Closed
Bug 1434415
Opened 8 years ago
Closed 8 years ago
Move all hard-coded PaymentRequest strings to localization files
Categories
(Firefox :: WebPayments UI, enhancement, P1)
Firefox
WebPayments UI
Tracking
()
RESOLVED
FIXED
Firefox 60
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | fixed |
People
(Reporter: MattN, Assigned: jaws)
Details
(Whiteboard: [webpayments])
Attachments
(1 file)
While bootstrapping and figuring out what l10n files to use we hard-coded English strings. Now that we know we won't use l20n (since it doesn't support unprivileged content pages yet), we should convert our hard-coded strings to DTD/properties.
I think DTD should be usable directly from our resource URIs. Otherwise we can send the all strings from the parent process (read from .properties) at dialog load time.
| Reporter | ||
Updated•8 years ago
|
Priority: P2 → P1
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jaws
Status: NEW → ASSIGNED
| Comment hidden (mozreview-request) |
| Reporter | ||
Comment 2•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8951424 [details]
Bug 1434415 - Move all hard-coded PaymentRequest strings to localization files.
https://reviewboard.mozilla.org/r/220716/#review226654
I can look more tomorrow
::: toolkit/locales/jar.mn:127
(Diff revision 1)
> locale/@AB_CD@/alerts/alert.dtd (%chrome/alerts/alert.dtd)
> locale/@AB_CD@/alerts/alert.properties (%chrome/alerts/alert.properties)
> +% locale autoconfig @AB_CD@ %locale/@AB_CD@/autoconfig/
> + locale/@AB_CD@/autoconfig/autoconfig.properties (%chrome/autoconfig/autoconfig.properties)
> +% locale payments @AB_CD@ %locale/@AB_CD@/payments/
> + locale/@AB_CD@/payments/paymentRequest.dtd (%chrome/payments/paymentRequest.dtd)
Can you talk to someone on l10n to figure out how to opt us out of translation until we're ready That way we are free to change strings
| Assignee | ||
Comment 3•8 years ago
|
||
Flod, what is the process to answer comment #2?
Flags: needinfo?(francesco.lodolo)
Comment 4•8 years ago
|
||
Right now you're putting strings in toolkit/locales/en-US/chrome/payments, which means they will be picked up automatically by localization.
The solution is to put them outside of toolkit/locales/en-US (e.g. e.g. toolkit/components/payments/locale), but I need to redirect the NI to pike though, since I'm lost when it comes to jar and chrome://
Flags: needinfo?(francesco.lodolo) → needinfo?(l10n)
Comment 5•8 years ago
|
||
Yeah, just load the DTD and properties files from chrome://payments/content for now, and once you're ready, move the file to locales/en-US.
That said. Are you the first guys to try to create localizable web componenents in-tree? We should talk about how to do that. We don't know that yet either, and it'd be really sad if we hacked something that is copied a dozen of times, and we figure out afterwards that there's a better way.
Flags: needinfo?(l10n)
Comment 6•8 years ago
|
||
If we solved bug 1407418, we could also use Fluent here.
| Reporter | ||
Comment 7•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8951424 [details]
Bug 1434415 - Move all hard-coded PaymentRequest strings to localization files.
https://reviewboard.mozilla.org/r/220716/#review227652
::: toolkit/components/payments/content/paymentDialogWrapper.js:334
(Diff revision 1)
> + // Load strings here that need to be passed to unprivileged code.
> + let strings = {
> + "SecurityCodeInputPlaceholder": bundle.GetStringFromName("SecurityCodeInputPlaceholder"),
> + };
> +
I don't think Fx strings should go in the state since they're static and arguably not part of the application state. It would be nice to just use DTD for now so I would just delete the placeholder text and revert the properties usage. We'll probably move to Fluent before we really need .properties-like support.
::: toolkit/components/payments/res/paymentRequest.xhtml:6
(Diff revision 1)
> + <!ENTITY % htmlDTD
> + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> + "DTD/xhtml1-strict.dtd">
> + %htmlDTD;
Is the htmlDTD necessary?
::: toolkit/locales/jar.mn:113
(Diff revision 1)
> locale/@AB_CD@/mozapps/preferences/changemp.dtd (%chrome/mozapps/preferences/changemp.dtd)
> locale/@AB_CD@/mozapps/preferences/removemp.dtd (%chrome/mozapps/preferences/removemp.dtd)
> locale/@AB_CD@/mozapps/preferences/preferences.properties (%chrome/mozapps/preferences/preferences.properties)
> locale/@AB_CD@/mozapps/profile/createProfileWizard.dtd (%chrome/mozapps/profile/createProfileWizard.dtd)
> locale/@AB_CD@/mozapps/profile/profileSelection.properties (%chrome/mozapps/profile/profileSelection.properties)
> locale/@AB_CD@/mozapps/profile/profileSelection.dtd (%chrome/mozapps/profile/profileSelection.dtd)
Revert this with the move to `content`
Attachment #8951424 -
Flags: review?(MattN+bmo) → review+
| Comment hidden (mozreview-request) |
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4a0f2f9776f8
Move all hard-coded PaymentRequest strings to localization files. r=MattN
Comment 10•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•8 years ago
|
Whiteboard: [webpayments]
Updated•8 years ago
|
Product: Toolkit → Firefox
Target Milestone: mozilla60 → Firefox 60
You need to log in
before you can comment on or make changes to this bug.
Description
•