If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED FIXED in Firefox 38

Status

()

Firefox
Developer Tools: Framework
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: bgrins, Assigned: bgrins)

Tracking

unspecified
Firefox 38
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8548391 [details] [diff] [review]
shared-strings.patch

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)
(Assignee)

Comment 2

3 years ago
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+
(Assignee)

Comment 4

3 years ago
Created attachment 8555416 [details] [diff] [review]
shared-strings-r=vporof.patch

Rebased and updated as per Comment 3.  Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e2b10d9a3635
Attachment #8555416 - Flags: review+
(Assignee)

Comment 5

3 years ago
Created attachment 8555900 [details] [diff] [review]
shared-strings-r=vporof.patch

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+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
(Assignee)

Comment 6

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/a19de49dacb8
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/a19de49dacb8
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
You need to log in before you can comment on or make changes to this bug.