chore: translation for error msg of validate-existing-file

This commit is contained in:
situ2001
2022-12-13 22:39:57 +08:00
committed by Tienson Qin
parent 73689cc9ef
commit 6999389a6d
2 changed files with 6 additions and 3 deletions

View File

@@ -132,6 +132,7 @@
:file/last-modified-at "Last modified at"
:file/no-data "No data"
:file/format-not-supported "Format .{1} is not supported."
:file/validate-existing-file-error "Page already exists with another file: {1}, current file: {2}. Please keep only one of them and re-index your graph."
:file-rn/re-index "Re-index is strongly recommended after the files are renamed and on other devices after syncing."
:file-rn/need-action "File rename actions are suggested to match the new format. Re-index is required on all devices when the renamed files are synced."
:file-rn/or-select-actions " or individually rename files below, then "
@@ -1584,7 +1585,8 @@
:file/name "文件名"
:file/file "文件:"
:file/last-modified-at "最后更改于"
:file/no-data "没有数据"
:file/no-data "没有数据"
:file/validate-existing-file-error "页面已存在另一个文件: {1}, 当前文件: {2}. 请保留其中一个文件,然后重建当前图谱的索引。"
:file-rn/re-index "重命名文件后,如果其他设备同步了改文件,强烈建议在同步成功后重新建立索引。"
:file-rn/need-action "建议执行文件重命名操作以匹配新格式。当重命名的文件被同步后,请在所有设备上重新建立索引。"
:file-rn/or-select-actions " 或在下面单独重命名这些文件,然后 "

View File

@@ -9,7 +9,8 @@
[logseq.graph-parser :as graph-parser]
[logseq.graph-parser.util :as gp-util]
[logseq.graph-parser.config :as gp-config]
[frontend.fs.capacitor-fs :as capacitor-fs]))
[frontend.fs.capacitor-fs :as capacitor-fs]
[frontend.context.i18n :refer [t]]))
(defn- page-exists-in-another-file
"Conflict of files towards same page"
@@ -23,7 +24,7 @@
[repo-url file-page file-path]
(when-let [current-file (page-exists-in-another-file repo-url file-page file-path)]
(when (not= file-path current-file)
(let [error (str "Page already exists with another file: " current-file ", current file: " file-path ". Please keep only one of them and re-index your graph.")]
(let [error (t :file/validate-existing-file-error current-file file-path)]
(state/pub-event! [:notification/show
{:content error
:status :error