Skip to content
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

Version 2.0.1 #61

Merged
merged 2 commits into from
Sep 21, 2023
Merged

Version 2.0.1 #61

merged 2 commits into from
Sep 21, 2023

Conversation

stelabouras
Copy link
Collaborator

  • Addresses language tag discrepancy: The fallback mechanism for accessing the
    bundled source locale translations, in case the target translations was not
    found, was trying to access the file by using the format that Transifex uses
    (e.g. en_US) instead of the one that iOS and Xcode use (e.g. en-US). The
    logic now normalizes the locale name to match the format that iOS accepts.

iOS accesses the language tags using a hyphen (e.g. `en-GB`), whilst
Transifex uses an underscore for the delimiter (e.g. `en_GB`).

This discrepancy was causing an issue in the `BypassLocalizer` class
logic, that is used to access the underlying bundled localized asset of
the app as a final fall-back when the translated strings cannot be found.

This fix replaces the underscore character (`_`) with a hyphen (`-`) in
the provided `localeCode` of the `BypassLocalizer` constructor, to
ensure that the underlying asset is always accessible by the logic.
* Bumps `TXNative.version` to 2.0.1.
* Updates CHANGELOG with the changes implemented for 2.0.1.
@n1k0sv n1k0sv merged commit 4490b3e into devel Sep 21, 2023
1 check passed
@n1k0sv n1k0sv deleted the stelios/fix/language-tag-delimiter branch September 21, 2023 08:01
@txsentinel txsentinel mentioned this pull request Sep 21, 2023
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