fix(appstore): локализация названий категорий (фильтр и бейджи)
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 12s

Категории приложений (gaming, media, network, …) отображаются переведёнными
подписями через i18n (appstore.categories.*, ru+en) при сохранении сырого ключа
как значения фильтра. Неизвестные категории показываются как есть (fallback).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
markmorado
2026-07-07 23:42:59 +05:00
parent 635947eb15
commit 799f18d88d
4 changed files with 49 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ export default function AppDetailPage() {
<div className="mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
{app.version && <span>{t('appstore.version')}: {app.version}</span>}
{app.author && <span>{t('appstore.by')} {app.author}</span>}
{(app.categories ?? []).map((c) => <Badge key={c} variant="outline" className="text-2xs">{c}</Badge>)}
{(app.categories ?? []).map((c) => <Badge key={c} variant="outline" className="text-2xs">{t(`appstore.categories.${c}`, c)}</Badge>)}
</div>
</div>
<Button onClick={() => setWizardOpen(true)} disabled={!app.available}>

View File

@@ -78,7 +78,7 @@ export default function AppStorePage() {
<SelectContent>
<SelectItem value="">{t('appstore.all_categories')}</SelectItem>
{(meta?.categories ?? []).map((c) => (
<SelectItem key={c} value={c}>{c}</SelectItem>
<SelectItem key={c} value={c}>{t(`appstore.categories.${c}`, c)}</SelectItem>
))}
</SelectContent>
</Select>
@@ -125,7 +125,7 @@ export default function AppStorePage() {
</div>
<div className="mt-auto flex flex-wrap items-center gap-1">
{(app.categories ?? []).slice(0, 2).map((c) => (
<Badge key={c} variant="outline" className="text-2xs">{c}</Badge>
<Badge key={c} variant="outline" className="text-2xs">{t(`appstore.categories.${c}`, c)}</Badge>
))}
{!app.available && (
<Badge variant="destructive" className="text-2xs">{t('appstore.unavailable')}</Badge>

View File

@@ -71,6 +71,29 @@
"rollback_started": "Rollback started",
"powered_by": "Powered by Runtipi appstore",
"golden_missing": "Golden LXC template is not configured. Set the APPSTORE_GOLDEN_TEMPLATE variable (see docs/golden-template.md).",
"categories": {
"ai": "AI",
"automation": "Automation",
"books": "Books",
"crypto": "Crypto",
"data": "Data & Analytics",
"dashboard": "Dashboards",
"development": "Development",
"featured": "Featured",
"finance": "Finance",
"gaming": "Gaming",
"media": "Media",
"messaging": "Messaging",
"monitoring": "Monitoring",
"music": "Music",
"network": "Network",
"photography": "Photography",
"productivity": "Productivity",
"security": "Security",
"social": "Social",
"storage": "Storage",
"utilities": "Utilities"
},
"install_title": "Install {{name}}",
"step_advanced": "Advanced (LXC resources)",
"server": "Server",

View File

@@ -71,6 +71,29 @@
"rollback_started": "Откат запущен",
"powered_by": "Powered by Runtipi appstore",
"golden_missing": "Не настроен золотой LXC-шаблон. Задайте переменную APPSTORE_GOLDEN_TEMPLATE (см. docs/golden-template.md).",
"categories": {
"ai": "ИИ",
"automation": "Автоматизация",
"books": "Книги",
"crypto": "Криптовалюты",
"data": "Данные и аналитика",
"dashboard": "Дашборды",
"development": "Разработка",
"featured": "Рекомендуемые",
"finance": "Финансы",
"gaming": "Игры",
"media": "Медиа",
"messaging": "Мессенджеры",
"monitoring": "Мониторинг",
"music": "Музыка",
"network": "Сеть",
"photography": "Фото",
"productivity": "Продуктивность",
"security": "Безопасность",
"social": "Соцсети",
"storage": "Хранилище",
"utilities": "Утилиты"
},
"install_title": "Установка {{name}}",
"step_advanced": "Дополнительно (ресурсы LXC)",
"server": "Сервер",