chooseVariant() in libphutil/src/internationalization/PhutilTranslator.php currently hardcodes locales. This leads to exceptions, if admins add custom locales (e.g. P1792):
[13-May-2016 10:23:43 UTC] [2016-05-13 10:23:43] EXCEPTION: (PhutilProxyException) Error while executing Task ID 720447. {>} (Exception) Unknown locale 'de_DE'. at [<phutil>/src/internationalization/PhutilTranslator.php:200] [13-May-2016 10:23:43 UTC] arcanist(head=stable, ref.master=999eb9376568, ref.stable=6d175516f548), libphremoteuser(head=master, ref.master=c7d09c47b797), phabricator(head=stable, ref.stable=fd394f7668d9, custom=2), phutil(head=stable, ref.master=aa6cd8f7e5e5, ref.stabl e=7d344401734e, custom=1), sprint(head=master, ref.master=df6e9dee03e4) [13-May-2016 10:23:43 UTC] #0 <#2> PhutilTranslator::chooseVariant(array, PhutilNumber) called at [<phutil>/src/internationalization/PhutilTranslator.php:70] [13-May-2016 10:23:43 UTC] #1 <#2> PhutilTranslator::translate(string, string, PhutilNumber, string) [13-May-2016 10:23:43 UTC] #2 <#2> call_user_func_array(array, array) called at [<phutil>/src/internationalization/pht.php:17] [13-May-2016 10:23:43 UTC] #3 <#2> pht(string, string, PhutilNumber, string) called at [<phabricator>/src/applications/maniphest/edge/ManiphestTaskDependedOnByTaskEdgeType.php:23] [13-May-2016 10:23:43 UTC] #4 <#2> ManiphestTaskDependedOnByTaskEdgeType::getTransactionAddString(string, PhutilNumber, string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:862] [13-May-2016 10:23:43 UTC] #5 <#2> PhabricatorApplicationTransaction::getTitle() called at [<phabricator>/src/applications/maniphest/storage/ManiphestTransaction.php:636] [13-May-2016 10:23:43 UTC] #6 <#2> ManiphestTransaction::getTitle() called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:686] [13-May-2016 10:23:43 UTC] #7 <#2> PhabricatorApplicationTransaction::getTitleForMail() called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2694] [13-May-2016 10:23:43 UTC] #8 <#2> PhabricatorApplicationTransactionEditor::addHeadersAndCommentsToMailBody(PhabricatorMetaMTAMailBody, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2659] [13-May-2016 10:23:43 UTC] #9 <#2> PhabricatorApplicationTransactionEditor::buildMailBody(ManiphestTask, array) called at [<phabricator>/src/applications/maniphest/editor/ManiphestTransactionEditor.php:356] [13-May-2016 10:23:43 UTC] #10 <#2> ManiphestTransactionEditor::buildMailBody(ManiphestTask, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2420] [13-May-2016 10:23:43 UTC] #11 <#2> PhabricatorApplicationTransactionEditor::buildMailForTarget(ManiphestTask, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2377] [13-May-2016 10:23:43 UTC] #12 <#2> PhabricatorApplicationTransactionEditor::buildMail(ManiphestTask, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1091] [13-May-2016 10:23:43 UTC] #13 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(ManiphestTask, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21] [13-May-2016 10:23:43 UTC] #14 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:122] [13-May-2016 10:23:43 UTC] #15 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171] [13-May-2016 10:23:43 UTC] #16 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22] [13-May-2016 10:23:43 UTC] #17 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:183] [13-May-2016 10:23:43 UTC] #18 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125]
Maybe it is possible to query gettext for such information and thus avoid hardcoding every single language?
I am using the latest stable versions of Arcanist, Phutil and Phabricator, plus some local patches (which should be irrelevant in this context):
phabricator fd394f7668d9f7ff2938048fd9cf49f9ed6d6cf5 (Mon, May 9) arcanist 6d175516f54818d02b5fa7d4bc2b290123c3d27f (Sat, Apr 30) phutil 7d344401734e9ab7908dce80751af79119b27ec3 (Mon, May 9) libphremoteuser c7d09c47b797e03a0585b85adc65d082a351cc20 (Apr 8 2016) sprint df6e9dee03e4dd0da551199df33b6d04bf096d32 (Apr 11 2016)