From b2e691265a0f283b1427ad2f0be069461d034bfc Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 20 Feb 2026 10:49:04 +0100 Subject: [PATCH] fix: consistent i18n usage on rootCmd --- cli/run.go | 14 +++++++------- pkg/i18n/locales/abra.pot | 26 +++++++++++++++++++++++--- pkg/i18n/locales/es.po | 25 +++++++++++++++++++++++-- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/cli/run.go b/cli/run.go index a71b75fe4..b232a0196 100644 --- a/cli/run.go +++ b/cli/run.go @@ -187,16 +187,16 @@ Config: rootCmd.PersistentFlags().BoolVarP( &internal.Debug, - "debug", - "d", + i18n.G("debug"), + i18n.G("d"), false, i18n.G("show debug messages"), ) rootCmd.PersistentFlags().BoolVarP( &internal.NoInput, - "no-input", - "n", + i18n.G("no-input"), + i18n.G("n"), false, i18n.G("toggle non-interactive mode"), ) @@ -204,15 +204,15 @@ Config: rootCmd.PersistentFlags().BoolVarP( &internal.Help, i18n.G("help"), - "h", // NOTE(d1): we are not translating this + i18n.G("h"), false, i18n.G("help for abra"), ) rootCmd.PersistentFlags().BoolVarP( &internal.Offline, - "offline", - "o", + i18n.G("offline"), + i18n.G("o"), false, i18n.G("prefer offline & filesystem access"), ) diff --git a/pkg/i18n/locales/abra.pot b/pkg/i18n/locales/abra.pot index 23bfb6417..a167b29f8 100644 --- a/pkg/i18n/locales/abra.pot +++ b/pkg/i18n/locales/abra.pot @@ -7,7 +7,7 @@ msgid "" msgstr "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" - "POT-Creation-Date: 2026-02-20 10:46+0100\n" + "POT-Creation-Date: 2026-02-20 10:49+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2387,10 +2387,14 @@ msgstr "" #. no spaces in between #. translators: `abra recipe diff` aliases. use a comma separated list of aliases #. with no spaces in between -#: ./cli/app/backup.go:73 ./cli/app/deploy.go:30 ./cli/recipe/diff.go:16 +#: ./cli/app/backup.go:73 ./cli/app/deploy.go:30 ./cli/recipe/diff.go:16 ./cli/run.go:191 msgid "d" msgstr "" +#: ./cli/run.go:190 +msgid "debug" +msgstr "" + #: ./cli/app/secret.go:326 #, c-format msgid "deleted %s successfully from local pass store" @@ -3151,6 +3155,10 @@ msgstr "" msgid "git: opening repository in %s" msgstr "" +#: ./cli/run.go:207 +msgid "h" +msgstr "" + #: ./cli/recipe/new.go:94 msgid "happy hacking 🎉" msgstr "" @@ -3611,7 +3619,7 @@ msgstr "" #. no spaces in between #. translators: `abra recipe new` aliases. use a comma separated list of #. aliases with no spaces in between -#: ./cli/app/new.go:48 ./cli/recipe/new.go:36 +#: ./cli/app/new.go:48 ./cli/recipe/new.go:36 ./cli/run.go:199 msgid "n" msgstr "" @@ -3863,6 +3871,10 @@ msgstr "" msgid "no-domain-checks" msgstr "" +#: ./cli/run.go:198 +msgid "no-input" +msgstr "" + #: ./cli/app/run.go:109 msgid "no-tty" msgstr "" @@ -3899,6 +3911,14 @@ msgstr "" msgid "number of retry attempts" msgstr "" +#: ./cli/run.go:215 +msgid "o" +msgstr "" + +#: ./cli/run.go:214 +msgid "offline" +msgstr "" + #: ./cli/app/cp.go:91 msgid "one of / arguments must take $SERVICE:$PATH form" msgstr "" diff --git a/pkg/i18n/locales/es.po b/pkg/i18n/locales/es.po index d6fdb8190..ba9c51c78 100644 --- a/pkg/i18n/locales/es.po +++ b/pkg/i18n/locales/es.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" -"POT-Creation-Date: 2026-02-20 10:46+0100\n" +"POT-Creation-Date: 2026-02-20 10:49+0100\n" "PO-Revision-Date: 2026-02-18 13:52+0000\n" "Last-Translator: chasqui \n" "Language-Team: Spanish si se agrega --no-input" #. no spaces in between #. translators: `abra recipe new` aliases. use a comma separated list of #. aliases with no spaces in between -#: cli/app/new.go:48 cli/recipe/new.go:36 +#: cli/app/new.go:48 cli/recipe/new.go:36 cli/run.go:199 msgid "n" msgstr "" @@ -4660,6 +4669,10 @@ msgstr "sin-verificaciones-de-convergencia" msgid "no-domain-checks" msgstr "sin-verificaciones-de-dominio" +#: cli/run.go:198 +msgid "no-input" +msgstr "" + #: cli/app/run.go:109 msgid "no-tty" msgstr "" @@ -4702,6 +4715,14 @@ msgstr "nada encontrado en el stack: %s" msgid "number of retry attempts" msgstr "número de reintentos" +#: cli/run.go:215 +msgid "o" +msgstr "" + +#: cli/run.go:214 +msgid "offline" +msgstr "" + #: cli/app/cp.go:91 msgid "one of / arguments must take $SERVICE:$PATH form" msgstr "uno de los argumentos / debe tener la forma $SERVICE:$PATH"