mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Add "pht_list()", a translation wrapper for lists of items
Summary: Ref T13603. This is just a small piece of cleanup I've wanted to do for a while: different languages might have different list separators and repeating this implosion manually all over the place is a bit ugly even if the beahvior is never a function of translation language. Test Plan: See next change. Maniphest Tasks: T13603 Differential Revision: https://secure.phabricator.com/D21814
This commit is contained in:
parent
fc5b228db5
commit
3cc486d5c1
2 changed files with 5 additions and 0 deletions
|
@ -968,6 +968,7 @@ phutil_register_library_map(array(
|
||||||
'nonempty' => 'utils/utils.php',
|
'nonempty' => 'utils/utils.php',
|
||||||
'phlog' => 'error/phlog.php',
|
'phlog' => 'error/phlog.php',
|
||||||
'pht' => 'internationalization/pht.php',
|
'pht' => 'internationalization/pht.php',
|
||||||
|
'pht_list' => 'internationalization/pht.php',
|
||||||
'phutil_build_http_querystring' => 'utils/utils.php',
|
'phutil_build_http_querystring' => 'utils/utils.php',
|
||||||
'phutil_build_http_querystring_from_pairs' => 'utils/utils.php',
|
'phutil_build_http_querystring_from_pairs' => 'utils/utils.php',
|
||||||
'phutil_censor_credentials' => 'utils/utils.php',
|
'phutil_censor_credentials' => 'utils/utils.php',
|
||||||
|
|
|
@ -44,3 +44,7 @@ function phutil_count($countable) {
|
||||||
function phutil_person(PhutilPerson $person) {
|
function phutil_person(PhutilPerson $person) {
|
||||||
return $person;
|
return $person;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pht_list(array $items) {
|
||||||
|
return implode(', ', $items);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue