- commit
- fb080a0446b60493eabfccb71a5655bdda614411
- parent
- 2c37909e6ac75700ef3434bf53a5e182cb524a7c
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-09-05 05:43
alias browser.i18n.getMessage
Diffstat
| M | content/js/message.js | 28 | +++++++++++++++------------- |
1 files changed, 15 insertions, 13 deletions
diff --git a/content/js/message.js b/content/js/message.js
@@ -49,13 +49,15 @@ var createAuthor = function(author) {
49 49
50 50 var template = function(ctx) {
51 51 var h = util.h;
-1 52 var _ = browser.i18n.getMessage;
-1 53
52 54 return h('article', {'class': ctx.isExpanded ? 'message is-expanded' : 'message', 'id': `msg-${ctx.id}`, 'tabindex': -1}, [
53 55 h('header', {'class': 'message__header'}, [
54 56 h('button', {'class': ctx.isFlagged ? 'star is-active' : 'star', 'data-action': 'toggleFlagged'}, [util.createIcon('star')]),
55 57 createAuthor(ctx.author),
56 58 ' ',
57 59 h('span', {'class': 'message__recipients'}, [
58 -1 browser.i18n.getMessage('to'),
-1 60 _('to'),
59 61 ' ',
60 62 ...ctx.recipients.map(r => h('a', {'href': `mailto:${r.email}`}, [r.name])),
61 63 ...ctx.cc.map(r => h('a', {'href': `mailto:${r.email}`, 'class': 'message__recipients__cc'}, [r.name])),
@@ -66,24 +68,24 @@ var template = function(ctx) {
66 68 util.createDate(ctx.date),
67 69 h('span', {'class': 'message__actions'}, [
68 70 ctx.canReplyAll
69 -1 ? h('button', {'class': 'button', 'title': browser.i18n.getMessage('replyAll'), 'data-action': 'replyAll'}, [util.createIcon('reply_all')])
-1 71 ? h('button', {'class': 'button', 'title': _('replyAll'), 'data-action': 'replyAll'}, [util.createIcon('reply_all')])
70 72 : ctx.canReplyToList
71 -1 ? h('button', {'class': 'button', 'title': browser.i18n.getMessage('replyList'), 'data-action': 'replyToList'}, [util.createIcon('list')])
72 -1 : h('button', {'class': 'button', 'title': browser.i18n.getMessage('reply'), 'data-action': 'replyToSender'}, [util.createIcon('reply')]),
73 -1 h('button', {'class': 'button dropdownToggle', 'title': browser.i18n.getMessage('more')}, [util.createIcon('menu')]),
-1 73 ? h('button', {'class': 'button', 'title': _('replyList'), 'data-action': 'replyToList'}, [util.createIcon('list')])
-1 74 : h('button', {'class': 'button', 'title': _('reply'), 'data-action': 'replyToSender'}, [util.createIcon('reply')]),
-1 75 h('button', {'class': 'button dropdownToggle', 'title': _('more')}, [util.createIcon('menu')]),
74 76 h('div', {'class': 'dropdown'}, [
75 -1 h('button', {'class': 'dropdown-item', 'data-action': 'replyToSender'}, [util.createIcon('reply'), ' ', browser.i18n.getMessage('reply')]),
76 -1 ctx.canReplyAll ? h('button', {'class': 'dropdown-item', 'data-action': 'replyAll'}, [util.createIcon('reply_all'), ' ', browser.i18n.getMessage('replyAll')]) : null,
77 -1 ctx.canReplyToList ? h('button', {'class': 'dropdown-item', 'data-action': 'replyToList'}, [util.createIcon('list'), ' ', browser.i18n.getMessage('replyList')]) : null,
78 -1 h('button', {'class': 'dropdown-item', 'data-action': 'forward'}, [util.createIcon('forward'), ' ', browser.i18n.getMessage('forward')]),
79 -1 h('button', {'class': 'dropdown-item', 'data-action': 'editAsNew'}, [util.createIcon('create'), ' ', browser.i18n.getMessage('edit')]),
80 -1 h('button', {'class': 'dropdown-item', 'data-action': 'viewClassic'}, [util.createIcon('open_in_new'), ' ', browser.i18n.getMessage('viewClassic')]),
81 -1 h('button', {'class': 'dropdown-item', 'data-action': 'viewSource'}, [util.createIcon('code'), ' ', browser.i18n.getMessage('viewSource')]),
-1 77 h('button', {'class': 'dropdown-item', 'data-action': 'replyToSender'}, [util.createIcon('reply'), ' ', _('reply')]),
-1 78 ctx.canReplyAll ? h('button', {'class': 'dropdown-item', 'data-action': 'replyAll'}, [util.createIcon('reply_all'), ' ', _('replyAll')]) : null,
-1 79 ctx.canReplyToList ? h('button', {'class': 'dropdown-item', 'data-action': 'replyToList'}, [util.createIcon('list'), ' ', _('replyList')]) : null,
-1 80 h('button', {'class': 'dropdown-item', 'data-action': 'forward'}, [util.createIcon('forward'), ' ', _('forward')]),
-1 81 h('button', {'class': 'dropdown-item', 'data-action': 'editAsNew'}, [util.createIcon('create'), ' ', _('edit')]),
-1 82 h('button', {'class': 'dropdown-item', 'data-action': 'viewClassic'}, [util.createIcon('open_in_new'), ' ', _('viewClassic')]),
-1 83 h('button', {'class': 'dropdown-item', 'data-action': 'viewSource'}, [util.createIcon('code'), ' ', _('viewSource')]),
82 84 ]),
83 85 ]),
84 86 ]),
85 87 h('div', {'class': 'message__details'}, [
86 -1 ctx.isJunk ? util.createAlert(browser.i18n.getMessage('junk'), 'mode_heat', 'warning') : null,
-1 88 ctx.isJunk ? util.createAlert(_('junk'), 'mode_heat', 'warning') : null,
87 89 h('footer', {'class': 'message__footer'}, [
88 90 h('ul', {'class': 'attachments'}, (ctx.attachments || []).map(a => h('li', {}, [
89 91 h('a', {'class': 'attachment', 'href': a.url}, [util.createIcon('attachment'), ' ', a.name]),