Use external l10n repos to extract and build locales - #14411
Conversation
ccc575b to
de7c0bd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14411 +/- ##
=======================================
Coverage 98.13% 98.13%
=======================================
Files 269 269
Lines 10750 10750
Branches 3314 3314
=======================================
Hits 10550 10550
Misses 187 187
Partials 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| token: ${{ secrets.L10N_GITHUB_TOKEN }} | ||
| persist-credentials: ${{ needs.context.outputs.is_default_branch }} | ||
| path: locale | ||
|
|
There was a problem hiding this comment.
I guess there's no way to avoid repeating this 8 times? :-/
There was a problem hiding this comment.
The options to avoid repeating are git submodules or a custom GitHub Action that does that double actions/checkout. I figured to start with the explicit checkout was simpler to understand, even if that's not very DRY.
| git push "$@" | ||
| git push "$@" -f origin $BRANCH_NAME | ||
|
|
||
| gh pr create --fill --head $BRANCH_NAME |
There was a problem hiding this comment.
So we push a branch to the l10n repo, and then create a PR... what merges the PR? (should we just merge directly to the main branch?)
There was a problem hiding this comment.
The idea is that the l10n person in charge of AMO (currently flod) merges it if the PR looks fine, or comes back to us with some feedback if some strings are unclear - that's how other teams do that. We could automate that part as well later if necessary (we can call gh pr merge here as well, or separately)
There was a problem hiding this comment.
If they want that step (extra work for them), then that works.
Part of mozilla/addons#16413
Description
This moves locale (
*.pot,*.po) files to an external repository, https://github.com/mozilla-l10n/addons-frontend-l10n.That repository is expected to be cloned into
locale/directory locally if you want to see translated content, and all relevant CI jobs do that transparently.CI will run the extraction using that repository and automatically open a pull request there if necessary, while the build step will simply continue to work as it does now (since the clone of the l10n repo happens in
locale/).Notes
This removes and gitignores the
locale/directory, so merge conflicts are to be expected until Pontoon switches to import/export from the https://github.com/mozilla-l10n/addons-frontend-l10n repository. We don't want to merge this PR until that happens anyway. I've filed https://mozilla-hub.atlassian.net/browse/LR-384 for this.