Skip to content

[Tooling] Add Localization sync job #770

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

Open
wants to merge 4 commits into
base: iangmaia/fluent-to-glotpress-with-rust-tools
Choose a base branch
from

Conversation

iangmaia
Copy link
Contributor

Related to AINFRA-573: Integrate Fluent translations import/export in the Release Process

Based on #765, which needs to be merged first.

This PR adds a job to sync the translations, reusing the nightly schedule. It essentially:

  1. Generates a new source English .po file based on wp_localization/localization/en-US/main.ftl and updates it in the repo (so it is uploaded to GlotPress with a wpcom job)
  2. Downloads the translations from GlotPress and converts them to Fluent files, updating them in the repo.

@iangmaia iangmaia requested a review from a team June 16, 2025 19:53
@iangmaia iangmaia self-assigned this Jun 16, 2025
Comment on lines 9 to 13
echo "--- :globe_with_meridians: :arrow_up: Generate the source language PO file for GlotPress based on `wp_localization/localization/en-US/main.ftl`"
bundle exec fastlane generate_source_po_file commit_and_push_changes:true

echo "--- :globe_with_meridians: :arrow_down: Download and update translations from GlotPress and update the local Fluent files"
bundle exec fastlane download_translations commit_and_push_changes:true

Choose a reason for hiding this comment

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

Not critical, but maybe it'd be nicer to have the lanes only commit without pushing, and push only at the end after both lanes have run, to push both commits at once instead of having 2 push operations? 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I also realized it once I published this PR 👍 I wasn't sure how the lanes were going to work independently but having them running together makes it clearer that is better to avoid the side effect in the lane itself.

I'll write it down to tackle it in #765 and then update it here 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 2c4547c / e022478.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants