From 244dda807be6ba7bbebc314dec8c3504d7cfccf0 Mon Sep 17 00:00:00 2001 From: codytseng Date: Mon, 9 Feb 2026 21:56:32 +0800 Subject: [PATCH] feat: add copy note content option and migrate AGENTS.md to CLAUDE.md Add a "Copy note content" option to the note options menu that copies the event's content field to clipboard. Merge AGENTS.md into CLAUDE.md with enhanced i18n rules emphasizing append-only locale key ordering. Co-Authored-By: Claude Opus 4.6 --- .gitignore | 2 ++ AGENTS.md => CLAUDE.md | 10 ++++++---- src/components/NoteOptions/useMenuActions.tsx | 8 ++++++++ src/i18n/locales/ar.ts | 3 ++- src/i18n/locales/de.ts | 3 ++- src/i18n/locales/en.ts | 3 ++- src/i18n/locales/es.ts | 3 ++- src/i18n/locales/fa.ts | 3 ++- src/i18n/locales/fr.ts | 3 ++- src/i18n/locales/hi.ts | 3 ++- src/i18n/locales/hu.ts | 3 ++- src/i18n/locales/it.ts | 3 ++- src/i18n/locales/ja.ts | 3 ++- src/i18n/locales/ko.ts | 3 ++- src/i18n/locales/pl.ts | 3 ++- src/i18n/locales/pt-BR.ts | 3 ++- src/i18n/locales/pt-PT.ts | 3 ++- src/i18n/locales/ru.ts | 3 ++- src/i18n/locales/th.ts | 3 ++- src/i18n/locales/zh-TW.ts | 3 ++- src/i18n/locales/zh.ts | 3 ++- 21 files changed, 52 insertions(+), 22 deletions(-) rename AGENTS.md => CLAUDE.md (98%) diff --git a/.gitignore b/.gitignore index e89fec0..2ffa8ff 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ dev-dist *.sw? .vercel + +.claude/ diff --git a/AGENTS.md b/CLAUDE.md similarity index 98% rename from AGENTS.md rename to CLAUDE.md index 8837f3e..d8d47b7 100644 --- a/AGENTS.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# AGENTS.md +# CLAUDE.md This document is designed to help AI Agents better understand and modify the Jumble project. @@ -69,8 +69,6 @@ jumble/ ### Environment Setup -### Environment Setup - ```bash # Install dependencies npm install @@ -147,7 +145,11 @@ And some Providers are placed in `PageManager.tsx` because they need to use the ### Internationalization (i18n) -Jumble is a multi-language application. When you add new text content, please ensure to add translations for all supported languages as much as possible. Append new translations to the end of each translation file without modifying or removing existing keys. +Jumble is a multi-language application. When you add new text content, please ensure to add translations for all supported languages as much as possible. + +**IMPORTANT: New translation keys must be appended to the end of each locale file (`src/i18n/locales/*.ts`). Never insert new keys in the middle of the file.** + +Do not modify or remove existing keys. At the trial stage, you can skip translation first. After the feature is completed and confirmed satisfactory, you can add translation content later. diff --git a/src/components/NoteOptions/useMenuActions.tsx b/src/components/NoteOptions/useMenuActions.tsx index 10bf429..f2f44c3 100644 --- a/src/components/NoteOptions/useMenuActions.tsx +++ b/src/components/NoteOptions/useMenuActions.tsx @@ -187,6 +187,14 @@ export function useMenuActions({ closeDrawer() } }, + { + icon: Copy, + label: t('Copy note content'), + onClick: () => { + navigator.clipboard.writeText(event.content) + closeDrawer() + } + }, { icon: Code, label: t('View raw event'), diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index d3f50a4..d3af665 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -666,6 +666,7 @@ export default { 'Default trust score filter threshold ({{n}}%)': 'عتبة مرشح درجة الثقة الافتراضية ({{n}}%)', 'No notes found': 'لم يتم العثور على ملاحظات', 'Try again later or check your connection': 'حاول مرة أخرى لاحقًا أو تحقق من اتصالك', - 'Hide indirect': 'إخفاء غير المباشرة' + 'Hide indirect': 'إخفاء غير المباشرة', + 'Copy note content': 'نسخ محتوى الملاحظة' } } diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 22bc1c7..d8df8a4 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -690,6 +690,7 @@ export default { 'No notes found': 'Keine Notizen gefunden', 'Try again later or check your connection': 'Versuchen Sie es später erneut oder überprüfen Sie Ihre Verbindung', - 'Hide indirect': 'Indirekte ausblenden' + 'Hide indirect': 'Indirekte ausblenden', + 'Copy note content': 'Notizinhalt kopieren' } } diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 4777610..ff0abb8 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -672,6 +672,7 @@ export default { 'Default trust score filter threshold ({{n}}%)', 'No notes found': 'No notes found', 'Try again later or check your connection': 'Try again later or check your connection', - 'Hide indirect': 'Hide indirect' + 'Hide indirect': 'Hide indirect', + 'Copy note content': 'Copy note content' } } diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 91be964..72f27f3 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -683,6 +683,7 @@ export default { 'Umbral predeterminado del filtro de puntuación de confianza ({{n}}%)', 'No notes found': 'No se encontraron notas', 'Try again later or check your connection': 'Inténtalo más tarde o verifica tu conexión', - 'Hide indirect': 'Ocultar indirectas' + 'Hide indirect': 'Ocultar indirectas', + 'Copy note content': 'Copiar contenido de la nota' } } diff --git a/src/i18n/locales/fa.ts b/src/i18n/locales/fa.ts index cb96fa0..e3de57a 100644 --- a/src/i18n/locales/fa.ts +++ b/src/i18n/locales/fa.ts @@ -678,6 +678,7 @@ export default { 'No notes found': 'یادداشتی یافت نشد', 'Try again later or check your connection': 'بعداً دوباره امتحان کنید یا اتصال خود را بررسی کنید', - 'Hide indirect': 'پنهان کردن غیرمستقیم' + 'Hide indirect': 'پنهان کردن غیرمستقیم', + 'Copy note content': 'کپی محتوای یادداشت' } } diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index f018c3a..3e14bf5 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -687,6 +687,7 @@ export default { 'Seuil par défaut du filtre de score de confiance ({{n}}%)', 'No notes found': 'Aucune note trouvée', 'Try again later or check your connection': 'Réessayez plus tard ou vérifiez votre connexion', - 'Hide indirect': 'Masquer indirects' + 'Hide indirect': 'Masquer indirects', + 'Copy note content': 'Copier le contenu de la note' } } diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts index 7531958..7fcf690 100644 --- a/src/i18n/locales/hi.ts +++ b/src/i18n/locales/hi.ts @@ -678,6 +678,7 @@ export default { 'Default trust score filter threshold ({{n}}%)': 'डिफ़ॉल्ट विश्वास स्कोर फ़िल्टर सीमा ({{n}}%)', 'No notes found': 'कोई नोट्स नहीं मिले', 'Try again later or check your connection': 'बाद में पुनः प्रयास करें या अपना कनेक्शन जाँचें', - 'Hide indirect': 'अप्रत्यक्ष छुपाएं' + 'Hide indirect': 'अप्रत्यक्ष छुपाएं', + 'Copy note content': 'नोट सामग्री कॉपी करें' } } diff --git a/src/i18n/locales/hu.ts b/src/i18n/locales/hu.ts index 0153a1f..ed7ce09 100644 --- a/src/i18n/locales/hu.ts +++ b/src/i18n/locales/hu.ts @@ -672,6 +672,7 @@ export default { 'Alapértelmezett bizalmi pontszám szűrő küszöbérték ({{n}}%)', 'No notes found': 'Nem található jegyzet', 'Try again later or check your connection': 'Próbáld újra később vagy ellenőrizd a kapcsolatot', - 'Hide indirect': 'Közvetettek elrejtése' + 'Hide indirect': 'Közvetettek elrejtése', + 'Copy note content': 'Jegyzet tartalmának másolása' } } diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts index bec7d84..3cbca05 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -683,6 +683,7 @@ export default { 'Soglia predefinita del filtro del punteggio di fiducia ({{n}}%)', 'No notes found': 'Nessuna nota trovata', 'Try again later or check your connection': 'Riprova più tardi o controlla la connessione', - 'Hide indirect': 'Nascondi indirette' + 'Hide indirect': 'Nascondi indirette', + 'Copy note content': 'Copia contenuto della nota' } } diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index 750ac80..98427cf 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -678,6 +678,7 @@ export default { 'No notes found': 'ノートが見つかりません', 'Try again later or check your connection': '後でもう一度お試しいただくか、接続を確認してください', - 'Hide indirect': '間接通知を非表示' + 'Hide indirect': '間接通知を非表示', + 'Copy note content': 'ノート内容をコピー' } } diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts index ea9eec2..7744c02 100644 --- a/src/i18n/locales/ko.ts +++ b/src/i18n/locales/ko.ts @@ -672,6 +672,7 @@ export default { 'Default trust score filter threshold ({{n}}%)': '기본 신뢰 점수 필터 임계값 ({{n}}%)', 'No notes found': '노트를 찾을 수 없습니다', 'Try again later or check your connection': '나중에 다시 시도하거나 연결을 확인하세요', - 'Hide indirect': '간접 숨기기' + 'Hide indirect': '간접 숨기기', + 'Copy note content': '노트 내용 복사' } } diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index d89b59e..315493c 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -684,6 +684,7 @@ export default { 'Domyślny próg filtra wyniku zaufania ({{n}}%)', 'No notes found': 'Nie znaleziono notatek', 'Try again later or check your connection': 'Spróbuj ponownie później lub sprawdź połączenie', - 'Hide indirect': 'Ukryj pośrednie' + 'Hide indirect': 'Ukryj pośrednie', + 'Copy note content': 'Kopiuj treść notatki' } } diff --git a/src/i18n/locales/pt-BR.ts b/src/i18n/locales/pt-BR.ts index 3c134f6..b21762e 100644 --- a/src/i18n/locales/pt-BR.ts +++ b/src/i18n/locales/pt-BR.ts @@ -681,6 +681,7 @@ export default { 'No notes found': 'Nenhuma nota encontrada', 'Try again later or check your connection': 'Tente novamente mais tarde ou verifique sua conexão', - 'Hide indirect': 'Ocultar indiretas' + 'Hide indirect': 'Ocultar indiretas', + 'Copy note content': 'Copiar conteúdo da nota' } } diff --git a/src/i18n/locales/pt-PT.ts b/src/i18n/locales/pt-PT.ts index 349e80a..6afc003 100644 --- a/src/i18n/locales/pt-PT.ts +++ b/src/i18n/locales/pt-PT.ts @@ -684,6 +684,7 @@ export default { 'No notes found': 'Nenhuma nota encontrada', 'Try again later or check your connection': 'Tente novamente mais tarde ou verifique a sua ligação', - 'Hide indirect': 'Ocultar indiretas' + 'Hide indirect': 'Ocultar indiretas', + 'Copy note content': 'Copiar conteúdo da nota' } } diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 925c74b..d1911f9 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -683,6 +683,7 @@ export default { 'Порог фильтра рейтинга доверия по умолчанию ({{n}}%)', 'No notes found': 'Заметки не найдены', 'Try again later or check your connection': 'Попробуйте позже или проверьте подключение', - 'Hide indirect': 'Скрыть косвенные' + 'Hide indirect': 'Скрыть косвенные', + 'Copy note content': 'Скопировать содержимое заметки' } } diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts index 2fdadd1..3bdf76f 100644 --- a/src/i18n/locales/th.ts +++ b/src/i18n/locales/th.ts @@ -668,6 +668,7 @@ export default { 'เกณฑ์ตัวกรองคะแนนความไว้วางใจเริ่มต้น ({{n}}%)', 'No notes found': 'ไม่พบโน้ต', 'Try again later or check your connection': 'ลองใหม่ภายหลังหรือตรวจสอบการเชื่อมต่อของคุณ', - 'Hide indirect': 'ซ่อนทางอ้อม' + 'Hide indirect': 'ซ่อนทางอ้อม', + 'Copy note content': 'คัดลอกเนื้อหาโน้ต' } } diff --git a/src/i18n/locales/zh-TW.ts b/src/i18n/locales/zh-TW.ts index 956616d..813c699 100644 --- a/src/i18n/locales/zh-TW.ts +++ b/src/i18n/locales/zh-TW.ts @@ -650,6 +650,7 @@ export default { 'Default trust score filter threshold ({{n}}%)': '預設信任分數過濾閾值 ({{n}}%)', 'No notes found': '沒有找到筆記', 'Try again later or check your connection': '請稍後重試或檢查網路連接', - 'Hide indirect': '隱藏間接通知' + 'Hide indirect': '隱藏間接通知', + 'Copy note content': '複製筆記內容' } } diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index b625ff8..fc4ab94 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -655,6 +655,7 @@ export default { 'Default trust score filter threshold ({{n}}%)': '默认信任分数过滤阈值 ({{n}}%)', 'No notes found': '没有找到笔记', 'Try again later or check your connection': '请稍后重试或检查网络连接', - 'Hide indirect': '隐藏间接通知' + 'Hide indirect': '隐藏间接通知', + 'Copy note content': '复制笔记内容' } }