mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
i18n: make duplicate notes suffix translatable
This commit is contained in:
parent
62696a4e0a
commit
256853a6f8
@ -923,8 +923,10 @@ function duplicateSubtree(origNoteId: string, newParentNoteId: string) {
|
||||
|
||||
const res = duplicateSubtreeInner(origNote, origBranch, newParentNoteId, noteIdMapping);
|
||||
|
||||
if (!res.note.title.endsWith('(dup)')) {
|
||||
res.note.title += " (dup)";
|
||||
const duplicateNoteSuffix = t("notes.duplicate-note-suffix");
|
||||
|
||||
if (!res.note.title.endsWith(duplicateNoteSuffix) && !res.note.title.startsWith(duplicateNoteSuffix)) {
|
||||
res.note.title = t("notes.duplicate-note-title", { noteTitle: res.note.title, duplicateNoteSuffix: duplicateNoteSuffix });
|
||||
}
|
||||
|
||||
res.note.save();
|
||||
|
@ -242,6 +242,8 @@
|
||||
"visible-launchers-title": "Visible Launchers"
|
||||
},
|
||||
"notes": {
|
||||
"new-note": "New note"
|
||||
"new-note": "New note",
|
||||
"duplicate-note-suffix": "(dup)",
|
||||
"duplicate-note-title": "{{ noteTitle }} {{ duplicateNoteSuffix }}"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user