diff options
author | Aleksander Machniak <alec@alec.pl> | 2022-08-28 12:43:48 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2022-08-28 12:43:48 +0300 |
commit | 1a3a253a7755b7974408f5f6c87da191822a2ec9 (patch) | |
tree | 2c9133cbb2d37a2c7307d0e142e0ed65a56882e1 | |
parent | 45b184e3372c1bb00efb8875b7b6570baf96df11 (diff) |
Remove redundant gettext() calls
-rw-r--r-- | program/js/app.js | 21 | ||||
-rw-r--r-- | skins/elastic/ui.js | 10 |
2 files changed, 17 insertions, 14 deletions
diff --git a/program/js/app.js b/program/js/app.js index a317b3caa..9c84ceb04 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1432,7 +1432,7 @@ function rcube_webmail() }; this.import_state = null; - this.import_dialog = this.simple_dialog(dialog, this.gettext('importcontacts'), import_func, { + this.import_dialog = this.simple_dialog(dialog, 'importcontacts', import_func, { close: close_func, button: 'import', width: 500, @@ -4196,7 +4196,7 @@ function rcube_webmail() $('<div>') .append($('<p>').html(ref.get_label('encryptpubkeysfound'))) .append(ul), - ref.get_label('importpubkeys'), + 'importpubkeys', null, {cancel_label: 'close', cancel_button: 'close'} ); @@ -4480,7 +4480,7 @@ function rcube_webmail() content = $('<ul class="proplist">').append(nodes); $('input:not([disabled])', content).first().attr('checked', true); - this.simple_dialog(content, this.get_label('markallread'), + this.simple_dialog(content, 'markallread', function() { ref.mark_all_read(folder, $('input:checked', content).val()); return true; @@ -4569,7 +4569,7 @@ function rcube_webmail() this.hide_menu('forwardmenu', event); - dialog = this.simple_dialog(dialog, this.gettext('bouncemsg'), submit_func, { + dialog = this.simple_dialog(dialog, 'bouncemsg', submit_func, { button: 'bounce', width: 400, height: 300 @@ -7105,7 +7105,7 @@ function rcube_webmail() } }; - this.simple_dialog(dialog, this.gettext('advsearch'), search_func, { + this.simple_dialog(dialog, 'advsearch', search_func, { button: 'search', width: 600, height: 500 @@ -7203,13 +7203,16 @@ function rcube_webmail() // display a dialog with QR code image this.qrcode = function() { - var title = this.get_label('qrcode'), - options = {button: false, cancel_button: 'close', width: 300, height: 300}, - img = new Image(300, 300); + var img = new Image(300, 300); img.src = this.url('addressbook/qrcode', {_source: this.env.source, _cid: this.get_single_cid()}); - return this.simple_dialog(img, title, null, options); + return this.simple_dialog(img, 'qrcode', null, { + button: false, + cancel_button: 'close', + width: 300, + height: 300 + }); }; diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index c65bd2f38..75343e1be 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -2710,7 +2710,7 @@ function rcube_elastic_ui() return true; }; - dialog = rcmail.simple_dialog(dialog, rcmail.gettext('listoptionstitle'), save_func, { + dialog = rcmail.simple_dialog(dialog, 'listoptionstitle', save_func, { closeOnEscape: true, minWidth: 400 }); @@ -2768,7 +2768,7 @@ function rcube_elastic_ui() var props = {_uid: rcmail.env.uid, _mbox: rcmail.env.mailbox, _framed: 1}, dialog = $('<iframe>').attr({id: 'headersframe', src: rcmail.url('headers', props)}); - rcmail.simple_dialog(dialog, rcmail.gettext('arialabelmessageheaders'), null, { + rcmail.simple_dialog(dialog, 'arialabelmessageheaders', null, { cancel_button: 'close', height: 400 }); @@ -2781,7 +2781,7 @@ function rcube_elastic_ui() { var dialog = $('#properties-menu').clone(); - rcmail.simple_dialog(dialog, rcmail.gettext('properties'), null, { + rcmail.simple_dialog(dialog, 'properties', null, { cancel_button: 'close', height: 400 }); @@ -2803,7 +2803,7 @@ function rcube_elastic_ui() return rcmail.command('import-messages', $(dialog.find('form')[0])); }; - rcmail.simple_dialog(dialog, rcmail.gettext('importmessages'), save_func, { + rcmail.simple_dialog(dialog, 'importmessages', save_func, { button: 'import', closeOnEscape: true, minWidth: 400 @@ -3158,7 +3158,7 @@ function rcube_elastic_ui() { if (!opts) opts = {}; - var title = rcmail.gettext(opts.title || 'insertcontact'), + var title = opts.title || 'insertcontact', dialog = $('#recipient-dialog'), parent = dialog.parent(), close_func = function() { |