feat(i18n): translate remaining components (HU/EN/DE)
Feed, VideoCard, Sidebar, PlayerModal, Channels, Stats, SettingsPanel, OnboardingWizard, NotificationCenter, Toaster, ErrorBoundary and the relativeTime helper are now fully translated in Hungarian, English and German, each with its own locale area file (auto-loaded). Key parity verified across all three languages.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Component, type ReactNode } from "react";
|
||||
import i18n from "../i18n";
|
||||
import { notify } from "../lib/notifications";
|
||||
|
||||
interface Props {
|
||||
@@ -20,8 +21,8 @@ export default class ErrorBoundary extends Component<Props, State> {
|
||||
componentDidCatch(error: Error) {
|
||||
notify({
|
||||
level: "fatal",
|
||||
title: "Something broke",
|
||||
message: error.message || "Unexpected error",
|
||||
title: i18n.t("errors.boundary.notifTitle"),
|
||||
message: error.message || i18n.t("errors.boundary.notifMessage"),
|
||||
requiresInteraction: true,
|
||||
});
|
||||
}
|
||||
@@ -31,13 +32,13 @@ export default class ErrorBoundary extends Component<Props, State> {
|
||||
return (
|
||||
<div className="min-h-screen grid place-items-center text-muted p-6 text-center">
|
||||
<div>
|
||||
<div className="text-lg font-semibold text-fg mb-1">Something went wrong.</div>
|
||||
<div className="text-sm mb-3">The app hit an unexpected error.</div>
|
||||
<div className="text-lg font-semibold text-fg mb-1">{i18n.t("errors.boundary.title")}</div>
|
||||
<div className="text-sm mb-3">{i18n.t("errors.boundary.subtitle")}</div>
|
||||
<button
|
||||
onClick={() => location.reload()}
|
||||
className="text-accent hover:underline text-sm font-semibold"
|
||||
>
|
||||
Reload
|
||||
{i18n.t("errors.boundary.reload")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user