aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-10-13 19:52:59 +0200
committerMax Kostikov <max@kostikov.co>2018-10-13 19:52:59 +0200
commit3ac4337aec929d6cdf12a1645ab142dc5279bd6c (patch)
treea3ce33b069f095de0e069083b17ec3a1e87d9143 /view/js
parentf68674b35a70bceb4e9d06f47776ae85bfe11652 (diff)
downloadvolse-hubzilla-3ac4337aec929d6cdf12a1645ab142dc5279bd6c.tar.gz
volse-hubzilla-3ac4337aec929d6cdf12a1645ab142dc5279bd6c.tar.bz2
volse-hubzilla-3ac4337aec929d6cdf12a1645ab142dc5279bd6c.zip
Update main.js
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js40
1 files changed, 21 insertions, 19 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 48277f5cc..0c16d0560 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -44,25 +44,27 @@ $(document).ready(function() {
$(document).on('click', '.conversation-settings-link', getConversationSettings);
$(document).on('click', '#settings_module_ajax_submit', postConversationSettings);
- jQuery.timeago.settings.strings = {
- prefixAgo : aStr['t01'],
- prefixFromNow : aStr['t02'],
- suffixAgo : aStr['t03'],
- suffixFromNow : aStr['t04'],
- seconds : aStr['t05'],
- minute : aStr['t06'],
- minutes : aStr['t07'],
- hour : aStr['t08'],
- hours : aStr['t09'],
- day : aStr['t10'],
- days : aStr['t11'],
- month : aStr['t12'],
- months : aStr['t13'],
- year : aStr['t14'],
- years : aStr['t15'],
- wordSeparator : aStr['t16'],
- numbers : aStr['t17'],
- };
+ var tf = new Function('n', aStr['plural_func']);
+
+ jQuery.timeago.settings.strings = {
+ prefixAgo : aStr['t01'],
+ prefixFromNow : aStr['t02'],
+ suffixAgo : aStr['t03'],
+ suffixFromNow : aStr['t04'],
+ seconds : aStr['t05'],
+ minute : aStr['t06'],
+ minutes : function(value){var str=aStr['t07'].split("/")[tf(value)]; return (str ? str : aStr['t07']);},
+ hour : aStr['t08'],
+ hours : function(value){var str=aStr['t09'].split("/")[tf(value)]; return (str ? str : aStr['t09']);},
+ day : aStr['t10'],
+ days : function(value){var str=aStr['t11'].split("/")[tf(value)]; return (str ? str : aStr['t11']);},
+ month : aStr['t12'],
+ months : function(value){var str=aStr['t13'].split("/")[tf(value)]; return (str ? str : aStr['t13']);},
+ year : aStr['t14'],
+ years : function(value){var str=aStr['t15'].split("/")[tf(value)]; return (str ? str : aStr['t15']);},
+ wordSeparator : aStr['t16'],
+ numbers : aStr['t17'],
+ };
//mod_mail only
$(".mail-conv-detail .autotime").timeago();