fix(appstore): локализация названий категорий (фильтр и бейджи)
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 12s
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:
@@ -48,7 +48,7 @@ export default function AppDetailPage() {
|
|||||||
<div className="mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
|
<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.version && <span>{t('appstore.version')}: {app.version}</span>}
|
||||||
{app.author && <span>{t('appstore.by')} {app.author}</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>
|
||||||
</div>
|
</div>
|
||||||
<Button onClick={() => setWizardOpen(true)} disabled={!app.available}>
|
<Button onClick={() => setWizardOpen(true)} disabled={!app.available}>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default function AppStorePage() {
|
|||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="">{t('appstore.all_categories')}</SelectItem>
|
<SelectItem value="">{t('appstore.all_categories')}</SelectItem>
|
||||||
{(meta?.categories ?? []).map((c) => (
|
{(meta?.categories ?? []).map((c) => (
|
||||||
<SelectItem key={c} value={c}>{c}</SelectItem>
|
<SelectItem key={c} value={c}>{t(`appstore.categories.${c}`, c)}</SelectItem>
|
||||||
))}
|
))}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
@@ -125,7 +125,7 @@ export default function AppStorePage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="mt-auto flex flex-wrap items-center gap-1">
|
<div className="mt-auto flex flex-wrap items-center gap-1">
|
||||||
{(app.categories ?? []).slice(0, 2).map((c) => (
|
{(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 && (
|
{!app.available && (
|
||||||
<Badge variant="destructive" className="text-2xs">{t('appstore.unavailable')}</Badge>
|
<Badge variant="destructive" className="text-2xs">{t('appstore.unavailable')}</Badge>
|
||||||
|
|||||||
@@ -71,6 +71,29 @@
|
|||||||
"rollback_started": "Rollback started",
|
"rollback_started": "Rollback started",
|
||||||
"powered_by": "Powered by Runtipi appstore",
|
"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).",
|
"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}}",
|
"install_title": "Install {{name}}",
|
||||||
"step_advanced": "Advanced (LXC resources)",
|
"step_advanced": "Advanced (LXC resources)",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
|
|||||||
@@ -71,6 +71,29 @@
|
|||||||
"rollback_started": "Откат запущен",
|
"rollback_started": "Откат запущен",
|
||||||
"powered_by": "Powered by Runtipi appstore",
|
"powered_by": "Powered by Runtipi appstore",
|
||||||
"golden_missing": "Не настроен золотой LXC-шаблон. Задайте переменную APPSTORE_GOLDEN_TEMPLATE (см. docs/golden-template.md).",
|
"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}}",
|
"install_title": "Установка {{name}}",
|
||||||
"step_advanced": "Дополнительно (ресурсы LXC)",
|
"step_advanced": "Дополнительно (ресурсы LXC)",
|
||||||
"server": "Сервер",
|
"server": "Сервер",
|
||||||
|
|||||||
Reference in New Issue
Block a user