mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
Make i18n string extraction ignore strings in test case files
Summary: Do not extract strings from test case files for localization / translation. They are not exposed to users, and localizing wastes translators' time. Closes T15815 Test Plan: * Install Wikimedia downstream `translations` extension via `git clone https://gerrit.wikimedia.org/r/phabricator/translations` and put it on the same filesystem level as `phorge` and `arcanist`, and follow https://we.phorge.it/w/docs/extensions/install/ * Apply https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1028887 on top, to make the `translations` extension work with upstream Phorge. * In the downstream `translations` extension path, run `./export.sh`, then run `grep -r "__tests__" .` and get a list of `qqq.json` files with context for strings from test files. * Apply this patch. * In the downstream `translations` extension path, run `./export.sh`, then run `grep -r "__tests__" .` to verify that no `qqq.json` files include any strings from test files anymore. Reviewers: O1 Blessed Committers, aklapper, avivey Reviewed By: O1 Blessed Committers, aklapper, avivey Subscribers: avivey, aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15815 Differential Revision: https://we.phorge.it/D25624
This commit is contained in:
parent
af300016b6
commit
29cbb0a658
1 changed files with 1 additions and 0 deletions
|
@ -277,6 +277,7 @@ final class PhabricatorInternationalizationManagementExtractWorkflow
|
|||
->withType('f')
|
||||
->withSuffix('php')
|
||||
->excludePath('*/.*')
|
||||
->excludePath('*/__tests__/*')
|
||||
->setGenerateChecksums(true)
|
||||
->find();
|
||||
|
||||
|
|
Loading…
Reference in a new issue