-
Notifications
You must be signed in to change notification settings - Fork 53
[PM-9907] Change language codes for Chinese and Brazilian Portuguese #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #994 +/- ##
=======================================
Coverage 89.05% 89.05%
=======================================
Files 654 654
Lines 41057 41057
=======================================
Hits 36562 36562
Misses 4495 4495 ☔ View full report in Codecov by Sentry. |
No New Or Fixed Issues Found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving because these look good to me, especially if they fix the issue, but I can't comment on the names, unfortunately.
📝 You will need to also update the snapshot tests for this. Particularly, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes make sense, as those codes should match what we have in the Info.plist and Localized string files.
Bitwarden/Application/Support/Info.plist:
<string>pt-PT</string>
<string>pt-BR</string>
<string>zh-Hans</string>
<string>zh-Hant</string>
BitwardenShared/UI/Platform/Application/Support/Localizations:
pt-BR.lproj
pt-PT.lproj
zh-Hans.lproj
zh-Hant.lproj
One thing I noticed though, if I set my system language (as opposed to the app's override) to simplified Chinese, I'm still only seeing English.
We currently use Locale.current.languageCode
to get the user's system language code, but maybe we should instead be using the bundle's preferredLocalizations
array.
(lldb) po Locale.current.languageCode
▿ Optional<String>
- some : "zh"
(lldb) po Bundle.main.preferredLocalizations
▿ 1 element
- 0 : "zh-Hans"
Seems I'm using Xcode 16 which isn't supported by our codebase yet 😓. |
989c4b6
When can it be repaired? |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-12977
📔 Objective
iOS prefers to use the
zh-Hans
andzh-Hant
language codes for traditional / simplified Chinese rather thanzh-CN
andzh-TW
that we previously used. This seems to resolve the issues around the language not working however it also changes how we represent it in the language picker.We should confirm this language codes are what we desire to use, and how they behave with the system language options.
📸 Screenshots
Before:

After:

⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes