Bug 1045273 - "[gcli] optional parameters labeled as 'helpManOptional', not as optional in help" r=mratcliffe

MozReview-Commit-ID: HFGkU77huBw

--HG--
extra : rebase_source : f8b921760207d9cb86cd7a297e7ac7ac3bd40164
This commit is contained in:
Stoyan Dimitrov 2017-04-04 05:48:00 +01:00
Родитель 5e5cbbbbd1
Коммит 49cdc6d567
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -335,10 +335,10 @@ Parameter.prototype.toJson = function() {
};
// Values do not need to be serializable, so we don't try. For the client
// side (which doesn't do any executing) we don't actually care what the
// default value is, just that it exists
// side (which doesn't do any executing) we only care whether default value is
// undefined, null, or something else.
if (this.paramSpec.defaultValue !== undefined) {
json.defaultValue = {};
json.defaultValue = (this.paramSpec.defaultValue === null) ? null : {};
}
if (this.paramSpec.description != null) {
json.description = this.paramSpec.description;

Просмотреть файл

@ -69,7 +69,7 @@ function getHelpManData(commandData, context) {
}
else {
// We need defaultText to work the text version of defaultValue
input = l10n.lookupFormat('helpManOptional');
input = l10n.lookup('helpManOptional');
/*
var val = param.type.stringify(param.defaultValue);
input = Promise.resolve(val).then(function(defaultValue) {