From 116f1f5b0e624ee09cf0e6affcf1d996a9af24a1 Mon Sep 17 00:00:00 2001 From: Toutsu Date: Fri, 17 Apr 2026 15:40:35 +0300 Subject: [PATCH] feat: translate web interface to Russian --- .../Components/Layout/MainLayout.razor | 6 +-- .../Components/Layout/NavMenu.razor | 8 ++-- .../Components/Layout/ReconnectModal.razor | 14 +++---- .../Components/Pages/EditSession.razor | 30 +++++++-------- src/GmRelay.Web/Components/Pages/Error.razor | 20 +++++----- .../Components/Pages/GroupDetails.razor | 38 ++++++++++++------- src/GmRelay.Web/Components/Pages/Home.razor | 14 +++---- src/GmRelay.Web/Components/Pages/Login.razor | 8 ++-- .../Components/Pages/NotFound.razor | 4 +- src/GmRelay.Web/Components/Routes.razor | 2 +- 10 files changed, 77 insertions(+), 67 deletions(-) diff --git a/src/GmRelay.Web/Components/Layout/MainLayout.razor b/src/GmRelay.Web/Components/Layout/MainLayout.razor index 78624f3..46bc25d 100644 --- a/src/GmRelay.Web/Components/Layout/MainLayout.razor +++ b/src/GmRelay.Web/Components/Layout/MainLayout.razor @@ -7,7 +7,7 @@
@@ -17,7 +17,7 @@
- An unhandled error has occurred. - Reload + Произошла непредвиденная ошибка. + Перезагрузить 🗙
diff --git a/src/GmRelay.Web/Components/Layout/NavMenu.razor b/src/GmRelay.Web/Components/Layout/NavMenu.razor index 48e0f32..a28b9c1 100644 --- a/src/GmRelay.Web/Components/Layout/NavMenu.razor +++ b/src/GmRelay.Web/Components/Layout/NavMenu.razor @@ -4,7 +4,7 @@ - +

- Rejoining the server... + Переподключение к серверу...

- Rejoin failed... trying again in seconds. + Подключение не удалось... повторная попытка через сек.

- Failed to rejoin.
Please retry or reload the page. + Не удалось переподключиться.
Пожалуйста, повторите попытку или перезагрузите страницу.

- The session has been paused by the server. + Сессия была приостановлена сервером.

- Failed to resume the session.
Please retry or reload the page. + Не удалось возобновить сессию.
Пожалуйста, повторите попытку или перезагрузите страницу.

diff --git a/src/GmRelay.Web/Components/Pages/EditSession.razor b/src/GmRelay.Web/Components/Pages/EditSession.razor index 71e9cb6..f416c53 100644 --- a/src/GmRelay.Web/Components/Pages/EditSession.razor +++ b/src/GmRelay.Web/Components/Pages/EditSession.razor @@ -6,21 +6,21 @@ @inject SessionService SessionService @inject NavigationManager Navigation -Edit Session - GM-Relay +Редактирование сессии - GM-Relay
-

Edit Session

+

Редактирование сессии

@if (session == null) { -

Loading session details...

+

Загрузка деталей сессии...

} else { @@ -28,27 +28,27 @@
- - -
Changing this will update all sessions in the same batch.
+ + +
Изменение этого поля обновит все сессии в одной группе.
- + -
Current: @session.ScheduledAt.FormatMoscow()
+
Текущее: @session.ScheduledAt.FormatMoscow()
- - + +
- +
@@ -96,7 +96,7 @@ } catch (Exception ex) { - errorMessage = "Failed to save changes: " + ex.Message; + errorMessage = "Не удалось сохранить изменения: " + ex.Message; } finally { diff --git a/src/GmRelay.Web/Components/Pages/Error.razor b/src/GmRelay.Web/Components/Pages/Error.razor index 576cc2d..b045a3d 100644 --- a/src/GmRelay.Web/Components/Pages/Error.razor +++ b/src/GmRelay.Web/Components/Pages/Error.razor @@ -1,27 +1,27 @@ @page "/Error" @using System.Diagnostics -Error +Ошибка -

Error.

-

An error occurred while processing your request.

+

Ошибка.

+

Произошла ошибка при обработке вашего запроса.

@if (ShowRequestId) {

- Request ID: @RequestId + ID запроса: @RequestId

} -

Development Mode

+

Режим разработки

- Swapping to Development environment will display more detailed information about the error that occurred. + Переключение на среду Development отобразит более подробную информацию о произошедшей ошибке.

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. + Среда Development не должна быть включена для развернутых приложений. + Это может привести к отображению конфиденциальной информации из исключений конечным пользователям. + Для локальной отладки включите среду Development, установив переменную среды ASPNETCORE_ENVIRONMENT в значение Development + и перезапустите приложение.

@code{ diff --git a/src/GmRelay.Web/Components/Pages/GroupDetails.razor b/src/GmRelay.Web/Components/Pages/GroupDetails.razor index 7e9e88b..fde4675 100644 --- a/src/GmRelay.Web/Components/Pages/GroupDetails.razor +++ b/src/GmRelay.Web/Components/Pages/GroupDetails.razor @@ -5,26 +5,26 @@ @attribute [Authorize] @inject SessionService SessionService -Group Sessions - GM-Relay +Сессии группы - GM-Relay
-

Upcoming Sessions

+

Предстоящие игры

@if (sessions == null) { -

Loading sessions...

+

Загрузка сессий...

} else if (sessions.Count == 0) { -
No upcoming sessions found for this group.
+
Для этой группы не найдено предстоящих сессий.
} else { @@ -32,11 +32,11 @@ - - - - - + + + + + @@ -46,11 +46,11 @@ - + } @@ -77,4 +77,14 @@ SessionStatus.ConfirmationSent => "bg-warning text-dark", _ => "bg-secondary" }; + + private string TranslateStatus(string status) => status switch + { + SessionStatus.Recruiting => "Набор", + SessionStatus.RecruitmentClosed => "Набор закрыт", + SessionStatus.ConfirmationSent => "Ждем подтверждения", + SessionStatus.Confirmed => "Подтверждено", + SessionStatus.Cancelled => "Отменено", + _ => status + }; } diff --git a/src/GmRelay.Web/Components/Pages/Home.razor b/src/GmRelay.Web/Components/Pages/Home.razor index 095abf2..8a9f002 100644 --- a/src/GmRelay.Web/Components/Pages/Home.razor +++ b/src/GmRelay.Web/Components/Pages/Home.razor @@ -6,23 +6,23 @@ @inject SessionService SessionService @inject AuthenticationStateProvider AuthStateProvider -Dashboard - GM-Relay +Панель управления - GM-Relay
-

