Skip to content

Add a daily translation-sync job#23001

Open
oguzkocer wants to merge 10 commits into
trunkfrom
task/daily-translation-sync
Open

Add a daily translation-sync job#23001
oguzkocer wants to merge 10 commits into
trunkfrom
task/daily-translation-sync

Conversation

@oguzkocer

@oguzkocer oguzkocer commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a daily job that pulls the latest WordPress & Jetpack translations from GlotPress and opens (or refreshes) a single rolling PR, keeping trunk continuously localized. Part of the Faster Releases effort.

  • update_translations lane (fastlane/lanes/localization.rb): checks out trunk, resets translations/daily-update to it, runs the existing download_translations, and — only if there are new translations — force-pushes the branch and opens the PR via release-toolkit's find_or_create_pull_request. No new translations ⇒ no commit ⇒ no PR. The branch is reset each run, so the PR always shows the full current delta against trunk (no accumulation).
  • .buildkite/commands/download-translations.sh: install_gems + configure_apply + bundle exec fastlane update_translations (mirrors beta-build.sh).
  • .buildkite/schedules/download-translations.yml: the scheduled pipeline (mirrors dependency-cache.yml); labels the PR Localization and notifies #android-core-notifs on failure.

Testing instructions

The lane is schedule-triggered, so normal PR CI does not exercise it. To verify it manually:

  1. Trigger a build on the wordpress-android pipeline for this branch with env PIPELINE=schedules/download-translations.yml.
  • Verify it downloads translations and opens (or refreshes) a translations/daily-update PR labelled Localization.
  1. Trigger it again when GlotPress has no new strings.
  • Verify it no-ops — no commit and no PR.

@dangermattic

dangermattic commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr23001-21c27b9
Build Number1498
Application IDorg.wordpress.android.prealpha
Commit21c27b9
Installation URL5oomnqhruroeg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr23001-21c27b9
Build Number1498
Application IDcom.jetpack.android.prealpha
Commit21c27b9
Installation URL4fgohip5g7ggg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

New update_translations lane downloads the latest WordPress & Jetpack
translations from GlotPress and opens/refreshes a single rolling
translations/daily-update PR via release-toolkit's find_or_create_pull_request.
A new scheduled Buildkite pipeline runs it daily.
- download-translations.sh: 'source use-bot-for-git' (like the release
  committing lanes) so the agent has a git identity/auth; drop configure_apply
  (not needed for translations).
- update_translations lane: use GitHelper.create_branch / point_to_same_commit?
  and push_to_git_remote instead of raw git sh calls, mirroring release.rb.
The job commits, pushes and opens a PR, which needs the bot git identity from
use-bot-for-git — only available on mac-metal agents, same as the release
code-freeze/finalize lanes. (android only builds, so release-builds.yml stays there.)
@oguzkocer oguzkocer force-pushed the task/daily-translation-sync branch from a0c6285 to 9b0fdcf Compare July 15, 2026 00:58
Comment out the notify block; the channel is pre-set to #wpmobile for if/when
it is re-enabled.
After downloading, prune keys no longer in the source strings (main/res vs
main; jetpack/res vs main+jetpack) via android_prune_orphaned_translations and
commit it separately, so the PR shows exactly what was pruned vs downloaded.
Re-enable the notify block, routed to #test-wpmobile-slack-integration while this flow is validated, mirroring the beta-promotion pipeline. Moves to #wpmobile once it ships to real use.
Use `#!/usr/bin/env bash` + `set -eu` (the more robust shebang recommended in review) and the `:rubygems: Setting up Gems` header, matching build-trunk-internal.sh, gather-beta-candidates.sh and promote-to-beta.sh.
Comment thread fastlane/lanes/localization.rb Outdated
Comment thread fastlane/lanes/localization.rb Outdated
oguzkocer and others added 3 commits July 15, 2026 17:54
Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com>
… out

Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com>
@oguzkocer oguzkocer requested a review from jkmassel July 15, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants