Node.js based forum software built for the modern web
flag post translations
Julian Lam339d0e549530
diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.jsonindex 604d7a03a2..d9ed9e0bd9 100644--- a/public/language/en_GB/topic.json+++ b/public/language/en_GB/topic.json@@ -1,6 +1,8 @@{"topic": "Topic","topics": "Topics",+ "topic_id": "Topic ID",+ "topic_id_placeholder": "Enter topic ID","no_topics_found": "No topics found!","no_posts_found": "No posts found!",@@ -25,6 +27,8 @@"bookmark_instructions" : "Click here to return to your last position or close to discard.","flag_title": "Flag this post for moderation",+ "flag_confirm": "Are you sure you want to flag this post?",+ "flag_success": "This post has been flagged for moderation.","deleted_message": "This thread has been deleted. Only users with thread management privileges can see it.","following_topic.title": "Following Topic",diff --git a/public/src/forum/topic.js b/public/src/forum/topic.jsindex ba4e4ae41f..3b27079dd7 100644--- a/public/src/forum/topic.js+++ b/public/src/forum/topic.js@@ -464,7 +464,9 @@ define(['forum/pagination', 'forum/topic/threadTools', 'forum/topic/postTools'],thread_state.deleted = deleted ? '1' : '0';if(deleted) {- $('<div id="thread-deleted" class="alert alert-warning">This thread has been deleted. Only users with thread management privileges can see it.</div>').insertBefore(threadEl);+ translator.translate('[[topic:deleted_message]]', function(translated) {+ $('<div id="thread-deleted" class="alert alert-warning">' + translated + '</div>').insertBefore(threadEl);+ });} else {$('#thread-deleted').remove();}diff --git a/public/src/forum/topic/postTools.js b/public/src/forum/topic/postTools.jsindex 26cbeb14c8..58e6406d29 100644--- a/public/src/forum/topic/postTools.js+++ b/public/src/forum/topic/postTools.js@@ -209,15 +209,19 @@ define(['composer', 'share'], function(composer, share) {}function flagPost(pid) {- bootbox.confirm('Are you sure you want to flag this post?', function(confirm) {- if (confirm) {- socket.emit('posts.flag', pid, function(err) {- if(err) {- return app.alertError(err.message);- }- app.alertSuccess('This post has been flagged for moderation.');- });- }+ translator.translate('[[topic:flag_confirm]]', function(message) {+ bootbox.confirm(message, function(confirm) {+ if (confirm) {+ socket.emit('posts.flag', pid, function(err) {+ if(err) {+ return app.alertError(err.message);+ }+ translator.translate('[[topic:flag_success]]', function(message) {+ app.alertSuccess(message);+ });+ });+ }+ });});}