Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
add translation for bulk action of labels
Nriver738684c4c728
diff --git a/src/public/app/widgets/bulk_actions/label/add_label.js b/src/public/app/widgets/bulk_actions/label/add_label.jsindex 8e120e0ceb..83782038a3 100644--- a/src/public/app/widgets/bulk_actions/label/add_label.js+++ b/src/public/app/widgets/bulk_actions/label/add_label.js@@ -1,3 +1,4 @@+import { t } from "../../../services/i18n.js";import SpacedUpdate from "../../../services/spaced_update.js";import AbstractBulkAction from "../abstract_bulk_action.js";@@ -5,31 +6,31 @@ const TPL = `<tr><td colspan="2"><div style="display: flex; align-items: center">- <div style="margin-right: 10px;" class="text-nowrap">Add label</div>+ <div style="margin-right: 10px;" class="text-nowrap">${t("add_label.add_label")}</div><input type="text"class="form-control label-name"- placeholder="label name"+ placeholder="${t("add_label.label_name_placeholder")}"pattern="[\\p{L}\\p{N}_:]+"- title="Alphanumeric characters, underscore and colon are allowed characters."/>+ title="${t("add_label.label_name_title")}"/>- <div style="margin-right: 10px; margin-left: 10px;" class="text-nowrap">to value</div>+ <div style="margin-right: 10px; margin-left: 10px;" class="text-nowrap">${t("add_label.to_value")}</div>- <input type="text" class="form-control label-value" placeholder="new value"/>+ <input type="text" class="form-control label-value" placeholder="${t("add_label.new_value_placeholder")}"/></div></td><td class="button-column"><div class="dropdown help-dropdown"><span class="bx bx-help-circle icon-action" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></span><div class="dropdown-menu dropdown-menu-right p-4">- <p>On all matched notes:</p>+ <p>${t("add_label.help_text")}</p><ul>- <li>create given label if note doesn't have one yet</li>- <li>or change value of the existing label</li>+ <li>${t("add_label.help_text_item1")}</li>+ <li>${t("add_label.help_text_item2")}</li></ul>- <p>You can also call this method without value, in such case label will be assigned to the note without value.</p>+ <p>${t("add_label.help_text_note")}</p></div></div>diff --git a/src/public/app/widgets/bulk_actions/label/delete_label.js b/src/public/app/widgets/bulk_actions/label/delete_label.jsindex 76490ca56f..003d1db945 100644--- a/src/public/app/widgets/bulk_actions/label/delete_label.js+++ b/src/public/app/widgets/bulk_actions/label/delete_label.js@@ -1,17 +1,18 @@+import { t } from "../../../services/i18n.js";import SpacedUpdate from "../../../services/spaced_update.js";import AbstractBulkAction from "../abstract_bulk_action.js";const TPL = `<tr><td>- Delete label:+ ${t("delete_label.delete_label")}</td><td><input type="text"class="form-control label-name"pattern="[\\p{L}\\p{N}_:]+"- title="Alphanumeric characters, underscore and colon are allowed characters."- placeholder="label name"/>+ title="${t("delete_label.label_name_title")}"+ placeholder="${t("delete_label.label_name_placeholder")}"/></td><td class="button-column"><span class="bx bx-x icon-action action-conf-del"></span>diff --git a/src/public/app/widgets/bulk_actions/label/rename_label.js b/src/public/app/widgets/bulk_actions/label/rename_label.jsindex ec66dede05..7b5304e1f2 100644--- a/src/public/app/widgets/bulk_actions/label/rename_label.js+++ b/src/public/app/widgets/bulk_actions/label/rename_label.js@@ -1,3 +1,4 @@+import { t } from "../../../services/i18n.js";import SpacedUpdate from "../../../services/spaced_update.js";import AbstractBulkAction from "../abstract_bulk_action.js";@@ -5,21 +6,21 @@ const TPL = `<tr><td colspan="2"><div style="display: flex; align-items: center">- <div style="margin-right: 10px; flex-shrink: 0;">Rename label from:</div>+ <div style="margin-right: 10px; flex-shrink: 0;">${t("rename_label.rename_label_from")}</div><input type="text"class="form-control old-label-name"- placeholder="old name"+ placeholder="${t("rename_label.old_name_placeholder")}"pattern="[\\p{L}\\p{N}_:]+"- title="Alphanumeric characters, underscore and colon are allowed characters."/>+ title="${t("rename_label.name_title")}"/>- <div style="margin-right: 10px; margin-left: 10px;">To:</div>+ <div style="margin-right: 10px; margin-left: 10px;">${t("rename_label.to")}</div><input type="text"class="form-control new-label-name"- placeholder="new name"+ placeholder="${t("rename_label.new_name_placeholder")}"pattern="[\\p{L}\\p{N}_:]+"- title="Alphanumeric characters, underscore and colon are allowed characters."/>+ title="${t("rename_label.name_title")}"/></div></td><td class="button-column">diff --git a/src/public/app/widgets/bulk_actions/label/update_label_value.js b/src/public/app/widgets/bulk_actions/label/update_label_value.jsindex 3a0829fff5..0f65fbeb86 100644--- a/src/public/app/widgets/bulk_actions/label/update_label_value.js+++ b/src/public/app/widgets/bulk_actions/label/update_label_value.js@@ -1,3 +1,4 @@+import { t } from "../../../services/i18n.js";import SpacedUpdate from "../../../services/spaced_update.js";import AbstractBulkAction from "../abstract_bulk_action.js";@@ -5,26 +6,26 @@ const TPL = `<tr><td colspan="2"><div style="display: flex; align-items: center">- <div style="margin-right: 10px;" class="text-nowrap">Update label value</div>+ <div style="margin-right: 10px;" class="text-nowrap">${t("update_label_value.update_label_value")}</div><input type="text"class="form-control label-name"- placeholder="label name"+ placeholder="${t("update_label_value.label_name_placeholder")}"pattern="[\\p{L}\\p{N}_:]+"- title="Alphanumeric characters, underscore and colon are allowed characters."/>+ title="${t("update_label_value.label_name_title")}"/>- <div style="margin-right: 10px; margin-left: 10px;" class="text-nowrap">to value</div>+ <div style="margin-right: 10px; margin-left: 10px;" class="text-nowrap">${t("update_label_value.to_value")}</div>- <input type="text" class="form-control label-value" placeholder="new value"/>+ <input type="text" class="form-control label-value" placeholder="${t("update_label_value.new_value_placeholder")}"/></div></td><td class="button-column"><div class="dropdown help-dropdown"><span class="bx bx-help-circle icon-action" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></span><div class="dropdown-menu dropdown-menu-right p-4">- <p>On all matched notes, change value of the existing label.</p>+ <p>${t("update_label_value.help_text")}</p>- <p>You can also call this method without value, in such case label will be assigned to the note without value.</p>+ <p>${t("update_label_value.help_text_note")}</p></div></div>diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.jsonindex fec3bb61f2..8b79dd2406 100644--- a/src/public/translations/cn/translation.json+++ b/src/public/translations/cn/translation.json@@ -410,5 +410,37 @@"help_text": "您可以在匹配的笔记上执行简单的脚本。","example_1": "例如,要在笔记标题后附加字符串,请使用以下脚本:","example_2": "更复杂的例子,删除所有匹配的笔记属性:"+ },+ "add_label": {+ "add_label": "添加标签",+ "label_name_placeholder": "标签名称",+ "label_name_title": "允许使用字母、数字、下划线和冒号。",+ "to_value": "值为",+ "new_value_placeholder": "新值",+ "help_text": "在所有匹配的笔记上:",+ "help_text_item1": "如果笔记尚无此标签,则创建给定的标签",+ "help_text_item2": "或更改现有标签的值",+ "help_text_note": "您也可以在不指定值的情况下调用此方法,这种情况下,标签将分配给没有值的笔记。"+ },+ "delete_label": {+ "delete_label": "删除标签",+ "label_name_placeholder": "标签名称",+ "label_name_title": "允许使用字母、数字、下划线和冒号。"+ },+ "rename_label": {+ "rename_label_from": "重命名标签从",+ "old_name_placeholder": "旧名称",+ "to": "改为",+ "new_name_placeholder": "新名称",+ "name_title": "允许使用字母、数字、下划线和冒号。"+ },+ "update_label_value": {+ "update_label_value": "更新标签值",+ "label_name_placeholder": "标签名称",+ "label_name_title": "允许使用字母、数字、下划线和冒号。",+ "to_value": "值为",+ "new_value_placeholder": "新值",+ "help_text": "在所有匹配的笔记上,更改现有标签的值。",+ "help_text_note": "您也可以在不指定值的情况下调用此方法,这种情况下,标签将分配给没有值的笔记。"}}diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex f7a68f5d1a..fab8c82e00 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -410,5 +410,37 @@"help_text": "You can execute simple scripts on the matched notes.","example_1": "For example to append a string to a note's title, use this small script:","example_2": "More complex example would be deleting all matched note's attributes:"+ },+ "add_label": {+ "add_label": "Add label",+ "label_name_placeholder": "label name",+ "label_name_title": "Alphanumeric characters, underscore and colon are allowed characters.",+ "to_value": "to value",+ "new_value_placeholder": "new value",+ "help_text": "On all matched notes:",+ "help_text_item1": "create given label if note doesn't have one yet",+ "help_text_item2": "or change value of the existing label",+ "help_text_note": "You can also call this method without value, in such case label will be assigned to the note without value."+ },+ "delete_label": {+ "delete_label": "Delete label",+ "label_name_placeholder": "label name",+ "label_name_title": "Alphanumeric characters, underscore and colon are allowed characters."+ },+ "rename_label": {+ "rename_label_from": "Rename label from",+ "old_name_placeholder": "old name",+ "to": "To",+ "new_name_placeholder": "new name",+ "name_title": "Alphanumeric characters, underscore and colon are allowed characters."+ },+ "update_label_value": {+ "update_label_value": "Update label value",+ "label_name_placeholder": "label name",+ "label_name_title": "Alphanumeric characters, underscore and colon are allowed characters.",+ "to_value": "to value",+ "new_value_placeholder": "new value",+ "help_text": "On all matched notes, change value of the existing label.",+ "help_text_note": "You can also call this method without value, in such case label will be assigned to the note without value."}}