From e9af285dadeeb0ce951940be46e07561f61844d9 Mon Sep 17 00:00:00 2001 From: c0mrade Date: Mon, 2 Feb 2026 11:14:29 +0300 Subject: [PATCH] fix: improve mobile layout for bandwidth and add pluralization support --- src/locales/en.json | 6 ++++++ src/locales/fa.json | 3 +++ src/locales/ru.json | 9 +++++++++ src/locales/zh.json | 3 +++ src/pages/AdminRemnawave.tsx | 14 ++++++++++---- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 9c5f6d5..175463e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -881,6 +881,8 @@ "restartAll": "Restart All", "confirmRestartAll": "Are you sure you want to restart all nodes?", "usersOnline": "online", + "usersOnlineCount_one": "{{count}} online", + "usersOnlineCount_other": "{{count}} online", "trafficUsed": "used", "uptimeLabel": "Uptime", "stats": { @@ -897,7 +899,11 @@ "noSquads": "No squads found", "syncServers": "Sync Servers", "members": "members", + "membersCount_one": "{{count}} member", + "membersCount_other": "{{count}} members", "inbounds": "inbounds", + "inboundsCount_one": "{{count}} inbound", + "inboundsCount_other": "{{count}} inbounds", "available": "Available", "unavailable": "Unavailable", "stats": { diff --git a/src/locales/fa.json b/src/locales/fa.json index 162be2d..7e01b65 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -1704,6 +1704,7 @@ "restart": "راه‌اندازی مجدد", "restartAll": "راه‌اندازی مجدد همه", "usersOnline": "آنلاین", + "usersOnlineCount_other": "{{count}} آنلاین", "trafficUsed": "استفاده شده", "uptimeLabel": "زمان فعالیت", "stats": { @@ -1742,7 +1743,9 @@ "syncServers": "همگام‌سازی سرورها", "synced": "همگام شده", "members": "اعضا", + "membersCount_other": "{{count}} عضو", "inbounds": "ورودی‌ها", + "inboundsCount_other": "{{count}} ورودی", "available": "در دسترس", "unavailable": "در دسترس نیست", "stats": { diff --git a/src/locales/ru.json b/src/locales/ru.json index 9f0ff4d..ebee1ba 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -897,6 +897,9 @@ "restartAll": "Перезапустить все", "confirmRestartAll": "Вы уверены, что хотите перезапустить все ноды?", "usersOnline": "онлайн", + "usersOnlineCount_one": "{{count}} онлайн", + "usersOnlineCount_few": "{{count}} онлайн", + "usersOnlineCount_many": "{{count}} онлайн", "trafficUsed": "использовано", "uptimeLabel": "Аптайм", "stats": { @@ -913,7 +916,13 @@ "noSquads": "Сквады не найдены", "syncServers": "Синхронизировать серверы", "members": "участников", + "membersCount_one": "{{count}} участник", + "membersCount_few": "{{count}} участника", + "membersCount_many": "{{count}} участников", "inbounds": "inbounds", + "inboundsCount_one": "{{count}} inbound", + "inboundsCount_few": "{{count}} inbounds", + "inboundsCount_many": "{{count}} inbounds", "available": "Доступен", "unavailable": "Недоступен", "stats": { diff --git a/src/locales/zh.json b/src/locales/zh.json index c9ce377..2bac504 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -1712,6 +1712,7 @@ "restart": "重启", "restartAll": "全部重启", "usersOnline": "在线", + "usersOnlineCount_other": "{{count}} 在线", "trafficUsed": "已使用", "uptimeLabel": "运行时间", "stats": { @@ -1750,7 +1751,9 @@ "syncServers": "同步服务器", "synced": "已同步", "members": "成员", + "membersCount_other": "{{count}} 成员", "inbounds": "入站", + "inboundsCount_other": "{{count}} 入站", "available": "可用", "unavailable": "不可用", "stats": { diff --git a/src/pages/AdminRemnawave.tsx b/src/pages/AdminRemnawave.tsx index 166ab0a..3a9bd36 100644 --- a/src/pages/AdminRemnawave.tsx +++ b/src/pages/AdminRemnawave.tsx @@ -157,7 +157,9 @@ function NodeCard({ node, onAction, isLoading }: NodeCardProps) {
- {node.users_online ?? 0} {t('admin.remnawave.nodes.usersOnline', 'online')} + {t('admin.remnawave.nodes.usersOnlineCount', '{{count}} online', { + count: node.users_online ?? 0, + })} {node.traffic_used_bytes !== undefined && ( @@ -239,7 +241,9 @@ function SquadCard({ squad, onClick }: SquadCardProps) {
- {squad.members_count} {t('admin.remnawave.squads.members', 'members')} + {t('admin.remnawave.squads.membersCount', '{{count}} members', { + count: squad.members_count, + })} {squad.current_users !== undefined && ( @@ -247,7 +251,9 @@ function SquadCard({ squad, onClick }: SquadCardProps) { )} - {squad.inbounds_count} {t('admin.remnawave.squads.inbounds', 'inbounds')} + {t('admin.remnawave.squads.inboundsCount', '{{count}} inbounds', { + count: squad.inbounds_count, + })} {squad.is_available !== undefined && ( @@ -389,7 +395,7 @@ function OverviewTab({ stats, isLoading, onRefresh }: OverviewTabProps) {

{t('admin.remnawave.overview.bandwidth', 'Realtime Bandwidth')}

-
+