translate helpers

This commit is contained in:
barisusakli
2014-07-05 16:58:57 -04:00
parent 89acec13dc
commit c5ccf4333b
11 changed files with 35 additions and 46 deletions

View File

@@ -22,11 +22,8 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com
postEl.find('.quote, .favourite, .post_reply, .chat').toggleClass('none', isDeleted);
postEl.find('.purge').toggleClass('none', !isDeleted);
translator.translate(isDeleted ? ' [[topic:restore]]' : ' [[topic:delete]]', function(translated) {
postEl.find('.delete').find('i').toggleClass('fa-trash-o', !isDeleted).toggleClass('fa-history', isDeleted);
postEl.find('.delete').find('span').html(translated);
});
postEl.find('.delete .i').toggleClass('fa-trash-o', !isDeleted).toggleClass('fa-history', isDeleted);
postEl.find('.delete span').translateHtml(isDeleted ? ' [[topic:restore]]' : ' [[topic:delete]]');
};
PostTools.updatePostCount = function() {