Skip to content

feat(i18n): update Traditional Chinese (zh-TW) localization for 0.9.0 - #122

Open
yangyws wants to merge 21 commits into
stormpanda:mainfrom
yangyws:feature/traditional-chinese-localization
Open

feat(i18n): update Traditional Chinese (zh-TW) localization for 0.9.0#122
yangyws wants to merge 21 commits into
stormpanda:mainfrom
yangyws:feature/traditional-chinese-localization

Conversation

@yangyws

@yangyws yangyws commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 0.9.0 Localization: Adds Traditional Chinese (values-zh-rTW/strings.xml) translations for all new 0.9.0 features (App Launcher picker, Floating Bubble overlay, and Auto Switch Off toast).
  • Refined & Natural Terminology:
    • Refined keyboard mode terms from literal translations to clear, intuitive handheld labels: 簡易 (Ergo / Compact) and 完整 (Full).
    • Translated touchpad mode toggle labels: 滑鼠 (Mouse) and 觸控 (Touch).
    • Updated UI drag handle term to standard Taiwanese localization: 拖曳把手 -> 拖曳控點.
    • Refined and polished existing Traditional Chinese phrasing across settings and help menus for better clarity and ergonomics.
  • Extracted Toolbar Mode Strings: Moved hardcoded toolbar mode switch labels (keyboard_mode_ergo, keyboard_mode_full, touchpad_mode_mouse, touchpad_mode_touch) into string resources across base, German, and Traditional Chinese.
  • Locale-Aware Default Profiles: Initial blank MacroPad profile & layout names are now locale-aware (預設 for Chinese, Standard for German, Default for English/fallback).
  • Fixed String Key Binding Mismatches:
    • MacroPadEditor.kt: Updated EditorTopBar title to reference quick_menu_edit_layout ("Edit Profile/Layout") rather than macropad_editor_title_edit_profile ("Edit Profile"). This matches the parent Quick Menu button text and reflects that both profiles and layouts are managed within this screen.
  • Unit Tests: Includes unit tests in MacroPadStateTest.kt for locale-aware profile naming.

yangyws and others added 16 commits August 6, 2026 21:10
- add `app/src/main/res/values-zh-rTW/strings.xml` with all 1055 strings, at full parity with `values/strings.xml`
- add `gamefocus/src/main/res/values-zh-rTW/strings.xml` with all 62 strings, at full parity
- register `zh-TW` in `app/src/main/res/xml/locales_config.xml` so the locale is offered in the per-app language picker on Android 13+
- mirror key order and comments from the English source files so future syncs stay reviewable as a diff
- leave `app_name` untranslated, matching `values-de`

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Required by the localization policy: every language Megingiard ships a
translation for must also be able to complete privileged Auto Setup, which
matches Settings entries by their text in the device language.

- add `CHINESE_TW` with the Traditional Chinese Settings wording (版本號碼,
  無線偵錯, USB 偵錯, 使用配對碼配對裝置, 允許), plus `CHINESE_HK` and
  `CHINESE_MO` sharing it, and register all three in `CONFIGS_BY_TAG`
- resolve a bare `zh` locale through region and script subtags rather than the
  primary language alone, so only Traditional regions (TW/HK/MO/Hant) match
- keep Simplified Chinese (zh-CN, zh-SG, zh-Hans) unsupported: its Settings
  entries read 版本号 / 无线调试, so falling back to the Traditional keywords
  would stall Auto Setup mid-flow instead of reporting the language as
  unsupported
- cover the new resolution paths in `AutoSetupLanguageConfigTest`, including
  the Simplified-stays-null cases the existing suite already asserted

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…cale

Auto Setup told the Wireless debugging sub-screen apart from Developer
options through a Developer options title list hardcoded in the service,
covering only English, German, Spanish and French. Both screens carry the
wireless debugging label, so on any other system language the check
reported the sub-screen while still on Developer options: the loop
advanced to CLICK_PAIR_DIALOG and scrolled Developer options 25 times
looking for a pairing row that only exists one screen deeper, then timed
out. Verified on an AYN Thor with the system language set to zh-Hant-TW.

