libnm-core: fix error message if address-data parsing fails

The code checks for presence of 'address' and 'prefix', so these fields
should be part of the error message.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2118
This commit is contained in:
Georg Müller
2025-01-24 13:41:36 +01:00
committed by Lubomir Rintel
parent 36bc62309b
commit 2fd34e1dec
6 changed files with 9 additions and 9 deletions

View File

@@ -3588,7 +3588,7 @@ msgstr "Ein Wert wurde für »%s« erwartet\n"
#: src/libnm-core-impl/nm-utils.c:2361 #: src/libnm-core-impl/nm-utils.c:2361
#, c-format #, c-format
msgid "IP address requires fields \"dest\" and \"prefix\" (idx=%u)" msgid "IP address requires fields \"address\" and \"prefix\" (idx=%u)"
msgstr "" msgstr ""
#: src/libnm-core-impl/nm-utils.c:2540 #: src/libnm-core-impl/nm-utils.c:2540

View File

@@ -3478,8 +3478,8 @@ msgstr "Ожидалось значение типа \"aa{sv}\""
#: src/libnm-core-impl/nm-utils.c:2361 #: src/libnm-core-impl/nm-utils.c:2361
#, c-format #, c-format
msgid "IP address requires fields \"dest\" and \"prefix\" (idx=%u)" msgid "IP address requires fields \"address\" and \"prefix\" (idx=%u)"
msgstr "Для адреса IP необходимы поля \"dest\" и \"prefix\" (idx=%u)" msgstr "Для адреса IP необходимы поля \"address\" и \"prefix\" (idx=%u)"
#: src/libnm-core-impl/nm-utils.c:2540 #: src/libnm-core-impl/nm-utils.c:2540
#, c-format #, c-format

View File

@@ -3662,8 +3662,8 @@ msgstr "Napaka: '%s' ni veljaven argument za možnost '%s'."
#: src/libnm-core-impl/nm-utils.c:2361 #: src/libnm-core-impl/nm-utils.c:2361
#, fuzzy, c-format #, fuzzy, c-format
msgid "IP address requires fields \"dest\" and \"prefix\" (idx=%u)" msgid "IP address requires fields \"address\" and \"prefix\" (idx=%u)"
msgstr "Naslov IP zahteva polja »dest« in »prefix« (idx=%u)" msgstr "Naslov IP zahteva polja »address« in »prefix« (idx=%u)"
#: src/libnm-core-impl/nm-utils.c:2540 #: src/libnm-core-impl/nm-utils.c:2540
#, fuzzy, c-format #, fuzzy, c-format

View File

@@ -3341,8 +3341,8 @@ msgstr "Förväntat värde av typen \"aa{sv}\""
#: src/libnm-core-impl/nm-utils.c:2359 #: src/libnm-core-impl/nm-utils.c:2359
#, c-format #, c-format
msgid "IP address requires fields \"dest\" and \"prefix\" (idx=%u)" msgid "IP address requires fields \"address\" and \"prefix\" (idx=%u)"
msgstr "IP-adressen kräver fälten \"dest\" och \"prefix\" (idx=%u)" msgstr "IP-adressen kräver fälten \"address\" och \"prefix\" (idx=%u)"
#: src/libnm-core-impl/nm-utils.c:2538 #: src/libnm-core-impl/nm-utils.c:2538
#, c-format #, c-format

View File

@@ -3428,7 +3428,7 @@ msgstr "'%s', '%s' için geçerli bir değer değil"
#: src/libnm-core-impl/nm-utils.c:2359 #: src/libnm-core-impl/nm-utils.c:2359
#, c-format #, c-format
msgid "IP address requires fields \"dest\" and \"prefix\" (idx=%u)" msgid "IP address requires fields \"address\" and \"prefix\" (idx=%u)"
msgstr "" msgstr ""
#: src/libnm-core-impl/nm-utils.c:2538 #: src/libnm-core-impl/nm-utils.c:2538

View File

@@ -2358,7 +2358,7 @@ _nm_utils_ip_addresses_from_variant(GVariant *value, int family, bool strict, GE
g_set_error(error, g_set_error(error,
NM_CONNECTION_ERROR, NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY, NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("IP address requires fields \"dest\" and \"prefix\" (idx=%u)"), _("IP address requires fields \"address\" and \"prefix\" (idx=%u)"),
i); i);
return NULL; return NULL;
} }