]> khamidou — GitHub mirrors - arcanist.git/commitdiff
`pht`ize some strings
authorJoshua Spence <josh@joshuaspence.com>
Tue, 6 Jan 2015 11:43:52 +0000 (22:43 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 6 Jan 2015 11:43:52 +0000 (22:43 +1100)
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

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

src/lint/linter/ArcanistExternalLinter.php

index fc824036ddea0ac524058f5351d9496ccf82d9ae..bb907d57f930b88c667291cae23fd04eb58037d2 100644 (file)
@@ -267,34 +267,37 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
       if (!Filesystem::binaryExists($interpreter)) {
         throw new ArcanistUsageException(
           pht(
-            'Unable to locate interpreter "%s" to run linter %s. You may '.
-            'need to install the interpreter, or adjust your linter '.
-            'configuration.'.
-            "\nTO INSTALL: %s",
+            'Unable to locate interpreter "%s" to run linter %s. You may need '.
+            'to install the interpreter, or adjust your linter configuration.',
             $interpreter,
-            get_class($this),
-            $this->getInstallInstructions()));
+            get_class($this)));
       }
       if (!Filesystem::pathExists($binary)) {
         throw new ArcanistUsageException(
-          pht(
-            'Unable to locate script "%s" to run linter %s. You may need '.
-            'to install the script, or adjust your linter configuration. '.
-            "\nTO INSTALL: %s",
-            $binary,
-            get_class($this),
-            $this->getInstallInstructions()));
+          sprintf(
+            "%s\n%s",
+            pht(
+              'Unable to locate script "%s" to run linter %s. You may need '.
+              'to install the script, or adjust your linter configuration.',
+              $binary,
+              get_class($this)),
+            pht(
+              'TO INSTALL: %s',
+              $this->getInstallInstructions())));
       }
     } else {
       if (!Filesystem::binaryExists($binary)) {
         throw new ArcanistUsageException(
-          pht(
-            'Unable to locate binary "%s" to run linter %s. You may need '.
-            'to install the binary, or adjust your linter configuration. '.
-            "\nTO INSTALL: %s",
-            $binary,
-            get_class($this),
-            $this->getInstallInstructions()));
+          sprintf(
+            "%s\n%s",
+            pht(
+              'Unable to locate binary "%s" to run linter %s. You may need '.
+              'to install the binary, or adjust your linter configuration.',
+              $binary,
+              get_class($this)),
+            pht(
+              'TO INSTALL: %s',
+              $this->getInstallInstructions())));
       }
     }
   }
@@ -415,7 +418,11 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
         $future->resolvex();
       } else {
         throw new Exception(
-          "Linter failed to parse output!\n\n{$stdout}\n\n{$stderr}");
+          sprintf(
+            "%s\n\nSTDOUT\n%s\n\nSTDERR\n%s",
+            pht('Linter failed to parse output!'),
+            $stdout,
+            $stderr));
       }
     }