Skip to content
Myr

✨ Allow gettext translation of help message (#886)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sofie Van Landeghem · committed by GitHub · parent 3b7fe59 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:typer/rich_utils.py+4 added-1 removed
90 unmodified lines
91OPTIONS_PANEL_TITLE = _("Options")92COMMANDS_PANEL_TITLE = _("Commands")93ERRORS_PANEL_TITLE = _("Error")94ABORTED_TEXT = _("Aborted.")95RICH_HELP = _("Try [blue]'{command_path} {help_option}'[/] for help.")9697MARKUP_MODE_MARKDOWN = "markdown"98MARKUP_MODE_RICH = "rich"99_RICH_HELP_PANEL_NAME = "rich_help_panel"
588 unmodified lines
688 console.print(ctx.get_usage())689690 if ctx is not None and ctx.command.get_help_option(ctx) is not None:691 console.print(691 f"Try [blue]'{ctx.command_path} {ctx.help_option_names[0]}'[/] for help.",692 RICH_HELP.format(693 command_path=ctx.command_path, help_option=ctx.help_option_names[0]694 ),695 style=STYLE_ERRORS_SUGGESTION,696 )697698 console.print(
13 unmodified lines