From f0406e118f5047596127b4676fc1f3e67151fec3 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 18 Jul 2023 08:00:00 +0000 Subject: [PATCH] locale-util: fix _() definition The previous definition was not quite appropriate for the library code because it relied on the message domain set by textdomain() invocation which is not necessarily the same message domain defined in GETTEXT_PACKAGE macro. The only code that uses _() so far is located in pam_systemd_home.c. Fixes: 20f56fddcd5 ("Add gettext support") --- src/basic/locale-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h index 8990cb6a75..ae2797cd2d 100644 --- a/src/basic/locale-util.h +++ b/src/basic/locale-util.h @@ -33,7 +33,7 @@ int get_locales(char ***l); bool locale_is_valid(const char *name); int locale_is_installed(const char *name); -#define _(String) gettext(String) +#define _(String) dgettext(GETTEXT_PACKAGE, String) #define N_(String) String void init_gettext(void); -- 2.25.1