Skip to content

Commit

Permalink
fix: update translations and enhance editor functionality
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
blinko-space committed Dec 16, 2024
1 parent 55156aa commit 06a3b27
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion public/locales/ar/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,5 +343,6 @@
"search-tags": "البحث عن العلامات",
"insert-attachment-or-note": "الإرفاق بملف أو المذكرة؟",
"context": "السياق",
"paste-to-note-or-attachment": "هل أنت متأكد من لصقه في السياق أو المرفق؟ اختر تأكيد للرفع إلى المرفقات أو رفعه إلى السياق"
"paste-to-note-or-attachment": "هل أنت متأكد من لصق النص في السياق أو المرفق؟",
"attachment": "المرفق"
}
3 changes: 2 additions & 1 deletion public/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
5 changes: 3 additions & 2 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion public/locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,5 +303,6 @@
"search-tags": "検索タグ",
"insert-attachment-or-note": "添付ファイルに挿入しますか、それともメモに書き込みますか?",
"context": "コンテクスト",
"paste-to-note-or-attachment": "コンテキストまたは添付ファイルに貼り付けることを確認しますか?アップロードして添付ファイルに保存する場合は「確認」を選択し、コンテキストにアップロードする場合は「アップロード」を選択してください。"
"paste-to-note-or-attachment": "コンテキストや添付ファイルに貼り付けることを確認しますか?",
"attachment": "添付"
}
3 changes: 2 additions & 1 deletion public/locales/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,6 @@
"search-tags": "검색 태그",
"insert-attachment-or-note": "첨부 파일이나 메모로 삽입하시겠습니까?",
"context": "문맥",
"paste-to-note-or-attachment": "컨텍스트 또는 첨부에 붙여 넣으시겠습니까? 첨부할 내용을 확인하려면 확인을 선택하거나 컨텍스트에 업로드하려면 업로드를 선택하세요."
"paste-to-note-or-attachment": "컨텍스트나 첨부 파일에 붙여 넣을 확신이 있습니까?",
"attachment": "첨부 파일"
}
3 changes: 2 additions & 1 deletion public/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion public/locales/ru/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,6 @@
"search-tags": "Поиск тегов",
"insert-attachment-or-note": "Вставить во вложение или заметку?",
"context": "Контекст",
"paste-to-note-or-attachment": "Вы уверены, что хотите вставить в контекст или прикрепить к сообщению? Выберите \"Подтвердить\", чтобы загрузить файл как прикрепление или загрузите его в контекст."
"paste-to-note-or-attachment": "Вы уверены, что хотите вставить в контекст или прикрепление?",
"attachment": "Прикрепление"
}
3 changes: 2 additions & 1 deletion public/locales/tr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion public/locales/zh-TW/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,5 +355,6 @@
"search-tags": "搜尋標籤",
"insert-attachment-or-note": "插入至附件或備註?",
"context": "正文",
"paste-to-note-or-attachment": "你確定要貼到內文或附件嗎?請選擇「確認」以上傳至附件,或是上傳至內文。"
"paste-to-note-or-attachment": "您確定要貼上到內容或附件嗎?",
"attachment": "附件"
}
5 changes: 3 additions & 2 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
"wysiwyg": "所见即所得",
"search-tags": "搜索标签",
"insert-attachment-or-note": "插入附件还是笔记中?",
"paste-to-note-or-attachment": "您确定要粘贴到上下文或附件吗?选择确认以上传至附件或上传至上下文。",
"context": "正文"
"paste-to-note-or-attachment": "您确定要粘贴到上下文或附件吗?",
"context": "正文",
"attachment": "附件"
}
4 changes: 2 additions & 2 deletions src/components/Common/Editor/editorStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class EditorStore {
title: i18n.t('insert-attachment-or-note'),
content: i18n.t('paste-to-note-or-attachment'),
buttonSlot: <>
<Button className="ml-auto" color='default'
<Button variant='flat' className="ml-auto" color='default'
onPress={e => {
if (type.includes('image')) {
this.vditor?.insertValue(`![${fileName}](${filePath})`)
Expand All @@ -183,7 +183,7 @@ export class EditorStore {
await _file.uploadPromise.call()
this.files.push(_file)
RootStore.Get(DialogStandaloneStore).close()
}}>{i18n.t('confrim')}</Button>
}}>{i18n.t('attachment')}</Button>
</>
})
}
Expand Down

0 comments on commit 06a3b27

Please sign in to comment.