mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fixed up translation strings, closed #1278
This commit is contained in:
@@ -53,7 +53,14 @@
|
||||
"thread_tools.move": "Move Topic",
|
||||
"thread_tools.fork": "Fork Topic",
|
||||
"thread_tools.delete": "Delete Topic",
|
||||
"thread_tools.delete_confirm": "Are you sure you want to delete this thread?",
|
||||
"thread_tools.restore": "Restore Topic",
|
||||
"thread_tools.restore_confirm": "Are you sure you want to restore this thread?",
|
||||
|
||||
"post_delete_confirm": "Are you sure you want to delete this post?",
|
||||
"post_restore_confirm": "Are you sure you want to restore this post?",
|
||||
"post_delete_error": "Could not delete this post!",
|
||||
"post_restore_error": "Could not restore this post!",
|
||||
|
||||
"load_categories": "Loading Categories",
|
||||
"disabled_categories_note": "Disabled Categories are greyed out",
|
||||
|
||||
@@ -143,17 +143,19 @@ define(['composer', 'share'], function(composer, share) {
|
||||
postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')),
|
||||
action = !postEl.hasClass('deleted') ? 'delete' : 'restore';
|
||||
|
||||
bootbox.confirm('Are you sure you want to ' + action + ' this post?', function(confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('posts.' + action, {
|
||||
pid: pid,
|
||||
tid: tid
|
||||
}, function(err) {
|
||||
if(err) {
|
||||
return app.alertError('Can\'t ' + action + ' post!');
|
||||
}
|
||||
});
|
||||
}
|
||||
translator.translate('[[topic:post_' + action + '_confirm]]', function(msg) {
|
||||
bootbox.confirm(msg, function(confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('posts.' + action, {
|
||||
pid: pid,
|
||||
tid: tid
|
||||
}, function(err) {
|
||||
if(err) {
|
||||
return translator.translate('[[topic:post_' + action + '_error]]', app.alertError);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,14 @@ define(['forum/topic/fork', 'forum/topic/move'], function(fork, move) {
|
||||
$('.delete_thread').on('click', function(e) {
|
||||
var command = threadState.deleted !== '1' ? 'delete' : 'restore';
|
||||
|
||||
bootbox.confirm('Are you sure you want to ' + command + ' this thread?', function(confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('topics.' + command, tid);
|
||||
}
|
||||
translator.translate('[[topic:thread_tools.' + command + '_confirm]]', function(msg) {
|
||||
bootbox.confirm(msg, function(confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('topics.' + command, tid);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user