Skip to content

Default descriptionKey for options and parameters #638

@Mikusch

Description

@Mikusch

In applications with a lot of commands, localizing argument descriptions is very tedious because you need to explicitly set descriptionKey on each option and positional parameter you wish to localize and ensure that the names match up with the keys in the resource bundle.

I propose a fallback resource bundle key that takes effect when both the description and descriptionKey attributes in @Option and @Parameters have not been set, similar to how the usage message already has pre-defined keys such as mycommand.usage.customSynopsis.

For a command purge with the --verbose option and files parameter the keys could be named git.option.--verbose or git.option.verbose and git.param.files.

If no mapping to that fallback key exists, it should do the same as it currently does when descriptionKey is missing and read the description attribute instead.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions