added translation to category infinite loader method

This commit is contained in:
psychobunny
2013-12-07 16:14:44 -05:00
parent 5c3c2623f2
commit e0e153eafb

View File

@@ -134,20 +134,22 @@ define(function () {
} }
Category.onTopicsLoaded = function(topics) { Category.onTopicsLoaded = function(topics) {
var html = templates.prepare(templates['category'].blocks['topics']).parse({ var html = templates.prepare(templates['category'].blocks['topics']).parse({
topics: topics topics: topics
}), });
container = $('#topics-container');
jQuery('#topics-container, .category-sidebar').removeClass('hidden'); translator.translate(html, function(translatedHTML) {
jQuery('#category-no-topics').remove(); var container = $('#topics-container');
html = $(html); jQuery('#topics-container, .category-sidebar').removeClass('hidden');
container.append(html); jQuery('#category-no-topics').remove();
$('#topics-container span.timeago').timeago(); html = $(translatedHTML);
app.makeNumbersHumanReadable(html.find('.human-readable-number')); container.append(html);
$('#topics-container span.timeago').timeago();
app.makeNumbersHumanReadable(html.find('.human-readable-number'));
});
} }
Category.loadMoreTopics = function(cid) { Category.loadMoreTopics = function(cid) {