mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Fix legal notice traduction bug (when refreshing sign in page, legal notice line was always in english even if a given language isn't english
This commit is contained in:
parent
fc6c4f85f0
commit
8752225409
2 changed files with 16 additions and 2 deletions
|
@ -50,9 +50,11 @@ template(name="userFormsLayout")
|
|||
+connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
|
||||
if isLegalNoticeLinkExist
|
||||
div#legalNoticeDiv
|
||||
span {{_ 'acceptance_of_our_legalNotice'}}
|
||||
a.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer")
|
||||
span#legalNoticeSpan {{_ 'acceptance_of_our_legalNotice'}}
|
||||
a#legalNoticeAtLink.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer")
|
||||
| {{_ 'legalNotice'}}
|
||||
if getLegalNoticeWithWritTraduction
|
||||
div
|
||||
div.at-form-lang
|
||||
select.select-lang.js-userform-set-language
|
||||
each languages
|
||||
|
|
|
@ -86,6 +86,18 @@ Template.userFormsLayout.helpers({
|
|||
return false;
|
||||
},
|
||||
|
||||
getLegalNoticeWithWritTraduction(){
|
||||
let spanLegalNoticeElt = $("#legalNoticeSpan");
|
||||
if(spanLegalNoticeElt != null && spanLegalNoticeElt != undefined){
|
||||
spanLegalNoticeElt.html(TAPi18n.__('acceptance_of_our_legalNotice', {}, T9n.getLanguage() || 'en'));
|
||||
}
|
||||
let atLinkLegalNoticeElt = $("#legalNoticeAtLink");
|
||||
if(atLinkLegalNoticeElt != null && atLinkLegalNoticeElt != undefined){
|
||||
atLinkLegalNoticeElt.html(TAPi18n.__('legalNotice', {}, T9n.getLanguage() || 'en'));
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
isLoading() {
|
||||
return Template.instance().isLoading.get();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue