Commit 4f412318 authored by Max Lv's avatar Max Lv

Update localizations

parent 3ce7f7e9
......@@ -134,6 +134,10 @@
<!-- status -->
<string name="sent">发送:</string>
<string name="received">接收:</string>
<string name="vpn_connected">已连接, 轻触以检查连接状态</string>
<string name="nat_connected">已连接</string>
<string name="not_connected">未连接</string>
<string name="shutting_down">关闭连接中...</string>
<!-- kcp -->
<string name="kcp_summary">启用 KCP 协议</string>
......
......@@ -136,6 +136,11 @@
<!-- status -->
<string name="sent">傳送:</string>
<string name="received">接收:</string>
<string name="connecting">連線中...</string>
<string name="vpn_connected">已連線, 輕觸以檢查連線能力</string>
<string name="nat_connected">已連線</string>
<string name="not_connected">未連線</string>
<string name="shutting_down">關閉連線中...</string>
<!-- kcp -->
<string name="kcp_summary">啟用 KCP 協定</string>
......
......@@ -146,6 +146,11 @@
<!-- status -->
<string name="sent">Sent:</string>
<string name="received">Received:</string>
<string name="connecting">Connecting...</string>
<string name="vpn_connected">Connected, tap to check connection</string>
<string name="nat_connected">Connected</string>
<string name="not_connected">Not connected</string>
<string name="shutting_down">Shutting down...</string>
<!-- kcp -->
<string name="kcp" translatable="false">KCP</string>
......
......@@ -104,16 +104,16 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
case State.CONNECTING =>
fab.setImageResource(R.drawable.ic_start_busy)
fabProgressCircle.show()
statusText.setText("Connecting...")
statusText.setText(R.string.connecting)
case State.CONNECTED =>
if (state == State.CONNECTING) fabProgressCircle.beginFinalAnimation()
else fabProgressCircle.postDelayed(hideCircle, 1000)
fab.setImageResource(R.drawable.ic_start_connected)
statusText.setText(if (app.isNatEnabled) "Connected" else "Connected, tap to check connection")
statusText.setText(if (app.isNatEnabled) R.string.nat_connected else R.string.vpn_connected)
case State.STOPPING =>
fab.setImageResource(R.drawable.ic_start_busy)
if (state == State.CONNECTED) fabProgressCircle.show() // ignore for stopped
statusText.setText("Shutting down...")
statusText.setText(R.string.shutting_down)
case _ =>
fab.setImageResource(R.drawable.ic_start_idle)
fabProgressCircle.postDelayed(hideCircle, 1000)
......@@ -124,7 +124,7 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
snackbar.show()
Log.e(TAG, "Error to start VPN service: " + m)
}
statusText.setText("Not connected")
statusText.setText(R.string.not_connected)
}
state = s
if (state == State.CONNECTED) fab.setBackgroundTintList(greenTint) else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment