flag post translations

v1.18.x
Julian Lam 11 years ago
parent bc29f832fe
commit 339d0e5495

@ -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",

@ -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();
}

@ -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);
});
});
}
});
});
}

Loading…
Cancel
Save