]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Improve translation of an "arc land" string
authorepriestley <git@epriestley.com>
Thu, 14 May 2015 17:58:22 +0000 (10:58 -0700)
committerepriestley <git@epriestley.com>
Thu, 14 May 2015 17:58:22 +0000 (10:58 -0700)
Summary: This lost formatting in a pht() conversion; give the bold back and make it properly translatable.

Test Plan: Will land.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D12843

src/workflow/ArcanistLandWorkflow.php

index 8f72f439144610efef15fea0a6f6372963eaeb6f..98c804b6370032c2d9757a950edbafdbf823441a 100644 (file)
@@ -25,6 +25,9 @@ final class ArcanistLandWorkflow extends ArcanistWorkflow {
   private $revision;
   private $messageFile;
 
+  const REFTYPE_BRANCH = 'branch';
+  const REFTYPE_BOOKMARK = 'bookmark';
+
   public function getRevisionDict() {
     return $this->revision;
   }
@@ -401,12 +404,21 @@ EOTEXT
       $repository_api->execxLocal('checkout %s', $this->branch);
     }
 
-    echo phutil_console_format(
-      "%s\n",
-      pht(
-        'Switched to %s **%s**. Identifying and merging...',
-        $this->branchType,
-        $this->branch));
+    switch ($this->branchType) {
+      case self::REFTYPE_BOOKMARK:
+        $message = pht(
+          'Switched to bookmark **%s**. Identifying and merging...',
+          $this->branch);
+        break;
+      case self::REFTYPE_BRANCH:
+      default:
+        $message = pht(
+          'Switched to branch **%s**. Identifying and merging...',
+          $this->branch);
+        break;
+    }
+
+    echo phutil_console_format($message."\n");
   }
 
   private function printPendingCommits() {