From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 3A66B1FF141 for ; Tue, 16 Jun 2026 16:02:14 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 029CAB336; Tue, 16 Jun 2026 16:02:12 +0200 (CEST) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-i18n] fix formats in translations Date: Tue, 16 Jun 2026 16:01:33 +0200 Message-ID: <20260616140135.467696-1-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781618440717 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.076 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record WEIRD_PORT 0.001 Uses non-standard port number for HTTP Message-ID-Hash: TRLRO22HZBXN266LOQ5FVWQNRJWQCXDN X-Message-ID-Hash: TRLRO22HZBXN266LOQ5FVWQNRJWQCXDN X-MailFrom: m.sandoval@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Detected with `make check` using gettext 0.26. Strings were fixed in place where the fix is obvious, e.g. {0} -> {n}. Else if any of the variables in msgid_plural were missing: - If msgstr[n] is not in english, instead of trying to guess the correct translation we set it to "" to be safe. - If msgstr[n] is in english, it is set to "", this was likely probably a translator error and might need reviewing anyways. In the case of Ukrainian and Russian the first plural form (msgstr[0]) applies when n=1,21,31,41,... so msgfmt will consider it an error if any variable defined in msgid_plural are missing in msgstr[0]. Signed-off-by: Maximiliano Sandoval --- Notes: The script used was ```perl use Locale::PO; foreach my $la (@ARGV) { my $file = "$la.po"; my $dest = "$la.with-formats.po"; my $po = Locale::PO->load_file_asarray($file, 'utf8'); die "The file $file does no exist\n" if !scalar(@$po); sub is_formated { my ($entry,) = @_; if ($entry->{msgid} =~ /{[a-z0-9_]*}/) { return 1; } elsif ($entry->{msgid_plural} =~ /{[a-z0-9_]*}/) { return 1; } return 0; } # Filter out obsolete entries and process flags in one pass my @clean_po = grep {!$_->{obsolete}} @$po; foreach (@clean_po) { my $entry = $_; if ($entry->{obsolete}) { print "$entry->{msgid}\n"; next; } if ($entry->has_flag('javascript-format')) { $entry->remove_flag('javascript-format'); } if (!$entry->has_flag('rust-format') && is_formated($entry)) { $entry->add_flag('rust-format'); } } Locale::PO->save_file_fromarray($dest, \@clean_po, 'utf8'); } ``` and the check was done with ``` flatpak run --command=msgfmt --filesystem=home org.freedesktop.Platform//25.08 --check "$LA".with-formats.po ``` de.po | 2 +- es.po | 2 +- ja.po | 4 +--- ko.po | 4 ++-- ru.po | 20 ++++++++++---------- ukr.po | 20 ++++++++++---------- 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/de.po b/de.po index fa211cf6..c1a5c88a 100644 --- a/de.po +++ b/de.po @@ -116,7 +116,7 @@ msgstr[1] "{n} Kerne" msgid "1 Node" msgid_plural "{0} Nodes" msgstr[0] "1 Knoten" -msgstr[1] "{n} Knoten" +msgstr[1] "{0} Knoten" #: pve-yew-mobile-gui/src/pages/page_node_status/dashboard_panel.rs:80 #: proxmox-yew-comp/src/form/pve/qemu_property/qemu_processor_property.rs:30 diff --git a/es.po b/es.po index cc8bb23e..adc5fef4 100644 --- a/es.po +++ b/es.po @@ -15138,7 +15138,7 @@ msgid "" "subscription on that node too." msgstr "" "¿Desea eliminar {key} del conjunto de llaves? Todavía está asignada a " -"{remote}/{node); la asignación se liberará sin eliminar ninguna suscripción " +"{remote}/{node}; la asignación se liberará sin eliminar ninguna suscripción " "en el nodo remoto. Utilice primero la opción “Limpiar llave” en el panel " "“Estado de suscripcion del nodo” para liberar también una suscripción en ese " "nodo." diff --git a/ja.po b/ja.po index b52a1b88..f2274760 100644 --- a/ja.po +++ b/ja.po @@ -8252,9 +8252,7 @@ msgstr "IPフィルタ" #: proxmox-backup/www/window/S3ClientEdit.js:52 msgid "IP or FQDN S3 endpoint (allows {{bucket}} or {{region}} templating)" -msgstr "" -"IP又は FQDN S3 エンドポイント({bucket}} 又は {{region}} テンプレート使用も可" -"能" +msgstr "IP又は FQDN S3 エンドポイント{{bucket}} 又は {{region}} テンプレート使用も可能" #: pve-manager/www/manager6/dc/ClusterEdit.js:261 msgid "IP resolved by node's hostname" diff --git a/ko.po b/ko.po index 5ae6c56c..897f4ba3 100644 --- a/ko.po +++ b/ko.po @@ -101,7 +101,7 @@ msgstr "/some/path" #: pve-yew-mobile-gui/src/pages/page_dashboard.rs:135 msgid "1 CPU" msgid_plural "{n} CPUs" -msgstr[0] "1 CPU" +msgstr[0] "" #: pve-yew-mobile-gui/src/pages/page_node_status/dashboard_panel.rs:79 #: proxmox-yew-comp/src/form/pve/qemu_property/qemu_processor_property.rs:29 @@ -12426,7 +12426,7 @@ msgstr "On-site" #: proxmox-yew-comp/src/apt_package_manager.rs:481 msgid "One item" msgid_plural "{n} items" -msgstr[0] "{}개의 항목" +msgstr[0] "{n}개의 항목" #: proxmox-datacenter-manager/ui/src/configuration/subscription_keys.rs:432 msgid "" diff --git a/ru.po b/ru.po index 2804ac33..80c22f0c 100644 --- a/ru.po +++ b/ru.po @@ -49,7 +49,7 @@ msgstr "Потоков рабочих процессов" #: pve-yew-mobile-gui/src/pages/page_node_status/dashboard_panel.rs:87 msgid "% of one threads" msgid_plural "% of {n} threads" -msgstr[0] "% использования одного потока" +msgstr[0] "" msgstr[1] "% использования {n} потоков" msgstr[2] "% использования {n} потоков" @@ -111,7 +111,7 @@ msgstr[2] "" #: proxmox-yew-comp/src/form/pve/qemu_property/qemu_processor_property.rs:29 msgid "1 Core" msgid_plural "{n} Cores" -msgstr[0] "1 ядро" +msgstr[0] "" msgstr[1] "{n} ядра" msgstr[2] "{n} ядер" @@ -128,7 +128,7 @@ msgstr[2] "Узел" #: proxmox-yew-comp/src/node_info.rs:242 msgid "1 Socket" msgid_plural "{n} Sockets" -msgstr[0] "1 сокет" +msgstr[0] "" msgstr[1] "{n} сокета" msgstr[2] "{n} сокетов" @@ -6831,7 +6831,7 @@ msgstr "Не удалось установить соединение ни с о #: proxmox-datacenter-manager/ui/src/dashboard/remote_panel.rs:102 msgid "Failed to reach one of {0} remotes." msgid_plural "Failed to reach {n} of {0} remotes." -msgstr[0] "Не удалось установить соединение с одним удалённым узлом из {0}." +msgstr[0] "" msgstr[1] "Не удалось установить соединение с {n} удалёнными узлами из {0}." msgstr[2] "Не удалось установить соединение с {n} удалёнными узлами из {0}." @@ -12697,9 +12697,9 @@ msgstr "По месту" #: proxmox-yew-comp/src/apt_package_manager.rs:481 msgid "One item" msgid_plural "{n} items" -msgstr[0] "Один объект" -msgstr[1] "{} объекта" -msgstr[2] "{} объектов" +msgstr[0] "" +msgstr[1] "{n} объекта" +msgstr[2] "{n} объектов" #: proxmox-datacenter-manager/ui/src/configuration/subscription_keys.rs:432 msgid "" @@ -12710,7 +12710,7 @@ msgstr "" #: proxmox-datacenter-manager/ui/src/dashboard/node_status_panel.rs:146 msgid "One of {0} nodes online" msgid_plural "{n} of {0} nodes online" -msgstr[0] "Один из {0} узлов в сети" +msgstr[0] "" msgstr[1] "{n} из {0} узла в сети" msgstr[2] "{n} из {0} узлов в сети" @@ -12727,14 +12727,14 @@ msgstr "" #: proxmox-yew-comp/src/apt_repositories.rs:853 msgid "One repository" msgid_plural "{n} repositories" -msgstr[0] "Один репозиторий" +msgstr[0] "" msgstr[1] "{n} репозитория" msgstr[2] "{n} репозиториев" #: proxmox-datacenter-manager/ui/src/remotes/updates.rs:676 msgid "One update pending" msgid_plural "{n} updates pending" -msgstr[0] "Доступно одно обновление" +msgstr[0] "" msgstr[1] "Доступно {n} обновления" msgstr[2] "Доступно {n} обновлений" diff --git a/ukr.po b/ukr.po index 855133bc..a5f3cc47 100644 --- a/ukr.po +++ b/ukr.po @@ -54,9 +54,9 @@ msgstr "# робочих потоків" #: pve-yew-mobile-gui/src/pages/page_node_status/dashboard_panel.rs:87 msgid "% of one threads" msgid_plural "% of {n} threads" -msgstr[0] "% одного потоку" -msgstr[1] "# робочих потоків" -msgstr[2] "# робочих потоків" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" #: proxmox-datacenter-manager/ui/src/configuration/subscription_registry.rs:1239 msgid "" @@ -114,9 +114,9 @@ msgstr[2] "" #: proxmox-yew-comp/src/form/pve/qemu_property/qemu_processor_property.rs:29 msgid "1 Core" msgid_plural "{n} Cores" -msgstr[0] "1 Ядро" -msgstr[1] "{n} Cores" -msgstr[2] "{n} Cores" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" #: proxmox-datacenter-manager/ui/src/dashboard/map.rs:256 #, fuzzy @@ -131,9 +131,9 @@ msgstr[2] "Вузол" #: proxmox-yew-comp/src/node_info.rs:242 msgid "1 Socket" msgid_plural "{n} Sockets" -msgstr[0] "1 Сокет" -msgstr[1] "Сокет" -msgstr[2] "Сокет" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" #: proxmox-backup/www/datastore/OptionView.js:335 msgid "1048576 (0 disables cache)" @@ -12797,7 +12797,7 @@ msgstr "" #: proxmox-yew-comp/src/apt_repositories.rs:853 msgid "One repository" msgid_plural "{n} repositories" -msgstr[0] "Один репозиторій" +msgstr[0] "" msgstr[1] "{n} репозиторія" msgstr[2] "{n} репозиторіїв" -- 2.47.3