added translation to new post creation, closes #627

This commit is contained in:
psychobunny
2013-12-07 16:11:37 -05:00
parent 34fc326a37
commit 5c3c2623f2

View File

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