[network-manager-openvpn] properties: split up creation of error message to simplify translation
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] properties: split up creation of error message to simplify translation
- Date: Tue, 8 Mar 2016 13:55:20 +0000 (UTC)
commit f0fd6a7ea518f5a2af81426d4de83348a4e48a2a
Author: Thomas Haller <thaller redhat com>
Date: Tue Mar 8 14:54:40 2016 +0100
properties: split up creation of error message to simplify translation
https://bugzilla.gnome.org/show_bug.cgi?id=763320
Fixes: b110933f63ec520fff844fc2ba405a56ea332956
properties/import-export.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index aff8dac..c5cbdf6 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -239,7 +239,10 @@ args_params_check_arg_nonempty (const char **params,
g_return_val_if_fail (out_error && !*out_error, FALSE);
if (params[n_param][0] == '\0') {
- *out_error = g_strdup_printf (_("argument%s%s of \"%s\" can not be empty"), argument_name ? "
" : "", argument_name ?: "", params[0]);
+ if (argument_name)
+ *out_error = g_strdup_printf (_("argument %s of \"%s\" can not be empty"),
argument_name, params[0]);
+ else
+ *out_error = g_strdup_printf (_("argument of \"%s\" can not be empty"), params[0]);
return FALSE;
}
return TRUE;
@@ -254,7 +257,10 @@ args_params_check_arg_utf8 (const char **params,
if (!args_params_check_arg_nonempty (params, n_param, argument_name, out_error))
return FALSE;
if (!_is_utf8 (params[n_param])) {
- *out_error = g_strdup_printf (_("argument%s%s of \"%s\" must be UTF-8 encoded"),
argument_name ? " " : "", argument_name ?: "", params[0]);
+ if (argument_name)
+ *out_error = g_strdup_printf (_("argument %s of \"%s\" must be UTF-8 encoded"),
argument_name, params[0]);
+ else
+ *out_error = g_strdup_printf (_("argument of \"%s\" must be UTF-8 encoded"),
params[0]);
return FALSE;
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]