mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
fixed up translation strings, closed #1278
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user