Welcome, @userName!

-

Select a group to manage your game sessions.

+

Добро пожаловать, @userName!

+

Выберите группу для управления играми.

@if (groups == null) { -

Loading groups...

+

Загрузка групп...

} else if (groups.Count == 0) {
-

You don't have any groups registered yet. Use the bot in a Telegram group first!

+

У вас еще нет зарегистрированных групп. Сначала добавьте бота в группу Telegram!

@@ -36,7 +36,7 @@
@group.Name

ID: @group.TelegramChatId

- View Sessions + Посмотреть игры
@@ -53,7 +53,7 @@ { var authState = await AuthStateProvider.GetAuthenticationStateAsync(); var user = authState.User; - userName = user.Identity?.Name ?? "Game Master"; + userName = user.Identity?.Name ?? "Мастер Игры"; var telegramIdClaim = user.FindFirst("TelegramId")?.Value; if (long.TryParse(telegramIdClaim, out var telegramId)) diff --git a/src/GmRelay.Web/Components/Pages/Login.razor b/src/GmRelay.Web/Components/Pages/Login.razor index 1760618..06eccc9 100644 --- a/src/GmRelay.Web/Components/Pages/Login.razor +++ b/src/GmRelay.Web/Components/Pages/Login.razor @@ -3,18 +3,18 @@ @inject NavigationManager Navigation @inject IConfiguration Configuration -Login - GM-Relay +Вход - GM-Relay
-

GM-Relay Control Panel

-

Please log in as a Game Master to manage your sessions.

+

Панель управления GM-Relay

+

Пожалуйста, войдите как Мастер Игры для управления сессиями.

@if (Navigation.Uri.Contains("error=auth_failed")) { -
Authentication failed. Please try again.
+
Ошибка аутентификации. Пожалуйста, попробуйте снова.
} @* Telegram Login Widget *@ diff --git a/src/GmRelay.Web/Components/Pages/NotFound.razor b/src/GmRelay.Web/Components/Pages/NotFound.razor index 917ada1..b0d247a 100644 --- a/src/GmRelay.Web/Components/Pages/NotFound.razor +++ b/src/GmRelay.Web/Components/Pages/NotFound.razor @@ -1,5 +1,5 @@ @page "/not-found" @layout MainLayout -

Not Found

-

Sorry, the content you are looking for does not exist.

\ No newline at end of file +

Не найдено

+

Извините, страница, которую вы ищете, не существует.

\ No newline at end of file diff --git a/src/GmRelay.Web/Components/Routes.razor b/src/GmRelay.Web/Components/Routes.razor index 2773fa5..4718f2f 100644 --- a/src/GmRelay.Web/Components/Routes.razor +++ b/src/GmRelay.Web/Components/Routes.razor @@ -10,7 +10,7 @@ } else { -

You are not authorized to access this resource.

+

У вас нет прав для доступа к этому ресурсу.

}
TitleTime (MSK)StatusLinkActionНазваниеВремя (МСК)СтатусСсылкаДействие
@session.Title @session.ScheduledAt.FormatMoscow() - @session.Status + @TranslateStatus(session.Status) LinkСсылка - Edit + Изменить