[evolution-data-server] Correct localization of external tools
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Correct localization of external tools
- Date: Thu, 13 Jul 2017 16:35:33 +0000 (UTC)
commit 3e247dcca5ea3c141be5ffb962bc7a38f94c8759
Author: Milan Crha <mcrha redhat com>
Date: Thu Jul 13 18:33:30 2017 +0200
Correct localization of external tools
Without the setlocale() call the translated strings were not localized.
Also noticed some strings being marked for localization, but not localized
anyway, thus fixed that too.
src/tools/addressbook-export/addressbook-export.c | 3 ++-
src/tools/list-sources/list-sources.c | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/tools/addressbook-export/addressbook-export.c
b/src/tools/addressbook-export/addressbook-export.c
index 11c2c6c..a9ae188 100644
--- a/src/tools/addressbook-export/addressbook-export.c
+++ b/src/tools/addressbook-export/addressbook-export.c
@@ -19,6 +19,7 @@
#include "evolution-data-server-config.h"
+#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n.h>
@@ -946,7 +947,7 @@ main (gint argc,
e_util_win32_initialize ();
#endif
- /*i18n-lize */
+ setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
diff --git a/src/tools/list-sources/list-sources.c b/src/tools/list-sources/list-sources.c
index 809bd0c..ba0cc26 100644
--- a/src/tools/list-sources/list-sources.c
+++ b/src/tools/list-sources/list-sources.c
@@ -17,6 +17,8 @@
#include "evolution-data-server-config.h"
+#include <locale.h>
+
#include <glib.h>
#include <glib/gi18n.h>
@@ -160,7 +162,7 @@ examine_source (ESource *source,
if (opt_machine_readable)
*out_type = check_extensions[ii].machine_description;
else
- *out_type = check_extensions[ii].localized_description;
+ *out_type = _(check_extensions[ii].localized_description);
extension = e_source_get_extension (source,
check_extensions[ii].extension_name);
break;
@@ -406,6 +408,7 @@ main (gint argc,
e_util_win32_initialize ();
#endif
+ setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]