Merge branch 'patch-14' into 'dev'
Add date/time plurals translation in JavaScript See merge request hubzilla/core!1336 (cherry picked from commita2575059e2)5c0d3187Add date/time plurals translation in JavaScript729d0d53Update language.phpf68674b3Update js_strings.tpl3ac4337aUpdate main.jse96e3dc6Update po2php.php54bdf59dUpdate js_strings.php
This commit is contained in:
@@ -254,6 +254,32 @@ function tt($singular, $plural, $count, $ctx = ''){
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return slash separated string of plurals translation forms
|
||||
*
|
||||
* @param string $k key in translations array
|
||||
* @return string
|
||||
*/
|
||||
function ta($k){
|
||||
|
||||
$t = App::$strings[$k];
|
||||
if (is_array($t))
|
||||
$t = implode("/", $t);
|
||||
return ($t == "" ? $k : $t);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return string_plural_select_xx function code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
||||
function tf() {
|
||||
|
||||
$s = "plural_function_code";
|
||||
return (x(App::$strings, $s) ? App::$strings[$s] : "return 0;");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Provide a fallback which will not collide with a function defined in
|
||||
* any language file.
|
||||
|
||||
Reference in New Issue
Block a user