Help desk translation: member messages in other languages get an English translation (Telegram, admin email, admin view, bot thread); Marty's replies go back in the member's language with his English underneath (OpenRouter, reasoning off; failures fall back to untranslated)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-16 19:03:30 -05:00
parent e490e15abf
commit af66f7f865
7 changed files with 107 additions and 7 deletions
+8
View File
@@ -365,6 +365,14 @@ async function bootstrap() {
via VARCHAR(12) NOT NULL DEFAULT 'web',
INDEX (ticket_id), INDEX (email_message_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`);
// help desk translations (2026-10-16): the English of a member message written in another language
await q(`CREATE TABLE IF NOT EXISTS ticket_translations (
message_id INT PRIMARY KEY,
ticket_id INT NOT NULL,
lang VARCHAR(8) NOT NULL,
body_en TEXT NOT NULL,
INDEX (ticket_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`);
}
// one-time import: only when the tables are empty and JSON files exist