From e0e153eafbc1a6c5d2d0081709e96d2c03a1e376 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Sat, 7 Dec 2013 16:14:44 -0500 Subject: [PATCH] added translation to category infinite loader method --- public/src/forum/category.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/public/src/forum/category.js b/public/src/forum/category.js index 5c7d6c7e99..6b25a85701 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -134,20 +134,22 @@ define(function () { } Category.onTopicsLoaded = function(topics) { - var html = templates.prepare(templates['category'].blocks['topics']).parse({ topics: topics - }), - container = $('#topics-container'); + }); + + translator.translate(html, function(translatedHTML) { + var container = $('#topics-container'); - jQuery('#topics-container, .category-sidebar').removeClass('hidden'); - jQuery('#category-no-topics').remove(); + jQuery('#topics-container, .category-sidebar').removeClass('hidden'); + jQuery('#category-no-topics').remove(); - html = $(html); - container.append(html); + html = $(translatedHTML); + container.append(html); - $('#topics-container span.timeago').timeago(); - app.makeNumbersHumanReadable(html.find('.human-readable-number')); + $('#topics-container span.timeago').timeago(); + app.makeNumbersHumanReadable(html.find('.human-readable-number')); + }); } Category.loadMoreTopics = function(cid) {