Commit c0829689 authored by Mygod's avatar Mygod

Refine traffic display

parent c3638b96
...@@ -74,8 +74,7 @@ ...@@ -74,8 +74,7 @@
<string name="ipv6_summary">向远程服务器转发 IPv6 流量</string> <string name="ipv6_summary">向远程服务器转发 IPv6 流量</string>
<string name="stat">网络流量</string> <string name="stat">网络流量</string>
<string name="stat_summary">发送:\t%1$s\t|\t接收:\t%2$s\n上传:\t%3$s\t|\t下载:\t%4$s</string> <string name="stat_summary">发送: \t%3$s\t↑\t%1$s/s\n接收: \t%4$s\t↓\t%2$s/s</string>
<string name="stat_profiles">\n已发送: \t%1$s\n已接收: \t%2$s</string>
<plurals name="bytes"> <plurals name="bytes">
<item quantity="other">字节</item> <item quantity="other">字节</item>
</plurals> </plurals>
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<string name="nat_summary">Use NAT mode instead of VPN mode</string> <string name="nat_summary">Use NAT mode instead of VPN mode</string>
<string name="nat_summary_no_root">NAT mode is disabled without root</string> <string name="nat_summary_no_root">NAT mode is disabled without root</string>
<string name="stat">Network Traffic</string> <string name="stat">Network Traffic</string>
<string name="stat_summary">Sent: \t%1$s\t|\tReceived: \t%2$s\nUpload: \t%3$s\t|\tDownload: \t%4$s</string> <string name="stat_summary">Sent: \t\t\t\t\t%3$s\t↑\t%1$s/s\nReceived: \t%4$s\t↓\t%2$s/s</string>
<string name="stat_profiles">\nTotal Sent: \t%1$s\nTotal Received: \t%2$s</string> <string name="stat_profiles">\n%1$s↑\t%2$s↓</string>
<plurals name="bytes"> <plurals name="bytes">
<item quantity="one">Byte</item> <item quantity="one">Byte</item>
<item quantity="other">Bytes</item> <item quantity="other">Bytes</item>
......
...@@ -74,15 +74,15 @@ object TrafficMonitor { ...@@ -74,15 +74,15 @@ object TrafficMonitor {
} }
def getTxRate(): String = { def getTxRate(): String = {
formatTraffic(txRate) + "/s" formatTraffic(txRate)
} }
def getRxRate(): String = { def getRxRate(): String = {
formatTraffic(rxRate) + "/s" formatTraffic(rxRate)
} }
def getRate(): String = { def getRate(): String = {
formatTraffic(txRate + rxRate) + "/s" formatTraffic(txRate + rxRate)
} }
} }
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