Command description is not localized

Assigned to
(NeedInfo from)



WebExtensions: General
a year ago
2 months ago


(Reporter: wbamberg, Assigned: anejaalisha, Mentored, NeedInfo)



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

11 months 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

11 months 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.)


9 months ago
Keywords: good-first-bug
Whiteboard: [commands] good first bug triaged → [commands][good first bug][triaged]


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


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

Comment 4

2 months ago

If nobody is working on this, can I take up this bug?
Flags: needinfo?(kmaglione+bmo)

Comment 5

2 months ago
Sure! Let me know if you have any questions
Assignee: nobody → anejaalisha
Flags: needinfo?(kmaglione+bmo)

Comment 6

2 months ago
Apologies for such a basic question. But how to exactly reproduce this bug?
Flags: needinfo?(kmaglione+bmo)
You need to log in before you can comment on or make changes to this bug.