Translations
Status: 458 CE-only keys (449 strings, 9 plurals) translated across 36 languages in six modules; verified by check-translations.py in CI. As of 2026-11-25 (main at cbb5abb7f).
Start here
Section titled “Start here”- Follow
.claude/skills/translate-strings/SKILL.mdwhenever a PR adds, edits, or removes user-facing strings or plurals (the skill lists all 36 supported language codes). - Put new or edited English CE strings in
<module>/src/main/res/values/strings.xmland their translations in<module>/src/main/res/values-<lang>/strings_ce.xml. Never edit upstream’svalues-<lang>/strings.xmlfiles. - Six modules currently carry
strings.xmlandstrings_ce.xml:core,downloads,modes/film,player/local,settings, andsetup. - Before translating a new sentence or updating an existing one, read neighbouring entries in that language’s
strings_ce.xml(andstrings.xml) so register (form of address) and recurring nouns match (#1021). - Check completeness fast:
python3 .claude/skills/translate-strings/scripts/check-translations.py(requiresupstream/mainfetched).
What it does
Section titled “What it does”Upstream Findroid’s translations come from Weblate into <module>/src/main/res/values-<lang>/strings.xml during upstream syncs. Because CE adds features and settings that upstream does not have, Ephyra keeps all CE-only translations in separate strings_ce.xml files inside each values-<lang>/ resource directory (#106, #110). Android merges all XML resource files in a values-<lang>/ folder at build time, so isolating CE strings in strings_ce.xml prevents merge conflicts with Weblate commits while keeping code references (R.string.*, R.plurals.*) unchanged.
All 36 values-<lang> translation folders are maintained even though locales_config.xml (wired in app/phone/src/main/AndroidManifest.xml) lists 26 locales in the in-app language picker (en from values/ plus 25 translated locales): Android still selects the other 11 values-<lang> folders (ar, az, ca, da, et, fi, hi, in, ja, nn, tr) when the device system language matches (#106).
Branding and variant names stay separated from Weblate keys:
app_nameis markedtranslatable="false"incore/src/main/res/values/strings.xml(Ephyra),core/src/debug/res/values/strings.xml(Ephyra Debug), andcore/src/staging/res/values/strings.xml(Ephyra Beta).- Where upstream text names “Findroid” or uses wording CE intentionally replaces (for example
ce_welcome,ce_welcome_text,ce_permission_local_network_rationale,ce_delete_download_message,ce_continue_watching), CE adds ace_key instrings_ce.xmland points the UI at it, leaving upstream’s key intact for Weblate syncs. - Option label arrays in
settings/src/main/res/values/string_arrays.xmlandcore/src/main/res/values/string_arrays.xmlreference@string/<key>items, so translating the referenced<string>translates the array; technical value arrays carrytranslatable="false"and are never translated.
Where the code is
Section titled “Where the code is”| Path | What |
|---|---|
.claude/skills/translate-strings/SKILL.md |
Translation procedure, rules, and the canonical list of 36 supported languages |
.claude/skills/translate-strings/scripts/check-translations.py |
Verifies every CE-only <string> and <plurals> across all 36 languages, simple <string> placeholders in direct child.text such as %s, %d, and %1$s (not <plurals> placeholders, not flag, width, or precision formats such as %1$02d, %.1f, or %05d, and not placeholders inside or after inline markup such as <b>%1$s</b>), and CLDR plural quantities |
core/src/main/res/xml/locales_config.xml |
The 26 locales shown in the in-app language picker (en plus 25 translated locales; referenced by app/phone/src/main/AndroidManifest.xml) |
core/src/main/res/values/strings.xml, core/src/debug/res/values/strings.xml, core/src/staging/res/values/strings.xml |
Core English strings and app_name per build type |
settings/src/main/res/values/strings.xml, settings/src/main/res/values/string_arrays.xml, core/src/main/res/values/string_arrays.xml |
Settings strings (largest CE string set) and @string/ option arrays / translatable="false" value arrays |
downloads/src/main/res/values/strings.xml, modes/film/src/main/res/values/strings.xml, player/local/src/main/res/values/strings.xml, setup/src/main/res/values/strings.xml |
English strings for the remaining modules with translations |
<module>/src/main/res/values-<lang>/strings_ce.xml (e.g. core/src/main/res/values-nl/strings_ce.xml) |
CE-only translations across all 36 languages for the 6 modules above |
lint.xml |
Disables MissingTranslation globally so gaps in upstream’s Weblate files do not fail lint |
.github/workflows/build.yaml |
Runs the Verify CE translations job on PRs and pushes to main |
.claude/skills/upstream-sync/SKILL.md |
How strings.xml merges during upstream syncs and how duplicate keys in strings_ce.xml are resolved |
- Follow
.claude/skills/translate-strings/SKILL.mdfor the 36 target language codes and the translation rules. - Never edit upstream’s
values-<lang>/strings.xmlfiles. Add or edit English CE strings in<module>/src/main/res/values/strings.xmland translate them in<module>/src/main/res/values-<lang>/strings_ce.xmlacross all 36 languages. To change upstream wording, introduce ace_<name>key instrings_ce.xmland point the code at it. - Match the register and terms of the neighbouring strings (#1021): before translating a new sentence or revising an existing string, read the neighbouring strings in that language’s
strings_ce.xmlandstrings.xmlso the form of address (for example informal vs formal: Germandu/deinrather thanIhr, Estoniansu/oledrather thanteie, Traditional Chinese omitting您的) and terms for recurring nouns (“device”, “file”, “limit”) match the rest of the file. - Keep every format specifier (
%s,%d,%1$s,%2$d, …) in translated strings; escape'as\',"as\", and write&as&. An unescaped'fails the check since #1076: aapt refuses it with a misleading “Invalid unicode escape sequence”. A script that writes the files can lose the backslash on the way (a heredoc, a Python string), so look at the file it wrote. - A
<plurals>entry has every CLDR quantity its language requires, as enforced byPLURAL_REQUIRED_QUANTITIESincheck-translations.py. - For string arrays, translate the
<string>keys referenced by label arrays; keep value arraystranslatable="false"with the exact same item count and order as their label array. - When an English CE string changes, update all 36
strings_ce.xmlfiles. When an upstream sync adds a key that already exists instrings_ce.xml, delete that key fromstrings_ce.xmlacross all 36 languages so Weblate’s translation takes over; when upstream removes or renames a key Ephyra still uses, preserve it as ace_key instrings_ce.xml. - CI:
.github/workflows/build.yamlexcludesdocs/**and.claude/**from builds, then re-includes.claude/skills/translate-strings/**so changes to the checker or skill still runVerify CE translations.check-guides-follow.pyignores/res/values-<lang>/, while edits to the counted paths indexed undertranslationsindocs/areas.yaml(core/src/main/res/values/strings.xml,settings/src/main/res/values/strings.xml,settings/src/main/res/values/string_arrays.xml,player/local/src/main/res/values/strings.xml,core/src/main/res/xml/locales_config.xml,.claude/skills/translate-strings/SKILL.md, and.claude/skills/translate-strings/scripts/check-translations.py; thevalues/strings.xmlfiles ofdownloads,modes/filmandsetupare not indexed) require updating or explaining the guide.
How to test it
Section titled “How to test it”Fastest real command (compares every translatable <string> and <plurals> in res/values/strings.xml against upstream/main and verifies all 36 strings_ce.xml files):
git remote add upstream https://github.com/jarnedemeulemeester/findroid.git # oncegit fetch upstream main --no-tags # once, or before checking against latest upstreampython3 .claude/skills/translate-strings/scripts/check-translations.pyOn Windows, run python instead of python3.
If keys were added, renamed, or removed across modules or string_arrays.xml, compile or assemble so Android resource merging catches missing or duplicate resources:
./gradlew :app:phone:compileLibreDebugKotlin :app:tv:compileLibreDebugKotlin./gradlew :app:phone:assembleLibreDebugWhat check-translations.py does NOT cover:
- Placeholders inside
<plurals>, formatted<string>specifiers, and inline markup: placeholder comparison (extract_placeholders) runs only on<string>entries usingchild.textand matches only simple placeholders (%s,%d,%1$s, …);<plurals>items check only key presence and required CLDR quantities, flag, width, or precision formats such as%1$02d,%.1f, or%05dare ignored by the regex, andchild.textstops at inline tags so placeholders inside or after inline markup such as<b>%1$s</b>are missed. Missing or mismatched placeholders in those cases pass the check. - Stale translations after English edits: it checks key existence, not whether the text in
strings_ce.xmlreflects a changed English source string. - Tone, register, and terminology consistency: mismatched pronouns (such as
Ihrvsduin #1021) or inconsistent nouns pass the script unnoticed. - UI truncation and RTL layout: narrow labels (such as the ~128 dp download status column in #113) and right-to-left rendering (
ar,iw) require checking on an emulator or device. string_arrays.xmlandtranslatable="false"entries:check-translations.pyreads onlystrings.xmland ignorestranslatable="false"items, so broken@string/references or mismatched array lengths only surface in Gradle resource merging or code review.- Unused CE keys and upstream translation gaps: the script does not flag unreferenced keys, and gaps in upstream’s
values-<lang>/strings.xmlare intentionally ignored (MissingTranslationinlint.xml). - Android Lint MissingQuantity warnings:
PLURAL_REQUIRED_QUANTITIESintentionally omits unused forms (oneinaz/tr,twoiniw, fractionalmanyincs-rCZ/sk; seedocs/audit/static-checks.md).
Before a PR
Section titled “Before a PR”python3 .claude/skills/translate-strings/scripts/check-translations.py./gradlew :app:phone:compileLibreDebugKotlin :app:tv:compileLibreDebugKotlinpython3 .claude/skills/start-work/scripts/check-docs.pyCommit your changes before running check-guides-follow.py (and re-run it after any new commit): it compares origin/main...HEAD and ignores staged or unstaged edits. If the PR uses a Docs: no change needed — <reason> explanation in its description, pass the description with --body FILE, --body-text TEXT, or --pr NUMBER so the local check can read it:
python3 .claude/skills/start-work/scripts/check-guides-follow.py# Or when checking with a PR description containing "Docs: no change needed — <reason>":python3 .claude/skills/start-work/scripts/check-guides-follow.py --body FILEpython3 .claude/skills/start-work/scripts/check-guides-follow.py --body-text "Docs: no change needed — <reason>"python3 .claude/skills/start-work/scripts/check-guides-follow.py --pr NUMBER- Verify that every edited English string had all 36
strings_ce.xmlfiles updated and that new sentences match neighbouring address forms and terminology. - For any added or edited
<plurals>entry, or any<string>entry using flag, width, or precision formats (such as%1$02d,%.1f, or%05d) or inline markup (such as<b>%1$s</b>, including text after the markup), compare placeholders in each language’sstrings_ce.xmlagainst the English source (check-translations.pyvalidates only simple placeholders in<string>directchild.text). - When layout, wrapping, or directionality is affected, inspect the screen on an emulator in at least one LTR locale (such as
nl) and one RTL locale (aroriw).
Decisions and history
Section titled “Decisions and history”- #106, #110: isolated CE-only strings into
<module>/src/main/res/values-<lang>/strings_ce.xmlacross all 36values-*folders (more than the 26 locales inlocales_config.xml:enplus 25 translated), added.claude/skills/translate-strings/andcheck-translations.pydiffing againstupstream/maininstead of enablingMissingTranslation, and wired the CI check intobuild.yaml. - #113: shortened
download_time_left_under_minuteanddownload_time_left_hoursacross all 36 languages so download rows fit within ~128 dp after English was shortened in #111. - #553 (closing #399, #400, #401, #402, #403, #414): introduced
player_backend_names(translatable="false"),ce_overrides (ce_media_segments_auto_skip_pip,ce_media_segments_auto_skip_always,ce_delete_download_message,ce_continue_watching), pluralized number settings (ce_episodes_count,ce_days_count,ce_number_no_limit,ce_number_off), RTL arrow mirroring withTextDirection.Content, locale-awareFormatStyle.MEDIUMdates, and addedmodes/filmtocheck-translations.py. - #844 and upstream syncs: shared
**/res/values*/strings.xmltake the three-way merge result while Kotlin stays on Ephyra’s side; key collisions with upstream are deleted fromstrings_ce.xml(.claude/skills/upstream-sync/SKILL.md). - #1021 (refs #1016): updated
ce_pref_player_quality_wifi_summaryandce_pref_player_quality_mobile_summaryacross all 36 languages, then corrected formal address drift inde(Ihr→dein),et(teie→su), andzh-rTW(removing您的) to match neighbouring strings.
Pitfalls
Section titled “Pitfalls”- Register and terminology drift across languages (#1021). Translating a string in isolation can introduce formal address (
Ihr,teie,您的) or inconsistent nouns (“device”, “file”, “limit”) compared with adjacent rows on the same screen. Always check neighbouring strings in each language’sstrings_ce.xmlandstrings.xml. - Changing English without updating
strings_ce.xml.check-translations.pypasses as long as the key exists (and, for<string>entries only, with matching simple placeholders inchild.text;<plurals>placeholders, flag, width, or precision formats such as%1$02d,%.1f, or%05d, and placeholders inside or after inline markup such as<b>%1$s</b>are not checked), so stale translations and broken placeholders in those cases silently stay behind unless every language file is updated and checked too. - Editing upstream’s
values-<lang>/strings.xmldirectly. Weblate commits overwrite or conflict with direct edits during upstream syncs; use ace_key instrings_ce.xmlinstead. - Duplicate resource failure after an upstream sync. When upstream adds a key that Ephyra already has in
strings_ce.xml, AAPT fails on duplicate resources; remove the key from all 36strings_ce.xmlfiles. - Translating only the 26 picker locales.
locales_config.xmllists 26 locales (eninvalues/plus 25 translated locales); 11 of the 36values-<lang>folders are absent from it (ar,az,ca,da,et,fi,hi,in,ja,nn,tr), yet Android still loads them from the system locale. - Running
check-translations.pywithoutupstream/main. Without an up-to-dateupstream/mainref (git fetch upstream main --no-tags), CE-only detection against Findroid cannot tell upstream keys from CE keys.check-translations.pyalso still listsdatainMODULES, thoughdatacurrently has nores/values/strings.xmland is skipped cleanly. - Narrow layouts and RTL clipping (#113, #553). Translated text in German, Finnish, Portuguese, or Slavic languages is often longer than English; short status fields and RTL screens need visual checks on an emulator.
Source: docs/areas/translations.md · raw Markdown