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

Add helper command to extract strings to an external repo #4199

Merged
merged 15 commits into from
Feb 19, 2020
Merged

Conversation

TheoChevalier
Copy link
Contributor

@TheoChevalier TheoChevalier commented Feb 13, 2020

This is related to MozillaFoundation/mofo-devops#735

Once the new workflow is live, translation files will live in an external repo. The string extraction will still happen in this repo, so this PR adds a script facilitating the string extraction.

It knows where to find the external repo via an env var. Mine looks like LOCAL_PATH_TO_L10N_REPO=/Users/theochevalier/Documents/GitHub/fomo-l10n/

What the script does:

  • Import the latest translation files from your local copy of the fomo-l10n repo to the right places in your local foundation.mozilla.org repo
  • Run makemessages to update all .po files
  • Export the updated .po files to the fomo-l10n repo

Then if everything looks right, I can easily commit & push the updates to fomo-l10n

@patjouk patjouk temporarily deployed to foundation-s-l10n-mgmt-aqzoayd February 13, 2020 18:52 Inactive
@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 13, 2020 18:54 Failure
Copy link
Contributor

@patjouk patjouk left a comment

Choose a reason for hiding this comment

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

LGTM, just a few code styling errors to fix: https://travis-ci.org/mozilla/foundation.mozilla.org/jobs/650100919#L252-L255
It's not a blocker, but adding a small paragraph with a link to the l1on repo and how to import/export translations would be useful for devs. It could be a new file in the docs directory or in the main readme.

@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 14, 2020 10:21 Failure
@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 14, 2020 16:47 Failure
@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 14, 2020 17:19 Failure
@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 14, 2020 17:22 Failure
@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 14, 2020 17:47 Failure
@TheoChevalier
Copy link
Contributor Author

Thanks! Fixed the tests, and added some doc in the readme

@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 19, 2020 10:33 Failure
Copy link
Contributor

@patjouk patjouk left a comment

Choose a reason for hiding this comment

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

All good! The review app is failing for now because compilemessages is compiling all the .po files from the virtualenv oO, but that's no need to worry/investigate since we're removing that step.
Let's merge the code that use the new translations archive, and then this PR.

@patjouk patjouk had a problem deploying to foundation-s-l10n-mgmt-aqzoayd February 19, 2020 14:08 Failure
@patjouk patjouk temporarily deployed to foundation-s-l10n-mgmt-aqzoayd February 19, 2020 14:15 Inactive
@patjouk patjouk temporarily deployed to foundation-s-l10n-mgmt-aqzoayd February 19, 2020 14:16 Inactive
@TheoChevalier TheoChevalier changed the title (Do not merge) Add helper command to extract strings to an external repo Add helper command to extract strings to an external repo Feb 19, 2020
@patjouk patjouk merged commit 6391f63 into master Feb 19, 2020
@patjouk patjouk deleted the l10n-mgmt branch February 19, 2020 14:53
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