Page MenuHomePhabricator

Export source strings with PLURAL where appropriate
Open, Needs TriagePublic

Event Timeline

Change #1217844 had a related patch set uploaded (by Pppery; author: Pppery):

[phabricator/translations@wmf/stable] WIP: Extract strings from US English locale as source strings and apply PLURAL

https://gerrit.wikimedia.org/r/1217844

As I wrote in https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1217844, I do not succeed in running generate.php after applying this patch locally (PHP 8.4 in case it mattered) - I get an opaque error:

[acko@450s translations]$ pwd
/var/www/html/phorge/translations
[acko@450s translations]$ ./generate.php 
[...]
Done.

run: './bin/translatewiki' 'generate' '--source' './projects/phabricator/aphlict/hu.json' '--class' 'PhabricatorAphlictHu' '--classlocale' 'hu' '--project' 'phabricator/aphlict' '--out' './src/translations/PhabricatorAphlictHu.php'

Done.
 SCAN  Searching for libraries in the current working directory...
 WORK  Updating library: src/
[2026-02-26 08:48:45] EXCEPTION: (XHPASTSyntaxErrorException) management/TranslatewikiManagementExportWorkflow.php: XHPAST Parse Error: syntax error, unexpected '=' on line 326 at [<arcanist>/src/moduleutils/PhutilLibraryMapBuilder.php:509]
arcanist(head=master, ref.master=8fd7a39d741b)
  #0 PhutilLibraryMapBuilder::analyzeLibrary() called at [<arcanist>/src/moduleutils/PhutilLibraryMapBuilder.php:79]
  #1 PhutilLibraryMapBuilder::buildMap() called at [<arcanist>/src/moduleutils/PhutilLibraryMapBuilder.php:112]
  #2 PhutilLibraryMapBuilder::buildAndWriteMap() called at [<arcanist>/support/lib/rebuild-map.php:75]
 ERROR  Failed to update library: /var/www/html/phorge/translations/src

After throwing a bit more manual debug spew into ArcanistLiberateWorkflow I still cannot make sense out of this...

COMMAND
php -f /var/www/html/phorge/arcanist/src/moduleutils/../../support/lib/extract-symbols.php -- --ugly  -- /var/www/html/phorge/translations/src/management/TranslatewikiManagementExportWorkflow.php

STDOUT
{
  "error": "XHPAST Parse Error: syntax error, unexpected '=' on line 326\n",
  "line": "326",
  "file": "/var/www/html/phorge/translations/src/management/TranslatewikiManagementExportWorkflow.php"
}

Or maybe should rebase https://gerrit.wikimedia.org/r/c/phabricator/translations/+/1221191/ first and go for phpast instead of xhpast? Hmm

Change #1217844 merged by Aklapper:

[phabricator/translations@wmf/stable] Extract strings from US English locale as source strings and apply PLURAL

https://gerrit.wikimedia.org/r/1217844