diff --git a/lib/usage.js b/lib/usage.js index a85f97c4c..fb41a3173 100644 --- a/lib/usage.js +++ b/lib/usage.js @@ -295,9 +295,11 @@ module.exports = function usage (yargs, y18n) { if (~options.number.indexOf(key)) type = `[${__('number')}]` const extra = [ - (key in deprecatedOptions) - ? `[${__('deprecated')}${typeof deprecatedOptions[key] === 'string' - ? `: ${deprecatedOptions[key]}` : ''}]` : null, + (key in deprecatedOptions) ? ( + typeof deprecatedOptions[key] === 'string' + ? `[${__('deprecated: %s', deprecatedOptions[key])}]` + : `[${__('deprecated')}]` + ) : null, type, (key in demandedOptions) ? `[${__('required')}]` : null, options.choices && options.choices[key] ? `[${__('choices:')} ${ diff --git a/locales/en.json b/locales/en.json index a03c1388b..c2d506bb4 100644 --- a/locales/en.json +++ b/locales/en.json @@ -44,5 +44,7 @@ "Did you mean %s?": "Did you mean %s?", "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", "Positionals:": "Positionals:", - "command": "command" + "command": "command", + "deprecated": "deprecated", + "deprecated: %s": "deprecated: %s" }