Page MenuHomePhabricator

Deploy Phab/Phorge 2026-03-03
Closed, ResolvedPublic

Description

Only contains translation updates at the time of this writing.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
update translations submodule for 2026-03-03 deployrepos/phabricator/deployment!98brennenwork/2026-03-03-deploywmf/stable
Customize query in GitLab

Event Timeline

What's the point of deploying this, then?

(It doesn't really contain translation updates, only updates to the JSON files that Phabricator won't read until I run a script to update PHP files derived from them)

(Edit later: this is wrong - it does include at least https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1217845 which directly has an impact when deployed)

Icinga downtime and Alertmanager silence (ID=efc84c28-0407-41e2-bb5e-4615e2133bf1) set by jelto@cumin1003 for 0:30:00 on 1 host(s) and their services with reason: Phabricator deploy

phab2002.codfw.wmnet

Icinga downtime and Alertmanager silence (ID=03f74407-6bbd-4fff-bfe1-5af3e8b4557c) set by jelto@cumin1003 for 0:30:00 on 1 host(s) and their services with reason: Phabricator deploy

phab1004.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2026-03-03T16:04:48Z] <brennen@deploy2002> Started deploy [phabricator/deployment@a883b6d]: deploy phab2002 for T418872

Mentioned in SAL (#wikimedia-operations) [2026-03-03T16:05:20Z] <brennen@deploy2002> Finished deploy [phabricator/deployment@a883b6d]: deploy phab2002 for T418872 (duration: 00m 32s)

Mentioned in SAL (#wikimedia-operations) [2026-03-03T16:05:56Z] <brennen@deploy2002> Started deploy [phabricator/deployment@a883b6d]: deploy phab1004 for T418872

(It doesn't really contain translation updates, only updates to the JSON files that Phabricator won't read until I run a script to update PHP files derived from them)

Deploying in order to keep deploy repo up to date with merged state. Since this does contain PHP file changes, I was assuming that meant it contained a run of the script, but clearly I don't actually understand the translation process here.

Mentioned in SAL (#wikimedia-operations) [2026-03-03T16:07:04Z] <brennen@deploy2002> Finished deploy [phabricator/deployment@a883b6d]: deploy phab1004 for T418872 (duration: 01m 07s)

I've been doing a lot of internal reworking of the scripts used to generate translation files, most of which doesn't have a direct impact on any translations themselves. I haven't actually run the scripts themselves since https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1222809 on January 6

Technically https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1217845 probably did have a direct effect in some edge cases, the rest don't.

My (likely wrong) naïve understanding had been that your recent merged changes to the PHP code which handles extracting and generating translatable strings need to end up on the server at some point. :) But I also must say that I would not be able to explain the full translation workflow (e.g. interaction with translatewiki.net) which predates me poking Phabricator code. You know much better than I do. (Again, thanks for all that work! Very appreciated.)

Only changes that change the src/locales or src/translation directories need to be on the server. The files in src/management don't need to be on the server because they are only used to produce patches changing those directories. In normal times when I'm not poking at things (like from June 2024 to December 2025), here's how the process has been working.

  1. Wikimedia pulls in the latest upstream from Phorge,.
  2. I pull those changes from GitLab and run ./export.sh on my own computer (or, usually, a VM running on my computer), which is a thin wrapper around src/management/TranslateWikiManagementExportWorkflow.php
  3. This delegates to bin/i18n extract in the upstream Phorge repo.
  4. This produces a src/.cache/i18n_strings.json file in the directory where Phorge (and arcanist, and other WMF extensions) are installed. This file is in .gitignore, so isn't committed.
  5. src/management/TranslateWikiManagementExportWorkflow.php then parses that i18n_strings.json file and writes the relevant source strings to projects/*/en.json (and projects/*/en_x_raw.json and projects/*/qqq.json).
  6. I take these changes to the projects directory, and submit them as a patch for review in Gerrit usually with a commit message like "update source strings" (example: https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1206983)
  7. Someone (usually you) merges that patch.
  8. Translatewiki.net then reads the en.json and qqq.json files from the Gerrit repo, and uses them to update its own internal database of strings to translate, producing edits like https://translatewiki.net/w/i.php?title=Special%3AContributions&target=FuzzyBot&namespace=1274&tagfilter=&start=&end=&limit=50
  9. Some translator on translatewiki.net writes a translation to a wiki page in the translatewiki.net db
  10. Translatewiki.net exports those changes to projects/*/<langcode>.json in Gerrit, and self-merges that patch (usually - occasionally TWN staff have to merge it manually)
  11. I pull those change from Gerrit and run ./generate.php on my own computer. This takes those JSON files that translatewiki.net wrote, cross-references them with the source strings in en-x-raw.json, and writes PHP files in src/translations
  12. Sometimes I also manually write locale files in src/locales
  13. I submit a patch with those changes to Gerrit for review (Example patch: https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1222809)

(Note that up until this point nothing whatsoever has involved the Phabricator server, only the translatewiki.net server, Gerrit/GitLab, and scripts than can be run against any local deploy. Hence, it doesn't matter whether any of the patches above actually get deployed there ...)

  1. You merge that patch and deploy it to the Phabricator server
  2. Phabricator reads the PHP files in src/translations and src/locales and uses them to display translation settings and translated strings to the server)

The comment above is a really valuable comment. Let's copy it over to Wikitech somewhere, what do you think?

Uhm, thanks. I knew some manual work is required but I had no idea it's that manual.
That comment feels like material for https://wikitech.wikimedia.org/wiki/Phabricator#Integrations (though "Integration" feels like a euphemism in this case)

Oof, yeah. Thanks for the detailed breakdown.

I think it sounds more manual than it is when I write it up in such excruciating detail.