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

phtize some strings

Summary: Self explanatory.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10536
This commit is contained in:
Joshua Spence 2014-09-25 07:09:07 +10:00
parent a70a00a960
commit 5951ec26b4

View file

@ -128,7 +128,7 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$pos, $pos,
self::LINT_DOS_NEWLINE, self::LINT_DOS_NEWLINE,
'You must use ONLY Unix linebreaks ("\n") in source code.', pht('You must use ONLY Unix linebreaks ("%s") in source code.', '\n'),
"\r"); "\r");
if ($this->isMessageEnabled(self::LINT_DOS_NEWLINE)) { if ($this->isMessageEnabled(self::LINT_DOS_NEWLINE)) {
$this->stopAllLinters(); $this->stopAllLinters();
@ -142,7 +142,7 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$pos, $pos,
self::LINT_TAB_LITERAL, self::LINT_TAB_LITERAL,
'Configure your editor to use spaces for indentation.', pht('Configure your editor to use spaces for indentation.'),
"\t"); "\t");
} }
} }
@ -157,8 +157,11 @@ final class ArcanistTextLinter extends ArcanistLinter {
$line_idx + 1, $line_idx + 1,
1, 1,
self::LINT_LINE_WRAP, self::LINT_LINE_WRAP,
'This line is '.number_format(strlen($line)).' characters long, '. pht(
'but the convention is '.$width.' characters.', 'This line is %s characters long, but the '.
'convention is %s characters.',
new PhutilNumber(strlen($line)),
$width),
$line); $line);
} }
} }
@ -170,7 +173,7 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
strlen($data), strlen($data),
self::LINT_EOF_NEWLINE, self::LINT_EOF_NEWLINE,
'Files must end in a newline.', pht('Files must end in a newline.'),
'', '',
"\n"); "\n");
} }
@ -196,9 +199,10 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$offset, $offset,
self::LINT_BAD_CHARSET, self::LINT_BAD_CHARSET,
'Source code should contain only ASCII bytes with ordinal decimal '. pht(
'values between 32 and 126 inclusive, plus linefeed. Do not use UTF-8 '. 'Source code should contain only ASCII bytes with ordinal '.
'or other multibyte charsets.', 'decimal values between 32 and 126 inclusive, plus linefeed. '.
'Do not use UTF-8 or other multibyte charsets.'),
$string); $string);
} }
@ -226,9 +230,10 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$offset, $offset,
self::LINT_TRAILING_WHITESPACE, self::LINT_TRAILING_WHITESPACE,
'This line contains trailing whitespace. Consider setting up your '. pht(
'editor to automatically remove trailing whitespace, you will save '. 'This line contains trailing whitespace. Consider setting '.
'time.', 'up your editor to automatically remove trailing whitespace, '.
'you will save time.'),
$string, $string,
''); '');
} }
@ -252,8 +257,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$offset, $offset,
self::LINT_BOF_WHITESPACE, self::LINT_BOF_WHITESPACE,
'This file contains leading whitespace at the beginning of the file. '. pht(
'This is unnecessary and should be avoided when possible.', 'This file contains leading whitespace at the beginning of the file. '.
'This is unnecessary and should be avoided when possible.'),
$string, $string,
''); '');
} }
@ -276,8 +282,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$offset, $offset,
self::LINT_EOF_WHITESPACE, self::LINT_EOF_WHITESPACE,
'This file contains trailing whitespace at the end of the file. This '. pht(
'is unnecessary and should be avoided when possible.', 'This file contains trailing whitespace at the end of the file. '.
'This is unnecessary and should be avoided when possible.'),
$string, $string,
''); '');
} }
@ -292,8 +299,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
$this->raiseLintAtOffset( $this->raiseLintAtOffset(
$offset, $offset,
self::LINT_NO_COMMIT, self::LINT_NO_COMMIT,
'This file is explicitly marked as "'.$deadly.'", which blocks '. pht(
'commits.', 'This file is explicitly marked as "%s", which blocks commits.',
$deadly),
$deadly); $deadly);
} }
} }