From 5c0d31873afef00ce7f6a4e1160f50f659f6b8c0 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 13 Oct 2018 19:48:45 +0200 Subject: Add date/time plurals translation in JavaScript --- include/js_strings.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/js_strings.php b/include/js_strings.php index d9038e838..17de06b31 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -38,6 +38,15 @@ function js_strings() { // using the defaults set below if left untranslated, empty strings if // translated to "NONE" and the corresponding language strings // 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'))), '$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'))), -- cgit v1.2.3