From 83ca2a63d1eea8286375cb6eb2e4741227391849 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 30 Aug 2025 12:02:13 +0200 Subject: [PATCH] fix: support ValidArgs translation See https://git.coopcloud.tech/toolshed/abra/issues/632 --- cli/run.go | 7 ++++++ pkg/i18n/locales/abra.pot | 45 ++++++++++++++++++++++----------------- pkg/i18n/locales/es.po | 45 ++++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 38 deletions(-) diff --git a/cli/run.go b/cli/run.go index d263963b..7a82359d 100644 --- a/cli/run.go +++ b/cli/run.go @@ -57,12 +57,19 @@ func Run(version, commit string) { Short: i18n.G("The Co-op Cloud command-line utility belt 🎩🐇"), Version: fmt.Sprintf("%s-%s", version, commit[:7]), ValidArgs: []string{ + // translators: `abra app` command for autocompletion i18n.G("app"), + // translators: `abra autocomplete` command for autocompletion i18n.G("autocomplete"), + // translators: `abra catalogue` command for autocompletion i18n.G("catalogue"), + // translators: `abra man` command for autocompletion i18n.G("man"), + // translators: `abra recipe` command for autocompletion i18n.G("recipe"), + // translators: `abra server` command for autocompletion i18n.G("server"), + // translators: `abra upgrade` command for autocompletion i18n.G("upgrade"), }, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { diff --git a/pkg/i18n/locales/abra.pot b/pkg/i18n/locales/abra.pot index ec43770c..904e37ff 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: 2025-08-30 11:46+0200\n" + "POT-Creation-Date: 2025-08-30 12:02+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,7 +43,7 @@ msgid " # fetch from recipe catalogue\n" " abra recipe fetch gitea --ssh" msgstr "" -#: ./cli/run.go:122 +#: ./cli/run.go:129 msgid " # generate the man pages into /usr/local/share/man/man1\n" " abra_path=$(which abra) # pass abra absolute path to sudo below\n" " sudo $abra_path man\n" @@ -827,7 +827,7 @@ msgid "Generate labels for the main recipe service.\n" msgstr "" #. translators: Short description for `man` command -#: ./cli/run.go:121 +#: ./cli/run.go:128 msgid "Generate manpage" msgstr "" @@ -1559,7 +1559,7 @@ msgstr "" msgid "abra app labels 1312.net" msgstr "" -#: ./cli/run.go:100 +#: ./cli/run.go:107 #, c-format msgid "abra version: %s, commit: %s, lang: %s" msgstr "" @@ -1634,7 +1634,8 @@ msgstr "" msgid "ambiguous service list received, prompting for input" msgstr "" -#: ./cli/run.go:60 +#. translators: `abra app` command for autocompletion +#: ./cli/run.go:61 msgid "app" msgstr "" @@ -1691,7 +1692,8 @@ msgstr "" msgid "attempting to scale %s to 1" msgstr "" -#: ./cli/run.go:61 +#. translators: `abra autocomplete` command for autocompletion +#: ./cli/run.go:63 msgid "autocomplete" msgstr "" @@ -1857,7 +1859,8 @@ msgstr "" msgid "cannot use [version] and --latest together" msgstr "" -#: ./cli/run.go:62 +#. translators: `abra catalogue` command for autocompletion +#: ./cli/run.go:65 msgid "catalogue" msgstr "" @@ -2325,7 +2328,7 @@ msgstr "" msgid "domain name for app" msgstr "" -#: ./cli/run.go:146 +#: ./cli/run.go:153 msgid "don't forget to run 'sudo mandb'" msgstr "" @@ -3242,7 +3245,7 @@ msgstr "" #. translators: `abra man` aliases. use a comma separated list of aliases #. with no spaces in between -#: ./cli/app/list.go:318 ./cli/app/ps.go:205 ./cli/app/secret.go:553 ./cli/app/secret.go:649 ./cli/recipe/list.go:104 ./cli/recipe/upgrade.go:376 ./cli/recipe/version.go:139 ./cli/run.go:114 ./cli/server/list.go:106 ./cli/updater/updater.go:560 +#: ./cli/app/list.go:318 ./cli/app/ps.go:205 ./cli/app/secret.go:553 ./cli/app/secret.go:649 ./cli/recipe/list.go:104 ./cli/recipe/upgrade.go:376 ./cli/recipe/version.go:139 ./cli/run.go:121 ./cli/server/list.go:106 ./cli/updater/updater.go:560 msgid "m" msgstr "" @@ -3264,12 +3267,13 @@ msgstr "" msgid "malformed version pin specification: %s" msgstr "" -#: ./cli/run.go:63 +#. translators: `abra man` command for autocompletion +#: ./cli/run.go:67 msgid "man" msgstr "" #. translators: `man` command -#: ./cli/run.go:118 +#: ./cli/run.go:125 msgid "man [flags]" msgstr "" @@ -3729,7 +3733,7 @@ msgstr "" msgid "polling undeploy status" msgstr "" -#: ./cli/run.go:171 +#: ./cli/run.go:178 msgid "prefer offline & filesystem access" msgstr "" @@ -3860,7 +3864,8 @@ msgstr "" msgid "readme: %s, " msgstr "" -#: ./cli/app/list.go:302 ./cli/app/list.go:309 ./cli/run.go:64 +#. translators: `abra recipe` command for autocompletion +#: ./cli/app/list.go:302 ./cli/app/list.go:309 ./cli/run.go:69 msgid "recipe" msgstr "" @@ -4281,7 +4286,8 @@ msgstr "" msgid "secrets are %s shown again, please save them %s" msgstr "" -#: ./cli/app/list.go:325 ./cli/app/list.go:332 ./cli/app/new.go:333 ./cli/app/new.go:340 ./cli/run.go:65 +#. translators: `abra server` command for autocompletion +#: ./cli/app/list.go:325 ./cli/app/list.go:332 ./cli/app/new.go:333 ./cli/app/new.go:340 ./cli/run.go:71 msgid "server" msgstr "" @@ -4397,7 +4403,7 @@ msgstr "" msgid "show apps of a specific server" msgstr "" -#: ./cli/run.go:155 ./cli/updater/updater.go:507 +#: ./cli/run.go:162 ./cli/updater/updater.go:507 msgid "show debug messages" msgstr "" @@ -4673,7 +4679,7 @@ msgstr "" msgid "tmpfs options are incompatible with type volume" msgstr "" -#: ./cli/run.go:163 ./cli/updater/updater.go:515 +#: ./cli/run.go:170 ./cli/updater/updater.go:515 msgid "toggle non-interactive mode" msgstr "" @@ -4757,7 +4763,7 @@ msgstr "" msgid "unable to convert to JSON: %s" msgstr "" -#: ./cli/run.go:80 +#: ./cli/run.go:87 #, c-format msgid "unable to create %s: %s" msgstr "" @@ -4846,7 +4852,7 @@ msgstr "" msgid "unable to parse '%s' value as bool: %s" msgstr "" -#: ./cli/run.go:138 +#: ./cli/run.go:145 #, c-format msgid "unable to proceed, %s does not exist?" msgstr "" @@ -5027,7 +5033,8 @@ msgstr "" msgid "updating %s to %s in %s" msgstr "" -#: ./cli/run.go:66 +#. translators: `abra upgrade` command for autocompletion +#: ./cli/run.go:73 msgid "upgrade" msgstr "" diff --git a/pkg/i18n/locales/es.po b/pkg/i18n/locales/es.po index 3c6d3aac..109fd1e2 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: 2025-08-30 11:46+0200\n" +"POT-Creation-Date: 2025-08-30 12:02+0200\n" "PO-Revision-Date: 2025-08-29 21:45+0000\n" "Last-Translator: chasqui \n" "Language-Team: Spanish