chore: add placeholder to comment editor

This commit is contained in:
Steven 2024-04-09 20:01:19 +08:00
parent 8356ebc46b
commit bbdd40b2b0
24 changed files with 26 additions and 26 deletions

View File

@ -31,6 +31,7 @@ import { MemoEditorContext } from "./types";
interface Props {
className?: string;
cacheKey?: string;
placeholder?: string;
memoName?: string;
parentMemoName?: string;
relationList?: MemoRelation[];
@ -374,7 +375,7 @@ const MemoEditor = (props: Props) => {
() => ({
className: "",
initialContent: "",
placeholder: t("editor.placeholder"),
placeholder: props.placeholder ?? t("editor.any-thoughts"),
onContentChange: handleContentChange,
onPaste: handlePasteEvent,
}),

View File

@ -69,7 +69,7 @@
"cancel-edit": "إلغاء التعديل",
"editing": "تعديل...",
"local": "محلي",
"placeholder": "أية أفكار...",
"any-thoughts": "أية أفكار...",
"save": "حفظ"
},
"memo": {

View File

@ -88,7 +88,7 @@
"cancel-edit": "Bearbeiten abbrechen",
"editing": "in Bearbeitung...",
"local": "Lokal",
"placeholder": "Ein Gedanke...",
"any-thoughts": "Ein Gedanke...",
"save": "Speichern"
},
"embed-memo": {

View File

@ -79,11 +79,9 @@
"repeat-new-password": "Repeat the new password"
},
"editor": {
"editing": "Editing...",
"cancel-edit": "Cancel edit",
"save": "Save",
"placeholder": "Any thoughts...",
"local": "Local"
"any-thoughts": "Any thoughts...",
"add-your-comment-here": "Add your comment here..."
},
"memo": {
"view-detail": "View Detail",

View File

@ -92,7 +92,7 @@
"cancel-edit": "Cancelar edición",
"editing": "Editando...",
"local": "Local",
"placeholder": "Alguna idea...",
"any-thoughts": "Alguna idea...",
"save": "Guardar"
},
"embed-memo": {

View File

@ -96,7 +96,7 @@
"cancel-edit": "Annuler l'édition",
"editing": "Édition...",
"local": "Local",
"placeholder": "Une idée...",
"any-thoughts": "Une idée...",
"save": "Enregistrer"
},
"embed-memo": {

View File

@ -84,7 +84,7 @@
"cancel-edit": "संपादन रद्द करें",
"editing": "संपादन कर रहे हैं...",
"local": "स्थानीय",
"placeholder": "कोई विचार...",
"any-thoughts": "कोई विचार...",
"save": "सहेजें"
},
"embed-memo": {

View File

@ -88,7 +88,7 @@
"cancel-edit": "Otkaži uređivanje",
"editing": "Uređivanje...",
"local": "Lokalno",
"placeholder": "Piši... piši mi...",
"any-thoughts": "Piši... piši mi...",
"save": "Sačuvaj"
},
"embed-memo": {

View File

@ -70,7 +70,7 @@
"cancel-edit": "Szerkesztés visszavonása",
"editing": "Szerkesztés...",
"local": "Helyi",
"placeholder": "Bármi ami a fejedben jár...",
"any-thoughts": "Bármi ami a fejedben jár...",
"save": "Mentés"
},
"memo": {

View File

@ -86,7 +86,7 @@
"cancel-edit": "Cancella modifica",
"editing": "Modificando...",
"local": "Locale",
"placeholder": "Qualsiasi cosa pensi...",
"any-thoughts": "Qualsiasi cosa pensi...",
"save": "Salva"
},
"embed-memo": {

View File

@ -93,7 +93,7 @@
"cancel-edit": "作成をキャンセルする",
"editing": "作成中",
"local": "ローカル",
"placeholder": "今思ったことは...",
"any-thoughts": "今思ったことは...",
"save": "保存"
},
"embed-memo": {

View File

@ -91,7 +91,7 @@
"cancel-edit": "편집 취소",
"editing": "편집 중...",
"local": "로컬",
"placeholder": "떠오르는 게 있나요...",
"any-thoughts": "떠오르는 게 있나요...",
"save": "저장"
},
"embed-memo": {

View File

@ -88,7 +88,7 @@
"cancel-edit": "Annuleer bewerking",
"editing": "Aan het bewerken...",
"local": "Lokaal",
"placeholder": "Leeg je gedachten...",
"any-thoughts": "Leeg je gedachten...",
"save": "Opslaan"
},
"embed-memo": {

View File

@ -80,7 +80,7 @@
"cancel-edit": "Anuluj edycję",
"editing": "Edytowanie...",
"local": "Lokalne",
"placeholder": "Jakieś przemyślenia...",
"any-thoughts": "Jakieś przemyślenia...",
"save": "Zapisz"
},
"memo": {

View File

@ -96,7 +96,7 @@
"cancel-edit": "Cancelar edição",
"editing": "Editando…",
"local": "Local",
"placeholder": "Alguma ideia…",
"any-thoughts": "Alguma ideia…",
"save": "Salvar"
},
"embed-memo": {

View File

@ -96,7 +96,7 @@
"cancel-edit": "Отменить",
"editing": "Редактирование...",
"local": "На устройстве",
"placeholder": "Ваши мысли...",
"any-thoughts": "Ваши мысли...",
"save": "Сохранить"
},
"embed-memo": {

View File

@ -66,7 +66,7 @@
"cancel-edit": "Prekliči urejanje",
"editing": "Urejanje...",
"local": "Lokalno",
"placeholder": "Kakšne misli...",
"any-thoughts": "Kakšne misli...",
"save": "Shrani"
},
"embed-memo": {

View File

@ -60,7 +60,7 @@
"cancel-edit": "Avbryt redigering",
"editing": "Redigerar...",
"local": "Lokal",
"placeholder": "Några tankar...",
"any-thoughts": "Några tankar...",
"save": "Spara"
},
"memo": {

View File

@ -95,7 +95,7 @@
"cancel-edit": "İptal et",
"editing": "Düzenleniyor...",
"local": "Bilgisayardan",
"placeholder": "Düşünceleriniz...",
"any-thoughts": "Düşünceleriniz...",
"save": "Kaydet"
},
"embed-memo": {

View File

@ -61,7 +61,7 @@
"cancel-edit": "Скасувати",
"editing": "Редагування...",
"local": "З комп'ютера",
"placeholder": "Ваші думки...",
"any-thoughts": "Ваші думки...",
"save": "Зберегти"
},
"memo": {

View File

@ -75,7 +75,7 @@
"cancel-edit": "Hủy chỉnh sửa",
"editing": "Đang chỉnh sửa...",
"local": "Cục bộ",
"placeholder": "Bất kỳ suy nghĩ nào...",
"any-thoughts": "Bất kỳ suy nghĩ nào...",
"save": "Lưu"
},
"memo": {

View File

@ -94,7 +94,7 @@
"cancel-edit": "取消编辑",
"editing": "编辑中...",
"local": "本地",
"placeholder": "此刻的想法...",
"any-thoughts": "此刻的想法...",
"save": "保存"
},
"embed-memo": {

View File

@ -94,7 +94,7 @@
"cancel-edit": "取消編輯",
"editing": "編輯中...",
"local": "本機",
"placeholder": "任何想法...",
"any-thoughts": "任何想法...",
"save": "儲存"
},
"embed-memo": {

View File

@ -118,6 +118,7 @@ const MemoDetail = () => {
<MemoEditor
key={memo.name}
cacheKey={`comment-editor-${memo.name}`}
placeholder={t("editor.add-your-comment-here")}
parentMemoName={memo.name}
onConfirm={handleCommentCreated}
/>