Skip to content

Node.js based forum software built for the modern web

fixed issue where timeago strings were not rendering in the correct language on cold loads

Julian Lam2430b970f3cf
diff --git a/public/src/translator.js b/public/src/translator.js
index a190500ee6..c64775f9fa 100644
--- a/public/src/translator.js
+++ b/public/src/translator.js
@@ -57,7 +57,9 @@
break;
}
- $.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.' + languageCode + '.js').fail(function() {
+ $.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.' + languageCode + '.js').success(function() {
+ $('span.timeago').timeago();
+ }).fail(function() {
$.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.en.js');
});