Closed Bug 1709137 Opened 3 years ago Closed 3 years ago

Use Multilocalization Helper for the Toolbox l10n helper

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: jdescottes, Assigned: V1KT1M, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: dt-outreachy-2021)

Attachments

(1 file)

In DebugTargetInfo we need to retrieve strings from both toolbox.properties and brand.properties.

For now we create an additional bundle to get the brand.properties string, but we could try to use MultiLocalizationHelper:

https://searchfox.org/mozilla-central/rev/083983b7f09b00cdfe4f70396e39ea4f8a1735e1/devtools/client/framework/toolbox.js#48-51

const { MultiLocalizationHelper } = require("devtools/shared/l10n");
const L10N = new MultiLocalizationHelper(
  "devtools/client/locales/toolbox.properties",
  "chrome://branding/locale/brand.properties"
);

After that we need to update https://searchfox.org/mozilla-central/rev/a8773ba2a8f015e0525f219a7e55087b04d30258/devtools/client/framework/components/DebugTargetInfo.js#84-86. Instead of using Services, we should be able to use L10N.getStr("brandShorterName")

To check your change:

  • open about:debugging
  • select This Nightly
  • go to the extensions section
  • click on Inspect for any extension

This should open a new tab, check that "This Nightly (90.0a1)" is displayed on the top left.

Node snapshot tests will have to be updated. See https://firefox-source-docs.mozilla.org/devtools/tests/node-tests.html#updating-snapshots

> cd devtools/client/framework/test/node/
> yarn run test-ci -u

(yarn needs to be installed)

Check if this should be flagged as good first bug

Flags: needinfo?(jdescottes)

Should be ok as a good first bug. The summary contains all the steps needed to fix this bug.

Contributor's docs are at https://firefox-source-docs.mozilla.org/setup/index.html

Mentor: jdescottes
Flags: needinfo?(jdescottes)
Keywords: good-first-bug

Hi, @jdescottes can I work on this, this is my very first time working with the codebase and I feel this would be a good introduction.

Hi Clinton! Sure, the bug is yours. There are instructions in the previous comments, you can also ask questions here or on https://chat.mozilla.org/#/room/#devtools:mozilla.org if you need any help.

Thanks!

Assignee: nobody → clintonadeleke
Status: NEW → ASSIGNED

Okay, I've done as mentioned in Comment #0 and I got This Nightly (95.0a1) instead of 90.0a1 as you mentioned in your comment is there a reason for this or do I have to keep debugging?

No that's fine, it should print the current version number (was 90 when I filed the bug, it is now 95)

Okay, so I've fixed tested, and linted it, committed my code using hg commit and now when I try to run moz-phab I run into this error

Failed to find draft commits to submit

However if I use hg glog I get

@  changeset:   595289:4468ef8385c3
|  tag:         tip
|  user:        htmlHxcker <clintonadeleke@gmail.com>
|  date:        Tue Oct 12 12:57:11 2021 +0200
|  summary:     Bug 1709137 - [devtools] Use Multilocalization Helper for the Toolbox r?jdescottes
|
o  changeset:   595288:27315087fdc5
|  user:        Steve Fink <xxx@xxx.xxx>
|  date:        Mon Oct 11 03:54:36 2021 +0000
|  summary:     Bug 1685586 - Fix GC function explanations in cases with modified unmangled names r=jonco
|
o  changeset:   595287:0f0d38187fd1
|  user:        Claudia <xxx@xxx.xxx>
|  date:        Sun Oct 10 20:39:08 2021 +0000
|  summary:     Bug 1719250 - [devtools] Stop deduping array query parameters. r=bomsy
|
o  changeset:   595286:e9573a9c111a
|  user:        Outvi V <xxx@xxx.xxx>
|  date:        Sun Oct 10 20:37:05 2021 +0000
|  summary:     Bug 1642778 - [devtools] Prioritize source-mapped files. r=bomsy

Am I missing something? I followed the steps outlined at https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#commit-message

Flags: needinfo?(jdescottes)

Looks like you managed to push to phabricator. Let me know if there is still an issue.

Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6288ef5f8ac
Use Multilocalization Helper for the Toolbox l10n helper r=jdescottes
Whiteboard: dt-outreachy-2021
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: