Skip to content

Guidelines for translation contributors

Mygod edited this page Dec 28, 2016 · 11 revisions

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 for your language. For example, zh is the language code for Chinese.
  2. Go to Android source 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 (use English for commit message please) or somehow upload these two files to us if not.

If you want to test out your translation (see 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 as well. For example:

-resConfigs := Seq("ja", "ru", "zh-rCN", "zh-rTW")
+resConfigs := Seq("ca", "ja", "ru", "zh-rCN", "zh-rTW")

It would be appreciated if you keep them in alphabetical order. 😛

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 and values-v21.

  • TBD (#1027): Add profile_invalid_input, yes, no, profile_empty, edit, profile_config, unsaved_changes_prompt, apply, delete, delete_confirm_prompt, share_qr_nfc, connecting, vpn_connected, nat_connected, not_connected.
  • 20161202: Add remote_dns.
  • 20160918: Changed route_entry.
  • 20160816: Add tcp_fastopen_summary, tcp_fastopen_summary_unsupported.
  • 20160805: Add kcp_summary, kcp_port, kcp_port_summary, kcpcli, kcpcli_summary (already removed).
  • 20160718: Add method_unsafe.
  • 20160703: Add action_apply_all.
  • 20160701: Add add_profile_scanner_permission_required.
  • 20160617: Add quick_switch.
  • Older changes removed.
Clone this wiki locally