Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Add Japanese string
Browse files Browse the repository at this point in the history
  • Loading branch information
matsujirushi committed Mar 27, 2021
1 parent af31aeb commit 726e09e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ public void onClick(View view) {
}

private void reName() {
DialogUtils.showEditOneRowDialog(NodeSettingActivity.this, "Edit Device Name", "", new DialogUtils.ButtonEditClickListenter() {
DialogUtils.showEditOneRowDialog(NodeSettingActivity.this, getString(R.string.node_setting_activity_edit_device_name), "", new DialogUtils.ButtonEditClickListenter() {
@Override
public void okClick(Dialog dialog, String content) {
if (TextUtils.isEmpty(content)) {
App.showToastShrot("The device name can not be empty");
return;
} else {
dialog.dismiss();
progressDialog = DialogUtils.showProgressDialog(NodeSettingActivity.this, getString(R.string.loading));
progressDialog = DialogUtils.showProgressDialog(NodeSettingActivity.this, getString(R.string.msg_loading));
ConfigDeviceLogic.getInstance().nodeReName(node.node_sn, content);
}
}
Expand All @@ -152,7 +152,7 @@ public void okClick(Dialog dialog, String content) {
}

public void getIpAddress(final Activity context, final Dialog dialog, final String url) {
progressDialog = DialogUtils.showProgressDialog(context, getString(R.string.loading));
progressDialog = DialogUtils.showProgressDialog(context, getString(R.string.msg_loading));
NetworkUtils.getIpAddress(context, NetworkUtils.getDomainName(url), new NetworkUtils.OnIpCallback() {
@Override
public void okCallback(String ip) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public void cancelClick() {
mBtnUpdate.setEnabled(false);
mBtnUpdate.setSelected(false);
progressDialog = new CustomProgressDialog(this, R.style.AlertDialogBg);
setProgressMsg("Preparing Server (10%)");
setProgressMsg(getString(R.string.msg_update_firmware_in_progress) + " (10%)");
mRlRemove.setVisibility(View.GONE);
isUpdateIng = true;
ConfigDeviceLogic.getInstance().updateFirware(node.node_key, node_josn);
Expand Down Expand Up @@ -929,13 +929,12 @@ public void onEvent(String event, int ret, String errInfo, Object[] data) {
if (ret == ConfigDeviceLogic.UPDATE_DONE) {
stopUpdate();
old_node_josn = new NodeConfigHelper().getConfigJson(pinConfigs, node);
// DialogUtils.showErrorDialog(SetupIotLinkActivity.this, "", "OK", "", "Firware Updated!", null);
App.showToastShrot("Firmware Updated!");
App.showToastShrot(getString(R.string.msg_updated_firmware));
setUpdateButton();
} else if (ret == ConfigDeviceLogic.UPDATEING) {
if (progress <= 80) {
progress += 12;
setProgressMsg("Preparing Server (" + progress + "%)");
setProgressMsg(getString(R.string.msg_update_firmware_in_progress) + " (" + progress + "%)");
}
} else if (ret == ConfigDeviceLogic.FAIL) {
if (data != null && data.length > 0) {
Expand All @@ -950,7 +949,7 @@ public void onEvent(String event, int ret, String errInfo, Object[] data) {
showErrDialog(bean);
}
} else if (ret == ConfigDeviceLogic.SUCCESS) {
setProgressMsg("Preparing Server (40%)");
setProgressMsg(getString(R.string.msg_update_firmware_in_progress) + " (40%)");
progress = 40;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/cc/seeed/iot/logic/SystemLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public UpdateApkBean getUpdateApkBean() {

public void checkUpdateApk(final Context context, final boolean isNotice) {
// String url = "http://192.168.3.65/seeed/api/index.php?r=makermap/version/get-new-version-message";
final Dialog dialog = DialogUtils.showProgressDialog(context, context.getString(R.string.loading));
final Dialog dialog = DialogUtils.showProgressDialog(context, context.getString(R.string.msg_loading));
RequestParams params = new RequestParams();
params.put("type", 1);
params.put("app_name", "wio");
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_setup_device.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center"
android:text="Drag and drop Groves you need to below ports"
android:text="@string/msg_drag_and_drop_grove_to_port"
android:textColor="#777777"
android:textSize="12sp"
app:cusTextFont="@string/Proxima_Nova_Regular" />
Expand Down Expand Up @@ -80,7 +80,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center"
android:text="New setting only applies after updating firware"
android:text="@string/msg_new_setting_only_applies"
android:textColor="#c7c7c7"
android:textSize="12sp"
app:cusTextFont="@string/Proxima_Nova_Regular" />
Expand Down Expand Up @@ -116,7 +116,7 @@
android:layout_below="@id/mIvRemove"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Remove"
android:text="@string/trash_box"
android:textColor="#4a4a4a"
android:textSize="14sp"
app:cusTextFont="@string/Proxima_Nova_Semibold" />
Expand All @@ -130,7 +130,7 @@
android:background="@drawable/btn_update_firmware"
android:gravity="center"
android:textAllCaps="false"
android:text="Update Firmware"
android:text="@string/activity_setup_device_update_firmware"
android:textColor="#ffffff"
android:textSize="16sp"
app:cusTextFont="@string/Proxima_Nova_Semibold" />
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<string name="add_your_first_device">デバイスを追加</string>
<string name="device_name">デバイス名</string>
<string name="data_exchange_server">データ交換サーバー</string>
<string name="trash_box">ゴミ箱</string>

<!--Message-->
<string name="msg_select_type_of_device">追加するデバイスを選択してください。</string>
Expand All @@ -36,6 +37,11 @@
<string name="msg_enter_wifi_password">Wi-Fiのパスワードを入力してください。</string>
<string name="msg_check_wio_is_in_config_mode">デバイスが設定モードになっていることを確認してください。\n青色LEDがふんわりと点滅していればOKです。</string>
<string name="msg_hint_not_device">デバイスが登録されていません。\nデバイスを追加してください。</string>
<string name="msg_loading">読み込み中</string>
<string name="msg_new_setting_only_applies">設定変更後、ファームウェアの更新が必要です。</string>
<string name="msg_drag_and_drop_grove_to_port">Groveをコネクタへドラッグ&amp;ドロップしてください。</string>
<string name="msg_update_firmware_in_progress">ファームウェアを更新中</string>
<string name="msg_updated_firmware">ファームウェアを更新しました。</string>

<!--Menu-->
<string name="menu_grove_list">Grove一覧</string>
Expand All @@ -59,12 +65,14 @@
<string name="step02_wifi_list_activity_title">接続先Wi-Fi</string>
<string name="step03_wifi_wio_list_activity_title">デバイス</string>
<string name="node_setting_activity_title">デバイス設定</string>
<string name="node_setting_activity_edit_device_name">デバイス名</string>
<string name="node_setting_activity_data_exchange_server_empty">未設定</string>

<!--Specific View-->
<string name="activity_sel_server_description">あなたの地域を選択してください。\n独自のサーバーを使うときは"カスタム"を選んで、サーバーのURLを入力してください。</string>
<string name="dialog_edit_node_name_description">デバイスの追加が完了しました。\nデバイスの名前を入力してください。</string>
<string name="dialog_edit_node_name_submit">登録</string>
<string name="activity_node_setting_delete_device">デバイスを削除</string>
<string name="activity_setup_device_update_firmware">ファームウェアを更新</string>

</resources>
9 changes: 8 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<string name="add_your_first_device">ADD YOUR FIRST DEVICE</string>
<string name="device_name">Device Name</string>
<string name="data_exchange_server">Customized Server</string>
<string name="trash_box">Remove</string>

<!--Message-->
<string name="msg_select_type_of_device">CHOOSE A DEVICE TO START</string>
Expand All @@ -49,6 +50,11 @@
<string name="msg_enter_wifi_password">Enter Wifi Password</string>
<string name="msg_check_wio_is_in_config_mode">Please check if Wio device is on configuration mode, in which the blue light appears as breathing.</string>
<string name="msg_hint_not_device">You have not connected to any device yet,get started now!</string>
<string name="msg_loading">"loading…"</string>
<string name="msg_new_setting_only_applies">New setting only applies after updating firmware</string>
<string name="msg_drag_and_drop_grove_to_port">Drag and drop Groves you need to below ports</string>
<string name="msg_update_firmware_in_progress">Preparing Server</string>
<string name="msg_updated_firmware">Firmware Updated!</string>

<!--Menu-->
<string name="menu_grove_list">Groves</string>
Expand All @@ -72,21 +78,22 @@
<string name="step02_wifi_list_activity_title">Connect to Wi-Fi Network</string>
<string name="step03_wifi_wio_list_activity_title">Connect to Wio Device</string>
<string name="node_setting_activity_title">Device Setting</string>
<string name="node_setting_activity_edit_device_name">Edit Device Name</string>
<string name="node_setting_activity_data_exchange_server_empty">Not Set</string>

<!--Specific View-->
<string name="activity_sel_server_description">Simply choose your region, and Wio will recommend the fastest server for you.\nChoosing Customized Server if you plan to run your data on your own server.</string>
<string name="dialog_edit_node_name_description">Your device is now ready!\n\nName this device if you wish.</string>
<string name="dialog_edit_node_name_submit">Start Wio-ing</string>
<string name="activity_node_setting_delete_device">Delete this device</string>
<string name="activity_setup_device_update_firmware">Update Firmware</string>

<!-- =====Original===== -->

<!--common-->
<string name="ok">OK</string>
<string name="website_format_hint">"e.g: https://wio.seeed.io or https://192.168.31.2"</string>
<string name="hint_get_host_address">"Get your server's host address…"</string>
<string name="loading">"loading…"</string>
<string name="setup_switch_international">Switch to International</string>
<string name="signin_email">Your Email</string>
<string name="grove_detail">Detail</string>
Expand Down

0 comments on commit 726e09e

Please sign in to comment.