Skip to content

android(i18n): complete zh-rCN/zh-rTW, move hard-coded UI text to resources - #852

Open
SAGIRIxr wants to merge 2 commits into
librepods-org:android/rewritefrom
SAGIRIxr:i18n/zh-rewrite
Open

SAGIRIxr wants to merge 2 commits into
librepods-org:android/rewritefrom
SAGIRIxr:i18n/zh-rewrite

Conversation

@SAGIRIxr

@SAGIRIxr SAGIRIxr commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What this does

Two commits against the current android/rewrite head (5dd8446):

1. android(i18n): complete zh-rCN / zh-rTW and route hard-coded UI text through resources

  • values-zh-rCN: 340 → 424 / 424 translatable strings (60 that had no entry, plus the new keys below).

  • values-zh-rTW: 238 → 424 / 424 (162 that had no entry, plus the new keys).

  • Fixes a typo in the existing zh-rCN ear_detection: 自动人耳检测 → 自动入耳检测.

  • Marks the font family names (inter, roboto_flex*) and the two GMS font certificate arrays translatable="false", so they stop showing up as missing translations.

  • Moves user-visible literals in Kotlin onto string resources. These rendered in English regardless of locale:

    • quick settings tile labels (Off / Transparency / Adaptive / Noise Cancellation / Unknown, and the "Disconnected" subtitle)
    • the ongoing notification's listening-mode action buttons, and its one-letter battery labels (L: 80% R: 75%). English output is unchanged; other locales can now localize them.
    • PressAndHoldSettings was showing a literal "Digital Assistant" even though R.string.digital_assistant already existed
    • head tracking screen (toggle label, Velocity, Test Head Gestures, plot legend, the yes/no gesture feedback)
    • hearing aid confirmation dialog, StyledConfirmationDialog default button texts
    • recording start/stop button, onboarding "Grant all", noise control widget configuration screen
    • contentDescriptions that TalkBack reads out (back, clear text, settings, close, send, permission icons, play/pause, start/stop)

    New keys: done, enable, close, send, clear_text, headset, disconnected, unknown, velocity, test_head_gestures, horizontal, vertical, enable_hearing_aid, enable_hearing_aid_description, start_recording, stop_recording, grant_all, no_battery_info, widget_service_not_available, widget_no_devices_found, battery_short_{left,right,case,headset}, head_gesture_{yes,no}_detected, play_pause, start_stop, next.

2. android: don't clip the EQ band labels in transparency settings

Each EQ row is value | slider | "Band n", and the slider took fillMaxWidth(0.9f) of what the value label left over. The band label only got the remainder, so in zh-rCN "频段 1"–"频段 8" had their digits cut off. The slider now takes the remaining space with weight(1f), so the labels get their natural width in every locale.

Left in English on purpose

  • PrivacyPolicyPage — it's your legal text, so I didn't think it was mine to translate.
  • The debug screen, the [debug] controls, and @Preview sample text.
  • The GitHub-issue / billing-error templates in AppSettingsScreen that get sent to you.

Terminology and how this was checked

The translations were drafted with AI assistance. To address the concern you raised on #761, the zh-rCN additions were reviewed by a native Simplified Chinese speaker, both as a list against the English source and in the running app. That review is where the nod/shake wording for gesture feedback and the EQ clipping came from.

For terms the existing file already uses, I kept them as they are (聆听模式, 通透模式, 自适应, 对话感知, 灵动岛, 点按 …) instead of reopening that discussion here.

zh-rTW has not been reviewed by a Taiwanese reader yet. It follows the wording already in the zh-rTW file (聽覺模式, 輕觸, 裝置, 小工具) and uses 動態島 for the island. A pass from someone in Taiwan would be welcome before merging.

Relation to #761

#761 also completes zh-rCN, but it is based on an older commit. Against the current head it is missing 67 strings and carries 11 removed keys, and its terminology was partly superseded by the wording that landed in the meantime. This PR starts from the current file instead. Thanks to @zyl6932 for the earlier pass. If you would rather land that one first, I'm happy to rebase this onto it.

Testing

  • Built assembleFossDebug and installed it on a Xiaomi 14 Pro (HyperOS 3 / Android 16). It launches without crashing, and the reviewer went through the app in zh-rCN.
  • Spot-checked the compiled resources with aapt2 dump resources for zh-rCN, zh-rTW and the default locale.
  • Confirmed on device after the fix: the EQ band labels in Customize Transparency Mode are no longer clipped, and the ongoing notification shows the localized battery labels and listening-mode actions.
  • Not checked on device yet: the QS tile and the widget configuration screen.

SAGIRIxr added 2 commits October 20, 2026 16:53
The slider took fillMaxWidth(0.9f) of whatever the value label left over, so the trailing band label only got the remainder and was cut off in scripts wider than Latin (e.g. 频段 1). Let the slider take the remaining space with weight(1f) instead.
…rough resources

Fills the remaining zh-rCN (60) and zh-rTW (162) strings, fixes the ear_detection typo (人耳 -> 入耳), and marks the font family names and the GMS font cert arrays translatable=false.

Moves user-visible literals in Kotlin onto string resources: the QS tile and notification listening-mode labels, the widget configuration screen, head tracking labels and gesture feedback, hearing aid confirmation, recording button, Grant all, and the contentDescriptions read by TalkBack. The ongoing notification's one-letter battery labels now come from resources as well; English output is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant