summaryrefslogtreecommitdiff
path: root/src/nm-logging.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-12-21 14:36:00 +0100
committerThomas Haller <thaller@redhat.com>2018-04-13 10:11:16 +0200
commit9a675ba82ac0a22c81d5492595098af76bf39915 (patch)
treeef5e4991934f3aa4419f41ed6607b1bc9fe3e525 /src/nm-logging.c
parent684bf311502a0579d841bb55137f42368ae0cc6b (diff)
downloadNetworkManager-th/various-cleanup.tar.gz
core: don't localize strings for daemonth/various-cleanup
NetworkManager deamon does not run in the context of the (client) user, hence it usually has no explicit locale set. Even if a admin configures a locale for system daemons, it is not necessarily the right locale in the client context. Getting localization of strings right would be important. For example, when a request fails, the error message should be in the language of the client. However, that is a lot of work to get right. Either the client has to provide a localization context (so the server can generated messages in the right language), or the client is given a method to localize messages (e.g. by not relying on generating the message by the server, but by generating an error code that can be looked up). It's complicated, but just translating strings server side doesn't help. Probably we should build libnm-core.a twice, once with l10n for libnm's use case, and once without for the server. The problem that the server doesn't know the l10n context is especially bad for the name of the generated default-wired-connection, which is something like "Wired Connection 1". See also related bug bgo#666516.
Diffstat (limited to 'src/nm-logging.c')
-rw-r--r--src/nm-logging.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nm-logging.c b/src/nm-logging.c
index 11e05c31f7..7b152dd09e 100644
--- a/src/nm-logging.c
+++ b/src/nm-logging.c
@@ -264,7 +264,7 @@ match_log_level (const char *level,
}
g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_LOG_LEVEL,
- _("Unknown log level '%s'"), level);
+ "Unknown log level '%s'", level);
return FALSE;
}
@@ -366,7 +366,7 @@ nm_logging_setup (const char *level,
if (!bits) {
if (!bad_domains) {
g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_LOG_DOMAIN,
- _("Unknown log domain '%s'"), *iter);
+ "Unknown log domain '%s'", *iter);
return FALSE;
}