Command description is not localized

Assigned to



WebExtensions: General
a year ago
9 hours ago


(Reporter: wbamberg, Assigned: anejaalisha, Mentored)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [commands][triaged])


(1 attachment)



a year ago
Created attachment 8751464 [details]

It should be possible for developers to provides localized versions of the "description" field in commands.

The "description" field for commands should be localized if it's referenced with a string of the form "__MSG_commandDescription__", and "commandDescription" exists in a messages.json file under the _locales directory.

For example, I've attached a zip containing an add-on with a _locales directory a containing messages.json that contains:

  "commandDescription": {
    "message": "Does stuff",
    "description": "Thingy."

Then in the manifest.json the commands key is:

  "commands": {
    "toggle-feature": {
      "suggested_key": { "default": "Ctrl+Shift+U" },
      "description": "__MSG_commandDescription__"

If you install the add-on you'll see output like this in the Browser Console:


In Chrome you get:

    Does stuff

This seems quite important, since AFAICT the only purpose of "description" is to show the user.
This is definitely something we should fix, but I'm not sure it's especially important at the moment. The command description definitely exists to be shown to the user, but at the moment, we don't actually show it anywhere. In Chrome, there's a configuration UI for extension commands where the field is used. We don't have anything similar, at the moment.
Whiteboard: [commands]

Comment 2

a year ago
we don't use descriptions yet - they are shown in prefferences where you can reassign key bindings.
Whiteboard: [commands] → [commands] good first bug triaged

Comment 3

a year ago
It's true that Firefox doesn't have a native UI for assigning shortcuts, but an add-on could build its own UI for them.

Enabling an add-on to have its own UI for shortcuts is the only reason I can imagine that the description is accessible to add-ons via the JS API at all.

(just to clarify this, not to argue with your triage.)
Keywords: good-first-bug
Whiteboard: [commands] good first bug triaged → [commands][good first bug][triaged]


10 months ago
Whiteboard: [commands][good first bug][triaged] → [commands][triaged]


7 months ago
Component: WebExtensions: Untriaged → WebExtensions: General
Priority: -- → P5

Comment 4

3 months ago

If nobody is working on this, can I take up this bug?
Flags: needinfo?(kmaglione+bmo)
Sure! Let me know if you have any questions
Assignee: nobody → anejaalisha
Flags: needinfo?(kmaglione+bmo)

Comment 6

3 months ago
Apologies for such a basic question. But how to exactly reproduce this bug?
Flags: needinfo?(kmaglione+bmo)
This is more like an "enhancement" than a "bug", so there are no easy steps to "reproduce".

The point is that that we don't localize the command descriptions the way Will described in comment #0.  So you would need to modify the loadCommandsFromManifest() method [1], in order to also read the localized descriptions (if present).  Also, you would need to add a test for new functionality in [2].

Flags: needinfo?(kmaglione+bmo)


22 days ago
Mentor: →
Hey @anejaalish! Just checking in to see how you are doing with this bug. :)
You need to log in before you can comment on or make changes to this bug.