From 3d1fe19460242c8de8f511009ce3f8cd1e624442 Mon Sep 17 00:00:00 2001 From: itzzdev09 Date: Tue, 1 Dec 2026 18:03:07 +0530 Subject: [PATCH] Fix the --omit-header help text of pybabel update --- babel/messages/frontend.py | 2 +- tests/messages/frontend/test_frontend.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py index d32104f88..50de12132 100644 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -820,7 +820,7 @@ class UpdateCatalog(CommandMixin): "name of the output file (default " "'//LC_MESSAGES/.po')"), ('omit-header', None, - "do not include msgid "" entry in header"), + 'do not include msgid "" entry in header'), ('locale=', 'l', 'locale of the catalog to compile'), ('width=', 'w', diff --git a/tests/messages/frontend/test_frontend.py b/tests/messages/frontend/test_frontend.py index 733986d8b..c858c32ef 100644 --- a/tests/messages/frontend/test_frontend.py +++ b/tests/messages/frontend/test_frontend.py @@ -239,6 +239,11 @@ def test_update_catalog_boolean_args(): assert cmdinst.previous is False # Mutually exclusive with no_fuzzy_matching +def test_update_catalog_omit_header_help(): + options = {name: help for name, _short, help in UpdateCatalog.user_options} + assert options['omit-header'] == 'do not include msgid "" entry in header' + + def test_compile_catalog_dir(tmp_path): """ Test that `compile` can compile all locales in a directory.