mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
added translation to category infinite loader method
This commit is contained in:
@@ -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');
|
|
||||||
|
translator.translate(html, function(translatedHTML) {
|
||||||
|
var container = $('#topics-container');
|
||||||
|
|
||||||
jQuery('#topics-container, .category-sidebar').removeClass('hidden');
|
jQuery('#topics-container, .category-sidebar').removeClass('hidden');
|
||||||
jQuery('#category-no-topics').remove();
|
jQuery('#category-no-topics').remove();
|
||||||
|
|
||||||
html = $(html);
|
html = $(translatedHTML);
|
||||||
container.append(html);
|
container.append(html);
|
||||||
|
|
||||||
$('#topics-container span.timeago').timeago();
|
$('#topics-container span.timeago').timeago();
|
||||||
app.makeNumbersHumanReadable(html.find('.human-readable-number'));
|
app.makeNumbersHumanReadable(html.find('.human-readable-number'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Category.loadMoreTopics = function(cid) {
|
Category.loadMoreTopics = function(cid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user