Skip to content

Add initial .pot file and extract pot generation to a reusable lane#2658

Merged
iangmaia merged 2 commits intotrunkfrom
iangmaia/add-initial-pot-file
Feb 25, 2026
Merged

Add initial .pot file and extract pot generation to a reusable lane#2658
iangmaia merged 2 commits intotrunkfrom
iangmaia/add-initial-pot-file

Conversation

@iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Feb 24, 2026

Related issues

Proposed Changes

  • Extract the .pot file generation logic from the code_freeze lane into a standalone generate_pot_file lane, making it reusable by other lanes (e.g. finalize_release)
  • Add the initial i18n/bundle-strings.pot file to version control so it can be used as a baseline for future string extraction

Testing Instructions

  • Verify that the generate_pot_file lane can be invoked independently: bundle exec fastlane generate_pot_file

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@iangmaia iangmaia self-assigned this Feb 24, 2026
Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

The code looks good! AFAIU, the .pot file is tracked in Git, so a cron job can use it to update GlotPress. However, I think that file won’t be added back to trunk until the release is completed and the PR is back-merged. @iangmaia , is that right? If so, it will be hard to translate the new strings that are added in the new release.

Copy link
Contributor

We do backmerge PRs at different stages of the release process, including:

  1. One right after the code-freeze
  2. One after each (optional) intermediate beta you might end up adding during the beta-testing phase, if needed
  3. One after the release finalization

I expect we generate the updated .pot file during code-freeze, which indeed commit those changes in the release/* branch, but the backmerge from (1) we do at the end of code-freeze should make the new .pot land into trunk early in the process, leaving the whole duration of the beta-testing phase for the new strings to start being translated as soon as the code and string copies are frozen for that release and don't intend to be modified for that release anymore.

This assumes that your beta-testing phase will be long enough for translators to translate new strings, so if your typical beta-testing phase (time between code-freeze and release finalization) lasts 2 weeks (well, ≈ 12 open days) for example that should be plenty enough. If you beta-testing phase is 1 week only, it might or might not be tight depending on the amount of new strings you have to translate and the reactivity of translators, though in most products this is usually still enough. But still good point to be conscious about! 👍

@iangmaia
Copy link
Contributor Author

we generate the updated .pot file during code-freeze, which indeed commit those changes in the release/* branch, but the backmerge from (1) we do at the end of code-freeze should make the new .pot land into trunk early in the process

🎯 Yep, that's exactly it 👍 So @sejas the GlotPress upload will be from the code freeze. That way, the set of strings being added to a given release is also part of the release.

Base automatically changed from iangmaia/add-studio-to-releasesv2 to trunk February 25, 2026 18:03
@iangmaia iangmaia force-pushed the iangmaia/add-initial-pot-file branch from 638798a to dacb487 Compare February 25, 2026 18:05
@iangmaia iangmaia merged commit 8f5b3f2 into trunk Feb 25, 2026
8 of 10 checks passed
@iangmaia iangmaia deleted the iangmaia/add-initial-pot-file branch February 25, 2026 18:12
@wpmobilebot
Copy link
Collaborator

📊 Performance Test Results

Comparing dacb487 vs trunk

site-editor

Metric trunk dacb487 Diff Change
load 1428.00 ms 1427.00 ms -1.00 ms ⚪ 0.0%

site-startup

Metric trunk dacb487 Diff Change
siteCreation 7088.00 ms 7128.00 ms +40.00 ms ⚪ 0.0%
siteStartup 3939.00 ms 3939.00 ms 0.00 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

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.

4 participants