Implement localization of paper names in the fallback paper-sizes list
Categories
(Core :: Printing: Setup, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
(Whiteboard: [print2020_v82][old-ui-])
Attachments
(3 files)
Followup to bug 1659781: the list landed there with hard-coded en-US names, but we should make them localizable. (The appropriate localizable strings already landed in printUI.ftl, but are not used by the code at present.)
Probably we should actually extend nsIPaper to expose both a (fixed) internal "key" and a (localizable) "display name" for the paper, so that code can be clear about which kind of name it wants to work with.
Comment 1•4 years ago
|
||
I'd been thinking we probably need a separate "internal" name and "display" name given the issues Erik has been working through.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D90073
Assignee | ||
Comment 4•4 years ago
|
||
Attaching a couple patches to get started here, but not intending these should land until after the bump to 83. We also need to check what additional adjustments (e.g. in front-end or platform-specific code) may be needed to work with the changes; some code may want to change from using nsIPaper.name
to using .id
.
Assignee | ||
Comment 5•4 years ago
|
||
FWIW, as they stand these patches definitely break things at least on Linux; probably the gtk code needs to change which attribute it's using somewhere. I'll try to look into this and see what fixups are needed.
Assignee | ||
Comment 6•4 years ago
|
||
Depends on D90074
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
The patches above should also resolve bug 1664017, as they result in using localized paper names for the UI on all platforms.
Assignee | ||
Comment 8•4 years ago
|
||
Oh, there's (at least) one more piece to take care of here: the PrintData that we pass over IPC needs updating to support paperId, and we can drop its (Windows-specific) paperData field.
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #8)
Oh, there's (at least) one more piece to take care of here: the PrintData that we pass over IPC needs updating to support paperId, and we can drop its (Windows-specific) paperData field.
Correction: we do pass the paperId there, of course - it's what now lives in the paperName field. (I'm inclined to do a more extensive renaming to make this less confusing, but that should be a separate no-functional-changes followup.)
However, I do think we can drop the paperData field altogether, as that is identical to the paperName (id), just stored in a different form.
Comment 10•4 years ago
|
||
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2bbc5c0b580f patch 1 - Make nsIPaper expose a non-localizable .id in addition to a localizable .name attribute. r=jwatt https://hg.mozilla.org/integration/autoland/rev/cd6aaf5e193c patch 2 - Localize paper names in the fallback paper size list used for Save to PDF. r=jwatt https://hg.mozilla.org/integration/autoland/rev/b95fc1c0599b patch 3 - Update front-end code to use nsIPaper.id instead of .name where appropriate. r=sfoster
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2bbc5c0b580f
https://hg.mozilla.org/mozilla-central/rev/cd6aaf5e193c
https://hg.mozilla.org/mozilla-central/rev/b95fc1c0599b
Updated•4 years ago
|
Updated•4 years ago
|
Description
•