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 <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2020-11-12 23:44:55 +00:00
parent 0b4d75fae5
commit fb038d27a1
No known key found for this signature in database
GPG Key ID: 0D46FEF7E61DBB46
1 changed files with 2 additions and 2 deletions

View File

@ -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);