diff --git a/src/applications/flag/application/PhabricatorApplicationFlags.php b/src/applications/flag/application/PhabricatorApplicationFlags.php
index 76af32f47a..74c1f7d73d 100644
--- a/src/applications/flag/application/PhabricatorApplicationFlags.php
+++ b/src/applications/flag/application/PhabricatorApplicationFlags.php
@@ -3,7 +3,7 @@
final class PhabricatorApplicationFlags extends PhabricatorApplication {
public function getShortDescription() {
- return 'Reminders';
+ return pht('Reminders');
}
public function getBaseURI() {
diff --git a/src/applications/flag/constants/PhabricatorFlagColor.php b/src/applications/flag/constants/PhabricatorFlagColor.php
index 839a889f97..0be6a87dda 100644
--- a/src/applications/flag/constants/PhabricatorFlagColor.php
+++ b/src/applications/flag/constants/PhabricatorFlagColor.php
@@ -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) {
diff --git a/src/applications/flag/controller/PhabricatorFlagController.php b/src/applications/flag/controller/PhabricatorFlagController.php
index 5c0818f9cd..1fbe0662ee 100644
--- a/src/applications/flag/controller/PhabricatorFlagController.php
+++ b/src/applications/flag/controller/PhabricatorFlagController.php
@@ -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!
diff --git a/src/applications/flag/controller/PhabricatorFlagEditController.php b/src/applications/flag/controller/PhabricatorFlagEditController.php
index e8f02dc951..69968ba678 100644
--- a/src/applications/flag/controller/PhabricatorFlagEditController.php
+++ b/src/applications/flag/controller/PhabricatorFlagEditController.php
@@ -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(
- "
You can flag this %s if you want to remember to look ".
- "at it later.
",
- $type_name));
+ "%s
",
+ 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);
}
diff --git a/src/applications/flag/controller/PhabricatorFlagListController.php b/src/applications/flag/controller/PhabricatorFlagListController.php
index f2f3d9d4e7..f4ebca574f 100644
--- a/src/applications/flag/controller/PhabricatorFlagListController.php
+++ b/src/applications/flag/controller/PhabricatorFlagListController.php
@@ -33,7 +33,7 @@ final class PhabricatorFlagListController extends PhabricatorFlagController {
return $this->buildStandardPageResponse(
$nav,
array(
- 'title' => 'Flags',
+ 'title' => pht('Flags'),
));
}
diff --git a/src/applications/flag/events/PhabricatorFlagsUIEventListener.php b/src/applications/flag/events/PhabricatorFlagsUIEventListener.php
index 13ba11321b..622801aecb 100644
--- a/src/applications/flag/events/PhabricatorFlagsUIEventListener.php
+++ b/src/applications/flag/events/PhabricatorFlagsUIEventListener.php
@@ -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()) {
diff --git a/src/applications/flag/view/PhabricatorFlagListView.php b/src/applications/flag/view/PhabricatorFlagListView.php
index eb200f6088..9e43887216 100644
--- a/src/applications/flag/view/PhabricatorFlagListView.php
+++ b/src/applications/flag/view/PhabricatorFlagListView.php
@@ -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();
}