From cc1ef0a9e7b89bce2411c4509675963776ad58e6 Mon Sep 17 00:00:00 2001 From: H-Chris233 Date: Thu, 30 Apr 2026 23:28:50 +0800 Subject: [PATCH] Route remaining visible labels through i18n Settings credential labels, capsule control aria labels, and duration suffixes still used inline literals after the i18n framework landed. Move those user-visible strings behind existing locale resources without changing provider or history behavior. Constraint: Issue #65 asks for minimal i18n alignment only. Rejected: Broad text audit or component refactor | unnecessary for the reported literals. Confidence: high Scope-risk: narrow Tested: npm run build Tested: git diff --check --- openless-all/app/src/components/Capsule.tsx | 3 ++- openless-all/app/src/i18n/en.ts | 8 ++++++++ openless-all/app/src/i18n/zh-CN.ts | 8 ++++++++ openless-all/app/src/pages/History.tsx | 10 +++++----- openless-all/app/src/pages/Overview.tsx | 11 ++++++----- openless-all/app/src/pages/Settings.tsx | 18 +++++++++--------- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/openless-all/app/src/components/Capsule.tsx b/openless-all/app/src/components/Capsule.tsx index 499478a1..43780554 100644 --- a/openless-all/app/src/components/Capsule.tsx +++ b/openless-all/app/src/components/Capsule.tsx @@ -119,11 +119,12 @@ interface CircleButtonProps { } function CircleButton({ variant, enabled, onClick }: CircleButtonProps) { + const { t } = useTranslation(); const isCancel = variant === 'cancel'; return (