Closed
Bug 653135
Opened 13 years ago
Closed 13 years ago
GCLI command help should be localizable
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jwalker, Assigned: jwalker)
References
Details
Currently GCLI commands have a description element that is in English. They should have the ability to specify strings using a locale. Current syntax: gcli.addCommand({ name: 'help', params: [ { name: 'search', type: 'string', description: 'Search string to narrow the output.', defaultValue: null } ], returnType: 'html', description: 'Get help on the available commands.', exec: function(env, args) { // blah blah } }); Since GCLI is an external project we can not tie l10n to the firefox l10n process. What we can do is attempt to provide a way to allow l10n either in place or via a lookup system. Possible in-place l10n: gcli.addCommand({ name: 'help', params: [ { name: 'search', type: 'string', description: { en_US: 'Search string to narrow the output', gk_GK: 'Αναζήτηση string για να περιορίσετε την έξοδο' } defaultValue: null } ], returnType: 'html', description: { en_US: 'Get help on the available commands', gk_GK: 'Ζητήστε βοήθεια σχετικά με τις διαθέσιμες εντολές' }, exec: function(env, args) { // blah blah } }); Possible way to have a lookup system: gcli.addCommand({ name: 'help', params: [ { name: 'search', type: 'string', description: { key: 'gcli.command.help.search.desc' }, defaultValue: null } ], returnType: 'html', description: { key: 'gcli.command.help.desc' }, exec: function(env, args) { // blah blah } });
Assignee | ||
Updated•13 years ago
|
Comment 1•13 years ago
|
||
FWIW, this would be fine RTL-size. We can use the RLM and LRM characters as needed to make embedding the command names in the translated string work correctly.
Assignee | ||
Updated•13 years ago
|
No longer blocks: GCLI-EXPERIMENT
Assignee | ||
Comment 2•13 years ago
|
||
Implemented as described, with a minor change to allow a 'root' locale (named to be compatible with requirejs) which allows for a default that isn't 'en_US', so a French developer can provide: 'root': 'Bonjour', 'en_us': 'Hello' See Internationalization at https://github.com/mozilla/gcli/blob/master/docs/index.md
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•