mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-02 03:32:41 +01:00
(stable) Promote 2015 Week 45
This commit is contained in:
commit
ebb88c8c59
9 changed files with 33 additions and 65 deletions
|
@ -34,7 +34,7 @@ final class ArcanistUSEnglishTranslation extends PhutilTranslation {
|
||||||
'these files, or continue. If you continue, these files will be '.
|
'these files, or continue. If you continue, these files will be '.
|
||||||
'marked as binary.',
|
'marked as binary.',
|
||||||
),
|
),
|
||||||
'%d AFFECTED FILE(S)' => array('AFFECTED FILE', 'AFFECTED FILES'),
|
'%s AFFECTED FILE(S)' => array('AFFECTED FILE', 'AFFECTED FILES'),
|
||||||
'Do you want to mark these %s file(s) as binary and continue?' => array(
|
'Do you want to mark these %s file(s) as binary and continue?' => array(
|
||||||
'Do you want to mark this file as binary and continue?',
|
'Do you want to mark this file as binary and continue?',
|
||||||
'Do you want to mark these files as binary and continue?',
|
'Do you want to mark these files as binary and continue?',
|
||||||
|
@ -57,11 +57,9 @@ final class ArcanistUSEnglishTranslation extends PhutilTranslation {
|
||||||
|
|
||||||
'%s line(s)' => array('line', 'lines'),
|
'%s line(s)' => array('line', 'lines'),
|
||||||
|
|
||||||
'%d test(s)' => array('%d test', '%d tests'),
|
'%s assertion(s) passed.' => array(
|
||||||
|
'%s assertion passed.',
|
||||||
'%d assertion(s) passed.' => array(
|
'%s assertions passed.',
|
||||||
'%d assertion passed.',
|
|
||||||
'%d assertions passed.',
|
|
||||||
),
|
),
|
||||||
|
|
||||||
'Ignore these %s untracked file(s) and continue?' => array(
|
'Ignore these %s untracked file(s) and continue?' => array(
|
||||||
|
|
|
@ -197,39 +197,6 @@ abstract class ArcanistLinter extends Phobject {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obsolete hook which was invoked before a path was linted.
|
|
||||||
*
|
|
||||||
* WARNING: This is an obsolete hook which is not called. If you maintain
|
|
||||||
* a linter which relies on it, update to use @{method:lintPath} instead.
|
|
||||||
*
|
|
||||||
* @task exec
|
|
||||||
*/
|
|
||||||
final public function willLintPath($path) {
|
|
||||||
// TODO: Remove this method after some time. In the meantime, the "final"
|
|
||||||
// will fatal subclasses which implement this hook and point at the API
|
|
||||||
// change so maintainers get fewer surprises.
|
|
||||||
throw new PhutilMethodNotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obsolete hook which was invoked after linters ran.
|
|
||||||
*
|
|
||||||
* WARNING: This is an obsolete hook which is not called. If you maintain
|
|
||||||
* a linter which relies on it, update to use @{method:didLintPaths} instead.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @task exec
|
|
||||||
*/
|
|
||||||
final public function didRunLinters() {
|
|
||||||
// TODO: Remove this method after some time. In the meantime, the "final"
|
|
||||||
// will fatal subclasses which implement this hook and point at the API
|
|
||||||
// change so maintainers get fewer surprises.
|
|
||||||
throw new PhutilMethodNotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function getLinterPriority() {
|
public function getLinterPriority() {
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -490,7 +490,10 @@ abstract class PhutilTestCase extends Phobject {
|
||||||
call_user_func_array(
|
call_user_func_array(
|
||||||
array($this, $name),
|
array($this, $name),
|
||||||
array());
|
array());
|
||||||
$this->passTest(pht('%d assertion(s) passed.', $this->assertions));
|
$this->passTest(
|
||||||
|
pht(
|
||||||
|
'%s assertion(s) passed.',
|
||||||
|
new PhutilNumber($this->assertions)));
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$exceptions['Execution'] = $ex;
|
$exceptions['Execution'] = $ex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,14 +245,14 @@ final class ArcanistFileUploader extends Phobject {
|
||||||
if ($done) {
|
if ($done) {
|
||||||
$this->writeStatus(
|
$this->writeStatus(
|
||||||
pht(
|
pht(
|
||||||
'Resuming upload (%d of %d chunks remain).',
|
'Resuming upload (%s of %s chunks remain).',
|
||||||
new PhutilNumber(count($remaining)),
|
phutil_count($remaining),
|
||||||
new PhutilNumber(count($chunks))));
|
phutil_count($chunks)));
|
||||||
} else {
|
} else {
|
||||||
$this->writeStatus(
|
$this->writeStatus(
|
||||||
pht(
|
pht(
|
||||||
'Uploading chunks (%d chunks to upload).',
|
'Uploading chunks (%s chunks to upload).',
|
||||||
new PhutilNumber(count($remaining))));
|
phutil_count($remaining)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$progress = new PhutilConsoleProgressBar();
|
$progress = new PhutilConsoleProgressBar();
|
||||||
|
|
|
@ -225,10 +225,10 @@ EOTEXT
|
||||||
if ($modified_but_not_included) {
|
if ($modified_but_not_included) {
|
||||||
$prefix = pht(
|
$prefix = pht(
|
||||||
'%s locally modified path(s) are not included in this revision:',
|
'%s locally modified path(s) are not included in this revision:',
|
||||||
new PhutilNumber(count($modified_but_not_included)));
|
phutil_count($modified_but_not_included));
|
||||||
$prompt = pht(
|
$prompt = pht(
|
||||||
'These %s path(s) will NOT be committed. Commit this revision anyway?',
|
'These %s path(s) will NOT be committed. Commit this revision anyway?',
|
||||||
new PhutilNumber(count($modified_but_not_included)));
|
phutil_count($modified_but_not_included));
|
||||||
$this->promptFileWarning($prefix, $prompt, $modified_but_not_included);
|
$this->promptFileWarning($prefix, $prompt, $modified_but_not_included);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ EOTEXT
|
||||||
if ($do_not_exist) {
|
if ($do_not_exist) {
|
||||||
$prefix = pht(
|
$prefix = pht(
|
||||||
'Revision includes changes to %s path(s) that do not exist:',
|
'Revision includes changes to %s path(s) that do not exist:',
|
||||||
new PhutilNumber(count($do_not_exist)));
|
phutil_count($do_not_exist));
|
||||||
$prompt = pht('Commit this revision anyway?');
|
$prompt = pht('Commit this revision anyway?');
|
||||||
$this->promptFileWarning($prefix, $prompt, $do_not_exist);
|
$this->promptFileWarning($prefix, $prompt, $do_not_exist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ EOTEXT
|
||||||
foreach ($files as $file => $info) {
|
foreach ($files as $file => $info) {
|
||||||
$line_noun = pht(
|
$line_noun = pht(
|
||||||
'%s line(s)',
|
'%s line(s)',
|
||||||
new PhutilNumber(count($info['lines'])));
|
phutil_count($info['lines']));
|
||||||
$lines = $this->readableSequenceFromLineNumbers($info['lines']);
|
$lines = $this->readableSequenceFromLineNumbers($info['lines']);
|
||||||
echo " {$file}: {$line_noun} {$lines}\n";
|
echo " {$file}: {$line_noun} {$lines}\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -962,7 +962,7 @@ EOTEXT
|
||||||
'works best for changes which will receive detailed human review, '.
|
'works best for changes which will receive detailed human review, '.
|
||||||
'and not as well for large automated changes or bulk checkins. '.
|
'and not as well for large automated changes or bulk checkins. '.
|
||||||
'See %s for information about reviewing big checkins. Continue anyway?',
|
'See %s for information about reviewing big checkins. Continue anyway?',
|
||||||
new PhutilNumber(count($changes)),
|
phutil_count($changes),
|
||||||
'https://secure.phabricator.com/book/phabricator/article/'.
|
'https://secure.phabricator.com/book/phabricator/article/'.
|
||||||
'differential_large_changes/');
|
'differential_large_changes/');
|
||||||
|
|
||||||
|
@ -1070,18 +1070,18 @@ EOTEXT
|
||||||
'contain invalid byte sequences). You can either stop this '.
|
'contain invalid byte sequences). You can either stop this '.
|
||||||
'workflow and fix these files, or continue. If you continue, '.
|
'workflow and fix these files, or continue. If you continue, '.
|
||||||
'these files will be marked as binary.',
|
'these files will be marked as binary.',
|
||||||
new PhutilNumber(count($utf8_problems))),
|
phutil_count($utf8_problems)),
|
||||||
pht(
|
pht(
|
||||||
"You can learn more about how Phabricator handles character ".
|
"You can learn more about how Phabricator handles character ".
|
||||||
"encodings (and how to configure encoding settings and detect and ".
|
"encodings (and how to configure encoding settings and detect and ".
|
||||||
"correct encoding problems) by reading 'User Guide: UTF-8 and ".
|
"correct encoding problems) by reading 'User Guide: UTF-8 and ".
|
||||||
"Character Encoding' in the Phabricator documentation."),
|
"Character Encoding' in the Phabricator documentation."),
|
||||||
pht(
|
pht(
|
||||||
'%d AFFECTED FILE(S)',
|
'%s AFFECTED FILE(S)',
|
||||||
count($utf8_problems)));
|
phutil_count($utf8_problems)));
|
||||||
$confirm = pht(
|
$confirm = pht(
|
||||||
'Do you want to mark these %s file(s) as binary and continue?',
|
'Do you want to mark these %s file(s) as binary and continue?',
|
||||||
new PhutilNumber(count($utf8_problems)));
|
phutil_count($utf8_problems));
|
||||||
|
|
||||||
echo phutil_console_format(
|
echo phutil_console_format(
|
||||||
"**%s**\n",
|
"**%s**\n",
|
||||||
|
|
|
@ -143,14 +143,14 @@ EOTEXT
|
||||||
if ($done) {
|
if ($done) {
|
||||||
$this->writeStatus(
|
$this->writeStatus(
|
||||||
pht(
|
pht(
|
||||||
'Resuming upload (%d of %d chunks remain).',
|
'Resuming upload (%s of %s chunks remain).',
|
||||||
new PhutilNumber(count($remaining)),
|
phutil_count($remaining),
|
||||||
new PhutilNumber(count($chunks))));
|
phutil_count($chunks)));
|
||||||
} else {
|
} else {
|
||||||
$this->writeStatus(
|
$this->writeStatus(
|
||||||
pht(
|
pht(
|
||||||
'Uploading chunks (%d chunks to upload).',
|
'Uploading chunks (%s chunks to upload).',
|
||||||
new PhutilNumber(count($remaining))));
|
phutil_count($remaining)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$progress = new PhutilConsoleProgressBar();
|
$progress = new PhutilConsoleProgressBar();
|
||||||
|
|
|
@ -938,17 +938,17 @@ abstract class ArcanistWorkflow extends Phobject {
|
||||||
if ($api instanceof ArcanistGitAPI) {
|
if ($api instanceof ArcanistGitAPI) {
|
||||||
$hint = pht(
|
$hint = pht(
|
||||||
'(To ignore these %s change(s), add them to "%s".)',
|
'(To ignore these %s change(s), add them to "%s".)',
|
||||||
new PhutilNumber(count($untracked)),
|
phutil_count($untracked),
|
||||||
'.git/info/exclude');
|
'.git/info/exclude');
|
||||||
} else if ($api instanceof ArcanistSubversionAPI) {
|
} else if ($api instanceof ArcanistSubversionAPI) {
|
||||||
$hint = pht(
|
$hint = pht(
|
||||||
'(To ignore these %s change(s), add them to "%s".)',
|
'(To ignore these %s change(s), add them to "%s".)',
|
||||||
new PhutilNumber(count($untracked)),
|
phutil_count($untracked),
|
||||||
'svn:ignore');
|
'svn:ignore');
|
||||||
} else if ($api instanceof ArcanistMercurialAPI) {
|
} else if ($api instanceof ArcanistMercurialAPI) {
|
||||||
$hint = pht(
|
$hint = pht(
|
||||||
'(To ignore these %s change(s), add them to "%s".)',
|
'(To ignore these %s change(s), add them to "%s".)',
|
||||||
new PhutilNumber(count($untracked)),
|
phutil_count($untracked),
|
||||||
'.hgignore');
|
'.hgignore');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -961,7 +961,7 @@ abstract class ArcanistWorkflow extends Phobject {
|
||||||
|
|
||||||
$prompt = pht(
|
$prompt = pht(
|
||||||
'Ignore these %s untracked file(s) and continue?',
|
'Ignore these %s untracked file(s) and continue?',
|
||||||
new PhutilNumber(count($untracked)));
|
phutil_count($untracked));
|
||||||
|
|
||||||
if (!phutil_console_confirm($prompt)) {
|
if (!phutil_console_confirm($prompt)) {
|
||||||
throw new ArcanistUserAbortException();
|
throw new ArcanistUserAbortException();
|
||||||
|
@ -1150,11 +1150,11 @@ abstract class ArcanistWorkflow extends Phobject {
|
||||||
if ($this->getShouldAmend()) {
|
if ($this->getShouldAmend()) {
|
||||||
$prompt = pht(
|
$prompt = pht(
|
||||||
'Do you want to amend these %s change(s) to the current commit?',
|
'Do you want to amend these %s change(s) to the current commit?',
|
||||||
new PhutilNumber(count($files)));
|
phutil_count($files));
|
||||||
} else {
|
} else {
|
||||||
$prompt = pht(
|
$prompt = pht(
|
||||||
'Do you want to create a new commit with these %s change(s)?',
|
'Do you want to create a new commit with these %s change(s)?',
|
||||||
new PhutilNumber(count($files)));
|
phutil_count($files));
|
||||||
}
|
}
|
||||||
return $prompt;
|
return $prompt;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue