mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
pht() for Flags
Summary: This also includes the "Flag for Later" action items Test Plan: did a run with all caps badassery Reviewers: epriestley, btrahan, chad Reviewed By: chad CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5276
This commit is contained in:
parent
0865ed266d
commit
048fb35b46
7 changed files with 28 additions and 27 deletions
|
@ -3,7 +3,7 @@
|
|||
final class PhabricatorApplicationFlags extends PhabricatorApplication {
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Reminders';
|
||||
return pht('Reminders');
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
|
|
|
@ -13,19 +13,19 @@ final class PhabricatorFlagColor extends PhabricatorFlagConstants {
|
|||
|
||||
public static function getColorNameMap() {
|
||||
return array(
|
||||
self::COLOR_RED => 'Red',
|
||||
self::COLOR_ORANGE => 'Orange',
|
||||
self::COLOR_YELLOW => 'Yellow',
|
||||
self::COLOR_GREEN => 'Green',
|
||||
self::COLOR_BLUE => 'Blue',
|
||||
self::COLOR_PINK => 'Pink',
|
||||
self::COLOR_PURPLE => 'Purple',
|
||||
self::COLOR_CHECKERED => 'Checkered',
|
||||
self::COLOR_RED => pht('Red'),
|
||||
self::COLOR_ORANGE => pht('Orange'),
|
||||
self::COLOR_YELLOW => pht('Yellow'),
|
||||
self::COLOR_GREEN => pht('Green'),
|
||||
self::COLOR_BLUE => pht('Blue'),
|
||||
self::COLOR_PINK => pht('Pink'),
|
||||
self::COLOR_PURPLE => pht('Purple'),
|
||||
self::COLOR_CHECKERED => pht('Checkered'),
|
||||
);
|
||||
}
|
||||
|
||||
public static function getColorName($color) {
|
||||
return idx(self::getColorNameMap(), $color, 'Unknown');
|
||||
return idx(self::getColorNameMap(), $color, pht('Unknown'));
|
||||
}
|
||||
|
||||
public static function getCSSClass($color) {
|
||||
|
|
|
@ -6,7 +6,7 @@ abstract class PhabricatorFlagController extends PhabricatorController {
|
|||
|
||||
$page = $this->buildStandardPageView();
|
||||
|
||||
$page->setApplicationName('Flag');
|
||||
$page->setApplicationName(pht('Flag'));
|
||||
$page->setBaseURI('/flag/');
|
||||
$page->setTitle(idx($data, 'title'));
|
||||
$page->setGlyph("\xE2\x9A\x90"); // Subtle!
|
||||
|
|
|
@ -42,7 +42,7 @@ final class PhabricatorFlagEditController extends PhabricatorFlagController {
|
|||
$dialog = new AphrontDialogView();
|
||||
$dialog->setUser($user);
|
||||
|
||||
$dialog->setTitle("Flag {$type_name}");
|
||||
$dialog->setTitle(pht("Flag %s", $type_name));
|
||||
|
||||
require_celerity_resource('phabricator-flag-css');
|
||||
|
||||
|
@ -53,9 +53,10 @@ final class PhabricatorFlagEditController extends PhabricatorFlagController {
|
|||
if ($is_new) {
|
||||
$form
|
||||
->appendChild(hsprintf(
|
||||
"<p>You can flag this %s if you want to remember to look ".
|
||||
"at it later.</p><br />",
|
||||
$type_name));
|
||||
"<p>%s</p><br />",
|
||||
pht('You can flag this %s if you want to remember to look ".
|
||||
"at it later.',
|
||||
$type_name)));
|
||||
}
|
||||
|
||||
$radio = new AphrontFormRadioButtonControl();
|
||||
|
@ -68,20 +69,20 @@ final class PhabricatorFlagEditController extends PhabricatorFlagController {
|
|||
->appendChild(
|
||||
$radio
|
||||
->setName('color')
|
||||
->setLabel('Flag Color')
|
||||
->setLabel(pht('Flag Color'))
|
||||
->setValue($flag->getColor()))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextAreaControl())
|
||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
|
||||
->setName('note')
|
||||
->setLabel('Note')
|
||||
->setLabel(pht('Note'))
|
||||
->setValue($flag->getNote()));
|
||||
|
||||
$dialog->appendChild($form);
|
||||
|
||||
$dialog->addCancelButton($handle->getURI());
|
||||
$dialog->addSubmitButton(
|
||||
$is_new ? "Flag {$type_name}" : 'Save');
|
||||
$is_new ? pht("Flag %s") : pht('Save'));
|
||||
|
||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ final class PhabricatorFlagListController extends PhabricatorFlagController {
|
|||
return $this->buildStandardPageResponse(
|
||||
$nav,
|
||||
array(
|
||||
'title' => 'Flags',
|
||||
'title' => pht('Flags'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,13 +31,13 @@ final class PhabricatorFlagsUIEventListener extends PhutilEventListener {
|
|||
$flag_action = id(new PhabricatorActionView())
|
||||
->setWorkflow(true)
|
||||
->setHref('/flag/delete/'.$flag->getID().'/')
|
||||
->setName('Remove '.$color.' Flag')
|
||||
->setName(pht('Remove %s Flag', $color))
|
||||
->setIcon('flag-'.$flag->getColor());
|
||||
} else {
|
||||
$flag_action = id(new PhabricatorActionView())
|
||||
->setWorkflow(true)
|
||||
->setHref('/flag/edit/'.$object->getPHID().'/')
|
||||
->setName('Flag For Later')
|
||||
->setName(pht('Flag For Later'))
|
||||
->setIcon('flag-ghost');
|
||||
|
||||
if (!$user->isLoggedIn()) {
|
||||
|
|
|
@ -41,7 +41,7 @@ final class PhabricatorFlagListView extends AphrontView {
|
|||
array(
|
||||
'class' => 'small grey',
|
||||
),
|
||||
'Edit Flag')),
|
||||
pht('Edit Flag'))),
|
||||
phabricator_form(
|
||||
$user,
|
||||
array(
|
||||
|
@ -54,7 +54,7 @@ final class PhabricatorFlagListView extends AphrontView {
|
|||
array(
|
||||
'class' => 'small grey',
|
||||
),
|
||||
'Remove Flag')),
|
||||
pht('Remove Flag'))),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,9 @@ final class PhabricatorFlagListView extends AphrontView {
|
|||
$table->setHeaders(
|
||||
array(
|
||||
'',
|
||||
'Flagged Object',
|
||||
'Note',
|
||||
'Flagged On',
|
||||
pht('Flagged Object'),
|
||||
pht('Note'),
|
||||
pht('Flagged On'),
|
||||
'',
|
||||
'',
|
||||
));
|
||||
|
@ -77,7 +77,7 @@ final class PhabricatorFlagListView extends AphrontView {
|
|||
'narrow action',
|
||||
'narrow action',
|
||||
));
|
||||
$table->setNoDataString('No flags.');
|
||||
$table->setNoDataString(pht('No flags.'));
|
||||
|
||||
return $table->render();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue