all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-i18n 1/2] ja: remove second plural form
@ 2026-02-04 10:41 Maximiliano Sandoval
  2026-02-04 10:41 ` [PATCH proxmox-i18n 2/2] fix strings with wrong format Maximiliano Sandoval
  0 siblings, 1 reply; 4+ messages in thread
From: Maximiliano Sandoval @ 2026-02-04 10:41 UTC (permalink / raw)
  To: pve-devel

As per gettext docs [1] there is a single plural form for Japaneses.
Here we simply leave the plural form and remove what used to be
`msgid[1]`. Note that this used to throw a fatal warning with msgfmt
--check.

[1] https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html#index-dcngettext

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 ja.po | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/ja.po b/ja.po
index 8e89c1cf..485b98c8 100644
--- a/ja.po
+++ b/ja.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: proxmox translations\n"
 "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
 "POT-Creation-Date: 2025-12-10 15:47+0100\n"
-"PO-Revision-Date: 2025-12-14 17:00+0900\n"
+"PO-Revision-Date: 2026-02-04 11:21+0100\n"
 "Last-Translator: ribbon <ribbon@users.osdn.me>\n"
 "Language-Team: Japanese <kde-i18n-doc@kde.org>\n"
 "Language: ja\n"
@@ -46,8 +46,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] "% 中の1つのスレッド"
-msgstr[1] "% 中の{n}個のスレッド"
+msgstr[0] "% 中の{n}個のスレッド"
 
 #: pmg-gui/js/SystemOptions.js:88
 msgid "'From:' for Admin Mail"
@@ -87,16 +86,14 @@ msgstr "/some/path"
 #: 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}コア"
+msgstr[0] "{n}コア"
 
 #: 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
 #: proxmox-yew-comp/src/node_info.rs:238
 msgid "1 Socket"
 msgid_plural "{n} Sockets"
-msgstr[0] "ソケット"
-msgstr[1] "{n}ソケット"
+msgstr[0] "{n}ソケット"
 
 #: proxmox-backup/www/datastore/OptionView.js:307
 msgid "1048576 (0 disables cache)"
@@ -5660,8 +5657,7 @@ msgstr "全 remote に接続失敗。"
 #: 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}台中の1つのリモートに接続失敗。"
-msgstr[1] "{0}台中の{n}台のリモートに接続失敗。"
+msgstr[0] "{0}台中の{n}台のリモートに接続失敗。"
 
 #: proxmox-datacenter-manager/ui/src/dashboard/remote_panel.rs:93
 msgid "Failed to reach {0} out of {1} remotes"
@@ -10446,14 +10442,12 @@ msgstr "オンサイト"
 #: proxmox-yew-comp/src/apt_package_manager.rs:481
 msgid "One item"
 msgid_plural "{} items"
-msgstr[0] "1つのアイテム"
-msgstr[1] "{}個のアイテム"
+msgstr[0] "{}個のアイテム"
 
 #: 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[1] "{n} 中の {0} ノードがオンライン"
+msgstr[0] "{n} 中の {0} ノードがオンライン"
 
 #: pve-yew-mobile-gui/src/pages/page_node_status/services_panel.rs:78
 msgid "One or more required services is not running"
@@ -10462,14 +10456,12 @@ msgstr "1つ以上の要求されたサービスが稼働していません"
 #: proxmox-yew-comp/src/apt_repositories.rs:867
 msgid "One repository"
 msgid_plural "{n} repositories"
-msgstr[0] "1つのリポジトリ"
-msgstr[1] "{n} 個のリポジトリ"
+msgstr[0] "{n} 個のリポジトリ"
 
 #: proxmox-datacenter-manager/ui/src/remotes/updates.rs:676
 msgid "One update pending"
 msgid_plural "{n} updates pending"
-msgstr[0] "1つのアップデートが待機中"
-msgstr[1] "{n} つのアップデートが待機中"
+msgstr[0] "{n} つのアップデートが待機中"
 
 #: pve-manager/www/manager6/data/ResourceStore.js:105
 #: pve-manager/www/manager6/dc/Health.js:108
@@ -17497,7 +17489,6 @@ msgstr "Wake-on-LAN"
 msgid "Warning"
 msgid_plural "Warnings"
 msgstr[0] "警告"
-msgstr[1] "警告"
 
 #: pve-manager/www/manager6/window/FirewallEnableEdit.js:28
 msgid "Warning: Firewall still disabled at datacenter level!"
-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH proxmox-i18n 2/2] fix strings with wrong format
  2026-02-04 10:41 [PATCH proxmox-i18n 1/2] ja: remove second plural form Maximiliano Sandoval
@ 2026-02-04 10:41 ` Maximiliano Sandoval
  2026-02-04 13:43   ` Maximiliano Sandoval
  0 siblings, 1 reply; 4+ messages in thread
From: Maximiliano Sandoval @ 2026-02-04 10:41 UTC (permalink / raw)
  To: pve-devel

That would fail to be replaced at runtime. Depending on how the string
was replaced at runtime having a broken format can result in either the
string not being replaced at runtime or a crash.

Where it was not clear how to fix the issue the string is left
untranslated.

After this commit the remaining errors are only in ukr.po, ru.po and a
single error in pl.po that can be fixed with [2]. The reported errors in
ukr.po and ru.po need more consideration due to the complexity of their
plural forms.

These were detected with the following script

```python
import polib
from pathlib import Path

dirty = False

def is_rust_format(entry):
    return (
        "{}" in entry.msgid
        or "{0}" in entry.msgid
        or "{n}" in entry.msgid
        or "{}" in entry.msgid_plural
        or "{0}" in entry.msgid_plural
        or "{n}" in entry.msgid_plural
    )

def check_po_file(path):
    po = polib.pofile(path)
    for entry in po:
        if "javascript-format" in entry.flags:
            entry.flags.remove("javascript-format")

        if (
            entry.occurrences
            and all([o.endswith(".rs") for (o, l) in entry.occurrences])
            and is_rust_format(entry)
        ):
            entry.flags.append("rust-format")
            dirty = True

    if dirty:
        po.save(f"{file.stem}.with-formats.po")

root = Path()

for file in root.iterdir():
    if file.suffix == ".po" and ".with-formats" not in file.name:
        check_po_file(file)
```

which attaches the `rust-format` flag to a string. Then later the new po
files are checked with
```
msgfmt --check $PO_FILE
```

with gettext 0.26. This can be done, for example, with
```sh
for f in *.with-formats.po; do flatpak run --command=msgfmt --filesystem=home org.freedesktop.Platform//25.08 --check $f; done
```

for example.

[1] https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html#index-ngettext
[2] https://lore.proxmox.com/all/20260204100736.134697-1-m.sandoval@proxmox.com/

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 ar.po  | 4 ++--
 cs.po  | 4 ++--
 ja.po  | 2 +-
 ko.po  | 4 ++--
 ukr.po | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ar.po b/ar.po
index 66a34efa..b4ae88c8 100644
--- a/ar.po
+++ b/ar.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: pve-manager 31813246103b2582162f422dc34d8077eaee1e01\n"
 "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
 "POT-Creation-Date: 2025-12-10 15:47+0100\n"
-"PO-Revision-Date: 2025-07-18 10:53+0200\n"
+"PO-Revision-Date: 2026-02-04 10:38+0100\n"
 "Last-Translator: \n"
 "Language-Team: Arabic <support@proxmox.com>\n"
 "Language: ar\n"
@@ -19109,7 +19109,7 @@ msgstr "{0} إلى {1} ({2})"
 #: proxmox-widget-toolkit/src/Utils.js:1121
 #, javascript-format
 msgid "{0}% of {1}"
-msgstr "{0}٪ من {1}"
+msgstr ""
 
 #: proxmox-datacenter-manager/ui/src/pve/lxc/overview.rs:296
 #: proxmox-datacenter-manager/ui/src/pve/qemu/overview.rs:305
diff --git a/cs.po b/cs.po
index 728f23aa..3d38dd7a 100644
--- a/cs.po
+++ b/cs.po
@@ -12,7 +12,7 @@ msgstr ""
 "Project-Id-Version: proxmox-backup 254169f622d891d67de38e8c8c6b9fa8f4af5dc9\n"
 "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
 "POT-Creation-Date: 2025-12-10 15:47+0100\n"
-"PO-Revision-Date: 2025-12-03 08:55+0100\n"
+"PO-Revision-Date: 2026-02-04 10:49+0100\n"
 "Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>\n"
 "Language-Team: Czech <support@proxmox.com>\n"
 "Language: cs\n"
@@ -18882,7 +18882,7 @@ msgstr "{0} {{1} na uzlu {2})"
 #: proxmox-datacenter-manager/ui/src/pve/storage.rs:288
 #: proxmox-datacenter-manager/ui/src/renderer.rs:76
 msgid "{0}% ({1} of {2})"
-msgstr "{0}% {{1} z {2})"
+msgstr "{0}% ({1} z {2})"
 
 #: proxmox-widget-toolkit/src/Utils.js:1121
 #, javascript-format
diff --git a/ja.po b/ja.po
index 485b98c8..3175e191 100644
--- a/ja.po
+++ b/ja.po
@@ -18710,7 +18710,7 @@ msgstr "{1}の {0}"
 
 #: proxmox-datacenter-manager/ui/src/dashboard/node_status_panel.rs:125
 msgid "{0} of {1} nodes are offline"
-msgstr "1}の {0} ノードがオフライン"
+msgstr "{1}の {0} ノードがオフライン"
 
 #. TRANSLATORS: For example "resource on Remote 'HAL 9000'"
 #: proxmox-datacenter-manager/ui/src/dashboard/top_entities.rs:249
diff --git a/ko.po b/ko.po
index e494cabb..64799f54 100644
--- a/ko.po
+++ b/ko.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: proxmox translations\n"
 "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
 "POT-Creation-Date: 2025-12-19 10:53+0100\n"
-"PO-Revision-Date: 2025-12-16 23:20+0900\n"
+"PO-Revision-Date: 2026-02-04 10:52+0100\n"
 "Last-Translator: angrystar170 <angrystar170@gmail.com>\n"
 "Language-Team: Korean <support@proxmox.com>\n"
 "Language: ko_KR\n"
@@ -12078,7 +12078,7 @@ msgstr "복구 키"
 
 #: proxmox-yew-comp/src/tfa/tfa_add_recovery.rs:119
 msgid "Recovery Keys for user '{}'"
-msgstr "복구 키"
+msgstr ""
 
 #: proxmox-backup/www/panel/PrunePanel.js:100
 msgid "Recursive"
diff --git a/ukr.po b/ukr.po
index 0d26066d..7a2ac42b 100644
--- a/ukr.po
+++ b/ukr.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: proxmox translations\n"
 "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
 "POT-Creation-Date: 2025-12-10 15:47+0100\n"
-"PO-Revision-Date: 2025-09-19 09:44+0200\n"
+"PO-Revision-Date: 2026-02-04 11:09+0100\n"
 "Last-Translator: Sviatoslav Brylenko <s.brylenko@proxmox.com>\n"
 "Language-Team: Ukrainian <support@proxmox.com>\n"
 "Language: uk\n"
@@ -4786,7 +4786,7 @@ msgstr "EVPN зона не має зконфігурованого VRF VNI!"
 #: proxmox-datacenter-manager/ui/src/sdn/evpn/vrf_tree.rs:160
 #: proxmox-datacenter-manager/ui/src/sdn/evpn/vrf_tree.rs:219
 msgid "EVPN Zone {} has no VRF VNI"
-msgstr "EVPN зона не має VRF VNI"
+msgstr ""
 
 #: proxmox-datacenter-manager/ui/src/sdn/evpn/remote_tree.rs:192
 msgid "EVPN Zone {} has no VXLAN ID defined!"
-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH proxmox-i18n 2/2] fix strings with wrong format
  2026-02-04 10:41 ` [PATCH proxmox-i18n 2/2] fix strings with wrong format Maximiliano Sandoval
@ 2026-02-04 13:43   ` Maximiliano Sandoval
  2026-02-04 13:50     ` superseded: " Maximiliano Sandoval
  0 siblings, 1 reply; 4+ messages in thread
From: Maximiliano Sandoval @ 2026-02-04 13:43 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> That would fail to be replaced at runtime. Depending on how the string
> was replaced at runtime having a broken format can result in either the
> string not being replaced at runtime or a crash.
>
> Where it was not clear how to fix the issue the string is left
> untranslated.
>
> After this commit the remaining errors are only in ukr.po, ru.po and a
> single error in pl.po that can be fixed with [2]. The reported errors in
> ukr.po and ru.po need more consideration due to the complexity of their
> plural forms.
>
> These were detected with the following script
>
> ```python
> import polib
> from pathlib import Path
>
> dirty = False
>
> def is_rust_format(entry):
>     return (
>         "{}" in entry.msgid
>         or "{0}" in entry.msgid
>         or "{n}" in entry.msgid
>         or "{}" in entry.msgid_plural
>         or "{0}" in entry.msgid_plural
>         or "{n}" in entry.msgid_plural
>     )
>
> def check_po_file(path):
>     po = polib.pofile(path)
>     for entry in po:
>         if "javascript-format" in entry.flags:
>             entry.flags.remove("javascript-format")
>
>         if (
>             entry.occurrences
>             and all([o.endswith(".rs") for (o, l) in entry.occurrences])
>             and is_rust_format(entry)
>         ):
>             entry.flags.append("rust-format")
>             dirty = True
>
>     if dirty:
>         po.save(f"{file.stem}.with-formats.po")
>
> root = Path()
>
> for file in root.iterdir():
>     if file.suffix == ".po" and ".with-formats" not in file.name:
>         check_po_file(file)
> ```
>
> which attaches the `rust-format` flag to a string. Then later the new po
> files are checked with
> ```
> msgfmt --check $PO_FILE
> ```
>
> with gettext 0.26. This can be done, for example, with
> ```sh
> for f in *.with-formats.po; do flatpak run --command=msgfmt --filesystem=home org.freedesktop.Platform//25.08 --check $f; done
> ```
>
> for example.
>
> [1] https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html#index-ngettext
> [2] https://lore.proxmox.com/all/20260204100736.134697-1-m.sandoval@proxmox.com/
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>

I found more issues on strings consumed by js. I will send v2 in a bit.

-- 
Maximiliano




^ permalink raw reply	[flat|nested] 4+ messages in thread

* superseded: [PATCH proxmox-i18n 2/2] fix strings with wrong format
  2026-02-04 13:43   ` Maximiliano Sandoval
@ 2026-02-04 13:50     ` Maximiliano Sandoval
  0 siblings, 0 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2026-02-04 13:50 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> Maximiliano Sandoval <m.sandoval@proxmox.com> writes:
>
>> That would fail to be replaced at runtime. Depending on how the string
>> was replaced at runtime having a broken format can result in either the
>> string not being replaced at runtime or a crash.
>>
>> ...
>>
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>
> I found more issues on strings consumed by js. I will send v2 in a bit.

Superseded-by: https://lore.proxmox.com/all/20260204134835.422155-1-m.sandoval@proxmox.com/

-- 
Maximiliano




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-04 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-04 10:41 [PATCH proxmox-i18n 1/2] ja: remove second plural form Maximiliano Sandoval
2026-02-04 10:41 ` [PATCH proxmox-i18n 2/2] fix strings with wrong format Maximiliano Sandoval
2026-02-04 13:43   ` Maximiliano Sandoval
2026-02-04 13:50     ` superseded: " Maximiliano Sandoval

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal