Add plurals translation at browser side (JS)
This commit is contained in:
parent
81d9258e80
commit
5f2c3f607e
@ -38,6 +38,15 @@ function js_strings() {
|
|||||||
// using the defaults set below if left untranslated, empty strings if
|
// using the defaults set below if left untranslated, empty strings if
|
||||||
// translated to "NONE" and the corresponding language strings
|
// translated to "NONE" and the corresponding language strings
|
||||||
// if translated to anything else
|
// if translated to anything else
|
||||||
|
'minutes' => tt('%d minutes', '%d minutes', '%d'),
|
||||||
|
'hours' => tt('about %d hours', 'about %d hours', '%d'),
|
||||||
|
'days' => tt('%d days', '%d days', '%d'),
|
||||||
|
'months' => tt('%d months', '%d months', '%d'),
|
||||||
|
'years' => tt('%d years', '%d years', '%d'),
|
||||||
|
|
||||||
|
// get plural function code
|
||||||
|
'plural_func' => tf(),
|
||||||
|
|
||||||
'$t01' => ((t('timeago.prefixAgo') == 'timeago.prefixAgo') ? '' : ((t('timeago.prefixAgo') == 'NONE') ? '' : t('timeago.prefixAgo'))),
|
'$t01' => ((t('timeago.prefixAgo') == 'timeago.prefixAgo') ? '' : ((t('timeago.prefixAgo') == 'NONE') ? '' : t('timeago.prefixAgo'))),
|
||||||
'$t02' => ((t('timeago.prefixFromNow') == 'timeago.prefixFromNow') ? '' : ((t('timeago.prefixFromNow') == 'NONE') ? '' : t('timeago.prefixFromNow'))),
|
'$t02' => ((t('timeago.prefixFromNow') == 'timeago.prefixFromNow') ? '' : ((t('timeago.prefixFromNow') == 'NONE') ? '' : t('timeago.prefixFromNow'))),
|
||||||
'$t03' => ((t('timeago.suffixAgo') == 'timeago.suffixAgo') ? 'ago' : ((t('timeago.suffixAgo') == 'NONE') ? '' : t('timeago.suffixAgo'))),
|
'$t03' => ((t('timeago.suffixAgo') == 'timeago.suffixAgo') ? 'ago' : ((t('timeago.suffixAgo') == 'NONE') ? '' : t('timeago.suffixAgo'))),
|
||||||
@ -46,15 +55,15 @@ function js_strings() {
|
|||||||
// translatable main strings for jquery.timeago
|
// translatable main strings for jquery.timeago
|
||||||
'$t05' => t('less than a minute'),
|
'$t05' => t('less than a minute'),
|
||||||
'$t06' => t('about a minute'),
|
'$t06' => t('about a minute'),
|
||||||
'$t07' => t('%d minutes'),
|
'$t07' => ta('%d minutes'),
|
||||||
'$t08' => t('about an hour'),
|
'$t08' => t('about an hour'),
|
||||||
'$t09' => t('about %d hours'),
|
'$t09' => ta('about %d hours'),
|
||||||
'$t10' => t('a day'),
|
'$t10' => t('a day'),
|
||||||
'$t11' => t('%d days'),
|
'$t11' => ta('%d days'),
|
||||||
'$t12' => t('about a month'),
|
'$t12' => t('about a month'),
|
||||||
'$t13' => t('%d months'),
|
'$t13' => ta('%d months'),
|
||||||
'$t14' => t('about a year'),
|
'$t14' => t('about a year'),
|
||||||
'$t15' => t('%d years'),
|
'$t15' => ta('%d years'),
|
||||||
'$t16' => t(' '), // wordSeparator
|
'$t16' => t(' '), // wordSeparator
|
||||||
'$t17' => ((t('timeago.numbers') != 'timeago.numbers') ? t('timeago.numbers') : '[]'),
|
'$t17' => ((t('timeago.numbers') != 'timeago.numbers') ? t('timeago.numbers') : '[]'),
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user