summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramadilsons <joao.amado.95@gmail.com>2017-10-05 17:22:03 +0200
committeramadilsons <joao.amado.95@gmail.com>2017-10-05 17:22:03 +0200
commitf77da76c682ec7ad1b5e141d113d4b74371f46ae (patch)
treeae82531e30e26596ebc988b2abccb5dc687b72fe
parent214fe6a61f60513d3ddfc9eee423c1b932ff8463 (diff)
downloadwekan-f77da76c682ec7ad1b5e141d113d4b74371f46ae.tar.gz
wekan-f77da76c682ec7ad1b5e141d113d4b74371f46ae.tar.bz2
wekan-f77da76c682ec7ad1b5e141d113d4b74371f46ae.zip
added i18n translation, minor fix
-rw-r--r--client/components/lists/listHeader.jade6
-rw-r--r--client/components/lists/listHeader.js4
-rw-r--r--i18n/en-GB.i18n.json3
-rw-r--r--i18n/en.i18n.json3
-rw-r--r--i18n/pt-BR.i18n.json3
-rw-r--r--models/lists.js4
6 files changed, 16 insertions, 7 deletions
diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade
index f0c4e5f1..d5738dd9 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -76,7 +76,7 @@ template(name="setWipLimitPopup")
#js-wip-limit-edit
lable {{_ 'set-wip-limit-value'}}
ul.pop-over-list
- li: a.js-enable-wip-limit Enable WIP Limit
+ li: a.js-enable-wip-limit {{_ 'enable-wip-limit'}}
if isWipLimitEnabled
i.fa.fa-check
if isWipLimitEnabled
@@ -87,6 +87,6 @@ template(name="setWipLimitPopup")
template(name="wipLimitErrorPopup")
.wip-limit-invalid
- p The number of tasks in this list is higher than the WIP limit you've defined.
- p Please move some tasks out of this list, or set a higher WIP limit.
+ p {{_ 'wipLimitErrorPopup-dialog-pt1'}}
+ p {{_ 'wipLimitErrorPopup-dialog-pt2'}}
button.full.js-back-view(type="submit") {{_ 'cancel'}}
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index 361f69cf..9974c788 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -93,10 +93,10 @@ BlazeComponent.extendComponent({
enableWipLimit() {
const list = Template.currentData();
// Prevent user from using previously stored wipLimit.value if it is less than the current number of cards in the list
- if(list.getWipLimit() && !list.wipLimit.enabled && list.wipLimit.value < list.cards().count()){
+ if(list.getWipLimit() && !list.getWipLimit('enabled') && list.getWipLimit('value') < list.cards().count()){
list.setWipLimit(list.cards().count());
}
- Meteor.call('enableWipLimit', Template.currentData()._id);
+ Meteor.call('enableWipLimit', list._id);
},
isWipLimitEnabled() {
diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json
index f49d3d84..9af3ed1c 100644
--- a/i18n/en-GB.i18n.json
+++ b/i18n/en-GB.i18n.json
@@ -186,6 +186,7 @@
"email-sent": "Email sent",
"email-verifyEmail-subject": "Verify your email address on __siteName__",
"email-verifyEmail-text": "Hello __user__,\n\nTo verify your account email, simply click the link below.\n\n__url__\n\nThanks.",
+ "enable-wip-limit": "Enable WIP Limit",
"error-board-doesNotExist": "This board does not exist",
"error-board-notAdmin": "You need to be admin of this board to do that",
"error-board-notAMember": "You need to be a member of this board to do that",
@@ -350,6 +351,8 @@
"welcome-list2": "Advanced",
"what-to-do": "What do you want to do?",
"wipLimitErrorPopup-title": "Invalid WIP Limit",
+ "wipLimitErrorPopup-dialog-pt1": "The number of tasks in this list is higher than the WIP limit you've defined.",
+ "wipLimitErrorPopup-dialog-pt2": "Please move some tasks out of this list, or set a higher WIP limit.",
"admin-panel": "Admin Panel",
"settings": "Settings",
"people": "People",
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index a16a3b3b..19844036 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -186,6 +186,7 @@
"email-sent": "Email sent",
"email-verifyEmail-subject": "Verify your email address on __siteName__",
"email-verifyEmail-text": "Hello __user__,\n\nTo verify your account email, simply click the link below.\n\n__url__\n\nThanks.",
+ "enable-wip-limit": "Enable WIP Limit",
"error-board-doesNotExist": "This board does not exist",
"error-board-notAdmin": "You need to be admin of this board to do that",
"error-board-notAMember": "You need to be a member of this board to do that",
@@ -350,6 +351,8 @@
"welcome-list2": "Advanced",
"what-to-do": "What do you want to do?",
"wipLimitErrorPopup-title": "Invalid WIP Limit",
+ "wipLimitErrorPopup-dialog-pt1": "The number of tasks in this list is higher than the WIP limit you've defined.",
+ "wipLimitErrorPopup-dialog-pt2": "Please move some tasks out of this list, or set a higher WIP limit.",
"admin-panel": "Admin Panel",
"settings": "Settings",
"people": "People",
diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json
index 97927e6d..9a42d404 100644
--- a/i18n/pt-BR.i18n.json
+++ b/i18n/pt-BR.i18n.json
@@ -186,6 +186,7 @@
"email-sent": "Email enviado",
"email-verifyEmail-subject": "Verifique seu endereço de email em __siteName__",
"email-verifyEmail-text": "Olá __user__\nPara verificar sua conta de email, clique no link abaixo.\n__url__\nObrigado.",
+ "enable-wip-limit": "Ativar Limite WIP",
"error-board-doesNotExist": "Este quadro não existe",
"error-board-notAdmin": "Você precisa ser administrador desse quadro para fazer isto",
"error-board-notAMember": "Você precisa ser um membro desse quadro para fazer isto",
@@ -350,6 +351,8 @@
"welcome-list2": "Avançado",
"what-to-do": "O que você gostaria de fazer?",
"wipLimitErrorPopup-title": "Limite WIP Inválido",
+ "wipLimitErrorPopup-dialog-pt1": "O número de tarefas nesta lista excede o limite WIP definido.",
+ "wipLimitErrorPopup-dialog-pt2": "Por favor, mova algumas tarefas para fora desta lista, ou defina um limite WIP mais elevado.",
"admin-panel": "Painel Administrativo",
"settings": "Configurações",
"people": "Pessoas",
diff --git a/models/lists.js b/models/lists.js
index 877b3d83..1b999b07 100644
--- a/models/lists.js
+++ b/models/lists.js
@@ -142,8 +142,8 @@ Meteor.methods({
enableWipLimit(listId) {
check(listId, String);
const list = Lists.findOne({ _id: listId });
- if( list.getWipLimit() ){ // Necessary check to avoid exceptions for the case where the doc doesn't have the wipLimit field yet set
- list.toggleWipLimit(!list.wipLimit.enabled);
+ if(list.getWipLimit()){ // Necessary check to avoid exceptions for the case where the doc doesn't have the wipLimit field yet set
+ list.toggleWipLimit(!list.getWipLimit('enabled'));
} else {
list.toggleWipLimit(true); // First time toggle is always to 'true' because default is 'false'
}