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.1.1 #28

Merged
merged 4 commits into from
Sep 21, 2023
Merged

Version 2.1.1 #28

merged 4 commits into from
Sep 21, 2023

Conversation

stelabouras
Copy link
Collaborator

This PR introduces a number of fixes that are outlined in each separate commit and in the CHANGELOG.

More specifically:

  • Adds --source-locale option to pull command so that developers can specify
    the source locale, if it's different than en. If not provided, the pull
    logic default to the en source locale.
  • Fixes an issue on push command where the unsupported SDK files were not
    being excluded by the localization parsing logic.
  • Addresses language tag discrepancy: In the push command, the
    --source-locale option refers to the source locale of the Xcode project and
    the format used by Xcode and iOS is different than the format used by Transifex
    (e.g en-US instead of en_US). For that reason the source locale string is
    now normalized before being passed to the exporter logic so that the latter can
    always be able to export the source locale from the Xcode project.

The pull logic used to always default to the 'en' source locale, so
projects with a different source locale would fail to fetch the source
locale strings.

This commit introduces the `--source-locale` option that can be used to
fetch the correct locale from Transifex.
The logic responsible for excluding the filename list provided by the
developer via the respective option of the push command was not
including the `UNSUPPORTED_FILES`, thus not excluding files that are not
supported by the SDK like `InfoPlist.strings` or `Root.string`.

This commit fixes this issue by passing the correct array to the logic.
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 can cause confusion to developers which expect
the Transifex format and will try to pass that in the `--source-locale`
option of the `push` command, causing the push logic to fail to export
the localizations from the project.

This commit addresses the issue by normalizing the `sourceLocale`
argument in the `LocalizationExporter` constructor so that the
underscore character (`_`) is replaced with a hypen (`-`) so that the
`xcodebuild` command will be able to export the localizations
correctly.
* Bumps CLI version to 2.1.1.
* Updates the CHANGELOG.
@n1k0sv n1k0sv merged commit 87dd281 into transifex:master Sep 21, 2023
1 check 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.

2 participants