- move the hardcoded titles into `AutoSetupLanguageConfig` as the default
  of a new `developerOptionsKeywords`, leaving the four existing locale
  configs untouched and their behaviour identical
- give `CHINESE_TW` its own `開發人員選項`, since its title is not among
  the defaults
- read the keywords from the config in `isWirelessDebuggingSubScreen`, so
  adding a locale no longer means editing the accessibility service
- assert every config carries lowercase keywords, the matching lowercases
  the screen text

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- add the 23 keys upstream introduced since the previous branch base
- retranslate 9 keys whose English source text changed upstream
- drop settings_jump_privileged_mode and settings_section_privileged_mode,
  renamed upstream to settings_jump_input and settings_section_input
- retranslate 29 entries that had been carried over from this fork's own
  strings, where upstream's English says something different: app_name no
  longer reads "Megingiard-zh", macropad_editor_new_profile_name no longer
  carries a %1$d that upstream never supplies, and the help texts no longer
  document behaviour that only exists in the fork

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…t for all locales, and fix Windows build/nativeCTest execution
… click, and complete 16-item permutation verification
…up FQN imports

- remove superfluous everyConfigCarriesDeveloperOptionsKeywords test enforced by data class constructor
- replace inline org.junit.Assert package references with top-level imports in AutoSetupLanguageConfigTest
…ode documentation

- add formatted="false" attribute to help_bg_settings_dimming_desc and help_ambient_dim_desc in values-zh-rTW/strings.xml
- update docs/features/privileged-mode/FEATURE.md to reflect Traditional Chinese auto-setup support
…ptimize UI terms

- add missing translations for 0.9.0 features (App Launcher, Floating Bubble, Auto Switch off toast)
- localize keyboard (Ergo/Full -> 簡易/完整) and touchpad (Mouse/Touch -> 滑鼠/觸控) mode toggles
- adapt initial blank profile and layout default name to system locale (預設 / Standard / Default)
- optimize drag handle term to Taiwanese standard 拖曳控點
- add unit tests for locale-aware default profile naming
@yangyws

yangyws commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Traditional Chinese Term Refinement

  • Refined the translation for the filled icon style (macropad_icon_picker_filled) from 填滿 (Fill) to 實心 (Solid).
  • Rationale: In Chinese UI and iconography conventions, "實心" directly and intuitively conveys solid/filled vs outlined glyph styles (similar to solid vs. hollow shapes), avoiding potential ambiguity with layout/dimension scaling terms (such as Full Bleed / Fill).

@stormpanda

Copy link
Copy Markdown
Owner

Hey, thanks for the quick update. Buuuut this has to wait a little, there is a lot coming... 😅

@yangyws

yangyws commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

No worries at all! I happened to be working on some local customizations and updated the translations along the way. Take your time with the upcoming changes, and whenever you're ready or have new strings coming, feel free to merge or let me know to help fill them in! 😊

- align EditorTopBar title with the parent Quick Menu action ('Edit Profile/Layout')
- accurately reflect that both Profiles and Layouts are managed within this screen
…Hub as 副螢幕輔助中心

- standardize screen terminology across all Traditional Chinese strings to strictly use 主螢幕 and 副螢幕
- eliminate ambiguous references (次螢幕, 底部螢幕, 上方螢幕, 上螢幕, 下方螢幕)
- localize Companion Hub to 副螢幕輔助中心 to align with Taiwanese UX conventions and establish clear hierarchy with 副螢幕工具
- escape XML ampersand in Thor settings deadzone dialog hint
@yangyws

yangyws commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

📝 Traditional Chinese (zh-TW) Terminology Standardization & Refinements

