mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
added translation to new post creation, closes #627
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user