Spaces:
Paused
Paused
Commit ·
40cfae9
1
Parent(s): 5b6d15f
refactor(i18n): complete status page ternary migration to t()
Browse files- All 18 inline language ternaries replaced with t() calls
- Removed unused 'language' destructure
- Gateway node name/region data ternaries preserved (not UI labels)
- app/status/page.tsx +5 -5
app/status/page.tsx
CHANGED
|
@@ -16,7 +16,7 @@ interface GatewayNode {
|
|
| 16 |
}
|
| 17 |
|
| 18 |
export default function StatusPage() {
|
| 19 |
-
const { t
|
| 20 |
const [mounted, setMounted] = useState(false);
|
| 21 |
const [isRefreshing, setIsRefreshing] = useState(false);
|
| 22 |
const [uptimeDays, setUptimeDays] = useState(99.98);
|
|
@@ -255,7 +255,7 @@ export default function StatusPage() {
|
|
| 255 |
<div className="flex justify-between items-center">
|
| 256 |
<h2 className="text-sm font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-2">
|
| 257 |
<Terminal className="w-4 h-4 text-indigo-500" />
|
| 258 |
-
<span>{
|
| 259 |
</h2>
|
| 260 |
|
| 261 |
<button
|
|
@@ -263,7 +263,7 @@ export default function StatusPage() {
|
|
| 263 |
disabled={isRunningDiagnostics}
|
| 264 |
className="h-9 px-4 bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-500/30 text-indigo-500 hover:text-indigo-400 text-[10px] font-bold tracking-widest uppercase transition-all duration-200 cursor-pointer disabled:opacity-50 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]"
|
| 265 |
>
|
| 266 |
-
{isRunningDiagnostics ? (
|
| 267 |
</button>
|
| 268 |
</div>
|
| 269 |
|
|
@@ -274,7 +274,7 @@ export default function StatusPage() {
|
|
| 274 |
|
| 275 |
{activeTermLine.length === 0 ? (
|
| 276 |
<div className="text-muted-foreground italic select-none text-start">
|
| 277 |
-
{
|
| 278 |
</div>
|
| 279 |
) : (
|
| 280 |
<div className="space-y-1 text-start">
|
|
@@ -302,7 +302,7 @@ export default function StatusPage() {
|
|
| 302 |
<div className="mt-12 py-8 border-t border-border text-center text-[10px] text-muted-foreground font-mono">
|
| 303 |
<div>HUBAPI GATEWAYS OPERATION // SECURED LAYER V1.0</div>
|
| 304 |
<div className="mt-1">
|
| 305 |
-
{
|
| 306 |
</div>
|
| 307 |
</div>
|
| 308 |
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
export default function StatusPage() {
|
| 19 |
+
const { t } = useLanguage();
|
| 20 |
const [mounted, setMounted] = useState(false);
|
| 21 |
const [isRefreshing, setIsRefreshing] = useState(false);
|
| 22 |
const [uptimeDays, setUptimeDays] = useState(99.98);
|
|
|
|
| 255 |
<div className="flex justify-between items-center">
|
| 256 |
<h2 className="text-sm font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-2">
|
| 257 |
<Terminal className="w-4 h-4 text-indigo-500" />
|
| 258 |
+
<span>{t("statusDiagnosticsTitle")}</span>
|
| 259 |
</h2>
|
| 260 |
|
| 261 |
<button
|
|
|
|
| 263 |
disabled={isRunningDiagnostics}
|
| 264 |
className="h-9 px-4 bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-500/30 text-indigo-500 hover:text-indigo-400 text-[10px] font-bold tracking-widest uppercase transition-all duration-200 cursor-pointer disabled:opacity-50 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]"
|
| 265 |
>
|
| 266 |
+
{isRunningDiagnostics ? t("statusDiagnosticsRunning") : t("statusInitDiagnostics")}
|
| 267 |
</button>
|
| 268 |
</div>
|
| 269 |
|
|
|
|
| 274 |
|
| 275 |
{activeTermLine.length === 0 ? (
|
| 276 |
<div className="text-muted-foreground italic select-none text-start">
|
| 277 |
+
{t("statusDiagnosticsPlaceholder")}
|
| 278 |
</div>
|
| 279 |
) : (
|
| 280 |
<div className="space-y-1 text-start">
|
|
|
|
| 302 |
<div className="mt-12 py-8 border-t border-border text-center text-[10px] text-muted-foreground font-mono">
|
| 303 |
<div>HUBAPI GATEWAYS OPERATION // SECURED LAYER V1.0</div>
|
| 304 |
<div className="mt-1">
|
| 305 |
+
{t("statusFooterLine")}
|
| 306 |
</div>
|
| 307 |
</div>
|
| 308 |
|