feat(i18n): migrate hardcoded German strings to t() across 104 components/pages — AST-based batch with re-parse gate, 423 new de.json keys; tsc clean; vitest failures byte-identical to clean-tree baseline (pre-existing)

This commit is contained in:
Agent Zero
2026-08-27 01:43:06 +02:00
parent 5680179260
commit 4cb5298768
105 changed files with 1204 additions and 459 deletions
@@ -4,6 +4,7 @@ import { Loader2 } from 'lucide-react';
import { usePluginStore } from '@/store/pluginStore';
import { ProtectedRoute } from '@/components/common/ProtectedRoute';
import { PluginPage } from './PluginLoader';
import { useTranslation } from 'react-i18next';
/**
* PluginRouteRenderer — catch-all route handler that checks the current URL
@@ -17,6 +18,7 @@ import { PluginPage } from './PluginLoader';
* { path: '*', element: <PluginRouteRenderer /> }
*/
export function PluginRouteRenderer() {
const { t } = useTranslation();
const location = useLocation();
const manifests = usePluginStore((s) => s.manifests);
const loaded = usePluginStore((s) => s.loaded);
@@ -63,7 +65,7 @@ export function PluginRouteRenderer() {
// If manifests haven't loaded yet, show a spinner (not null/blank)
if (!loaded) {
return (
<div className="flex items-center justify-center min-h-[50vh]" role="status" aria-label="Loading">
<div className="flex items-center justify-center min-h-[50vh]" role="status" aria-label={t('pluginRouteRenderer.loading')}>
<Loader2 className="animate-spin h-8 w-8 text-primary-500" aria-hidden="true" />
</div>
);
@@ -72,9 +74,9 @@ export function PluginRouteRenderer() {
// No plugin route matched — show a simple not-found
return (
<div className="flex flex-col items-center justify-center min-h-[50vh] text-secondary-500">
<h2 className="text-2xl font-semibold mb-2">Page Not Found</h2>
<h2 className="text-2xl font-semibold mb-2">{t('pluginRouteRenderer.pagenotfound')}</h2>
<p className="text-sm">
The page <code className="bg-secondary-100 px-1 rounded">{location.pathname}</code> was not found.
{t('pluginRouteRenderer.thepage')} <code className="bg-secondary-100 px-1 rounded">{location.pathname}</code> {t('pluginRouteRenderer.wasnotfound')}
</p>
</div>
);