D5067: help: assigning categories to existing commands

Yuya Nishihara yuya at tcha.org
Sun Oct 14 11:13:21 EDT 2018


Queued the first 5 patches, thanks.

>  # Human-readable category names. These are translated.
>  # Extensions with custom categories should add their names here.

To make these being collected to i18n catalog, we have to wrap them with _().
But that can be fixed later.

>  CATEGORY_NAMES = {
> +    registrar.command.CATEGORY_REPO_CREATION: 'Repository creation',
> +    registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT:
> +        'Remote repository management',
> +    registrar.command.CATEGORY_COMMITTING: 'Change creation',
> +    registrar.command.CATEGORY_CHANGE_NAVIGATION: 'Change navigation',
> +    registrar.command.CATEGORY_CHANGE_MANAGEMENT: 'Change manipulation',
> +    registrar.command.CATEGORY_CHANGE_ORGANIZATION: 'Change organization',
> +    registrar.command.CATEGORY_WORKING_DIRECTORY:
> +        'Working directory management',
> +    registrar.command.CATEGORY_FILE_CONTENTS: 'File content management',
> +    registrar.command.CATEGORY_IMPORT_EXPORT: 'Change import/export',
> +    registrar.command.CATEGORY_MAINTENANCE: 'Repository maintenance',
> +    registrar.command.CATEGORY_HELP: 'Help',
> +    registrar.command.CATEGORY_MISC: 'Miscellaneous commands',
>      registrar.command.CATEGORY_NONE: 'Uncategorized commands',

Perhaps, using all-lowercase names is our convention.


More information about the Mercurial-devel mailing list