fixed up translation strings, closed #1278

v1.18.x
Julian Lam 11 years ago
parent fa6d6816e4
commit ef47fc78eb

@ -53,7 +53,14 @@
"thread_tools.move": "Move Topic", "thread_tools.move": "Move Topic",
"thread_tools.fork": "Fork Topic", "thread_tools.fork": "Fork Topic",
"thread_tools.delete": "Delete 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": "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", "load_categories": "Loading Categories",
"disabled_categories_note": "Disabled Categories are greyed out", "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 + '"]')), postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')),
action = !postEl.hasClass('deleted') ? 'delete' : 'restore'; action = !postEl.hasClass('deleted') ? 'delete' : 'restore';
bootbox.confirm('Are you sure you want to ' + action + ' this post?', function(confirm) { translator.translate('[[topic:post_' + action + '_confirm]]', function(msg) {
if (confirm) { bootbox.confirm(msg, function(confirm) {
socket.emit('posts.' + action, { if (confirm) {
pid: pid, socket.emit('posts.' + action, {
tid: tid pid: pid,
}, function(err) { tid: tid
if(err) { }, function(err) {
return app.alertError('Can\'t ' + action + ' post!'); 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) { $('.delete_thread').on('click', function(e) {
var command = threadState.deleted !== '1' ? 'delete' : 'restore'; var command = threadState.deleted !== '1' ? 'delete' : 'restore';
bootbox.confirm('Are you sure you want to ' + command + ' this thread?', function(confirm) { translator.translate('[[topic:thread_tools.' + command + '_confirm]]', function(msg) {
if (confirm) { bootbox.confirm(msg, function(confirm) {
socket.emit('topics.' + command, tid); if (confirm) {
} socket.emit('topics.' + command, tid);
}
});
}); });
return false; return false;
}); });

Loading…
Cancel
Save