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: 20f56fddcd ("Add gettext support")
This commit is contained in:
Dmitry V. Levin
2023-07-19 14:02:04 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent 7177c9022e
commit f0406e118f
+1 -1
View File
@@ -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);