Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13986831
D10431.id25127.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10431.id25127.diff
View Options
diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php
--- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php
+++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php
@@ -38,10 +38,17 @@
public function getLintNameMap() {
return array(
- self::LINT_ARRAY_COMBINE => 'array_combine() Unreliable',
- self::LINT_DEPRECATED_FUNCTION => 'Use of Deprecated Function',
- self::LINT_UNSAFE_DYNAMIC_STRING => 'Unsafe Usage of Dynamic String',
- self::LINT_RAGGED_CLASSTREE_EDGE => 'Class Not abstract Or final',
+ self::LINT_ARRAY_COMBINE => pht(
+ '%s Unreliable',
+ 'array_combine()'),
+ self::LINT_DEPRECATED_FUNCTION => pht(
+ 'Use of Deprecated Function'),
+ self::LINT_UNSAFE_DYNAMIC_STRING => pht(
+ 'Unsafe Usage of Dynamic String'),
+ self::LINT_RAGGED_CLASSTREE_EDGE => pht(
+ 'Class Not %s Or %s',
+ 'abstract',
+ 'final'),
);
}
@@ -194,8 +201,11 @@
$this->raiseLintAtNode(
$call,
self::LINT_UNSAFE_DYNAMIC_STRING,
- "Parameter ".($param + 1)." of {$name}() should be a scalar string, ".
- "otherwise it's not safe.");
+ pht(
+ "Parameter %d of %s should be a scalar string, ".
+ "otherwise it's not safe.",
+ $param + 1,
+ $name.'()'));
}
}
}
@@ -218,8 +228,12 @@
$this->raiseLintAtNode(
$call,
self::LINT_ARRAY_COMBINE,
- 'Prior to PHP 5.4, array_combine() fails when given empty '.
- 'arrays. Prefer to write array_combine(x, x) as array_fuse(x).');
+ pht(
+ 'Prior to PHP 5.4, `%s` fails when given empty arrays. '.
+ 'Prefer to write `%s` as `%s`.',
+ 'array_combine()',
+ 'array_combine(x, x)',
+ 'array_fuse(x)'));
}
}
}
@@ -273,8 +287,12 @@
$this->raiseLintAtNode(
$class->getChildOfType(1, 'n_CLASS_NAME'),
self::LINT_RAGGED_CLASSTREE_EDGE,
- "This class is neither 'final' nor 'abstract', and does not have ".
- "a docblock marking it '@concrete-extensible'.");
+ pht(
+ "This class is neither '%s' nor '%s', and does not have ".
+ "a docblock marking it '%s'.",
+ 'final',
+ 'abstract',
+ '@concrete-extensible'));
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 22, 5:51 AM (3 w, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6731441
Default Alt Text
D10431.id25127.diff (2 KB)
Attached To
Mode
D10431: Make some strings in `ArcanistPhutilXHPASTLinter` translatable
Attached
Detach File
Event Timeline
Log In to Comment