Skip to content

Enhance i18n:check task #1578

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

Merged
merged 1 commit into from
Dec 2, 2021
Merged

Enhance i18n:check task #1578

merged 1 commit into from
Dec 2, 2021

Conversation

silvanocerza
Copy link
Contributor

@silvanocerza silvanocerza commented Dec 2, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

Enhances the i18n:check task to also verify that translations files other than en.po are up to date.

  • What is the current behavior?

i18n:check verifies that en.po has the same data and formatting as the one generated by i18n:update.

  • What is the new behavior?

i18n:check task used to verify only if the source en.po file was up to date. The new process instead verifies that all translations are up to date by downloading them directly from Transifex.

The previous process was causing some issues since after uploading the en.po file Transifex would change its formatting, meaning when calling i18n:pull we would download a file containing the same information but formatted in a different way and that made the i18n:check command fail.

By making the i18n:check task call i18n:pull instead of i18n:update we don't have issues with the formatting anymore.

This change also covers a corner-case that would occur when the en.po file wasn't updated since a long time, the i18n:check wouldn't fail because the en.po was the same as before but that wouldn't mean that the translations were up to date with the latest from Transifex.

Nope.

  • Other information:

Fixes #1560.


See how to contribute

@silvanocerza silvanocerza added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Dec 2, 2021
@silvanocerza silvanocerza self-assigned this Dec 2, 2021
@silvanocerza silvanocerza added the type: imperfection Perceived defect in any part of project label Dec 2, 2021
i18n:check task used to verify only if the source en.po file was up to
date. The new process instead verifies that all translations are up to
date by downloading them directly from Transifex.

The previous process was causing some issues since after uploading the
en.po file Transifex would change its formatting, meaning when calling
i18n:pull we would download a file containing the same information but
formatted in a different way and that made the i18n:check command fail.

By making the i18n:check task call i18n:pull instead of i18n:update we
don't have issues with the formatting anymore.

This change also covers a corner-case that would occur when the
en.po file wasn't updated since a long time, the i18n:check wouldn't
fail because the en.po was the same as before but that wouldn't mean
that the translations were up to date with the latest from Transifex.
@silvanocerza silvanocerza force-pushed the scerza/enhance-i18n-check branch from 28c3afb to 1e52dbb Compare December 2, 2021 09:58
@silvanocerza silvanocerza merged commit 8f0e8ae into master Dec 2, 2021
@silvanocerza silvanocerza deleted the scerza/enhance-i18n-check branch December 2, 2021 10:19
umbynos pushed a commit that referenced this pull request Dec 7, 2021
i18n:check task used to verify only if the source en.po file was up to
date. The new process instead verifies that all translations are up to
date by downloading them directly from Transifex.

The previous process was causing some issues since after uploading the
en.po file Transifex would change its formatting, meaning when calling
i18n:pull we would download a file containing the same information but
formatted in a different way and that made the i18n:check command fail.

By making the i18n:check task call i18n:pull instead of i18n:update we
don't have issues with the formatting anymore.

This change also covers a corner-case that would occur when the
en.po file wasn't updated since a long time, the i18n:check wouldn't
fail because the en.po was the same as before but that wouldn't mean
that the translations were up to date with the latest from Transifex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix transifex translation handling
2 participants