From: Sami Kerola Date: Thu, 12 Nov 2020 23:44:55 +0000 (+0000) Subject: login: move getlogindefs_num() after localization init X-Git-Tag: v2.37-rc1~255 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb038d27a1a0e2faf7fc9c5bbf62ec6379c93f10;p=thirdparty%2Futil-linux.git login: move getlogindefs_num() after localization init There are translations in getlogindefs_num() and they will not take effect unless the function call is after the setlocale(), bindtextdomain(), and textdomain(). Signed-off-by: Sami Kerola --- diff --git a/login-utils/login.c b/login-utils/login.c index b15b0ee18e..11d1afd493 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -1284,12 +1284,12 @@ int main(int argc, char **argv) {NULL, 0, NULL, 0} }; - timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT); - setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT); + /* TRANSLATORS: The standard value for %u is 60. */ xasprintf(&timeout_msg, _("%s: timed out after %u seconds"), program_invocation_short_name, timeout);