From 64c7906b9267547e65466a54baa801e6efa8856d Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 11 Jan 2024 17:35:15 +0530 Subject: [PATCH] fix: regen single po file using --locale --- frappe/commands/gettext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frappe/commands/gettext.py b/frappe/commands/gettext.py index a4c42ec36b..c3e54f2bf6 100644 --- a/frappe/commands/gettext.py +++ b/frappe/commands/gettext.py @@ -56,14 +56,15 @@ def csv_to_po(context, app: str | None = None, locale: str = None): You might want to run generate-pot-file first.""", ) @click.option("--app", help="Only update for this app. eg: frappe") +@click.option("--locale", help="Update PO files only for this locale. eg: de") @pass_context -def update_po_files(context, app: str | None = None): +def update_po_files(context, app: str | None = None, locale: str | None = None): from frappe.gettext.translate import update_po if not app: connect_to_site(context.sites[0] if context.sites else None) - update_po(app) + update_po(app, locale=locale) @click.command("create-po-file", help="Translation: create a new PO file for a locale")