Initial draft.
@@ -0,0 +1,30 @@
|
||||
To add a translation or modify an existing translation for shadowsocks-android, follow these steps:
|
||||
|
||||
1. Look up the appropriate [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for your language. For example, `zh` is the language code for Chinese.
|
||||
2. Go to [Android source](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/) to see which region is supported by Android. (if you add a language that isn't supported by AOSP, there's a good chance that nobody will be ever able to use your translation) For example,
|
||||
Case 1: There are files named `values-zh-rCN/strings.xml`, `values-zh-rHK/strings.xml`, `values-zh-rTW/strings.xml` which stands for China, Hong Kong, and Taiwan respectively. Pick the most appropriate one.
|
||||
Case 2: There are folders named `values-ja` and `values-ja-rJP` but there isn't a file named `values-ja-rJP/strings.xml`. So you should use `values-ja` instead of `values-ja-rJP`.
|
||||
3. Add or change `src/main/res/values-[code]/strings.xml` and `src/main/res/values-[code]-v21/strings.xml` following the template of other languages.
|
||||
4. Create a pull request if you know how to use git/GitHub or somehow upload these two files to us if not.
|
||||
|
||||
If you want to test out your translation (see [`README.md`](https://github.com/shadowsocks/shadowsocks-android/blob/master/README.md) for compile instructions), it's likely that your translation will be removed by lint to shrink apk size. To add your language to the excluded list, you need to tweak [this line in `build.sbt`](https://github.com/shadowsocks/shadowsocks-android/blob/f70e905/build.sbt#L30) as well. For example:
|
||||
|
||||
```
|
||||
-resConfigs := Seq("jp", "ru", "zh-rCN", "zh-rTW")
|
||||
+resConfigs := Seq("ca", "jp", "ru", "zh-rCN", "zh-rTW")
|
||||
```
|
||||
|
||||
It would be appreciated if you keep them in alphabetical order. :stuck_out_tongue:
|
||||
|
||||
# Recent changes for strings.xml
|
||||
|
||||
shadowsocks-android adds features and therefore strings from time to time. You can come back and check changes here or at git log for [values](https://github.com/shadowsocks/shadowsocks-android/commits/master/src/main/res/values/strings.xml) and [values-v21](https://github.com/shadowsocks/shadowsocks-android/commits/master/src/main/res/values-v21/strings.xml).
|
||||
|
||||
* [20160918](https://github.com/shadowsocks/shadowsocks-android/commit/edda3179dd42c508d742b5a034f0f4fd136f9263): Changed `route_entry`.
|
||||
* [20160816](https://github.com/shadowsocks/shadowsocks-android/commit/80d93a84bdb9fb1bbe6184ed7babca2deb4fefcf): Add `tcp_fastopen_summary`, `tcp_fastopen_summary_unsupported`.
|
||||
* [20160805](https://github.com/shadowsocks/shadowsocks-android/commit/b9a33cf1db37fc4cc0deaf4e6ecf278e92a32df2): Add `kcp_summary`, `kcp_port`, `kcp_port_summary`, `kcpcli`, `kcpcli_summary` (already removed).
|
||||
* [20160718](https://github.com/shadowsocks/shadowsocks-android/commit/360b425d4768bf73ef3db4e37d793045dc4f3ad6): Add `method_unsafe`.
|
||||
* [20160703](https://github.com/shadowsocks/shadowsocks-android/commit/df09d391399449d356c83441dd38a35b51abf0be): Add `action_apply_all`.
|
||||
* [20160701](https://github.com/shadowsocks/shadowsocks-android/commit/0b3ee8b7937238025dbc9d6d6c03d78a55fbd2c4): Add `add_profile_scanner_permission_required`.
|
||||
* [20160617](https://github.com/shadowsocks/shadowsocks-android/commit/8e3af71696d72b0e39c4c57960cc1964d6fc39fa): Add `quick_switch`.
|
||||
* Older changes removed.
|
||||
Reference in New Issue
Block a user