Skip to content
This repository was archived by the owner on Oct 7, 2023. It is now read-only.

Commit 2c1fc45

Browse files
committed
Resources: Add zh-rCN & zh-rTW language support
SettingsActivity: Hide password Project: Bump to 0.1.1 (2) Signed-off-by: Fung <[email protected]>
1 parent 1c91990 commit 2c1fc45

File tree

5 files changed

+85
-4
lines changed

5 files changed

+85
-4
lines changed

app/src/main/kotlin/moe/feng/scut/autowifi/SettingsActivity.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SettingsActivity : PreferenceActivity(), Preference.OnPreferenceChangeList
3737
prefUsername.text = Hawk.get("username", "")
3838
prefPassword.text = Hawk.get("password", "")
3939
if (!prefUsername.text.isNullOrEmpty()) prefUsername.summary = prefUsername.text
40-
if (!prefPassword.text.isNullOrEmpty()) prefPassword.summary = prefPassword.text
40+
if (!prefPassword.text.isNullOrEmpty()) prefPassword.summary = getString(R.string.pref_account_user_pwd_saved)
4141

4242
var versionName: String? = null
4343
var versionCode = 0
@@ -66,7 +66,9 @@ class SettingsActivity : PreferenceActivity(), Preference.OnPreferenceChangeList
6666
prefPassword -> {
6767
Hawk.put("password", newValue as String)
6868
preference.summary =
69-
if (newValue.isNullOrEmpty()) getString(R.string.pref_account_user_pwd_hint) else newValue
69+
if (newValue.isNullOrEmpty())
70+
getString(R.string.pref_account_user_pwd_hint)
71+
else getString(R.string.pref_account_user_pwd_saved)
7072
}
7173
}
7274
return !(newValue is Boolean && !newValue)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<resources>
2+
3+
<string name="app_name">SCUTAutoWiFi</string>
4+
5+
<string name="status_text_format">状态: %s</string>
6+
<string name="status_text_mobile_connected">使用移动网络</string>
7+
<string name="status_text_disconnected">未连接</string>
8+
<string name="status_text_wifi_connected_other">已连接 (其它网络: %s).</string>
9+
<string name="status_text_wifi_connecting">连接中&#8230;</string>
10+
<string name="status_text_wifi_connected_scut">已连接 (SCUT-Student),需要登录</string>
11+
<string name="status_text_wifi_connected_scut_logon">已连接并登录 (SCUT-Student)</string>
12+
13+
<string name="dialog_no_account">没有帐号</string>
14+
<string name="dialog_no_account_msg">请移步到设置添加你的帐号。</string>
15+
16+
<string name="dialog_connected_wifi_but_not_scut">切换到 SCUT WiFi</string>
17+
<string name="dialog_connected_wifi_but_not_scut_msg">你正在使用其它网络,这个应用不支持自动登录。你确定要切换到 SCUT WiFi 吗?</string>
18+
19+
<!-- Settings -->
20+
<string name="title_activity_settings">设置</string>
21+
22+
<string name="pref_account_header">SCUT 网络帐号</string>
23+
<string name="pref_account_user_name">用户名</string>
24+
<string name="pref_account_user_name_hint">通常使用学生 ID 作为帐号</string>
25+
<string name="pref_account_user_pwd">密码</string>
26+
<string name="pref_account_user_pwd_hint">输入你的密码</string>
27+
<string name="pref_account_user_pwd_saved">已保存</string>
28+
29+
<string name="pref_about_header">关于</string>
30+
<string name="pref_about_github">GitHub 仓库</string>
31+
<string name="pref_about_github_url">https://github.com/fython/SCUTAutoWiFi-Android</string>
32+
<string name="pref_about_author_telegram">作者 Telegram</string>
33+
<string name="pref_about_author_telegram_url">https://t.me/fython</string>
34+
<string name="pref_about_author_email">通过邮箱联系</string>
35+
<string name="pref_about_author_email_url">fythonx\@gmail.com</string>
36+
<string name="pref_about_alipay_donate">捐赠</string>
37+
<string name="pref_about_alipay_donate_url">316643843\@qq.com</string>
38+
39+
</resources>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<resources>
2+
3+
<string name="app_name">SCUTAutoWiFi</string>
4+
5+
<string name="status_text_format">狀態: %s</string>
6+
<string name="status_text_mobile_connected">使用行動網路</string>
7+
<string name="status_text_disconnected">未連接</string>
8+
<string name="status_text_wifi_connected_other">已連接 (其他網路: %s).</string>
9+
<string name="status_text_wifi_connecting">連接中&#8230;</string>
10+
<string name="status_text_wifi_connected_scut">已連接 (SCUT-Student),需要登錄</string>
11+
<string name="status_text_wifi_connected_scut_logon">已連接並登錄 (SCUT-Student)</string>
12+
13+
<string name="dialog_no_account">沒有帳戶</string>
14+
<string name="dialog_no_account_msg">請移步到設定並添加你的帳戶。</string>
15+
16+
<string name="dialog_connected_wifi_but_not_scut">切換到 SCUT WiFi</string>
17+
<string name="dialog_connected_wifi_but_not_scut_msg">你正在使用其他網路,這個程式不支援自動登錄。你確定要切換到 SCUT WiFi 嗎?</string>
18+
19+
<!-- Settings -->
20+
<string name="title_activity_settings">設定</string>
21+
22+
<string name="pref_account_header">SCUT 網路帳戶</string>
23+
<string name="pref_account_user_name">用戶名</string>
24+
<string name="pref_account_user_name_hint">通常使用學生 ID 作為用戶名</string>
25+
<string name="pref_account_user_pwd">密碼</string>
26+
<string name="pref_account_user_pwd_hint">輸入你的密碼</string>
27+
<string name="pref_account_user_pwd_saved">已保存</string>
28+
29+
<string name="pref_about_header">關於</string>
30+
<string name="pref_about_github">GitHub 倉庫</string>
31+
<string name="pref_about_github_url">https://github.com/fython/SCUTAutoWiFi-Android</string>
32+
<string name="pref_about_author_telegram">作者 Telegram</string>
33+
<string name="pref_about_author_telegram_url">https://t.me/fython</string>
34+
<string name="pref_about_author_email">通過郵箱聯絡</string>
35+
<string name="pref_about_author_email_url">fythonx\@gmail.com</string>
36+
<string name="pref_about_alipay_donate">捐贈</string>
37+
<string name="pref_about_alipay_donate_url">316643843\@qq.com</string>
38+
39+
</resources>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<string name="pref_account_user_name_hint">Mostly use Student ID as username</string>
2626
<string name="pref_account_user_pwd">Password</string>
2727
<string name="pref_account_user_pwd_hint">Enter your password</string>
28+
<string name="pref_account_user_pwd_saved">Saved</string>
2829

2930
<string name="pref_about_header">About</string>
3031
<string name="pref_about_github">GitHub Repository</string>

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BUILD_TOOLS_VERSION=25.0.2
22
org.gradle.jvmargs=-Xmx1536m
3-
VERSION_NAME=0.1.0
3+
VERSION_NAME=0.1.1
44
TARGET_SDK_VERSION=25
5-
VERSION_CODE=1
5+
VERSION_CODE=2
66
MIN_SDK_VERSION=21

0 commit comments

Comments
 (0)