浏览代码

Added translations to questions about are you sure.

Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/5745
Lauri Ojansivu 1 月之前
父节点
当前提交
4d145ab4ad
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 4 5
      client/components/boards/boardsList.js
  2. 2 0
      imports/i18n/data/en.i18n.json

+ 4 - 5
client/components/boards/boardsList.js

@@ -239,7 +239,7 @@ BlazeComponent.extendComponent({
           evt.preventDefault();
           evt.preventDefault();
         },
         },
         'click .js-clone-board'(evt) {
         'click .js-clone-board'(evt) {
-          if (confirm('Are you sure you want to clone this board?')) {
+          if (confirm(TAPi18n.__('duplicate-board-confirm')) {
             let title =
             let title =
               getSlug(ReactiveCache.getBoard(this.currentData()._id).title) ||
               getSlug(ReactiveCache.getBoard(this.currentData()._id).title) ||
               'cloned-board';
               'cloned-board';
@@ -268,11 +268,10 @@ BlazeComponent.extendComponent({
           }
           }
         },
         },
         'click .js-archive-board'(evt) {
         'click .js-archive-board'(evt) {
-          if (confirm('Are you sure you want to archive this board?'))
-          {
+          if (confirm(TAPi18n.__('archive-board-confirm')) {
             const boardId = this.currentData()._id;
             const boardId = this.currentData()._id;
-          Meteor.call('archiveBoard', boardId);
-          evt.preventDefault();
+            Meteor.call('archiveBoard', boardId);
+            evt.preventDefault();
           }
           }
         },
         },
         'click .js-accept-invite'() {
         'click .js-accept-invite'() {

+ 2 - 0
imports/i18n/data/en.i18n.json

@@ -125,6 +125,7 @@
   "archive": "Move to Archive",
   "archive": "Move to Archive",
   "archive-all": "Move All to Archive",
   "archive-all": "Move All to Archive",
   "archive-board": "Move Board to Archive",
   "archive-board": "Move Board to Archive",
+  "archive-board-confirm": "Are you sure you want to archive this board?",
   "archive-card": "Move Card to Archive",
   "archive-card": "Move Card to Archive",
   "archive-list": "Move List to Archive",
   "archive-list": "Move List to Archive",
   "archive-swimlane": "Move Swimlane to Archive",
   "archive-swimlane": "Move Swimlane to Archive",
@@ -896,6 +897,7 @@
   "oidc-button-text": "Customize the OIDC button text",
   "oidc-button-text": "Customize the OIDC button text",
   "default-authentication-method": "Default Authentication Method",
   "default-authentication-method": "Default Authentication Method",
   "duplicate-board": "Duplicate Board",
   "duplicate-board": "Duplicate Board",
+  "duplicate-board-confirm": "Are you sure you want to duplicate this board?",
   "org-number": "The number of organizations is: ",
   "org-number": "The number of organizations is: ",
   "team-number": "The number of teams is: ",
   "team-number": "The number of teams is: ",
   "people-number": "The number of people is: ",
   "people-number": "The number of people is: ",