mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
Improve error message for lobby code
This commit is contained in:
parent
6a86aae346
commit
45d8819d9d
3 changed files with 14 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
connect_steam = Connect using steam
|
||||
connect_steam_create = Create lobby
|
||||
connect_steam_connect = Connect to lobby in clipboard
|
||||
connect_steam_connect_invalid_lobby_id = Clipboard does not contain a lobby code
|
||||
|
||||
connect_ip = Connect using ip
|
||||
|
||||
|
@ -16,6 +17,7 @@ button_confirm = Confirm
|
|||
button_continue = Continue
|
||||
button_retry = Retry
|
||||
button_select_again = Select again
|
||||
button_back = Back
|
||||
|
||||
button_set_lang = Select language
|
||||
|
||||
|
@ -56,3 +58,5 @@ netman_save_lobby = Save lobby id to clipboard
|
|||
ip_note = Note: steam networking is more reliable. Use it, if possible.
|
||||
ip_connect = Connect to IP
|
||||
ip_host = Create a server
|
||||
|
||||
error_occured = An error occured:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
connect_steam = Подключение по Steam
|
||||
connect_steam_create = Создать лобби
|
||||
connect_steam_connect = Подключиться к лобби в буфере обмена
|
||||
connect_steam_connect_invalid_lobby_id = Буфер обмена не содержит кода лобби.
|
||||
|
||||
connect_ip = Подключение по IP
|
||||
|
||||
|
@ -16,6 +17,7 @@ button_confirm = Подтвердить
|
|||
button_continue = Продолжить
|
||||
button_retry = Попробовать снова
|
||||
button_select_again = Выбрать ещё раз
|
||||
button_back = Назад
|
||||
|
||||
button_set_lang = Выбрать язык
|
||||
|
||||
|
@ -56,3 +58,5 @@ netman_save_lobby = Сохранить код лобби в буфер обме
|
|||
ip_note = Рекомендуется использовать подключение через Steam, поскольку оно работает стабильнее.
|
||||
ip_connect = Подключиться по IP
|
||||
ip_host = Создать сервер
|
||||
|
||||
error_occured = Произошла ошибка:
|
||||
|
|
|
@ -291,10 +291,12 @@ impl App {
|
|||
.and_then(|mut ctx: ClipboardContext| ctx.get_contents());
|
||||
match id {
|
||||
Ok(id) => {
|
||||
let id = id.parse().map(LobbyId::from_raw);
|
||||
let id = id.trim().parse().map(LobbyId::from_raw);
|
||||
match id {
|
||||
Ok(id) => self.start_steam_connect(id),
|
||||
Err(error) => self.notify_error(error),
|
||||
Err(_error) => self.notify_error(tr(
|
||||
"connect_steam_connect_invalid_lobby_id",
|
||||
)),
|
||||
}
|
||||
}
|
||||
Err(error) => self.notify_error(error),
|
||||
|
@ -407,9 +409,9 @@ impl eframe::App for App {
|
|||
AppState::Error { message } => {
|
||||
if egui::CentralPanel::default()
|
||||
.show(ctx, |ui| {
|
||||
ui.heading("An error occured:");
|
||||
ui.heading(tr("error_occured"));
|
||||
ui.label(message);
|
||||
ui.button("Back").clicked()
|
||||
ui.button(tr("button_back")).clicked()
|
||||
})
|
||||
.inner
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue