From 302c33e377539368c79cd3270ab2664e7d7080ab Mon Sep 17 00:00:00 2001 From: Juho Kuisma Date: Sun, 16 Nov 2025 11:07:46 +0100 Subject: [PATCH] Deduplicate and fix broken translations Co-authored-by: Johannes Altmanninger --- po/de.po | 5 +---- po/en.po | 5 +---- po/fr.po | 5 +---- po/pl.po | 5 +---- po/pt_BR.po | 5 +---- po/sv.po | 5 +---- po/zh_CN.po | 7 ++----- po/zh_TW.po | 7 ++----- share/functions/funced.fish | 10 +++++----- 9 files changed, 15 insertions(+), 39 deletions(-) diff --git a/po/de.po b/po/de.po index 535b250d7..5b96d550e 100644 --- a/po/de.po +++ b/po/de.po @@ -2325,10 +2325,7 @@ msgstr "" msgid "foo=bar variable overrides" msgstr "" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" msgstr "" msgid "help: %s is not a valid command: %s\\n" diff --git a/po/en.po b/po/en.po index 95f4f62a0..5912be2f2 100644 --- a/po/en.po +++ b/po/en.po @@ -2323,10 +2323,7 @@ msgstr "" msgid "foo=bar variable overrides" msgstr "" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" msgstr "" msgid "help: %s is not a valid command: %s\\n" diff --git a/po/fr.po b/po/fr.po index 9d35abc5e..842fb94c1 100644 --- a/po/fr.po +++ b/po/fr.po @@ -2454,10 +2454,7 @@ msgstr "" msgid "foo=bar variable overrides" msgstr "" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" msgstr "" msgid "help: %s is not a valid command: %s\\n" diff --git a/po/pl.po b/po/pl.po index 497bf2fa2..c179dadc8 100644 --- a/po/pl.po +++ b/po/pl.po @@ -2319,10 +2319,7 @@ msgstr "" msgid "foo=bar variable overrides" msgstr "" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" msgstr "" msgid "help: %s is not a valid command: %s\\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index da16bced4..baaf9ad14 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -2324,10 +2324,7 @@ msgstr "" msgid "foo=bar variable overrides" msgstr "" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" msgstr "" msgid "help: %s is not a valid command: %s\\n" diff --git a/po/sv.po b/po/sv.po index 13f2d4a1b..a7302b641 100644 --- a/po/sv.po +++ b/po/sv.po @@ -2320,10 +2320,7 @@ msgstr "" msgid "foo=bar variable overrides" msgstr "" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" msgstr "" msgid "help: %s is not a valid command: %s\\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index 2f9b4431e..26c9d5987 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2352,11 +2352,8 @@ msgstr "fish: 未知的命令:%s\\n" msgid "foo=bar variable overrides" msgstr "foo=bar 变量覆盖" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "funced: 无法使用 $EDITOR '$editor' 的值,因为找不到命令 '$editor[1]'" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "funced: 无法使用 $VISUAL '$editor' 的值,因为找不到命令 '$editor[1]'" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" +msgstr "funced: 无法使用 $%s '%s' 的值,因为找不到命令 '%s'" msgid "help: %s is not a valid command: %s\\n" msgstr "help: %s 不是有效的命令:%s\\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index 6ae2fd9fa..c7382c8bf 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -2327,11 +2327,8 @@ msgstr "fish:未知命令:%s\\n" msgid "foo=bar variable overrides" msgstr "foo=bar 變數覆寫" -msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "funced:$EDITOR 的值「$editor」無法使用,找不到命令「$editor[1]」" - -msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found" -msgstr "funced:$VISUAL 的值「$editor」無法使用,找不到命令「$editor[1]」" +msgid "funced: The value for $%s '%s' could not be used because the command '%s' could not be found" +msgstr "" msgid "help: %s is not a valid command: %s\\n" msgstr "help:%s 不是有效的命令:%s\\n" diff --git a/share/functions/funced.fish b/share/functions/funced.fish index 827335f1b..d07a1e1a0 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -39,11 +39,11 @@ function funced --description 'Edit function definition' end if not type -q -f "$editor[1]" - if set -q VISUAL - echo (_ "funced: The value for \$VISUAL '$editor' could not be used because the command '$editor[1]' could not be found") >&2 - else - echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor[1]' could not be found") >&2 - end + printf >&2 \ + (_ "funced: The value for \$%s '%s' could not be used because the command '%s' could not be found") \ + (set -q VISUAL && echo VISUAL || echo EDITOR) \ + "$editor" \ + $editor[1] set editor fish end