Skip to content
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ Run tests, lint, release metadata checks, and artifact builds locally before pub

## Translations

CallShield ships in English, Simplified Chinese, Brazilian Portuguese and Spanish. A string that isn't translated yet falls back to English. The Portuguese and Spanish text hasn't had a native speaker's review, so corrections are welcome. Pick a language under Settings, or in Android's per-app language screen.
CallShield ships in English, Simplified Chinese, Brazilian Portuguese, Spanish and Turkish. A string that isn't translated yet falls back to English. The Portuguese and Spanish text hasn't had a native speaker's review, so corrections are welcome. Pick a language under Settings, or in Android's per-app language screen.
More translations are welcome. See
[docs/TRANSLATING.md](docs/TRANSLATING.md) for the resource layout, the priority
order for partial translations, and `scripts/check_translations.py`, which
Expand All @@ -655,7 +655,7 @@ language in [issue #7](https://github.com/SysAdminDoc/CallShield/issues/7).
| URL Safety | Local spam-domain data, with optional PhishTank and OpenPhish |
| Verification | Local Gradle, lint, and release-artifact checks |
| Tests | 2318 JVM unit tests (JUnit) |
| Strings | 1878 string resources and 65 plural groups (translation-ready) |
| Strings | 1879 string resources and 65 plural groups (translation-ready) |
| Accessibility | 100+ content descriptions, 48dp touch targets |
| Min SDK | 29 (Android 10) |
| Target SDK | 36 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ object AppLanguage {
const val CHINESE_SIMPLIFIED_TAG = "zh-CN"
const val PORTUGUESE_BRAZIL_TAG = "pt-BR"
const val SPANISH_TAG = "es"
const val TURKISH_TAG = "tr"
const val ACCENTED_PSEUDO_TAG = "en-XA"
const val RTL_PSEUDO_TAG = "ar-XB"

Expand All @@ -32,6 +33,7 @@ object AppLanguage {
add(AppLanguageOption(CHINESE_SIMPLIFIED_TAG, R.string.settings_language_chinese_simplified))
add(AppLanguageOption(PORTUGUESE_BRAZIL_TAG, R.string.settings_language_portuguese_brazil))
add(AppLanguageOption(SPANISH_TAG, R.string.settings_language_spanish))
add(AppLanguageOption(TURKISH_TAG, R.string.settings_language_turkish))
if (includePseudoLocales) {
add(AppLanguageOption(ACCENTED_PSEUDO_TAG, R.string.settings_language_pseudo_accented))
add(AppLanguageOption(RTL_PSEUDO_TAG, R.string.settings_language_pseudo_rtl))
Expand Down Expand Up @@ -89,6 +91,8 @@ object AppLanguage {
// values-es has no region, so Android's own picker can hand back es-MX.
tag == SPANISH_TAG || tag.startsWith("$SPANISH_TAG-") -> SPANISH_TAG

tag == TURKISH_TAG || tag.startsWith("$TURKISH_TAG-") -> TURKISH_TAG

tag == ACCENTED_PSEUDO_TAG -> ACCENTED_PSEUDO_TAG

tag == RTL_PSEUDO_TAG -> RTL_PSEUDO_TAG
Expand Down
2,122 changes: 2,122 additions & 0 deletions app/src/main/res/values-tr/strings.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@
<string name="settings_language_chinese_simplified" translatable="false">简体中文</string>
<string name="settings_language_portuguese_brazil" translatable="false">Português (Brasil)</string>
<string name="settings_language_spanish" translatable="false">Español</string>
<string name="settings_language_turkish" translatable="false">Türkçe</string>
<string name="settings_language_pseudo_accented">Pseudolocale: accented</string>
<string name="settings_language_pseudo_rtl">Pseudolocale: right-to-left</string>
<string name="settings_language_dialog_title">Choose app language</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/xml/locales_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<locale android:name="zh-CN" />
<locale android:name="pt-BR" />
<locale android:name="es" />
<locale android:name="tr" />
</locale-config>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AppLanguageTest {
fun `release options contain only actual shipped locales`() {
val options = AppLanguage.options(includePseudoLocales = false)

assertEquals(listOf("", "en", "zh-CN", "pt-BR", "es"), options.map { it.languageTag })
assertEquals(listOf("", "en", "zh-CN", "pt-BR", "es", "tr"), options.map { it.languageTag })
}

@Test
Expand Down
1 change: 1 addition & 0 deletions scripts/check_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"ru": {"one", "few", "many", "other"},
"pl": {"one", "few", "many", "other"},
"ar": {"zero", "one", "two", "few", "many", "other"},
"tr": {"one", "other"},
# zh/ja/ko/th/vi have no grammatical plural: "other" alone is correct.
}
DEFAULT_PLURAL_QUANTITIES = {"other"}
Expand Down
7 changes: 4 additions & 3 deletions scripts/translation_floors.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"description": "Minimum translated-string coverage per locale, in percent. check_translations.py fails when a shipped locale drops below its floor. --update-floors only raises a floor. Lowering one is a hand edit, made on purpose and explained in the commit message.",
"floors": {
"values-es": 98.5,
"values-pt-rBR": 98.5,
"values-zh-rCN": 98.5
"values-es": 100.0,
"values-pt-rBR": 100.0,
"values-tr": 100.0,
"values-zh-rCN": 99.9
}
}