Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Chinese(zh-CN) support #937

Merged
merged 1 commit into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[main]
host = https://www.transifex.com
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,nl_BE:nl-rBE,nl_NL:nl-rNL,en_NL:en-rNL,lt_LT:lt,nb_NO:nb-rNO,ru_RU:ru-rRU,id:in
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,nl_BE:nl-rBE,nl_NL:nl-rNL,en_NL:en-rNL,lt_LT:lt,nb_NO:nb-rNO,ru_RU:ru-rRU,id:in
minimum_perc = 10

[runner-up-android.stringsxml]
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ android {
applicationId = rootProject.ext.applicationId
vectorDrawables.useSupportLibrary = true
//By default all AppCompat translations are included, saves 350KB
resConfigs "ar", "bs", "cs", "ca", "de", "en", "es", "fa", "fi", "fr", "hu", "id", "it", "ja", "lt", "nb", "nl", "pl", "pt", "ru", "sv", "tr"
resConfigs "ar", "bs", "cs", "ca", "de", "en", "es", "fa", "fi", "fr", "hu", "id", "it", "ja", "lt", "nb", "nl", "pl", "pt", "ru", "sv", "tr", "zh"
}

signingConfigs {
Expand Down
3 changes: 3 additions & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
<!-- Transifex refuses quantity="one" for tr,pl (gradle) lint requires it, Inspect allows both-->
<ignore path="res/values-tr/cues.xml" />
<ignore path="res/values-pl/cues.xml" />
<ignore path="res/values-zh/cues.xml" />
</issue>
<issue id="UnusedQuantity">
<ignore path="res/values-lt/cues.xml" />
<ignore path="res/values-zh/cues.xml" />
</issue>

<issue id="InvalidPackage">
<ignore regexp=".*okio.*" />
<ignore regexp=".*retrofit.*" />
Expand Down
70 changes: 70 additions & 0 deletions app/res/values-zh/cues.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<!--~ Copyright (C) 2014 jonas.oreland@gmail.com
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.-->
<string name="cue_activity">运动</string>
<string name="cue_interval">间隔</string>
<string name="cue_end_of_lap">分段完成</string>
<string name="cue_lap">分段</string>
<string name="cue_warmup">热身</string>
<string name="cue_cooldown">缓和</string>
<string name="cue_current">当前</string>
<string name="cue_perkilometer">每公里</string>
<string name="cue_permile">每英里</string>
<string name="cue_started">开始</string>
<string name="cue_paused">暂停</string>
<string name="cue_resumed">恢复</string>
<string name="cue_stopped">停止</string>
<string name="cue_completed">完成</string>
<string name="cue_speedup">加速</string>
<string name="cue_slowdown">放慢速度</string>
<plurals name="cue_hour">
<item quantity="other">%d 小时</item>
</plurals>
<plurals name="cue_minute">
<item quantity="other">%d 分钟</item>
</plurals>
<plurals name="cue_second">
<item quantity="other">%d 秒</item>
</plurals>
<plurals name="cue_meter">
<item quantity="other">%d 米</item>
</plurals>
<plurals name="cue_kilometer">
<item quantity="other">%s 公里</item>
</plurals>
<plurals name="cue_mile">
<item quantity="other">%s 英里</item>
</plurals>
<plurals name="cue_kilometers_per_hour">
<item quantity="other">%s 公里每小时</item>
</plurals>
<plurals name="cue_miles_per_hour">
<item quantity="other">%s 英里每小时</item>
</plurals>
<plurals name="cue_bpm">
<item quantity="other">%d bpm</item>
</plurals>
<plurals name="cue_rpm">
<item quantity="other">%d rpm</item>
</plurals>
<string name="cue_activity_paused">运动暂停</string>
<string name="cue_activity_resumed">运动恢复</string>
<string name="cue_activity_stopped">运动停止</string>
<string name="cue_lap_started">分段开始</string>
<string name="cue_lap_completed">分段完成</string>
<string name="cue_warmup_started">热身开始</string>
<string name="cue_cooldown_started">缓和开始</string>
</resources>
4 changes: 3 additions & 1 deletion app/res/values/array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<item>Suomi</item>
<item>Svenska</item>
<item>Türkçe</item>
<item>简体中文</item>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list is intended to be in "alphabetic" sort order with local names. Is "Chinese" supposed to be sorted last like this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine.

</string-array>
<!--Note: keep in same order as languagesNames-->
<string-array name="cueLanguageCodes" translatable="false">
Expand All @@ -83,5 +84,6 @@
<item>fi</item>
<item>sv</item>
<item>tr</item>
</string-array>
<item>zh</item>
</string-array>
</resources>
61 changes: 61 additions & 0 deletions common/src/main/res/values-zh/array.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2012 - 2016 jonas.oreland@gmail.com
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<string-array name="unitEntries">
<item>英里</item>
<item>公里</item>
</string-array>
<string-array name="unitValues">
<item>英里</item>
<item>公里</item>
</string-array>
<!--Note: keep in same order as DB.INTENSITY-->
<string-array name="step_intensity_types">
<item>热身</item>
<item>运动</item>
<item>休息</item>
<item>放松</item>
<item>缓和</item>
</string-array>
<string-array name="duration_types">
<item>直到按键</item>
<item>时间</item>
<item>距离</item>
</string-array>
<string-array name="target_types">
<item>None</item>
<item>配速</item>
<item>心率区间</item>
</string-array>
<!-- Note: keep in same order as DB.ACCOUNT.SPORT_ -->
<string-array name="sportEntries">
<item>跑步</item>
<item>骑行</item>
<item>其他</item>
<item>越野</item>
<item>行走</item>
</string-array>
<string-array name="types">
<item>时间</item>
<item>距离</item>
</string-array>
<string-array name="sexes">
<item>男</item>
<item>女</item>
</string-array>
</resources>
Loading