1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 00:32:41 +01:00

Add back pht()s and tsprintf()s to arg set-config

Summary: See D17357

Test Plan: invoke and still see output in English?

Reviewers: #blessed_reviewers, joshuaspence, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17362
This commit is contained in:
Aviv Eyal 2017-02-16 11:08:45 +00:00 committed by avivey
parent bc9b70508e
commit 13596cd10f

View file

@ -72,11 +72,14 @@ EOTEXT
$console = PhutilConsole::getConsole(); $console = PhutilConsole::getConsole();
if (!$settings->getHelp($key)) { if (!$settings->getHelp($key)) {
$warn = pht( $warning = tsprintf(
'The configuration key \'%s\' is not recognized by arc. It may '. "**%s:** %s\n",
'be misspelled or out of date.', pht('Warning'),
$key); pht(
$console->writeErr("**%s:** %s\n", pht('Warning'), $warn); 'The configuration key "%s" is not recognized by arc. It may '.
'be misspelled or out of date.',
$key));
$console->writeErr('%s', $warning);
} }
$old = null; $old = null;
@ -95,17 +98,18 @@ EOTEXT
$old = $settings->formatConfigValueForDisplay($key, $old); $old = $settings->formatConfigValueForDisplay($key, $old);
if ($old === null) { if ($old === null) {
$console->writeOut( $message = pht(
"Deleted key '%s' from %s config.\n", 'Deleted key "%s" from %s config.',
$key, $key,
$which); $which);
} else { } else {
$console->writeOut( $message = pht(
"Deleted key '%s' from %s config (was %s).\n", 'Deleted key "%s" from %s config (was %s).',
$key, $key,
$which, $which,
$old); $old);
} }
$console->writeOut('%s', tsprintf("%s\n", $message));
} else { } else {
$val = $settings->willWriteValue($key, $val); $val = $settings->willWriteValue($key, $val);
@ -120,19 +124,20 @@ EOTEXT
$old = $settings->formatConfigValueForDisplay($key, $old); $old = $settings->formatConfigValueForDisplay($key, $old);
if ($old === null) { if ($old === null) {
$console->writeOut( $message = pht(
"Set key '%s' = %s in %s config.\n", 'Set key "%s" = %s in %s config.',
$key, $key,
$val, $val,
$which); $which);
} else { } else {
$console->writeOut( $message = pht(
"Set key '%s' = %s in %s config (was %s).\n", 'Set key "%s" = %s in %s config (was %s).',
$key, $key,
$val, $val,
$which, $which,
$old); $old);
} }
$console->writeOut('%s', tsprintf("%s\n", $message));
} }
return 0; return 0;