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,18 +143,20 @@ 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) {
bootbox.confirm(msg, function(confirm) {
if (confirm) { if (confirm) {
socket.emit('posts.' + action, { socket.emit('posts.' + action, {
pid: pid, pid: pid,
tid: tid tid: tid
}, function(err) { }, function(err) {
if(err) { if(err) {
return app.alertError('Can\'t ' + action + ' post!'); return translator.translate('[[topic:post_' + action + '_error]]', app.alertError);
} }
}); });
} }
}); });
});
} }
function openMovePostModal(button) { function openMovePostModal(button) {

@ -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) {
bootbox.confirm(msg, function(confirm) {
if (confirm) { if (confirm) {
socket.emit('topics.' + command, tid); socket.emit('topics.' + command, tid);
} }
}); });
});
return false; return false;
}); });

Loading…
Cancel
Save