From 57167b979f3cb79c6a4925052ad89951bfb4a338 Mon Sep 17 00:00:00 2001
From: zhom <2717306+zhom@users.noreply.github.com>
Date: Thu, 30 Apr 2026 00:10:19 +0400
Subject: [PATCH] chore: copy
---
AGENTS.md | 2 +
src-tauri/src/lib.rs | 2 +-
src/app/page.tsx | 2 +-
src/components/app-update-toast.tsx | 12 +-
src/components/create-profile-dialog.tsx | 2 +-
src/components/custom-toast.tsx | 10 +-
.../extension-group-assignment-dialog.tsx | 6 +-
.../extension-management-dialog.tsx | 401 +++++------
src/components/group-badges.tsx | 2 +-
src/components/group-management-dialog.tsx | 2 +-
src/components/import-profile-dialog.tsx | 6 +-
src/components/profile-data-table.tsx | 47 +-
src/components/profile-selector-dialog.tsx | 18 +-
src/components/profile-sync-dialog.tsx | 45 +-
src/components/proxy-management-dialog.tsx | 634 +++++++++---------
src/components/settings-dialog.tsx | 98 +--
src/components/sync-config-dialog.tsx | 6 +-
src/components/ui/copy-to-clipboard.tsx | 8 +-
src/components/ui/dialog.tsx | 2 +-
src/i18n/locales/en.json | 61 +-
src/i18n/locales/es.json | 89 ++-
src/i18n/locales/fr.json | 87 ++-
src/i18n/locales/ja.json | 83 ++-
src/i18n/locales/pt.json | 85 ++-
src/i18n/locales/ru.json | 83 ++-
src/i18n/locales/zh.json | 85 ++-
26 files changed, 1048 insertions(+), 830 deletions(-)
diff --git a/AGENTS.md b/AGENTS.md
index afbc338..8409816 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -67,6 +67,8 @@ donutbrowser/
- Adding a new string means adding the key to ALL seven locale files in `src/i18n/locales/` (en, es, fr, ja, pt, ru, zh) — not just `en.json`. The English version alone is incomplete work.
- Reuse existing keys (`common.buttons.*`, `common.labels.*`, `createProfile.*`, etc.) before creating new namespaces. Check `en.json` first.
- Strings excluded from this rule: `console.log/warn/error`, dev-only debug labels, internal IDs, CSS class names, type names. If unsure whether a string renders to the user, assume it does and translate it.
+- **Never use `t(key, "fallback")` with a default-value second argument.** The 2-arg form is forbidden — every key must exist in every locale file before the call site lands. Fallbacks mask missing translations: a key missing from `ru.json` will silently render the English fallback to Russian users, so the bug never surfaces in CI or review. Only call `t("namespace.key")`. If a translation is missing for any locale, that's a bug to fix at the JSON, not a hole to paper over at the call site.
+- Empty-string values in non-English locales are also forbidden — a locale either has the right translation or it has the same content as English; never `""`. If a particular language doesn't need a particular phrase (e.g. a suffix that doesn't grammatically apply), refactor the JSX to use a single interpolated key (`t("foo.bar", { name })` with `"...{{name}}..."` in each locale) instead of splitting prefix/suffix.
## Singletons
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 98d4675..32d8c33 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -1232,7 +1232,7 @@ pub fn run() {
#[allow(unused_variables)]
let win_builder = WebviewWindowBuilder::new(app, "main", WebviewUrl::default())
.title("Donut Browser")
- .inner_size(800.0, 500.0)
+ .inner_size(840.0, 500.0)
.resizable(false)
.fullscreen(false)
.center()
diff --git a/src/app/page.tsx b/src/app/page.tsx
index fb30c74..6c145c0 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1070,7 +1070,7 @@ export default function Home() {
return (