Skip to content

Commit

Permalink
add translation for the last ribbon widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Nriver committed Aug 6, 2024
1 parent 74c4634 commit 9453ec4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/public/app/widgets/ribbon_widgets/similar_notes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { t } from "../../services/i18n.js";
import linkService from "../../services/link.js";
import server from "../../services/server.js";
import froca from "../../services/froca.js";
Expand Down Expand Up @@ -48,7 +49,7 @@ export default class SimilarNotesWidget extends NoteContextAwareWidget {
getTitle() {
return {
show: this.isEnabled(),
title: 'Similar Notes',
title: t('similar_notes.title'),
icon: 'bx bx-bar-chart'
};
}
Expand All @@ -67,7 +68,7 @@ export default class SimilarNotesWidget extends NoteContextAwareWidget {
const similarNotes = await server.get(`similar-notes/${this.noteId}`);

if (similarNotes.length === 0) {
this.$similarNotesWrapper.empty().append("No similar notes found.");
this.$similarNotesWrapper.empty().append(t('similar_notes.no_similar_notes_found'));

return;
}
Expand Down
4 changes: 4 additions & 0 deletions src/public/translations/cn/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -776,5 +776,9 @@
"unknown_search_option": "未知的搜索选项 {{searchOptionName}}",
"search_note_saved": "搜索笔记已保存到 {{- notePathTitle}}",
"actions_executed": "操作已执行。"
},
"similar_notes": {
"title": "相似笔记",
"no_similar_notes_found": "未找到相似的笔记。"
}
}
4 changes: 4 additions & 0 deletions src/public/translations/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -777,5 +777,9 @@
"unknown_search_option": "Unknown search option {{searchOptionName}}",
"search_note_saved": "Search note has been saved into {{- notePathTitle}}",
"actions_executed": "Actions have been executed."
},
"similar_notes": {
"title": "Similar Notes",
"no_similar_notes_found": "No similar notes found."
}
}

0 comments on commit 9453ec4

Please sign in to comment.