From 06a3b2777abd6da1044f9f05bf53a177e1f35b15 Mon Sep 17 00:00:00 2001 From: blinko Date: Mon, 16 Dec 2024 16:26:22 +0800 Subject: [PATCH] fix: update translations and enhance editor functionality - Refined the "paste-to-note-or-attachment" prompt across multiple language translation files for clarity and conciseness. - Added a new "attachment" string to various language files to improve localization support. - Updated the EditorStore component to reflect the new translation strings, enhancing user interaction. These changes aim to improve the user experience and maintainability of the application. --- public/locales/ar/translation.json | 3 ++- public/locales/de/translation.json | 3 ++- public/locales/en/translation.json | 5 +++-- public/locales/es/translation.json | 3 ++- public/locales/fr/translation.json | 3 ++- public/locales/ja/translation.json | 3 ++- public/locales/ko/translation.json | 3 ++- public/locales/pt/translation.json | 3 ++- public/locales/ru/translation.json | 3 ++- public/locales/tr/translation.json | 3 ++- public/locales/zh-TW/translation.json | 3 ++- public/locales/zh/translation.json | 5 +++-- src/components/Common/Editor/editorStore.tsx | 4 ++-- 13 files changed, 28 insertions(+), 16 deletions(-) diff --git a/public/locales/ar/translation.json b/public/locales/ar/translation.json index aac9501..8de0437 100644 --- a/public/locales/ar/translation.json +++ b/public/locales/ar/translation.json @@ -343,5 +343,6 @@ "search-tags": "البحث عن العلامات", "insert-attachment-or-note": "الإرفاق بملف أو المذكرة؟", "context": "السياق", - "paste-to-note-or-attachment": "هل أنت متأكد من لصقه في السياق أو المرفق؟ اختر تأكيد للرفع إلى المرفقات أو رفعه إلى السياق" + "paste-to-note-or-attachment": "هل أنت متأكد من لصق النص في السياق أو المرفق؟", + "attachment": "المرفق" } diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index 4b3d1fa..a7b46a8 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -330,5 +330,6 @@ "search-tags": "Suchbegriffe", "insert-attachment-or-note": "In Anhang oder Notiz einfügen?", "context": "Kontext", - "paste-to-note-or-attachment": "Bist du sicher, dass du den Text in den Kontext oder als Anhang einfügen willst? Wähle \"Bestätigen\", um als Anhang hochzuladen, oder \"Hochladen\", um in den Kontext einzufügen." + "paste-to-note-or-attachment": "Sind Sie sicher, dass Sie in den Kontext oder als Anhang einfügen möchten?", + "attachment": "Anhang" } diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 239f6de..8e87dcd 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -340,6 +340,7 @@ "wysiwyg": "WYSIWYG", "search-tags": "Search Tags", "insert-attachment-or-note": "Insert to attachment or note?", - "paste-to-note-or-attachment": "Are you sure to paste to context or attachment? Choose Confirm to upload to attachement or upload to context", - "context": "Context" + "paste-to-note-or-attachment": "Are you sure to paste to context or attachment? ", + "context": "Context", + "attachment": "Attachment" } diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 4a75e37..18131fc 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -321,5 +321,6 @@ "search-tags": "Buscar etiquetas", "insert-attachment-or-note": "¿Insertar en el archivo adjunto o en la nota?", "context": "Contexto", - "paste-to-note-or-attachment": "¿Estás seguro de pegar en el contexto o en el archivo adjunto? Elige Confirmar para subir al archivo adjunto o subir al contexto." + "paste-to-note-or-attachment": "¿Estás seguro de pegar en el contexto o adjuntar?", + "attachment": "Adjunto" } diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 52cae6d..9bae94d 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -318,5 +318,6 @@ "search-tags": "Balises de recherche", "insert-attachment-or-note": "Insérer dans la pièce jointe ou la note ?", "context": "Contexte", - "paste-to-note-or-attachment": "Êtes-vous sûr de coller dans le contexte ou en pièce jointe ? Choisissez Confirmer pour télécharger en pièce jointe ou télécharger dans le contexte" + "paste-to-note-or-attachment": "Êtes-vous sûr de coller dans le contexte ou en pièce jointe ?", + "attachment": "Pièce jointe" } diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index 8799d6c..53f7d57 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -303,5 +303,6 @@ "search-tags": "検索タグ", "insert-attachment-or-note": "添付ファイルに挿入しますか、それともメモに書き込みますか?", "context": "コンテクスト", - "paste-to-note-or-attachment": "コンテキストまたは添付ファイルに貼り付けることを確認しますか?アップロードして添付ファイルに保存する場合は「確認」を選択し、コンテキストにアップロードする場合は「アップロード」を選択してください。" + "paste-to-note-or-attachment": "コンテキストや添付ファイルに貼り付けることを確認しますか?", + "attachment": "添付" } diff --git a/public/locales/ko/translation.json b/public/locales/ko/translation.json index 1acfce9..0bc94a1 100644 --- a/public/locales/ko/translation.json +++ b/public/locales/ko/translation.json @@ -325,5 +325,6 @@ "search-tags": "검색 태그", "insert-attachment-or-note": "첨부 파일이나 메모로 삽입하시겠습니까?", "context": "문맥", - "paste-to-note-or-attachment": "컨텍스트 또는 첨부에 붙여 넣으시겠습니까? 첨부할 내용을 확인하려면 확인을 선택하거나 컨텍스트에 업로드하려면 업로드를 선택하세요." + "paste-to-note-or-attachment": "컨텍스트나 첨부 파일에 붙여 넣을 확신이 있습니까?", + "attachment": "첨부 파일" } diff --git a/public/locales/pt/translation.json b/public/locales/pt/translation.json index 2b3416d..d5788cc 100644 --- a/public/locales/pt/translation.json +++ b/public/locales/pt/translation.json @@ -253,5 +253,6 @@ "search-tags": "Tags de pesquisa", "insert-attachment-or-note": "Inserir em anexo ou nota?", "context": "Contexto", - "paste-to-note-or-attachment": "Você tem certeza de colar no contexto ou anexo? Escolha Confirmar para fazer upload como anexo ou fazer upload como contexto." + "paste-to-note-or-attachment": "Tem certeza de que deseja colar no contexto ou no anexo?", + "attachment": "Anexo" } diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 1656a01..e8205df 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -258,5 +258,6 @@ "search-tags": "Поиск тегов", "insert-attachment-or-note": "Вставить во вложение или заметку?", "context": "Контекст", - "paste-to-note-or-attachment": "Вы уверены, что хотите вставить в контекст или прикрепить к сообщению? Выберите \"Подтвердить\", чтобы загрузить файл как прикрепление или загрузите его в контекст." + "paste-to-note-or-attachment": "Вы уверены, что хотите вставить в контекст или прикрепление?", + "attachment": "Прикрепление" } diff --git a/public/locales/tr/translation.json b/public/locales/tr/translation.json index c01ee87..d6141f2 100644 --- a/public/locales/tr/translation.json +++ b/public/locales/tr/translation.json @@ -271,5 +271,6 @@ "search-tags": "Arama Etiketleri", "insert-attachment-or-note": "Eklentiye mi yoksa notlara mı ekleyeceksiniz?", "context": "Bağlam", - "paste-to-note-or-attachment": "Metni veya ekine yapıştırmak istediğinizden emin misiniz? Eklemeye yüklemek için Onayla'yı seçin ya da metne yükleyin" + "paste-to-note-or-attachment": "Metin veya ek dosyaya yapıştırmak istediğinizden emin misiniz?", + "attachment": "Eklenti" } diff --git a/public/locales/zh-TW/translation.json b/public/locales/zh-TW/translation.json index 7bce59c..e74d598 100644 --- a/public/locales/zh-TW/translation.json +++ b/public/locales/zh-TW/translation.json @@ -355,5 +355,6 @@ "search-tags": "搜尋標籤", "insert-attachment-or-note": "插入至附件或備註?", "context": "正文", - "paste-to-note-or-attachment": "你確定要貼到內文或附件嗎?請選擇「確認」以上傳至附件,或是上傳至內文。" + "paste-to-note-or-attachment": "您確定要貼上到內容或附件嗎?", + "attachment": "附件" } diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index 3d8ba6a..e5dc47b 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -354,6 +354,7 @@ "wysiwyg": "所见即所得", "search-tags": "搜索标签", "insert-attachment-or-note": "插入附件还是笔记中?", - "paste-to-note-or-attachment": "您确定要粘贴到上下文或附件吗?选择确认以上传至附件或上传至上下文。", - "context": "正文" + "paste-to-note-or-attachment": "您确定要粘贴到上下文或附件吗?", + "context": "正文", + "attachment": "附件" } diff --git a/src/components/Common/Editor/editorStore.tsx b/src/components/Common/Editor/editorStore.tsx index af8d1db..d1a5dce 100644 --- a/src/components/Common/Editor/editorStore.tsx +++ b/src/components/Common/Editor/editorStore.tsx @@ -157,7 +157,7 @@ export class EditorStore { title: i18n.t('insert-attachment-or-note'), content: i18n.t('paste-to-note-or-attachment'), buttonSlot: <> - + }}>{i18n.t('attachment')} }) }