Skip to content

Conversation

@vvolkgang
Copy link
Member

@vvolkgang vvolkgang commented Oct 31, 2025

๐ŸŽŸ๏ธ Tracking

PM-27018

๐Ÿ“” Objective

Both iOS Password Manager and Authenticator have a list of supported languages, this list was missing 22 languages that are supported in our Crowdin Project. While analyzing that I noticed other issues with existing language codes too, this PR addresses both.

  • Removes Esperanto :( - We don't currently have Esperanto as a supported language in our Crowdin project.
  • Fixed ๐Ÿ‡ต๐Ÿ‡น Portuguese (Portugal) defaulting to English in Password Manager and Authenticator
  • Fixed ๐Ÿ‡ง๐Ÿ‡ท Portuguese (Brasil), ๐Ÿ‡จ๐Ÿ‡ณ Simplified Chinese and ๐Ÿ‡จ๐Ÿ‡ณ Traditional Chinese defaulting to English in Authenticator
  • Add Crowdin project supported languages to Password Manager and Authenticator list:
    • ar (Arabic)
    • az (Azerbaijani)
    • bn (Bengali)
    • bs (Bosnian)
    • cy (Welsh)
    • en-IN (English India)
    • eu (Basque)
    • fil (Filipino)
    • gl (Galician)
    • ka (Georgian)
    • kn (Kannada)
    • lt (Lithuanian)
    • mr (Marathi)
    • my (Burmese)
    • ne (Nepali)
    • nn-NO (Norwegian Nynorsk)
    • or (Odia)
    • si (Sinhala)
    • sl (Slovenian)
    • sr (Serbian)
    • ta (Tamil)
    • te (Telugu)

๐Ÿ“ธ Screenshots

  • Fixed ๐Ÿ‡ต๐Ÿ‡น Portuguese (Portugal)
image

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

๐Ÿฆฎ 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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2025

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 5c534907-f315-496d-8a37-04c3cceb97f6

Great job! No new security vulnerabilities introduced in this pull request

@KatherineInCode
Copy link
Contributor

๐Ÿค” Consolidating the LanguageOption into BitwardenKit is actually on my list of things with eventually getting the entire Select Language UI/UX consolidated. Is that something you think could be done in this PR, or would you rather wait on it until later?

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

โœ… All modified and coverable lines are covered by tests.
โœ… Project coverage is 82.95%. Comparing base (6ff9048) to head (ad42365).
โš ๏ธ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2086      +/-   ##
==========================================
- Coverage   85.28%   82.95%   -2.34%     
==========================================
  Files        1695     1973     +278     
  Lines      144592   160801   +16209     
==========================================
+ Hits       123319   133388   +10069     
- Misses      21273    27413    +6140     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„๏ธ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vvolkgang vvolkgang changed the title Vvolkgang/add missing l10n [PM-27018] Add 22 supported languages and fix existing language codes ๐Ÿ‡ต๐Ÿ‡น๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡จ๐Ÿ‡ณ Nov 3, 2025
@vvolkgang vvolkgang changed the title [PM-27018] Add 22 supported languages and fix existing language codes ๐Ÿ‡ต๐Ÿ‡น๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡จ๐Ÿ‡ณ [PM-27018] Add 22 supported languages and fix existing language codes Nov 3, 2025
@vvolkgang vvolkgang changed the title [PM-27018] Add 22 supported languages and fix existing language codes [PM-27018] Add 22 supported languages and fix existing language codes in Password Manager and Authenticator Nov 3, 2025
@vvolkgang vvolkgang marked this pull request as ready for review November 3, 2025 16:59
@vvolkgang vvolkgang requested review from a team and matt-livefront as code owners November 3, 2025 16:59
@claude
Copy link

claude bot commented Nov 3, 2025

Claude finished @vvolkgang's task โ€”โ€” View job


Code Review Complete

Summary of Changes

This PR successfully addresses the issue raised by @fedemkr's review comment by adding 22 missing supported languages and fixing existing language code issues across both Password Manager and Authenticator apps. The changes include:

  1. Removed Esperanto (eo) - not supported in Crowdin
  2. Fixed incorrect language codes:
    • Password Manager: pt-PT โ†’ pt (Portuguese Portugal)
    • Authenticator: pt-BT โ†’ pt-BR (Brazilian Portuguese - typo fix)
    • Authenticator: zh-CN โ†’ zh-Hans, zh-TW โ†’ zh-Hant (proper Chinese variants)
  3. Added 22 new languages from Crowdin to both apps
  4. Updated CFBundleLocalizations in all 5 Info.plist files as requested
  5. Updated tests to reflect new language count (63 total)

Critical Issues

None identified. The reviewer's concern about CFBundleLocalizations has been properly addressed in commit ad42365ed.


Suggested Improvements

1. Missing Portuguese Portugal in old Password Manager Info.plist

File: Bitwarden/Application/Support/Info.plist

The original Info.plist had an unorganized list with incorrect codes like dk (should be da for Danish) and cz (should be cs for Czech). While this PR fixes the language codes in the LanguageOption enum, the Info.plist refactor is good but worth noting the old file had inconsistencies.

Old Info.plist issues (now fixed)

The old file had:

  • dk instead of da (Danish)
  • cz instead of cs (Czech)
  • pt-PT which doesn't match iOS standard for Portugal Portuguese (should be pt)

All of these are now corrected in the new alphabetically sorted list.

2. Code Duplication Between Password Manager and Authenticator

Files:

  • BitwardenShared/Core/Platform/Models/Enum/LanguageOption.swift:23-87
  • AuthenticatorShared/Core/Platform/Models/Enum/LanguageOption.swift:23-87

Both LanguageOption enums have identical languageCodes arrays. As @KatherineInCode mentioned in the comments, consolidating these into BitwardenKit would eliminate duplication and potential drift.

Suggestion: This is tracked for future work and appropriately scoped out of this PR. The comment at line 20-22 in both files correctly documents the intention to dynamically fetch languages in the future.

3. Test Comment Accuracy

Files:

  • BitwardenShared/Core/Platform/Models/Enum/LanguageOptionTests.swift:14
  • AuthenticatorShared/Core/Platform/Models/Enum/LanguageOptionTests.swift:14
XCTAssertEqual(allCases.count, 63) // "default" + "en" + crowdin provided languages

The comment is slightly misleading. The count is actually: 1 (default) + 62 language codes = 63 total. The comment suggests "en" is separate from "crowdin provided languages," but "en" is included in the 62 language codes.

Suggested fix:

XCTAssertEqual(allCases.count, 63) // 1 default + 62 language codes from Crowdin

4. Missing DocC Documentation

Files:

  • BitwardenShared/Core/Platform/Models/Enum/LanguageOption.swift:23
  • AuthenticatorShared/Core/Platform/Models/Enum/LanguageOption.swift:23

The languageCodes property lacks DocC documentation. Per CLAUDE.md directive: "Everything in the code requires DocC documentation."

Suggested addition:

/// All supported language codes from the Crowdin localization project.
///
/// This array is manually maintained to match the languages available in Crowdin.
/// Ideally this would be dynamically fetched from `Bundle.main.localizations`, but that
/// currently doesn't return reliable results.
private static let languageCodes = [

5. Info.plist Consistency Verification

โœ… All 5 Info.plist files that were modified have identical, alphabetically sorted CFBundleLocalizations arrays:

  • Bitwarden/Application/Support/Info.plist
  • Authenticator/Application/Support/Info.plist
  • BitwardenActionExtension/Application/Support/Info.plist
  • BitwardenAutoFillExtension/Application/Support/Info.plist
  • BitwardenShareExtension/Application/Support/Info.plist

This is excellent for maintainability.


Good Practices Observed

  • โœ… Alphabetically sorted language codes for easy maintenance
  • โœ… Consistent application of changes across both Password Manager and Authenticator
  • โœ… Test updates to match new language count
  • โœ… Proper use of iOS standard language codes (zh-Hans, zh-Hant, pt, pt-BR)
  • โœ… All Info.plist files updated consistently as per reviewer feedback
  • โœ… Informative commit messages tracking the evolution of fixes
  • โœ… Removed invalid language codes (Esperanto, typos like pt-BT)

Action Items for Author

Required

None - the PR addresses the reviewer's concern and is functionally complete.

Optional Improvements

  1. Minor: Update test comment to be more precise about the count breakdown (item Update dependency prettier to v3ย #3)
  2. Minor: Add DocC documentation to languageCodes property (item Lock file maintenanceย #4)
  3. Future: Track the consolidation of LanguageOption into BitwardenKit as @KatherineInCode suggested (already acknowledged by author)

Architecture & Code Style Compliance

โœ… Architecture: Changes follow established patterns. Language handling remains in the Platform layer as appropriate.

โœ… Code Style: Consistent with Swift code style guidelines. Alphabetically sorted arrays are a good practice.

โœ… Testing: Test coverage is maintained with updated assertions.

โœ… Security: No security implications for language selection changes.


Conclusion

This is a well-executed PR that addresses missing language support and fixes existing language code issues. The reviewer's concern about CFBundleLocalizations has been properly resolved. The suggested improvements are minor and optional. The PR is ready to merge pending any final team review.

Recommendation: โœ… Approve with optional minor improvements

@vvolkgang
Copy link
Member Author

๐Ÿค” Consolidating the LanguageOption into BitwardenKit is actually on my list of things with eventually getting the entire Select Language UI/UX consolidated. Is that something you think could be done in this PR, or would you rather wait on it until later?

Let's keep that to a separate PR. Ideally, this would also be refactored to load the list based on existing files but reckon we could provide a quick win for the time being and handle that later too.

@KatherineInCode
Copy link
Contributor

Let's keep that to a separate PR.

Roger roger

Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ In order to update supported languages of the apps, the Info.plist files should be updated as well as you can see under CFBundleLocalizations => https://github.com/bitwarden/ios/blob/main/Bitwarden/Application/Support/Info.plist#L24.

@vvolkgang
Copy link
Member Author

vvolkgang commented Nov 3, 2025

โš ๏ธ In order to update supported languages of the apps, the Info.plist files should be updated as well as you can see under CFBundleLocalizations => https://github.com/bitwarden/ios/blob/main/Bitwarden/Application/Support/Info.plist#L24.

@fedemkr Thanks for raising it, updated all Info.plist files!

@vvolkgang vvolkgang enabled auto-merge (squash) November 3, 2025 22:00
@vvolkgang vvolkgang merged commit 2e4b325 into main Nov 3, 2025
16 checks passed
@vvolkgang vvolkgang deleted the vvolkgang/add-missing-l10n branch November 3, 2025 22:10
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