Closed Bug 1662538 Opened 4 years ago Closed 4 years ago

Implement localization of paper names in the fallback paper-sizes list

Categories

(Core :: Printing: Setup, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
82 Branch
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.

I'd been thinking we probably need a separate "internal" name and "display" name given the issues Erik has been working through.

Severity: -- → S3
Flags: needinfo?(enordin)
Priority: -- → P2
Whiteboard: [print2020_v82][old-ui-]
Whiteboard: [print2020_v82][old-ui-] → [print2020_v83][old-ui-]

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.

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.

See Also: → 1659807
See Also: 1659807
See Also: → 1664017
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

The patches above should also resolve bug 1664017, as they result in using localized paper names for the UI on all platforms.

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.

(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.

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
Blocks: 1665901
Blocks: 1665904
Flags: needinfo?(enordin)
Whiteboard: [print2020_v83][old-ui-] → [print2020_v82][old-ui-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: