remove most xul:stringbundle usage from messenger.xhtml
Categories
(Thunderbird :: General, task)
Tracking
(thunderbird_esr91 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | wontfix |
People
(Reporter: mkmelin, Assigned: lasana)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
<stringbundle> is a xul-only magic element. Ultimately these properties files should be converted to using Fluent, but there is also the programmatic replacement Services.strings.createBundle which could be used to start cleaning things up. <stringbundle> is a lot of looking back and forth since you need the js to grab an element from the file, by id, and the file to include the js, and those two to hold true everywhere the js file is included.
Let's start with messenger.xhtml - https://searchfox.org/comm-central/rev/ddd293b13d7052f64e51dca70678bfdf88fe2088/mail/base/content/messenger.xhtml#259
- bundle_smime_read_info: this needs code cleanup, mixing in OpenPGP in the S/MIME code. msgHdrView.js should figure out which technology to show for and loadOpenPgpMessageSecurityInfo moved elsewhere
- bundle_read_smime: use createBundle()
- bundle_offlinePrompts: createBundle()
- bundle_editContact: createBundle()
- placesBundle: preferably remove
- bundle_dateformat: on man, burn it from the ground. We have the js internationalization api for this nowadays
- chatBundle: unclear, probably should be split up... or createBundle() for now
- bundle_search: createBundle()
Then there are still bundle_brand and bundle_messenger which are trickier, and perhaps need to go directly to Fluent.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #0)
- bundle_dateformat: on man, burn it from the ground. We have the js internationalization api for this nowadays
What's that?
Assignee | ||
Comment 2•3 years ago
|
||
I'm not familiar with this api, not sure how/if these strings can be converted to use it. I'll come back to bundle_dateformat.
Assignee | ||
Comment 3•3 years ago
|
||
This changes handles:
- bundle_read_smime
- bundle_offlinePrompts
- bundle_editContact
- bundle_places
- bundle_dateformat:
- bundle_chat
- bundle_search
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
(In reply to Lasana Murray from comment #1)
What's that?
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
Something like new Intl.DateTimeFormat('en-GB', { weekday: 'long' }).format(new Date());
will give you the name of a day. I think all we need is in there somewhere...
Assignee | ||
Updated•3 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3b8a41c0bb6a
Use Services.strings.createBundle() instead of xul in some places. r=mkmelin
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/1e2dca717d2f
Follow up, fix GetStringByName typo in chat-messenger.js r=mkmelin
Assignee | ||
Comment 8•3 years ago
|
||
For bundle_smime_read_info
is it ok to create new ftl files or would this be better left up to migration when we can?
Edit: Maybe just one for openpgp?
Assignee | ||
Comment 9•3 years ago
|
||
Assignee | ||
Comment 10•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/b5474385c7fc
Use the i10n api instead for chat log date formatting. r=mkmelin
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Comment 12•3 years ago
|
||
Please remember to run linting for Fluent fixes (I've fixed it now)
./mach lint --config-path=comm/tools/lint -l fluent-lint comm/*
Comment 13•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d13d869c20bf
Separate openpgp strings from smime strings. r=kaie
Comment 14•3 years ago
|
||
Description
•