gdbus: factor out untranslatable parts of error messages

This commit is contained in:
José Guilherme
2024-06-13 18:30:58 +00:00
committed by Philip Withnall
parent ea58dcb538
commit efe2c24757
3 changed files with 29 additions and 12 deletions

View File

@@ -619,8 +619,12 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("Error in address “%s” — the host attribute is missing or malformed"),
address_entry);
/* Translators: The first placeholder is a D-Bus connection address,
* the second is the literal name of an attribute in the address.
*/
_("Error in address “%s” — the %s attribute is missing or malformed"),
address_entry,
"host");
goto out;
}
@@ -633,8 +637,9 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("Error in address “%s” — the port attribute is missing or malformed"),
address_entry);
_("Error in address “%s” — the %s attribute is missing or malformed"),
address_entry,
"port");
goto out;
}
@@ -647,8 +652,9 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("Error in address “%s” — the noncefile attribute is missing or malformed"),
address_entry);
_("Error in address “%s” — the %s attribute is missing or malformed"),
address_entry,
"noncefile");
goto out;
}
}