mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
printf: simplify conversion specifier
We already compute the length of the substring we want to print in Rust. Passing that length as the precision to let printf formatting limit the length is brittle, as it requires that the same semantics for "length" are used. Simplifying conversion specifiers also makes the transition to Fluent easier. Part of #12119
This commit is contained in:
committed by
danielrainer
parent
5130fc6f17
commit
8a75bccf00
8
po/de.po
8
po/de.po
@@ -79,10 +79,6 @@ msgstr ""
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr "$status ist kein gültiger Befehl. Siehe `help %s`"
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr "%.*s: Ungültige Umwandlungsspezifikation"
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr ""
|
||||
@@ -727,6 +723,10 @@ msgstr "%s: Brauche Funktionsnamen"
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr "%s: Ungültige Umwandlungsspezifikation"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr "%s: ungültige Optionskombination\n"
|
||||
|
||||
8
po/en.po
8
po/en.po
@@ -77,10 +77,6 @@ msgstr ""
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr "%.*s: invalid conversion specification"
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr ""
|
||||
@@ -725,6 +721,10 @@ msgstr ""
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr "%s: invalid conversion specification"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr ""
|
||||
|
||||
8
po/fr.po
8
po/fr.po
@@ -208,10 +208,6 @@ msgstr "$@ n’est pas supporté. Dans fish, veuillez utiliser $argv."
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr "$status n’est pas une commande valide. Voir « help %s »"
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr "%.*s : spécification de conversion invalide"
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr "%s"
|
||||
@@ -856,6 +852,10 @@ msgstr ""
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr "%s : spécification de conversion invalide"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr ""
|
||||
|
||||
8
po/pl.po
8
po/pl.po
@@ -73,10 +73,6 @@ msgstr "$@ nie jest obsługiwane. W fish używane jest $argv."
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr ""
|
||||
@@ -721,6 +717,10 @@ msgstr ""
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -78,10 +78,6 @@ msgstr ""
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr "%.*s: especificação de conversão inválida"
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr ""
|
||||
@@ -726,6 +722,10 @@ msgstr ""
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr "%s: especificação de conversão inválida"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr ""
|
||||
|
||||
8
po/sv.po
8
po/sv.po
@@ -74,10 +74,6 @@ msgstr ""
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr ""
|
||||
@@ -722,6 +718,10 @@ msgstr ""
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr ""
|
||||
|
||||
@@ -100,10 +100,6 @@ msgstr "不支持 $@。在 fish 中,请使用 $argv。"
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr "$status 不是有效的命令。参见 `help %s`"
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr "%.*s: 无效的转换规范"
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr "%s"
|
||||
@@ -748,6 +744,10 @@ msgstr "%s: 函数名称是必须的"
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr "%s: 给定索引 %d 但只有 %d 个值\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr "%s: 无效的转换规范"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr "%s: 无效的选项组合\n"
|
||||
|
||||
@@ -73,10 +73,6 @@ msgstr "不支援 $@。在 fish 中請使用 $argv。"
|
||||
msgid "$status is not valid as a command. See `help %s`"
|
||||
msgstr "$status 不是有效的命令。參見「help %s」"
|
||||
|
||||
#, c-format
|
||||
msgid "%.*s: invalid conversion specification"
|
||||
msgstr "%.*s:轉換規格無效"
|
||||
|
||||
#, c-format
|
||||
msgid "%s"
|
||||
msgstr "%s"
|
||||
@@ -721,6 +717,10 @@ msgstr "%s:需要函式名稱"
|
||||
msgid "%s: given %d indexes but %d values\n"
|
||||
msgstr "%s:指定了 %d 個索引卻有 %d 個值\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid conversion specification"
|
||||
msgstr "%s:轉換規格無效"
|
||||
|
||||
#, c-format
|
||||
msgid "%s: invalid option combination\n"
|
||||
msgstr "%s:無效的選項組合\n"
|
||||
|
||||
@@ -526,10 +526,12 @@ fn print_formatted(&mut self, format: &wstr, mut argv: &[&wstr]) -> usize {
|
||||
|
||||
let conversion = f.char_at(0);
|
||||
if (conversion as usize) > 0xFF || !ok[conversion as usize] {
|
||||
let directive = &directive_start[0..directive_start
|
||||
.len()
|
||||
.min(wstr_offset_in(f, directive_start) + 1)];
|
||||
self.fatal_error(wgettext_fmt!(
|
||||
"%.*s: invalid conversion specification",
|
||||
wstr_offset_in(f, directive_start) + 1,
|
||||
directive_start
|
||||
"%s: invalid conversion specification",
|
||||
directive
|
||||
));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user