Closed Bug 1121110 Opened 9 years ago Closed 9 years ago

Add a shared.properties file for localizing strings used across tools

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 38

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

Attachments

(1 file, 2 obsolete files)

For strings like "width×height", "ms", and other hardcoded strings that we have throughout the tools, we should have a shared properties file. This, combined with ViewHelpers.L10N should make it easy to replace hardcoded strings with their localized forms.
Attached patch shared-strings.patch (obsolete) — Splinter Review
Adds shared.properties file and replaces hardcoded occurrences of width×height in frontend with a localized version.

I tried to keep L10N usage / declarations consistent with how it was used elsewhere in the file.
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8548391 - Flags: review?(vporof)
Note: this patch is built on top of the patch from bug 1042619
Comment on attachment 8548391 [details] [diff] [review]
shared-strings.patch

Review of attachment 8548391 [details] [diff] [review]:
-----------------------------------------------------------------

Nice

::: browser/devtools/canvasdebugger/canvasdebugger.js
@@ +1050,5 @@
>  /**
>   * Localization convenience methods.
>   */
>  let L10N = new ViewHelpers.L10N(STRINGS_URI);
> +let SHARED_L10N = new ViewHelpers.L10N("chrome://browser/locale/devtools/shared.properties");

Nit: have a const for the shared properties file, along with STRINGS_URI.
Attachment #8548391 - Flags: review?(vporof) → review+
Needed on assertion fix in browser_canvas-frontend-img-screenshots.js (it was expecting a space between the multiplication symbol and dimensions).

https://treeherder.mozilla.org/#/jobs?repo=try&revision=621fe0ea9dbe
Attachment #8548391 - Attachment is obsolete: true
Attachment #8555416 - Attachment is obsolete: true
Attachment #8555900 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a19de49dacb8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: