mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
pht
ize 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:
parent
a70a00a960
commit
5951ec26b4
1 changed files with 25 additions and 17 deletions
|
@ -128,7 +128,7 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$pos,
|
||||
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");
|
||||
if ($this->isMessageEnabled(self::LINT_DOS_NEWLINE)) {
|
||||
$this->stopAllLinters();
|
||||
|
@ -142,7 +142,7 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$pos,
|
||||
self::LINT_TAB_LITERAL,
|
||||
'Configure your editor to use spaces for indentation.',
|
||||
pht('Configure your editor to use spaces for indentation.'),
|
||||
"\t");
|
||||
}
|
||||
}
|
||||
|
@ -157,8 +157,11 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$line_idx + 1,
|
||||
1,
|
||||
self::LINT_LINE_WRAP,
|
||||
'This line is '.number_format(strlen($line)).' characters long, '.
|
||||
'but the convention is '.$width.' characters.',
|
||||
pht(
|
||||
'This line is %s characters long, but the '.
|
||||
'convention is %s characters.',
|
||||
new PhutilNumber(strlen($line)),
|
||||
$width),
|
||||
$line);
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +173,7 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
strlen($data),
|
||||
self::LINT_EOF_NEWLINE,
|
||||
'Files must end in a newline.',
|
||||
pht('Files must end in a newline.'),
|
||||
'',
|
||||
"\n");
|
||||
}
|
||||
|
@ -196,9 +199,10 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$offset,
|
||||
self::LINT_BAD_CHARSET,
|
||||
'Source code should contain only ASCII bytes with ordinal decimal '.
|
||||
'values between 32 and 126 inclusive, plus linefeed. Do not use UTF-8 '.
|
||||
'or other multibyte charsets.',
|
||||
pht(
|
||||
'Source code should contain only ASCII bytes with ordinal '.
|
||||
'decimal values between 32 and 126 inclusive, plus linefeed. '.
|
||||
'Do not use UTF-8 or other multibyte charsets.'),
|
||||
$string);
|
||||
}
|
||||
|
||||
|
@ -226,9 +230,10 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$offset,
|
||||
self::LINT_TRAILING_WHITESPACE,
|
||||
'This line contains trailing whitespace. Consider setting up your '.
|
||||
'editor to automatically remove trailing whitespace, you will save '.
|
||||
'time.',
|
||||
pht(
|
||||
'This line contains trailing whitespace. Consider setting '.
|
||||
'up your editor to automatically remove trailing whitespace, '.
|
||||
'you will save time.'),
|
||||
$string,
|
||||
'');
|
||||
}
|
||||
|
@ -252,8 +257,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$offset,
|
||||
self::LINT_BOF_WHITESPACE,
|
||||
'This file contains leading whitespace at the beginning of the file. '.
|
||||
'This is unnecessary and should be avoided when possible.',
|
||||
pht(
|
||||
'This file contains leading whitespace at the beginning of the file. '.
|
||||
'This is unnecessary and should be avoided when possible.'),
|
||||
$string,
|
||||
'');
|
||||
}
|
||||
|
@ -276,8 +282,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$offset,
|
||||
self::LINT_EOF_WHITESPACE,
|
||||
'This file contains trailing whitespace at the end of the file. This '.
|
||||
'is unnecessary and should be avoided when possible.',
|
||||
pht(
|
||||
'This file contains trailing whitespace at the end of the file. '.
|
||||
'This is unnecessary and should be avoided when possible.'),
|
||||
$string,
|
||||
'');
|
||||
}
|
||||
|
@ -292,8 +299,9 @@ final class ArcanistTextLinter extends ArcanistLinter {
|
|||
$this->raiseLintAtOffset(
|
||||
$offset,
|
||||
self::LINT_NO_COMMIT,
|
||||
'This file is explicitly marked as "'.$deadly.'", which blocks '.
|
||||
'commits.',
|
||||
pht(
|
||||
'This file is explicitly marked as "%s", which blocks commits.',
|
||||
$deadly),
|
||||
$deadly);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue