mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-07 17:33:02 +01:00
common: Respect gpgconf.ctl when looking up translations
* common/i18n.c (i18n_init): Use gnupg_localedir() instead of LOCALEDIR. (i18n_localegettext): Ditto. * tools/gpgconf-comp.c (my_dgettext): Ditto. -- On Unix, gnupg_localedir() returns the locale directory relative to the root directory of the gnupg installation if specified in the gpgconf.ctl. Otherwise, it returns the built-in LOCALEDIR. GnuPG-bug-id: 5999
This commit is contained in:
parent
4b3e9a44b5
commit
e99b9890c2
@ -87,7 +87,7 @@ i18n_init (void)
|
|||||||
#else
|
#else
|
||||||
# ifdef ENABLE_NLS
|
# ifdef ENABLE_NLS
|
||||||
setlocale (LC_ALL, "" );
|
setlocale (LC_ALL, "" );
|
||||||
bindtextdomain (PACKAGE_GT, LOCALEDIR);
|
bindtextdomain (PACKAGE_GT, gnupg_localedir ());
|
||||||
textdomain (PACKAGE_GT);
|
textdomain (PACKAGE_GT);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -199,10 +199,10 @@ i18n_localegettext (const char *lc_messages, const char *string)
|
|||||||
if (!setlocale (LC_MESSAGES, lc_messages))
|
if (!setlocale (LC_MESSAGES, lc_messages))
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
bindtextdomain (PACKAGE_GT, LOCALEDIR);
|
bindtextdomain (PACKAGE_GT, gnupg_localedir ());
|
||||||
result = gettext (string);
|
result = gettext (string);
|
||||||
setlocale (LC_MESSAGES, saved);
|
setlocale (LC_MESSAGES, saved);
|
||||||
bindtextdomain (PACKAGE_GT, LOCALEDIR);
|
bindtextdomain (PACKAGE_GT, gnupg_localedir ());
|
||||||
|
|
||||||
/* Cache the result. */
|
/* Cache the result. */
|
||||||
if (!mh)
|
if (!mh)
|
||||||
|
@ -1082,7 +1082,7 @@ my_dgettext (const char *domain, const char *msgid)
|
|||||||
switched_codeset = 1;
|
switched_codeset = 1;
|
||||||
bind_textdomain_codeset (PACKAGE_GT, "utf-8");
|
bind_textdomain_codeset (PACKAGE_GT, "utf-8");
|
||||||
|
|
||||||
bindtextdomain (DIRMNGR_NAME, LOCALEDIR);
|
bindtextdomain (DIRMNGR_NAME, gnupg_localedir ());
|
||||||
bind_textdomain_codeset (DIRMNGR_NAME, "utf-8");
|
bind_textdomain_codeset (DIRMNGR_NAME, "utf-8");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user