added translation to new post creation, closes #627

v1.18.x
psychobunny 11 years ago
parent 34fc326a37
commit 5c3c2623f2

@ -83,8 +83,10 @@ define(function () {
Category.onNewTopic = function(data) { Category.onNewTopic = function(data) {
var html = templates.prepare(templates['category'].blocks['topics']).parse({ var html = templates.prepare(templates['category'].blocks['topics']).parse({
topics: [data] topics: [data]
}), });
topic = $(html),
translator.translate(html, function(translatedHTML) {
var topic = $(translatedHTML),
container = $('#topics-container'), container = $('#topics-container'),
topics = $('#topics-container').children('.category-item'), topics = $('#topics-container').children('.category-item'),
numTopics = topics.length; numTopics = topics.length;
@ -113,6 +115,7 @@ define(function () {
addActiveUser(data); addActiveUser(data);
$('#topics-container span.timeago').timeago(); $('#topics-container span.timeago').timeago();
});
} }
function addActiveUser(data) { function addActiveUser(data) {

Loading…
Cancel
Save