Skip to content

Use external l10n repos to extract and build locales - #14411

Open
diox wants to merge 5 commits into
masterfrom
external-l10n-repos
Open

Use external l10n repos to extract and build locales#14411
diox wants to merge 5 commits into
masterfrom
external-l10n-repos

Conversation

@diox

@diox diox commented Aug 24, 2026

Copy link
Copy Markdown
Member

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.

@diox
diox force-pushed the external-l10n-repos branch from ccc575b to de7c0bd Compare August 24, 2026 11:18
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.13%. Comparing base (17b2f2e) to head (50e895a).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@diox
diox requested a review from eviljeff August 24, 2026 12:45
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
token: ${{ secrets.L10N_GITHUB_TOKEN }}
persist-credentials: ${{ needs.context.outputs.is_default_branch }}
path: locale

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess there's no way to avoid repeating this 8 times? :-/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Comment thread bin/push-locales
git push "$@"
git push "$@" -f origin $BRANCH_NAME

gh pr create --fill --head $BRANCH_NAME

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If they want that step (extra work for them), then that works.

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