Skip to content

Commit

Permalink
fix: syntax (#232)
Browse files Browse the repository at this point in the history
* fix: syntax
* feat: i18n
  • Loading branch information
lovelyCARDINAL committed Oct 17, 2023
1 parent 77283f2 commit 7b85dec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions public/i18n/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"notify-rename-error": "Some error(s) occurred while moving the page",
"rename-articleexists-title": "Target page exist",
"rename-articleexists": "Page with new page name already exists. The force move function is under development, stay tuned.",
"rename-articleexists-reason": "To move the page [[$1]] here.",
"rename-no-right": "You do NOT have permission to delete the page.",
"preference-title": "InPageEdit preferences",
"preference-editor-label": "Editor settings",
Expand Down Expand Up @@ -1136,6 +1137,7 @@
"notify-rename-error": "重命名时遇到错误",
"rename-articleexists-title": "目标页面已存在",
"rename-articleexists": "以新页面名命名的页面存在内容,强制移动页面的功能正在开发中,敬请期待。",
"rename-articleexists-reason": "将页面[[$1]]移动至此。",
"rename-no-right": "您没有移动页面(move)的权限。",
"preference-title": "InPageEdit偏好设置",
"preference-editor-label": "编辑器设置",
Expand Down Expand Up @@ -1302,6 +1304,7 @@
"notify-rename-error": "移動時遇到錯誤",
"rename-articleexists-title": "目標頁面已存在",
"rename-articleexists": "以新頁面名命名的頁面存在內容,強制移動頁面的功能正在開發中,敬請期待。",
"rename-articleexists-reason": "將頁面[[$1]]移動至此。",
"rename-no-right": "您沒有移動頁面的權限。",
"preference-title": "InPageEdit偏好設定",
"preference-editor-label": "編輯器設定",
Expand Down
4 changes: 3 additions & 1 deletion src/module/quickRename.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ export function quickRename(from, to) {
})
// 如果原因是页面已存在,给出解决方案
if (errorThrown.error.code === 'articleexists') {
_resolveExists(to, 'For move page [[' + from + ']] to here.')
_resolveExists(to,
_msg('rename-articleexists-reason', from)
)
}
})
},
Expand Down

0 comments on commit 7b85dec

Please sign in to comment.