Skip to content

fix(i18n): replace hardcoded strings in ProfilePopupLayout with i18n …#2944

Merged
StageGuard merged 2 commits intoopen-ani:mainfrom
wellorbetter:fix/issue-2938-profile-popup-i18n
Apr 28, 2026
Merged

fix(i18n): replace hardcoded strings in ProfilePopupLayout with i18n …#2944
StageGuard merged 2 commits intoopen-ani:mainfrom
wellorbetter:fix/issue-2938-profile-popup-i18n

Conversation

@wellorbetter
Copy link
Copy Markdown
Contributor


Description

Replace hardcoded Chinese strings in ProfilePopupLayout and ProfilePopup with proper i18n resource references.

Closes #2938

Reasoning

ProfilePopupLayout.kt and ProfilePopup.kt contained hardcoded Chinese strings ("未登录", "编辑个人资料", "登录 / 注册", "设置",
"退出登录", "确定要退出登录吗?", "取消"). These have been replaced with stringResource(Lang.xxx) calls following the existing
pattern in the codebase.

New string keys added under the settings_account_popup_* namespace, with translations provided for:

  • values/ (English)
  • values-zh-rCN/ (Simplified Chinese)
  • values-zh-rHK/ (Traditional Chinese — Hong Kong)
  • values-zh-rTW/ (Traditional Chinese — Taiwan)

zh-MO, zh-SG, and zh locales are auto-generated by the populateStringsLocales Gradle task and are not committed.

Type of change

✅ Bug fix
❌ New feature / Enhancement (i18n support for account popup strings)
❌ Breaking change
❌ Refactor
❌ Performance
❌ Style
❌ Docs
❌ Chore


@Him188 Him188 enabled auto-merge (squash) April 7, 2026 06:39
auto-merge was automatically disabled April 8, 2026 10:44

Head branch was pushed to by a user without write access

@wellorbetter wellorbetter requested a review from Him188 April 8, 2026 10:51
@wellorbetter
Copy link
Copy Markdown
Contributor Author

Tests are flaky — passed locally on the same base commit (201a1d3). Could you re-run the CI? Thanks. @Him188

@wellorbetter wellorbetter requested a review from Him188 April 12, 2026 09:44
@wellorbetter
Copy link
Copy Markdown
Contributor Author

CI failure on Build (macOS 15 x86_64) is a runner environment issue, not related to this PR.

This PR only modifies i18n strings (strings.xml × 4) and two Kotlin files (ProfilePopup.kt, ProfilePopupLayout.kt). Verified locally — compileKotlinDesktop passes with no errors. The rm local.properties error is also a CI-side issue (missing -f flag).

Could you re-run CI? Thanks.

@wellorbetter wellorbetter force-pushed the fix/issue-2938-profile-popup-i18n branch from 3fecefd to d9643cc Compare April 20, 2026 15:44
wellorbetter and others added 2 commits April 28, 2026 21:36
…resources open-ani#2938

- Add 7 new string keys for the account popup (not_logged_in, edit_profile,
  login_register, logout, logout_confirm, logout_button, cancel)
- Provide translations in en, zh-CN, zh-HK, zh-TW
- Update ProfilePopupLayout.kt and ProfilePopup.kt to use stringResource(Lang.xxx)
@wellorbetter wellorbetter force-pushed the fix/issue-2938-profile-popup-i18n branch from d9643cc to aa58194 Compare April 28, 2026 13:36
@wellorbetter
Copy link
Copy Markdown
Contributor Author

@Him188 Hi, can you review this pr & re-triger this CI?

@ChouChiu

This comment has been minimized.

@StageGuard
Copy link
Copy Markdown
Member

@Him188 Hi, can you review this pr & re-triger this CI?

貌似自己 approve 一下就行了

是我点的

@wellorbetter
Copy link
Copy Markdown
Contributor Author

CI passed. Could you merge this change? Thanks. @StageGuard

@StageGuard StageGuard merged commit 0c39501 into open-ani:main Apr 28, 2026
11 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.

點擊頭像後介面的少許簡體字

4 participants