Fixed obfuscation of error messages caused by previous commits

This commit is contained in:
kaedr 2021-10-15 19:41:31 -04:00
parent f6176df9a1
commit eb02a4733d
2 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,7 @@ https://veloren.net/account/."#,
"main.login.select_language": "Select a language", "main.login.select_language": "Select a language",
"main.login.client_version": "Client Version", "main.login.client_version": "Client Version",
"main.login.server_version": "Server Version", "main.login.server_version": "Server Version",
"main.login.client_init_failed": "Client failed to initialize.", "main.login.client_init_failed": "Client failed to initialize: {init_fail_reason}",
"main.login.username_bad_characters": "Username contains invalid characters! (Only alphanumeric, '_' and '-' are allowed)", "main.login.username_bad_characters": "Username contains invalid characters! (Only alphanumeric, '_' and '-' are allowed)",
"main.login.username_too_long": "Username is too long! Max length is: {max_len}", "main.login.username_too_long": "Username is too long! Max length is: {max_len}",
"main.servers.select_server": "Select a server", "main.servers.select_server": "Select a server",

View File

@ -154,7 +154,8 @@ impl PlayState for MainMenuState {
global_state.info_message = Some( global_state.info_message = Some(
localized_strings localized_strings
.get("main.login.client_init_failed") .get("main.login.client_init_failed")
.to_owned(), .to_owned()
.replace("{init_fail_reason}", e.as_str()),
); );
}, },
Some(InitMsg::IsAuthTrusted(auth_server)) => { Some(InitMsg::IsAuthTrusted(auth_server)) => {