feat(settings): mother-tongue language routing table
Replace the single reverse-direction pair with a general routing table. The saved target is the mother tongue and the default target for every source; languageRoutes is an empty-by-default, source-unique list of source-to-target rules (for example Chinese -> English, Traditional Chinese -> English, German -> English). Rules apply only when the source is confidently detected; otherwise the mother tongue is used. Same-language rules are dropped.\n\nThe panel shows the effective direction and a banner explaining a rule, with a one-capture override back to the mother tongue; the panel picker is now a session-only override. Persistent rules are edited in Settings. The old autoSwitchTarget/fallbackTargetLanguage keys are ignored, so the default after migration is everything -> mother tongue.\n\nAdd LanguageRoute, generalize the direction policy and tests, add the rules UI, and update ADR-022, architecture, translation output, user guide, README and progress. Verified: make verify green; empty rules translate French -> German, a Chinese -> English rule produces Chinese (Simplified) -> English with the banner, and the rules table renders in Settings.
This commit is contained in:
1 parent
41f1cea769
commit
940abcc996
24 files changed
+454
-336
No files matched your search
@@ -104,10 +104,14 @@
|
||||
"Render bold, italic, headings, lists, code and links when the source is Markdown." = "Fett, kursiv, Überschriften, Listen, Code und Links anzeigen, wenn die Quelle Markdown ist.";
|
||||
"Close with Esc without clicking" = "Mit Esc schließen, ohne zu klicken";
|
||||
"The panel takes keyboard focus while it is visible. The source app stays frontmost." = "Das Panel übernimmt die Tastatureingabe, solange es sichtbar ist. Die Quell-App bleibt im Vordergrund.";
|
||||
"Translate the other direction when the text is already in the target language" = "In die andere Richtung übersetzen, wenn der Text bereits in der Zielsprache ist";
|
||||
"Translate the other direction" = "In die andere Richtung übersetzen";
|
||||
"Fallback target language" = "Ausweich-Zielsprache";
|
||||
"Used only when the text is confidently detected as the target language." = "Wird nur verwendet, wenn der Text sicher als Zielsprache erkannt wird.";
|
||||
"Detected %@. Translating to %@." = "%@ erkannt. Übersetzung nach %@.";
|
||||
"Translate to %@" = "Nach %@ übersetzen";
|
||||
"This text already appears to be in %@ (detected %@)." = "Dieser Text scheint bereits auf %@ zu sein (erkannt: %@).";
|
||||
"Mother tongue" = "Muttersprache";
|
||||
"The default target for every language unless a rule matches." = "Das Standardziel für jede Sprache, wenn keine Regel passt.";
|
||||
"Language rules" = "Sprachregeln";
|
||||
"Add rule" = "Regel hinzufügen";
|
||||
"No rules. Every language translates to your mother tongue." = "Keine Regeln. Jede Sprache wird in Ihre Muttersprache übersetzt.";
|
||||
"Source language" = "Ausgangssprache";
|
||||
"Remove rule" = "Regel entfernen";
|
||||
"Rules apply only to confidently detected sources; otherwise the mother tongue is used." = "Regeln gelten nur für sicher erkannte Ausgangssprachen; sonst wird die Muttersprache verwendet.";
|
||||
@@ -104,10 +104,14 @@
|
||||
"Render bold, italic, headings, lists, code and links when the source is Markdown." = "Render bold, italic, headings, lists, code and links when the source is Markdown.";
|
||||
"Close with Esc without clicking" = "Close with Esc without clicking";
|
||||
"The panel takes keyboard focus while it is visible. The source app stays frontmost." = "The panel takes keyboard focus while it is visible. The source app stays frontmost.";
|
||||
"Translate the other direction when the text is already in the target language" = "Translate the other direction when the text is already in the target language";
|
||||
"Translate the other direction" = "Translate the other direction";
|
||||
"Fallback target language" = "Fallback target language";
|
||||
"Used only when the text is confidently detected as the target language." = "Used only when the text is confidently detected as the target language.";
|
||||
"Detected %@. Translating to %@." = "Detected %@. Translating to %@.";
|
||||
"Translate to %@" = "Translate to %@";
|
||||
"This text already appears to be in %@ (detected %@)." = "This text already appears to be in %@ (detected %@).";
|
||||
"Mother tongue" = "Mother tongue";
|
||||
"The default target for every language unless a rule matches." = "The default target for every language unless a rule matches.";
|
||||
"Language rules" = "Language rules";
|
||||
"Add rule" = "Add rule";
|
||||
"No rules. Every language translates to your mother tongue." = "No rules. Every language translates to your mother tongue.";
|
||||
"Source language" = "Source language";
|
||||
"Remove rule" = "Remove rule";
|
||||
"Rules apply only to confidently detected sources; otherwise the mother tongue is used." = "Rules apply only to confidently detected sources; otherwise the mother tongue is used.";
|
||||
Reference in new issue
Block a user