Skip to content

Commit 78b2e9d

Browse files
committed
Remove 'Command' prefix for every origin
Print 'Commands' section only once (if command exists) with removal of i18n support of 'Commands'.
1 parent 837b61b commit 78b2e9d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pyodide_cli/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
22
from collections import defaultdict
33
from functools import cache
4-
from gettext import gettext
54
from importlib.metadata import Distribution, EntryPoint
65
from importlib.metadata import distribution as importlib_distribution
76
from importlib.metadata import entry_points
@@ -66,14 +65,16 @@ def format_commands(self, ctx: click.Context, formatter: click.HelpFormatter):
6665
last_source: str = ""
6766
rows = []
6867

68+
with formatter.section("Commands"):
69+
pass
70+
6971
def write_row():
7072
if rows:
7173
if len(last_source):
7274
source_desc = f" Registered by {last_source}"
7375
else:
7476
source_desc = ""
75-
# NOTE: gettext is used in click! Any i18n support?
76-
with formatter.section(f"{gettext('Commands')}{source_desc}"):
77+
with formatter.section(f"{source_desc}"):
7778
formatter.write_dl(rows)
7879
rows.clear()
7980

0 commit comments

Comments
 (0)