Hi @stormpanda! Here is a breakdown of the refinements made across existing Traditional Chinese keys in this PR and the rationales behind them:


1. 📱 Screen Terminology Standardization (Primary vs. Secondary Display)

  • Changes: Unified various legacy phrases like 上方螢幕 (top screen), 下方螢幕 (bottom screen), and 次螢幕 (sub screen) to standardized dual-screen terminology:
    • 主螢幕 (Primary Display)
    • 副螢幕 (Secondary / Companion Display)
  • Rationale: The AYN Thor is a dual-screen device with a primary gaming display and a companion secondary display. Standardizing on 主螢幕 and 副螢幕 across all dialogs, tutorial sheets, and tool descriptions provides consistent and professional phrasing.

2. 🏠 Companion Hub Localization & Quick Menu Consistency

  • Changes:
    • integration_home_hero_idle_title: Localized as Megingiard 副螢幕輔助中心 (Megingiard Companion Hub).
    • quick_menu_show_dashboard & Quick Menu help: Standardized view toggle labels as 切換至輔助中心 (Switch to Companion Hub) and 切換至遊戲設定檔 (Switch to Game Profile).
  • Rationale: Gives users a crystal-clear understanding of the companion dashboard role on the secondary display when switching between custom MacroPad controller layouts and the companion home hub.

3. 📋 Profile & Layout Duplication Clarity

  • Changes:
    • macropad_duplicate_profile: Changed from 重複設定檔 to 複製設定檔 (Copy/Duplicate Profile).
    • macropad_duplicate_layout: Changed from 重複配置 to 複製配置 (Copy/Duplicate Layout).
  • Rationale: In Traditional Chinese, "重複" typically implies redundancy/conflict (e.g. duplicate entries), whereas "複製" accurately conveys the user action of cloning or duplicating an existing configuration.

4. 🎨 Icon & Scaling Terminology Precision

  • Changes:
    • macropad_icon_picker_filled: Changed from 填滿 (Fill) to 實心 (Solid Glyph).
    • crop_image_fit_whole & crop_image_fit_fill: Refined as 完整顯示 (Aspect Fit) and 滿版 (Aspect Fill / Full Bleed).
  • Rationale: Avoids overloaded usage of "填滿" across different concepts, cleanly distinguishing between glyph styles (Outlined vs. Solid) and image/mirror aspect ratio scaling modes (Fit vs. Fill).

5. 🎛️ UI Control Precision

  • Changes:
    • help_macrolist_drag_label: Changed from 拖曳把手 to 拖曳控點 (Drag Handle).
  • Rationale: Conforms to standard modern software UI translation guidelines for touch/reorder handle elements.

@yangyws

yangyws commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

🌐 Traditional Chinese (zh-TW) Localization Fully Synced for 0.9.0

Hi @stormpanda!

I've merged the latest \main\ (including #123 PSP detection and recent 0.9.0 features) and verified that all Traditional Chinese (\zh-TW) resources are 100% complete and up to date.

🆕 Highlights for 0.9.0:

  • App Launcher: Localized \macropad_action_app_launcher\ as *\應用程式啟動器* and \�pp_launcher_button_label_format\ as **\開啟 %1**.
  • Floating Bubble: Localized overlay and hint as *\Megingiard 懸浮氣泡覆蓋層* and **\輕觸以還原 Megingiard**.
  • Auto Switch Toast: Added *\自動切換:關閉* (\ oast_auto_switch_off).
  • Terminology Standardization: Consistent usage of *\主螢幕* (Primary) / *\副螢幕* (Secondary / Companion) and *\副螢幕輔助中心* (Companion Hub) across all screens and help sheets.
  • Zero missing strings: All keys across :companion:ui\ and :gamefocus:ui\ are fully matched.

The PR is purely focused on localization and clean UI string resources, ready for the 0.9.0 release whenever you are! 🚀

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.

2 participants