From 726e09e58585c332153bfc52803ae517c4c3ff0e Mon Sep 17 00:00:00 2001 From: Takashi Matsuoka Date: Sat, 27 Mar 2021 17:58:39 +0900 Subject: [PATCH] Add Japanese string --- .../java/cc/seeed/iot/activity/NodeSettingActivity.java | 6 +++--- .../java/cc/seeed/iot/activity/SetupDeviceActivity.java | 9 ++++----- app/src/main/java/cc/seeed/iot/logic/SystemLogic.java | 2 +- app/src/main/res/layout/activity_setup_device.xml | 8 ++++---- app/src/main/res/values-ja/strings.xml | 8 ++++++++ app/src/main/res/values/strings.xml | 9 ++++++++- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/cc/seeed/iot/activity/NodeSettingActivity.java b/app/src/main/java/cc/seeed/iot/activity/NodeSettingActivity.java index 34ff8fd..54110be 100644 --- a/app/src/main/java/cc/seeed/iot/activity/NodeSettingActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/NodeSettingActivity.java @@ -119,7 +119,7 @@ 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)) { @@ -127,7 +127,7 @@ public void okClick(Dialog dialog, String content) { 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); } } @@ -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) { diff --git a/app/src/main/java/cc/seeed/iot/activity/SetupDeviceActivity.java b/app/src/main/java/cc/seeed/iot/activity/SetupDeviceActivity.java index 25f4b39..3718f41 100644 --- a/app/src/main/java/cc/seeed/iot/activity/SetupDeviceActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/SetupDeviceActivity.java @@ -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); @@ -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) { @@ -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; } } diff --git a/app/src/main/java/cc/seeed/iot/logic/SystemLogic.java b/app/src/main/java/cc/seeed/iot/logic/SystemLogic.java index 2421e68..e3fd76d 100644 --- a/app/src/main/java/cc/seeed/iot/logic/SystemLogic.java +++ b/app/src/main/java/cc/seeed/iot/logic/SystemLogic.java @@ -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"); diff --git a/app/src/main/res/layout/activity_setup_device.xml b/app/src/main/res/layout/activity_setup_device.xml index 8760df8..a892fbf 100644 --- a/app/src/main/res/layout/activity_setup_device.xml +++ b/app/src/main/res/layout/activity_setup_device.xml @@ -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" /> @@ -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" /> @@ -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" /> @@ -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" /> diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index c97b77e..b93a1b2 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -27,6 +27,7 @@ デバイスを追加 デバイス名 データ交換サーバー + ゴミ箱 追加するデバイスを選択してください。 @@ -36,6 +37,11 @@ Wi-Fiのパスワードを入力してください。 デバイスが設定モードになっていることを確認してください。\n青色LEDがふんわりと点滅していればOKです。 デバイスが登録されていません。\nデバイスを追加してください。 + 読み込み中 + 設定変更後、ファームウェアの更新が必要です。 + Groveをコネクタへドラッグ&ドロップしてください。 + ファームウェアを更新中 + ファームウェアを更新しました。 Grove一覧 @@ -59,6 +65,7 @@ 接続先Wi-Fi デバイス デバイス設定 + デバイス名 未設定 @@ -66,5 +73,6 @@ デバイスの追加が完了しました。\nデバイスの名前を入力してください。 登録 デバイスを削除 + ファームウェアを更新 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e3664f1..9d61aa7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -40,6 +40,7 @@ ADD YOUR FIRST DEVICE Device Name Customized Server + Remove CHOOSE A DEVICE TO START @@ -49,6 +50,11 @@ Enter Wifi Password Please check if Wio device is on configuration mode, in which the blue light appears as breathing. You have not connected to any device yet,get started now! + "loading…" + New setting only applies after updating firmware + Drag and drop Groves you need to below ports + Preparing Server + Firmware Updated! Groves @@ -72,6 +78,7 @@ Connect to Wi-Fi Network Connect to Wio Device Device Setting + Edit Device Name Not Set @@ -79,6 +86,7 @@ Your device is now ready!\n\nName this device if you wish. Start Wio-ing Delete this device + Update Firmware @@ -86,7 +94,6 @@ OK "e.g: https://wio.seeed.io or https://192.168.31.2" "Get your server's host address…" - "loading…" Switch to International Your Email Detail