Skip to content

feat(harmonyos): switch the phone UI between Chinese and English - #2369

Merged
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:feat/harmonyos-app-i18n
Aug 18, 2026
Merged

feat(harmonyos): switch the phone UI between Chinese and English#2369
wgqqqqq merged 1 commit into
GCWing:mainfrom
wgqqqqq:feat/harmonyos-app-i18n

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The phone could show Chinese copy and nothing else. RemoteI18n was a
static zh-CN map, so Settings had no language control and a switch could
not rebuild the current surface.

This keeps locale ids, catalogs, and fallback on the phone itself — the
same zh-CN / en-US contract as the rest of the product, without
importing Web UI or mobile-web catalogs. First launch uses a stored
preference, then the system language, then zh-CN. Changing language in
Settings writes that preference and refreshes the open UI immediately,
including status, time, speech recognition, and permission strings.

Shared short labels such as 设置 / 未连接 are not remapped by value
alone; only unique catalog strings, or fields that name their keys, move
with the language.

The HarmonyOS architecture check no longer fails a file for crossing a
line count. Ownership still has to stay focused; do not flatten a file
just to stay under a number.

Verification: harmony:architecture, assembleHap, and LocalTest pass.
The signed HAP was installed on the connected phone and launched.

Design notes: src/apps/mobile/harmonyos/docs/harmonyos-i18n-design.md

The in-app language never changed because RemoteI18n only had a
hardcoded zh-CN map and no locale state. Keep catalogs, persistence,
and Settings selection on the phone so the current surface rebuilds
immediately after a switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wgqqqqq
wgqqqqq merged commit 3a7c75a into GCWing:main Aug 18, 2026
8 checks passed
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