From d8fabbaf6d3539b873412f4e9777ec2b2a7a0bf8 Mon Sep 17 00:00:00 2001 From: Takashi Matsuoka Date: Mon, 22 Mar 2021 16:40:16 +0900 Subject: [PATCH 1/3] Add Japanese string --- .../cc/seeed/iot/activity/GrovesActivity.java | 2 +- .../cc/seeed/iot/activity/HelpActivity.java | 2 +- .../iot/activity/NodeSettingActivity.java | 6 +- .../iot/activity/SelectServerActivity.java | 2 +- .../iot/activity/SetupDeviceActivity.java | 8 +- .../add_step/Step01GoReadyActivity.java | 10 +- .../add_step/Step02WifiListActivity.java | 4 +- .../add_step/Step03WifiWioListActivity.java | 4 +- .../iot/activity/user/BindEmailActivity.java | 4 +- .../iot/activity/user/ResetPwd01Activity.java | 2 +- .../iot/activity/user/ResetPwd03Activity.java | 6 +- .../cc/seeed/iot/fragment/LoginFragment.java | 4 +- .../cc/seeed/iot/fragment/RegistFragment.java | 8 +- .../seeed/iot/ui_main/MainScreenActivity.java | 2 +- .../iot/ui_main/MainSettingActivity.java | 10 +- .../iot/ui_main/NodeListRecyclerAdapter.java | 4 +- .../res/layout/activity_login_and_regist.xml | 20 +++- .../main/res/layout/activity_node_setting.xml | 4 +- .../main/res/layout/activity_sel_server.xml | 27 ++---- app/src/main/res/layout/activity_setting.xml | 4 +- .../main/res/layout/dialog_edit_node_name.xml | 30 +++--- .../main/res/layout/dialog_edit_wifi_pwd.xml | 6 +- app/src/main/res/layout/fragment_login.xml | 8 +- app/src/main/res/layout/fragment_regist.xml | 12 +-- .../res/layout/include_list_viewpager.xml | 4 +- app/src/main/res/layout/item_node1.xml | 2 +- app/src/main/res/layout/menu_layout.xml | 16 ++-- .../res/layout/step01_go_ready_activity.xml | 4 +- app/src/main/res/layout/step_view_layout.xml | 12 +-- app/src/main/res/values-ja/strings.xml | 67 +++++++++++++ app/src/main/res/values/strings.xml | 93 +++++++++++++------ 31 files changed, 245 insertions(+), 142 deletions(-) create mode 100644 app/src/main/res/values-ja/strings.xml diff --git a/app/src/main/java/cc/seeed/iot/activity/GrovesActivity.java b/app/src/main/java/cc/seeed/iot/activity/GrovesActivity.java index 47c668a..2503340 100644 --- a/app/src/main/java/cc/seeed/iot/activity/GrovesActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/GrovesActivity.java @@ -95,7 +95,7 @@ protected void onCreate(Bundle savedInstanceState) { private void initView() { setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.groves); + getSupportActionBar().setTitle(R.string.menu_grove_list); init(); if (mLvGroves != null) { mAdapter = new GrovesAdapter(this, mGroveDrivers); diff --git a/app/src/main/java/cc/seeed/iot/activity/HelpActivity.java b/app/src/main/java/cc/seeed/iot/activity/HelpActivity.java index 8cefb8a..4a701c6 100644 --- a/app/src/main/java/cc/seeed/iot/activity/HelpActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/HelpActivity.java @@ -101,7 +101,7 @@ private void initDate() { private void initView() { setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.help_toolbar); + getSupportActionBar().setTitle(R.string.menu_support); } /* @Override 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 6989f0f..34ff8fd 100644 --- a/app/src/main/java/cc/seeed/iot/activity/NodeSettingActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/NodeSettingActivity.java @@ -79,7 +79,7 @@ public void onCreate(Bundle savedInstanceState) { private void initView() { setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(getString(R.string.toolBar_title)); + getSupportActionBar().setTitle(getString(R.string.node_setting_activity_title)); } private void initData() { @@ -93,7 +93,7 @@ private void initData() { mTvName.setText(node.name); if (TextUtils.isEmpty(node.dataxserver)) { - mTvConnectServer.setText(R.string.not_set); + mTvConnectServer.setText(R.string.node_setting_activity_data_exchange_server_empty); } else { mTvConnectServer.setText(node.dataxserver); } @@ -135,7 +135,7 @@ public void okClick(Dialog dialog, String content) { } private void saveUrl() { - DialogUtils.showEditOneRowDialog(NodeSettingActivity.this, "Customized Server","", new DialogUtils.ButtonEditClickListenter() { + DialogUtils.showEditOneRowDialog(NodeSettingActivity.this, getString(R.string.data_exchange_server),"", new DialogUtils.ButtonEditClickListenter() { @Override public void okClick(Dialog dialog, String content) { if (TextUtils.isEmpty(content)) { diff --git a/app/src/main/java/cc/seeed/iot/activity/SelectServerActivity.java b/app/src/main/java/cc/seeed/iot/activity/SelectServerActivity.java index dacdf97..861d7e4 100644 --- a/app/src/main/java/cc/seeed/iot/activity/SelectServerActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/SelectServerActivity.java @@ -83,7 +83,7 @@ private void initView() { mEtCustomServer.addTextChangedListener(this); setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.choose_server_toolbar); + getSupportActionBar().setTitle(R.string.select_server_activity_title); } private void initData() { 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 9ecca4d..25f4b39 100644 --- a/app/src/main/java/cc/seeed/iot/activity/SetupDeviceActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/SetupDeviceActivity.java @@ -363,10 +363,10 @@ public boolean onOptionsItemSelected(MenuItem item) { return true; } else if (id == R.id.update) { List menu = new ArrayList<>(); - menu.add("View API"); - menu.add("Device Setting"); - menu.add("Change Wi-Fi Network"); - menu.add("Help"); + menu.add(getResources().getString(R.string.menu_view_api)); + menu.add(getResources().getString(R.string.menu_device_setting)); + menu.add(getResources().getString(R.string.menu_change_wifi)); + menu.add(getResources().getString(R.string.menu_help)); DialogUtils.showMenuPopWindow(this, mToolbar, menu, new DialogUtils.OnMenuItemChickListener() { @Override public void chickItem(View v, int position) { diff --git a/app/src/main/java/cc/seeed/iot/activity/add_step/Step01GoReadyActivity.java b/app/src/main/java/cc/seeed/iot/activity/add_step/Step01GoReadyActivity.java index 589de88..e8723d6 100644 --- a/app/src/main/java/cc/seeed/iot/activity/add_step/Step01GoReadyActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/add_step/Step01GoReadyActivity.java @@ -66,7 +66,7 @@ private void initToolBar() { setSupportActionBar(mToolbar); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.add_device_step01_link_title); + getSupportActionBar().setTitle(R.string.step01_go_ready_activity_title_wio_link); } } @@ -83,17 +83,17 @@ private void initData() { case Constant.WIO_LINK_V1_0: mIvCourse.setImageResource(R.mipmap.link_config); if (node != null) { - getSupportActionBar().setTitle(R.string.add_device_step01_change_wifi); + getSupportActionBar().setTitle(R.string.step01_go_ready_activity_title_change_wifi); } else { - getSupportActionBar().setTitle(R.string.add_device_step01_link_title); + getSupportActionBar().setTitle(R.string.step01_go_ready_activity_title_wio_link); } break; case Constant.WIO_NODE_V1_0: mIvCourse.setImageResource(R.mipmap.node_config); if (node != null) { - getSupportActionBar().setTitle(R.string.add_device_step01_change_wifi); + getSupportActionBar().setTitle(R.string.step01_go_ready_activity_title_change_wifi); } else { - getSupportActionBar().setTitle(R.string.add_device_step01_node_title); + getSupportActionBar().setTitle(R.string.step01_go_ready_activity_title_wio_node); } break; } diff --git a/app/src/main/java/cc/seeed/iot/activity/add_step/Step02WifiListActivity.java b/app/src/main/java/cc/seeed/iot/activity/add_step/Step02WifiListActivity.java index 19122bd..563bf72 100644 --- a/app/src/main/java/cc/seeed/iot/activity/add_step/Step02WifiListActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/add_step/Step02WifiListActivity.java @@ -106,7 +106,7 @@ protected void onCreate(Bundle savedInstanceState) { private void initToolBar() { setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.title_wifi_list_activity); + getSupportActionBar().setTitle(R.string.step02_wifi_list_activity_title); } private void initData() { @@ -219,7 +219,7 @@ public void onItem(View caller) { int position = mWifiListView.getChildLayoutPosition(caller); scanResult = mWifiListAdapter.getItem(position); final String oldPwd = App.getSp().getString(scanResult.SSID, ""); - DialogUtils.showEditOneRowDialog(Step02WifiListActivity.this, "Enter Wifi Password", oldPwd, new DialogUtils.ButtonEditClickListenter() { + DialogUtils.showEditOneRowDialog(Step02WifiListActivity.this, getString(R.string.msg_enter_wifi_password), oldPwd, new DialogUtils.ButtonEditClickListenter() { @Override public void okClick(Dialog dialog, String pwd) { MobclickAgent.onEvent(Step02WifiListActivity.this, "17003"); diff --git a/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java b/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java index df7d18e..9569a4e 100644 --- a/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java @@ -106,11 +106,11 @@ protected void onCreate(Bundle savedInstanceState) { private void initToolBar() { setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.title_wio_activity); + getSupportActionBar().setTitle(R.string.step03_wifi_wio_list_activity_title); } private void initData() { - mTvTip.setText(R.string.is_config_mode); + mTvTip.setText(R.string.msg_check_wio_is_in_config_mode); mStepView.setDoingStep(2); if (mWifiListView != null) { mWifiListView.setHasFixedSize(true); diff --git a/app/src/main/java/cc/seeed/iot/activity/user/BindEmailActivity.java b/app/src/main/java/cc/seeed/iot/activity/user/BindEmailActivity.java index 879caf0..3bfdd53 100644 --- a/app/src/main/java/cc/seeed/iot/activity/user/BindEmailActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/user/BindEmailActivity.java @@ -82,11 +82,11 @@ private void login() { String email = mEtEmail.getText().toString().trim(); String pwd = mEtPwd.getText().toString().trim(); if (!RegularUtils.isEmail(email)) { - mEtEmail.setError(getString(R.string.email_format_error)); + mEtEmail.setError(getString(R.string.msg_email_format_error)); mEtEmail.requestFocus(); return; } else if (TextUtils.isEmpty(pwd) || pwd.length() < 6) { - mEtPwd.setError(getString(R.string.pwd_format_error)); + mEtPwd.setError(getString(R.string.msg_password_too_short_error)); mEtPwd.requestFocus(); return; } else { diff --git a/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd01Activity.java b/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd01Activity.java index 8d9c5fc..7f12d24 100644 --- a/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd01Activity.java +++ b/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd01Activity.java @@ -57,7 +57,7 @@ private void initData() { public void resetEmail() { String email = mEtEmail.getText().toString().trim(); if (!RegularUtils.isEmail(email)) { - mEtEmail.setError(getString(R.string.email_format_error)); + mEtEmail.setError(getString(R.string.msg_email_format_error)); mEtEmail.requestFocus(); return; } diff --git a/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd03Activity.java b/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd03Activity.java index bdb7578..659dbc3 100644 --- a/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd03Activity.java +++ b/app/src/main/java/cc/seeed/iot/activity/user/ResetPwd03Activity.java @@ -59,18 +59,18 @@ public void resetPwd() { String pwd = mEtPwd.getText().toString().trim(); String rePwd = mEtRePwd.getText().toString().trim(); if (TextUtils.isEmpty(pwd) || pwd.length() < 6) { - mEtPwd.setError(getString(R.string.pwd_format_error)); + mEtPwd.setError(getString(R.string.msg_password_too_short_error)); mEtPwd.requestFocus(); return; } if (TextUtils.isEmpty(rePwd) || rePwd.length() < 6) { - mEtRePwd.setError(getString(R.string.pwd_format_error)); + mEtRePwd.setError(getString(R.string.msg_password_too_short_error)); mEtRePwd.requestFocus(); return; } else { if (!rePwd.equals(pwd)) { - mEtRePwd.setError(getString(R.string.pwd_dont_match_error)); + mEtRePwd.setError(getString(R.string.msg_password_dont_match_error)); mEtRePwd.requestFocus(); return; } diff --git a/app/src/main/java/cc/seeed/iot/fragment/LoginFragment.java b/app/src/main/java/cc/seeed/iot/fragment/LoginFragment.java index f99de56..077e430 100644 --- a/app/src/main/java/cc/seeed/iot/fragment/LoginFragment.java +++ b/app/src/main/java/cc/seeed/iot/fragment/LoginFragment.java @@ -80,11 +80,11 @@ private void login() { String email = mEtEmail.getText().toString().trim(); String pwd = mEtPwd.getText().toString().trim(); if (!RegularUtils.isEmail(email)) { - mEtEmail.setError(getString(R.string.email_format_error)); + mEtEmail.setError(getString(R.string.msg_email_format_error)); mEtEmail.requestFocus(); return; } else if (TextUtils.isEmpty(pwd) || pwd.length() < 6) { - mEtPwd.setError(getString(R.string.pwd_format_error)); + mEtPwd.setError(getString(R.string.msg_password_too_short_error)); mEtPwd.requestFocus(); return; } else { diff --git a/app/src/main/java/cc/seeed/iot/fragment/RegistFragment.java b/app/src/main/java/cc/seeed/iot/fragment/RegistFragment.java index 0d14f1f..f34e1e4 100644 --- a/app/src/main/java/cc/seeed/iot/fragment/RegistFragment.java +++ b/app/src/main/java/cc/seeed/iot/fragment/RegistFragment.java @@ -63,23 +63,23 @@ public void regiest() { String pwd = mEtPwd.getText().toString().trim(); String rePwd = mEtRePwd.getText().toString().trim(); if (!RegularUtils.isEmail(email)) { - mEtEmail.setError(getString(R.string.email_format_error)); + mEtEmail.setError(getString(R.string.msg_email_format_error)); mEtEmail.requestFocus(); return; } if (TextUtils.isEmpty(pwd) || pwd.length() < 6) { - mEtPwd.setError(getString(R.string.pwd_format_error)); + mEtPwd.setError(getString(R.string.msg_password_too_short_error)); mEtPwd.requestFocus(); return; } if (TextUtils.isEmpty(rePwd) || rePwd.length() < 6) { - mEtRePwd.setError(getString(R.string.pwd_format_error)); + mEtRePwd.setError(getString(R.string.msg_password_too_short_error)); mEtRePwd.requestFocus(); return; } else { if (!rePwd.equals(pwd)) { - mEtRePwd.setError(getString(R.string.pwd_dont_match_error)); + mEtRePwd.setError(getString(R.string.msg_password_dont_match_error)); mEtRePwd.requestFocus(); return; } diff --git a/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java b/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java index 44b5b29..e011add 100644 --- a/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java +++ b/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java @@ -202,7 +202,7 @@ public void onRefresh() { if (ab != null) { ab.setHomeAsUpIndicator(R.mipmap.menu); ab.setDisplayHomeAsUpEnabled(true); - ab.setTitle("Devices"); + ab.setTitle(R.string.main_screen_activity_title); } toolbar.setOnClickListener(this); diff --git a/app/src/main/java/cc/seeed/iot/ui_main/MainSettingActivity.java b/app/src/main/java/cc/seeed/iot/ui_main/MainSettingActivity.java index a8d2f25..8b82440 100644 --- a/app/src/main/java/cc/seeed/iot/ui_main/MainSettingActivity.java +++ b/app/src/main/java/cc/seeed/iot/ui_main/MainSettingActivity.java @@ -47,7 +47,7 @@ public void onCreate(Bundle savedInstanceState) { public void initToolBar() { setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle("Setting"); + getSupportActionBar().setTitle(R.string.menu_setting); } private void initData(){ @@ -61,13 +61,13 @@ private void initData(){ }*/ if (CommonUrl.OTA_CHINA_URL.equals(serverUrl)) { - mTvConnectServer.setText(serverUrl+"("+getString(R.string.server_chinese)+")"); + mTvConnectServer.setText(getString(R.string.server_chinese)); } else if (CommonUrl.OTA_INTERNATIONAL_URL.equals(serverUrl)) { - mTvConnectServer.setText(serverUrl+"("+getString(R.string.server_global)+")"); + mTvConnectServer.setText(getString(R.string.server_global)); } else if (CommonUrl.OTA_INTERNATIONAL_OLD_URL.equals(serverUrl)) { - mTvConnectServer.setText(serverUrl+"("+getString(R.string.server_old_global)+")"); + mTvConnectServer.setText(getString(R.string.server_old_global)); } else { - mTvConnectServer.setText(serverUrl+"("+getString(R.string.server_customize)+")"); + mTvConnectServer.setText(getString(R.string.server_customize)+"\n"+serverUrl); } } diff --git a/app/src/main/java/cc/seeed/iot/ui_main/NodeListRecyclerAdapter.java b/app/src/main/java/cc/seeed/iot/ui_main/NodeListRecyclerAdapter.java index 7ef3210..8362a04 100644 --- a/app/src/main/java/cc/seeed/iot/ui_main/NodeListRecyclerAdapter.java +++ b/app/src/main/java/cc/seeed/iot/ui_main/NodeListRecyclerAdapter.java @@ -108,10 +108,10 @@ public void onBindViewHolder(MainViewHolder holder, final int position) { } holder.mTvTitle.setText(TextUtils.isEmpty(node.name) ? "Wio Link" + position + 1 : node.name); if (node.online) { - holder.mTvState.setText(R.string.online); + holder.mTvState.setText(R.string.online_u); holder.mTvState.setBackgroundResource(R.drawable.online_state_bg); } else { - holder.mTvState.setText(R.string.offline); + holder.mTvState.setText(R.string.offline_u); holder.mTvState.setBackgroundResource(R.drawable.offline_state_bg); } diff --git a/app/src/main/res/layout/activity_login_and_regist.xml b/app/src/main/res/layout/activity_login_and_regist.xml index 3c39694..5acd653 100644 --- a/app/src/main/res/layout/activity_login_and_regist.xml +++ b/app/src/main/res/layout/activity_login_and_regist.xml @@ -91,7 +91,7 @@ android:layout_centerInParent="true" android:layout_marginTop="1dp" android:singleLine="true" - android:text="SIGN UP" + android:text="@string/registration" android:textColor="#ffffff" android:textSize="16sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> @@ -118,7 +118,7 @@ android:layout_centerInParent="true" android:layout_marginTop="1dp" android:singleLine="true" - android:text="LOG IN" + android:text="@string/login" android:textColor="#b2ffffff" android:textSize="16sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> @@ -192,7 +192,19 @@ android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginRight="3dp" - android:text="Server Location:" + android:text="@string/server_location" + android:textColor="#9B9B9B" + android:textSize="14sp" + app:cusTextFont="@string/Proxima_Nova_Semibold" /> + + @@ -202,7 +214,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="10dp" - android:text="Global" + android:text="-" android:textColor="#FF252C59" android:textSize="14sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> diff --git a/app/src/main/res/layout/activity_node_setting.xml b/app/src/main/res/layout/activity_node_setting.xml index d8c8e4b..7645e1e 100644 --- a/app/src/main/res/layout/activity_node_setting.xml +++ b/app/src/main/res/layout/activity_node_setting.xml @@ -53,7 +53,7 @@ @@ -87,8 +87,8 @@ diff --git a/app/src/main/res/layout/activity_sel_server.xml b/app/src/main/res/layout/activity_sel_server.xml index 9497c57..e9ff3f5 100644 --- a/app/src/main/res/layout/activity_sel_server.xml +++ b/app/src/main/res/layout/activity_sel_server.xml @@ -31,7 +31,7 @@ android:id="@+id/mTvSave" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Save" + android:text="@string/save" android:textColor="#ADB0C3" android:textSize="14sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> @@ -51,10 +51,9 @@ @@ -82,18 +81,10 @@ Choosing Customized Server if you plan to run your data on your own server." android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15dp" - android:text="Global Server" + android:text="@string/server_global" android:textColor="#333333" android:textSize="16sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> - @@ -156,10 +147,10 @@ Choosing Customized Server if you plan to run your data on your own server." android:layout_height="wrap_content" /> @@ -183,10 +174,10 @@ Choosing Customized Server if you plan to run your data on your own server." android:layout_height="wrap_content" /> diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml index 0815211..8374fb4 100644 --- a/app/src/main/res/layout/activity_setting.xml +++ b/app/src/main/res/layout/activity_setting.xml @@ -52,7 +52,7 @@ @@ -86,8 +86,8 @@ diff --git a/app/src/main/res/layout/dialog_edit_node_name.xml b/app/src/main/res/layout/dialog_edit_node_name.xml index fcb4b67..2c5e84b 100644 --- a/app/src/main/res/layout/dialog_edit_node_name.xml +++ b/app/src/main/res/layout/dialog_edit_node_name.xml @@ -29,9 +29,9 @@ android:id="@+id/mTvHint" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_horizontal" android:layout_marginTop="18dp" - android:text="Your device is now ready!\r\n\r\n Name this device if you wish." + android:gravity="center_horizontal" + android:text="@string/dialog_edit_node_name_description" android:textColor="#777777" android:textSize="13sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> @@ -54,19 +54,19 @@ android:layout_height="wrap_content" android:layout_marginTop="20dp"> - + diff --git a/app/src/main/res/layout/dialog_edit_wifi_pwd.xml b/app/src/main/res/layout/dialog_edit_wifi_pwd.xml index d695666..cc14800 100644 --- a/app/src/main/res/layout/dialog_edit_wifi_pwd.xml +++ b/app/src/main/res/layout/dialog_edit_wifi_pwd.xml @@ -45,9 +45,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/white" - android:text="CANCEL" android:paddingTop="7dp" android:paddingBottom="5dp" + android:text="@string/cancel" android:textColor="#C7C7C7" android:textSize="14sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> @@ -56,10 +56,10 @@ android:id="@+id/mTvSubmit" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginLeft="29dp" android:paddingTop="7dp" android:paddingBottom="5dp" - android:layout_marginLeft="29dp" - android:text="SUBMIT" + android:text="@string/submit_u" android:textColor="#4A4A4A" android:textSize="14sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> diff --git a/app/src/main/res/layout/fragment_login.xml b/app/src/main/res/layout/fragment_login.xml index e9b272c..7917eca 100644 --- a/app/src/main/res/layout/fragment_login.xml +++ b/app/src/main/res/layout/fragment_login.xml @@ -43,7 +43,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" - android:hint="Email" + android:hint="@string/email_address" android:inputType="textEmailAddress" android:singleLine="true" android:textColor="#000000" @@ -77,7 +77,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" - android:hint="Password" + android:hint="@string/password" android:inputType="textPassword" android:singleLine="true" android:textColor="#000000" @@ -94,7 +94,7 @@ android:layout_marginTop="30dp" android:background="@drawable/btn_long_bg" android:elevation="5dp" - android:text="Login" + android:text="@string/login" android:textColor="@color/white" android:textSize="14sp" /> @@ -116,7 +116,7 @@ android:layout_marginTop="19dp" android:gravity="center_horizontal" android:singleLine="true" - android:text="Forget Password?" + android:text="@string/forget_your_password" android:textColor="#C7C7C7" android:textSize="12sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> diff --git a/app/src/main/res/layout/fragment_regist.xml b/app/src/main/res/layout/fragment_regist.xml index 71d6195..456541a 100644 --- a/app/src/main/res/layout/fragment_regist.xml +++ b/app/src/main/res/layout/fragment_regist.xml @@ -43,8 +43,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" + android:hint="@string/email_address" android:inputType="textEmailAddress" - android:hint="Email" android:singleLine="true" android:textColor="#000000" android:textColorHint="#FFC7C7C7" @@ -77,9 +77,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" + android:hint="@string/password" android:inputType="textPassword" android:singleLine="true" - android:hint="Password" android:textColor="#000000" android:textColorHint="#FFC7C7C7" android:textSize="14sp" @@ -105,9 +105,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" - android:singleLine="true" - android:hint="Re-enter Password" + android:hint="@string/re_enter_password" android:inputType="textPassword" + android:singleLine="true" android:textColor="#000000" android:textColorHint="#FFC7C7C7" android:textSize="14sp" @@ -119,10 +119,10 @@ android:id="@+id/mBtnRegist" android:layout_width="match_parent" android:layout_height="50dp" - android:elevation="5dp" android:layout_marginTop="30dp" android:background="@drawable/btn_long_bg" - android:text="REGISTER" + android:elevation="5dp" + android:text="@string/register" android:textColor="@color/white" android:textSize="14sp" /> diff --git a/app/src/main/res/layout/include_list_viewpager.xml b/app/src/main/res/layout/include_list_viewpager.xml index f2c51d1..d612332 100644 --- a/app/src/main/res/layout/include_list_viewpager.xml +++ b/app/src/main/res/layout/include_list_viewpager.xml @@ -87,7 +87,7 @@ android:layout_marginRight="43dp" android:layout_marginTop="83dp" android:gravity="center_horizontal" - android:text="@string/hint_not_device" + android:text="@string/msg_hint_not_device" android:textColor="#979797" android:textSize="16sp" android:visibility="visible" @@ -120,7 +120,7 @@ android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_marginTop="18dp" - android:text="CHOOSE A DEVICE TO START" + android:text="@string/msg_select_type_of_device" android:textColor="#FF4A4A4A" android:textSize="12sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> diff --git a/app/src/main/res/layout/item_node1.xml b/app/src/main/res/layout/item_node1.xml index 1fd2cf3..23c86ea 100644 --- a/app/src/main/res/layout/item_node1.xml +++ b/app/src/main/res/layout/item_node1.xml @@ -56,7 +56,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:text="CONNECTED" + android:text="@string/grove_connected_number" android:textColor="#FF9B9B9B" android:textSize="10sp" app:cusTextFont="@string/Proxima_Nova_Semibold" /> diff --git a/app/src/main/res/layout/menu_layout.xml b/app/src/main/res/layout/menu_layout.xml index 96cfaa3..bf3abea 100644 --- a/app/src/main/res/layout/menu_layout.xml +++ b/app/src/main/res/layout/menu_layout.xml @@ -63,7 +63,7 @@ + android:text="@string/menu_grove_list" /> + android:text="@string/menu_support" /> + android:layout_marginTop="10dp" + android:text="@string/menu_setting" /> + android:text="@string/menu_about" /> + android:text="@string/menu_feedback" /> + android:text="@string/menu_update_app" + android:visibility="visible" /> diff --git a/app/src/main/res/layout/step_view_layout.xml b/app/src/main/res/layout/step_view_layout.xml index 44d8d85..17a995c 100644 --- a/app/src/main/res/layout/step_view_layout.xml +++ b/app/src/main/res/layout/step_view_layout.xml @@ -46,9 +46,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/mIvStep1" - android:layout_toLeftOf="@id/mLLLine" - android:text="Step 1" android:layout_marginTop="5.6dp" + android:layout_toLeftOf="@id/mLLLine" + android:text="@string/step1" android:textColor="#FFFFFFFF" android:textSize="12sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> @@ -73,9 +73,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/mIvStep1" - android:layout_toLeftOf="@id/mLLLine" - android:text="Step 2" android:layout_marginTop="5.6dp" + android:layout_toLeftOf="@id/mLLLine" + android:text="@string/step2" android:textColor="#FFFFFFFF" android:textSize="12sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> @@ -101,9 +101,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/mIvStep1" - android:layout_toLeftOf="@id/mLLLine" - android:text="Step 3" android:layout_marginTop="5.6dp" + android:layout_toLeftOf="@id/mLLLine" + android:text="@string/step3" android:textColor="#FFFFFFFF" android:textSize="12sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml new file mode 100644 index 0000000..3959aa1 --- /dev/null +++ b/app/src/main/res/values-ja/strings.xml @@ -0,0 +1,67 @@ + + + グローバル + グローバル(旧) + 中国 + カスタム + 登録 + 登録 + ログイン + サーバーの場所: + パスワードを忘れた + Eメールアドレス + パスワード + パスワード再入力 + 保存 + 接続数 + 0 デバイス + "デバイス" + ログアウト + 次へ + ステップ1 + ステップ2 + ステップ3 + OK + キャンセル + デバイスを追加 + デバイス名 + データ交換サーバー + + 追加するデバイスを選択してください。 + Eメールアドレスのフォーマットが間違っています。正しいEメールアドレスを入力してください。 + パスワードが短すぎます。6文字以上を入力してください。 + パスワードが一致しません。入力し直してください。 + Wi-Fiのパスワードを入力してください。 + デバイスが設定モードになっていることを確認してください。\n青色LEDがふんわりと点滅していればOKです。 + デバイスが登録されていません。\nデバイスを追加してください。 + + Grove一覧 + サポート + 設定 + Wioアプリについて + 意見 + Wioアプリ更新 + + API + 設定 + Wi-Fi変更 + サポート + + + デバイス一覧 + サーバーを選択 + Wio Linkをセットアップ + Wio Nodeをセットアップ + 接続先Wi-Fiを変更 + 接続先Wi-Fi + デバイス + デバイス設定 + 未設定 + + + あなたの地域を選択してください。\n独自のサーバーを使うときは"カスタム"を選んで、サーバーのURLを入力してください。 + デバイスの追加が完了しました。\nデバイスの名前を入力してください。 + 登録 + デバイスを削除 + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bee3b5b..3296a7d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,12 +16,8 @@ OK - Cancel "You're accessing a page with an untrusted or invalid certificate. Do you want to continue?" hmmm..website looks wrong.. - hmmm..email address looks wrong.. - Password is too short (minimum is 6 characters) - Passwords don\'t match "e.g: https://wio.seeed.io or https://192.168.31.2" "Get your server's host address…" "loading…" @@ -30,10 +26,72 @@ Cancel FAQ NEXT - Global (new) + + Global Global (old) Chinese Customize + Registration + Register + Login + Server location + Forgot your password? + E-mail address + Password + Re-enter password + Save + ONLINE + OFFLINE + CONNECTED + 0 Devices + "Devices" + Logout + Next + Step 1 + Step 2 + Step 3 + SUBMIT + Cancel + ADD YOUR FIRST DEVICE + Device Name + Customized Server + + CHOOSE A DEVICE TO START + hmmm..email address looks wrong.. + Password is too short (minimum is 6 characters) + Passwords don\'t match + 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! + + Groves + Support + Setting + About + Feedback + Update App + + View API + Device Setting + Change Wi-Fi Network + Help + + + Devices + Choose a Server + Setup Your Wio Link + Setup Your Wio Node + Change Wi-Fi Networks + Connect to Wi-Fi Network + Connect to Wio Device + Device Setting + Not Set + + + 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. + Your device is now ready!\n\nName this device if you wish. + Start Wio-ing + Delete this device Section 1 @@ -80,12 +138,8 @@ test - ONLINE - OFFLINE Settings New Wio name - ADD YOUR FIRST DEVICE - You have not connected to any device yet,get started now! Confirm the exit @@ -131,7 +185,6 @@ - Connect to Wio Device Transmitting Configuration Setting Wio name… @@ -144,14 +197,10 @@ Update API Share API url to… - Grove List Can\'t connect server… Server on . Change? Make sure that location services turned on - Password - Connect Server - Log Out Authenticating … @@ -163,27 +212,15 @@ Password Recovery - Device Name - Customized Server - Delete this device - Device Setting Could not connection to Wi-Fi. Please check Wi-Fi password and try again\r\n\r\nError code:1021 Could not connect to Wio Wi-fi hotspot, please try again or manually choose Wio\'s Wi-Fi hotspot in system settings.\r\n\r\n Error code:1031 Please connect to Wi-Fi network before you start - Setup Your Wio Link - Setup Your Wio Node - Change Wi-Fi Networks Connect server… You are not connected to Wi-fi - - Connect to Wi-Fi Network - - Detail - Support Choose a Server
Because we are making changes our server architecture, our old Global Server will be terminated on September 1, 2016. At that time, all your data will be transferred automatically to new Global Server.

We highly recommend that you use our new Global Server for your new projects.]]>
Choose Display Grove @@ -197,13 +234,9 @@ Bind Email Authorization failure! Please ensure that the Wio app has location permissions turned on, and that your device has location services turned on. - Please check if Wio device is on configuration mode, in which the blue light appears as breathing. Check the firmware version… Sending Wi-Fi password to Wio… Waiting Wio get ip address… "Added on " - Not Set - 0 DEVICES - "DEVICES" Privacy Policy \ No newline at end of file From af31aeb1f8fd4f1d91ae01bc0e45798da3090f4c Mon Sep 17 00:00:00 2001 From: Takashi Matsuoka Date: Mon, 22 Mar 2021 18:06:12 +0900 Subject: [PATCH 2/3] Remove unused resources and code --- .../add_step/Step03WifiWioListActivity.java | 111 --------- .../activity/user/LoginAndRegistActivity.java | 1 - .../seeed/iot/ui_main/MainScreenActivity.java | 5 - .../java/cc/seeed/iot/util/DialogUtils.java | 1 - app/src/main/res/layout/ap_connect.xml | 4 +- app/src/main/res/layout/dialog_name_input.xml | 38 ---- .../main/res/layout/smartconfig_connect.xml | 117 ---------- .../res/layout/smartconfig_connect_backup.xml | 130 ----------- .../main/res/layout/smartconfig_connected.xml | 96 -------- app/src/main/res/layout/smartconfig_ready.xml | 31 --- app/src/main/res/menu/drawer_view.xml | 51 ----- app/src/main/res/menu/menu_main.xml | 9 - app/src/main/res/menu/menu_main2.xml | 9 - app/src/main/res/values-ja/strings.xml | 7 +- app/src/main/res/values/strings.xml | 215 ++++++------------ 15 files changed, 81 insertions(+), 744 deletions(-) delete mode 100644 app/src/main/res/layout/dialog_name_input.xml delete mode 100644 app/src/main/res/layout/smartconfig_connect.xml delete mode 100644 app/src/main/res/layout/smartconfig_connect_backup.xml delete mode 100644 app/src/main/res/layout/smartconfig_connected.xml delete mode 100644 app/src/main/res/layout/smartconfig_ready.xml delete mode 100644 app/src/main/res/menu/drawer_view.xml delete mode 100644 app/src/main/res/menu/menu_main.xml delete mode 100644 app/src/main/res/menu/menu_main2.xml diff --git a/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java b/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java index 9569a4e..5133a21 100644 --- a/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/add_step/Step03WifiWioListActivity.java @@ -264,117 +264,6 @@ public void wifiConnect(final String SSID) { mWaitDialog.setMessage("Connecting to " + SSID + "..."); mWaitDialog.setCanceledOnTouchOutside(false); mWaitDialog.show(); -// startTime = System.currentTimeMillis(); -// -// final Timer timer = new Timer(); -// timer.scheduleAtFixedRate(new TimerTask() { -// public void run() { -// flag++; -// if (flag >= TimeOutCount) { -// // TimeOutCount = App.getSp().getInt(Constant.SP_Connect_Wifi_TimeOut_Count, 30); -// if (TimeOutCount <= 60) { -// TimeOutCount += 15; -// } -// App.getSp().edit().putInt(Constant.SP_Connect_Wifi_TimeOut_Count, TimeOutCount).commit(); -// timer.cancel(); -// MLog.e(this, "超时"); -// runOnUiThread(new Runnable() { -// @Override -// public void run() { -// /* DialogUtils.showErrorDialog(Step03WifiWioListActivity.this, "Fail connect to Wio Wifi:1031", getString(R.string.dialog_btn_tryAgain), -// getString(R.string.dialog_btn_Cancel), getString(R.string.cont_connection_wio_wifi), new DialogUtils.OnErrorButtonClickListenter() { -// @Override -// public void okClick() { -// wifiConnect(SSID); -// timer.cancel(); -// } -// -// @Override -// public void cancelClick() { -// timer.cancel(); -// } -// });*/ -// AlertDialog dialog = new AlertDialog.Builder(Step03WifiWioListActivity.this) -// .setTitle("Fail connect to Wio Wi-Fi") -// .setMessage(getString(R.string.cont_connection_wio_wifi)) -// .setPositiveButton("Try again", new DialogInterface.OnClickListener() { -// @Override -// public void onClick(DialogInterface dialog, int which) { -// TimeOutCount = App.getSp().getInt(Constant.SP_Connect_Wifi_TimeOut_Count, 30); -// wifiConnect(SSID); -// timer.cancel(); -// ConnectCount++; -// } -// }) -// .setNeutralButton("Setting", new DialogInterface.OnClickListener() { -// @Override -// public void onClick(DialogInterface dialog, int which) { -// timer.cancel(); -// Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS); -// startActivityForResult(intent, SETTING_REQ_CODE); -// } -// }) -// .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { -// @Override -// -// public void onClick(DialogInterface dialog, int which) { -// timer.cancel(); -// } -// }).create(); -// // dialog.setCancelable(true); -// dialog.setCanceledOnTouchOutside(true); -// dialog.show(); -// -// dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setVisibility(View.VISIBLE); -// /* if (ConnectCount > 2) { -// dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setVisibility(View.VISIBLE); -// } else { -// dialog.getButton(AlertDialog.BUTTON_NEUTRAL).setVisibility(View.GONE); -// }*/ -// } -// }); -// -// if (mWaitDialog != null) { -// mWaitDialog.dismiss(); -// } -// } else { -// /* runOnUiThread(new Runnable() { -// @Override -// public void run() { -// if (!checkWifiIsExist(SSID)) { -// timer.cancel(); -// if (mWaitDialog != null) { -// mWaitDialog.dismiss(); -// } -// DialogUtils.showErrorDialog(Step03WifiWioListActivity.this, "WiFi not exist:1034", getString(R.string.dialog_btn_OK), -// null, "Equipment Wi-Fi hotspot does not exist", null); -// } -// } -// });*/ -// } -// if (WifiUtils.isWifiConnected(Step03WifiWioListActivity.thi s) && getCurrentSsid().equals("\"" + SSID + "\"")) { -// timer.cancel(); -// MLog.e(this, "连接成功"); -// if (mWaitDialog != null) { -// mWaitDialog.dismiss(); -// } -// Log.e(TAG, "###### connect success"); -// goStep04(); -// return; -// } else { -// // MLog.e(this, "连接失败"); -// } -// runOnUiThread(new Runnable() { -// @Override -// public void run() { -// mWaitDialog.setMessage("Connecting to " + SSID + " Wi-Fi (" + (TimeOutCount - flag) + ")"); -// } -// }); -// -// } -// } - -// , 1500, 1000); break; } } diff --git a/app/src/main/java/cc/seeed/iot/activity/user/LoginAndRegistActivity.java b/app/src/main/java/cc/seeed/iot/activity/user/LoginAndRegistActivity.java index 3579ce9..e4779f1 100644 --- a/app/src/main/java/cc/seeed/iot/activity/user/LoginAndRegistActivity.java +++ b/app/src/main/java/cc/seeed/iot/activity/user/LoginAndRegistActivity.java @@ -200,7 +200,6 @@ public void cancelClick() { return; } OtherPlatformUtils.getFacebookInfo(this, callbackManager, OtherPlatformUtils.LoginWithFacebook); - // dialog = DialogUtils.showProgressDialog(LoginAndRegistActivity.this, getString(R.string.loading_login)); break; case R.id.mRlSelectServer: startActivity(new Intent(LoginAndRegistActivity.this, SelectServerActivity.class)); diff --git a/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java b/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java index e011add..318c277 100644 --- a/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java +++ b/app/src/main/java/cc/seeed/iot/ui_main/MainScreenActivity.java @@ -612,11 +612,6 @@ public void onClick(DialogInterface dialog, int which) { return true; } Intent intent = new Intent(this, SetupDeviceActivity.class); - /* if (node.board.equals(Constant.WIO_LINK_V1_0)) { - intent.setClass(this, SetupIotLinkActivity.class); - } else if (node.board.equals(Constant.WIO_NODE_V1_0)) { - intent.setClass(this, SetupIotNodeActivity.class); - }*/ intent.putExtra("node_sn", node.node_sn); startActivity(intent); return true; diff --git a/app/src/main/java/cc/seeed/iot/util/DialogUtils.java b/app/src/main/java/cc/seeed/iot/util/DialogUtils.java index 910c5a2..5d0db99 100644 --- a/app/src/main/java/cc/seeed/iot/util/DialogUtils.java +++ b/app/src/main/java/cc/seeed/iot/util/DialogUtils.java @@ -210,7 +210,6 @@ public void onClick(View v) { if (mRbCustomServer.isChecked()) { String url = mEtCustomServer.getText().toString().trim(); if (!RegularUtils.isWebsite(url)) { - // App.showToastShrot(context.getString(R.string.website_format_error)); mEtCustomServer.setError(context.getResources().getString(R.string.website_format_hint), context.getDrawable(R.mipmap.edit_help)); return; } diff --git a/app/src/main/res/layout/ap_connect.xml b/app/src/main/res/layout/ap_connect.xml index d2cdfba..8f62cc5 100644 --- a/app/src/main/res/layout/ap_connect.xml +++ b/app/src/main/res/layout/ap_connect.xml @@ -36,10 +36,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/mIvLoading" - android:layout_marginTop="50dp" android:layout_centerHorizontal="true" + android:layout_marginTop="50dp" android:gravity="center_horizontal" - android:text="We are almost there!\r\nThis process will take about a minute." + android:text="We are almost there!\nThis process will take about a minute." android:textColor="#A6000000" android:textSize="14sp" app:cusTextFont="@string/Proxima_Nova_Regular" /> diff --git a/app/src/main/res/layout/dialog_name_input.xml b/app/src/main/res/layout/dialog_name_input.xml deleted file mode 100644 index ef5e27e..0000000 --- a/app/src/main/res/layout/dialog_name_input.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/smartconfig_connect.xml b/app/src/main/res/layout/smartconfig_connect.xml deleted file mode 100644 index 3f01656..0000000 --- a/app/src/main/res/layout/smartconfig_connect.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -