Merge branch 'upgrade-meteor-2.6' of https://github.com/majus/wekan into upgrade-meteor

This commit is contained in:
Lauri Ojansivu 2022-04-18 21:25:47 +03:00
commit 0c3ca14699
268 changed files with 3109 additions and 10419 deletions

View file

@ -1,7 +1,7 @@
FROM ubuntu:rolling
LABEL maintainer="sgr"
ENV BUILD_DEPS="gnupg gosu libarchive-tools wget curl bzip2 g++ build-essential python git ca-certificates iproute2"
ENV BUILD_DEPS="gnupg gosu libarchive-tools wget curl bzip2 g++ build-essential python3 git ca-certificates iproute2"
ENV DEBIAN_FRONTEND=noninteractive
ENV \

View file

@ -3,7 +3,7 @@ version: '3.7'
services:
wekandb-dev:
image: mongo:4.4
image: mongo:5.0
container_name: wekan-dev-db
restart: unless-stopped
command: mongod --oplogSize 128

View file

@ -3,12 +3,12 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-base@1.4.0
meteor-base@1.5.1
# Build system
ecmascript@0.15.1
standard-minifier-css@1.7.2
standard-minifier-js@2.6.0
ecmascript@0.16.2
standard-minifier-css@1.8.1
standard-minifier-js@2.8.0
mquandalle:jade
coffeescript@2.4.1!
@ -21,19 +21,15 @@ cfs:standard-packages
cottz:publish-relations
dburles:collection-helpers
idmontie:migrations
matb33:collection-hooks
matteodem:easy-search
mongo@1.11.0
mongo@1.14.6
mquandalle:collection-mutations
# Account system
kenton:accounts-sandstorm
service-configuration@1.0.11
useraccounts:unstyled
useraccounts:flow-routing
wekan-ldap
wekan-accounts-cas
wekan-accounts-oidc
#wekan-ldap
#wekan-accounts-cas
#wekan-accounts-oidc
# Utilities
check@1.3.1
@ -43,7 +39,6 @@ reactive-dict@1.3.0
session@1.2.0
tracker@1.2.0
underscore@1.0.10
3stack:presence
arillo:flow-router-helpers
audit-argument-checks@1.0.7
kadira:blaze-layout
@ -51,39 +46,33 @@ kadira:dochead
mquandalle:autofocus
ongoworks:speakingurl
raix:handlebar-helpers
tap:i18n
http@1.4.2
http@2.0.0! # force new http package
# UI components
blaze
ostrio:i18n
reactive-var@1.0.11
fortawesome:fontawesome
mousetrap:mousetrap
mquandalle:jquery-textcomplete
mquandalle:mousetrap-bindglobal
peerlibrary:blaze-components@=0.15.1
peerlibrary:blaze-components
templates:tabs
meteor-autosize
simple:json-routes
rajit:bootstrap3-datepicker
shell-server@0.5.0
simple:rest-accounts-password
useraccounts:core
email@2.0.0
email@2.2.1
horka:swipebox
dynamic-import@0.6.0
dynamic-import@0.7.2
accounts-password@1.6.2
cfs:gridfs
rzymek:fullcalendar
momentjs:moment@2.22.2
mquandalle:moment
cfs:gridfs
rzymek:fullcalendar
msavin:usercache
# Keep stylus in 1.1.0, because building v2 takes extra 52 minutes.
coagmano:stylus@1.1.0!
meteorhacks:subs-manager
meteorhacks:picker
lamhieu:unblock
meteorhacks:aggregate@1.3.0
wekan-markdown
konecty:mongo-counter
@ -91,8 +80,6 @@ percolate:synced-cron
cfs:filesystem
ostrio:cookies
ostrio:files@2.0.1
tmeasday:check-npm-versions
steffo:meteor-accounts-saml
rajit:bootstrap3-datepicker-fi
rajit:bootstrap3-datepicker-ar
rajit:bootstrap3-datepicker-bg
@ -141,10 +128,19 @@ rajit:bootstrap3-datepicker-uk
rajit:bootstrap3-datepicker-vi
rajit:bootstrap3-datepicker-zh-cn
rajit:bootstrap3-datepicker-zh-tw
staringatlights:fast-render
spacebars
easylogic:summernote
pascoual:pdfkit
wekan-accounts-lockout
lmieulet:meteor-coverage
meteortesting:mocha
meteortesting:mocha@2.0.3
aldeed:simple-schema
accounts-password@2.3.1
matb33:collection-hooks
simple:json-routes
kadira:flow-router
spacebars
useraccounts:core
useraccounts:flow-routing
useraccounts:unstyled
service-configuration@1.3.0
communitypackages:picker
simple:rest-accounts-password

View file

@ -1 +1 @@
METEOR@2.2
METEOR@2.7.1

View file

@ -1,26 +1,24 @@
3stack:presence@1.1.2
accounts-base@1.9.0
accounts-oauth@1.2.0
accounts-password@1.7.1
accounts-base@2.2.2
accounts-password@2.3.1
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
aldeed:schema-index@1.1.1
aldeed:simple-schema@1.5.4
allow-deny@1.1.0
allow-deny@1.1.1
arillo:flow-router-helpers@0.5.2
audit-argument-checks@1.0.7
autoupdate@1.7.0
babel-compiler@7.6.1
autoupdate@1.8.0
babel-compiler@7.9.0
babel-runtime@1.5.0
base64@1.0.12
binary-heap@1.0.11
blaze@2.5.0
blaze-tools@1.1.2
blaze@2.6.0
blaze-tools@1.1.3
boilerplate-generator@1.7.1
caching-compiler@1.2.2
caching-html-compiler@1.2.0
callback-hook@1.3.0
caching-html-compiler@1.2.1
callback-hook@1.4.0
cfs:access-point@0.1.49
cfs:base-package@0.0.30
cfs:collection@0.5.5
@ -40,27 +38,27 @@ cfs:tempstore@0.1.6
cfs:upload-http@0.0.20
cfs:worker@0.1.5
check@1.3.1
chuangbo:cookie@1.1.0
coagmano:stylus@1.1.0
coffeescript@2.4.1
coffeescript-compiler@2.4.1
communitypackages:picker@1.1.0
cottz:publish-relations@2.0.8
dburles:collection-helpers@1.1.0
ddp@1.4.0
ddp-client@2.4.1
ddp-client@2.5.0
ddp-common@1.4.0
ddp-rate-limiter@1.0.9
ddp-server@2.3.3
ddp-rate-limiter@1.1.0
ddp-server@2.5.0
deps@1.0.12
diff-sequence@1.1.1
dynamic-import@0.6.0
dynamic-import@0.7.2
easylogic:summernote@0.8.8
ecmascript@0.15.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.11.1
ecmascript-runtime-server@0.10.1
ejson@1.1.1
email@2.0.0
ecmascript@0.16.2
ecmascript-runtime@0.8.0
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.2
email@2.2.1
es5-shim@4.8.0
fastclick@1.0.13
fetch@0.1.1
@ -68,9 +66,9 @@ fortawesome:fontawesome@4.7.0
geojson-utils@1.0.10
horka:swipebox@1.0.2
hot-code-push@1.0.4
html-tools@1.1.2
html-tools@1.1.3
htmljs@1.1.1
http@1.4.4
http@2.0.0
id-map@1.1.1
idmontie:migrations@1.0.3
inter-process-messaging@0.1.1
@ -78,40 +76,37 @@ jquery@1.11.11
kadira:blaze-layout@2.3.0
kadira:dochead@1.5.0
kadira:flow-router@2.12.1
kenton:accounts-sandstorm@0.7.0
kenton:accounts-sandstorm@0.1.0
konecty:mongo-counter@0.0.5_3
lamhieu:meteorx@2.1.1
lamhieu:unblock@1.0.0
launch-screen@1.2.1
launch-screen@1.3.0
livedata@1.0.18
lmieulet:meteor-coverage@3.2.0
lmieulet:meteor-coverage@1.1.4
localstorage@1.2.0
logging@1.2.0
matb33:collection-hooks@0.9.1
logging@1.3.1
matb33:collection-hooks@1.1.2
matteodem:easy-search@1.6.4
mdg:validation-error@0.5.1
meteor@1.9.3
meteor@1.10.0
meteor-autosize@5.0.1
meteor-base@1.4.0
meteor-base@1.5.1
meteor-platform@1.2.6
meteorhacks:aggregate@1.3.0
meteorhacks:collection-utils@1.2.0
meteorhacks:picker@1.0.3
meteorhacks:subs-manager@1.6.4
meteorspark:util@0.2.0
meteortesting:browser-tests@1.3.4
meteortesting:mocha@2.0.1
meteortesting:browser-tests@1.3.5
meteortesting:mocha@2.0.3
meteortesting:mocha-core@8.0.1
minifier-css@1.5.4
minifier-js@2.6.0
minifier-css@1.6.0
minifier-js@2.7.4
minifiers@1.1.8-faster-rebuild.0
minimongo@1.6.2
minimongo@1.8.0
mobile-status-bar@1.1.0
modern-browsers@0.1.5
modules@0.16.0
modules-runtime@0.12.0
momentjs:moment@2.29.1
mongo@1.11.1
modern-browsers@0.1.7
modules@0.18.0
modules-runtime@0.13.0
momentjs:moment@2.29.3
mongo@1.14.6
mongo-decimal@0.1.2
mongo-dev-server@1.1.0
mongo-id@1.0.8
@ -125,23 +120,23 @@ mquandalle:jquery-textcomplete@0.8.0_1
mquandalle:moment@1.0.1
mquandalle:mousetrap-bindglobal@0.0.1
msavin:usercache@1.8.0
npm-bcrypt@0.9.4
npm-mongo@3.9.0
oauth@1.3.2
oauth2@1.3.0
observe-sequence@1.0.16
npm-mongo@4.3.1
observe-sequence@1.0.20
ongoworks:speakingurl@1.1.0
ordered-dict@1.1.0
ostrio:cookies@2.7.0
ostrio:cstorage@2.2.2
ostrio:files@2.0.1
ostrio:i18n@3.1.0
pascoual:pdfkit@1.0.7
peerlibrary:assert@0.3.0
peerlibrary:base-component@0.16.0
peerlibrary:blaze-components@0.15.1
peerlibrary:base-component@0.17.1
peerlibrary:blaze-components@0.23.0
peerlibrary:computed-field@0.10.0
peerlibrary:data-lookup@0.3.0
peerlibrary:reactive-field@0.6.0
percolate:synced-cron@1.3.2
promise@0.11.2
promise@0.12.0
raix:eventemitter@0.1.3
raix:handlebar-helpers@0.2.5
rajit:bootstrap3-datepicker@1.7.1_1
@ -195,56 +190,42 @@ rajit:bootstrap3-datepicker-zh-cn@1.7.1
rajit:bootstrap3-datepicker-zh-tw@1.7.1
random@1.2.0
rate-limit@1.0.9
react-fast-refresh@0.1.1
react-fast-refresh@0.2.3
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.1
retry@1.1.0
routepolicy@1.1.0
routepolicy@1.1.1
rzymek:fullcalendar@3.8.0
server-render@0.3.1
service-configuration@1.0.11
service-configuration@1.3.0
session@1.2.0
sha@1.0.9
shell-server@0.5.0
simple:authenticate-user-by-token@1.0.1
simple:json-routes@2.1.0
simple:rest-accounts-password@1.1.2
simple:rest-bearer-token-parser@1.0.1
simple:rest-json-error-handler@1.0.1
socket-stream-client@0.3.3
softwarerero:accounts-t9n@1.3.11
spacebars@1.2.0
spacebars-compiler@1.2.1
srp@1.1.0
standard-minifier-css@1.7.2
standard-minifier-js@2.6.0
staringatlights:fast-render@3.3.0
staringatlights:inject-data@2.3.0
steffo:meteor-accounts-saml@0.0.18
tap:i18n@1.8.2
simple:authenticate-user-by-token@1.2.1
simple:json-routes@2.3.1
simple:rest-accounts-password@1.2.1
simple:rest-bearer-token-parser@1.1.1
simple:rest-json-error-handler@1.1.1
socket-stream-client@0.4.0
spacebars@1.3.0
spacebars-compiler@1.3.1
standard-minifier-css@1.8.1
standard-minifier-js@2.8.0
tap:i18n@1.3.2
templates:tabs@2.3.0
templating@1.4.0
templating@1.4.1
templating-compiler@1.4.1
templating-runtime@1.4.0
templating-tools@1.2.0
tmeasday:check-npm-versions@1.0.2
templating-runtime@1.5.0
templating-tools@1.2.2
tracker@1.2.0
twbs:bootstrap@3.3.6
typescript@4.2.2
ui@1.0.13
underscore@1.0.10
url@1.3.2
useraccounts:core@1.14.2
useraccounts:flow-routing@1.14.2
useraccounts:core@1.16.2
useraccounts:flow-routing@1.15.0
useraccounts:unstyled@1.14.2
webapp@1.10.1
webapp@1.13.1
webapp-hashing@1.1.0
wekan-accounts-cas@0.1.0
wekan-accounts-lockout@1.0.0
wekan-accounts-oidc@1.0.10
wekan-ldap@0.0.2
wekan-markdown@1.0.9
wekan-oidc@1.0.12
yasaricli:slugify@0.0.7
zimme:active-route@2.3.2

View file

@ -42,7 +42,7 @@ host = https://www.transifex.com
lang_map = ar_EG:ar-EG, bg_BG:bg, cs_CZ:cs-CZ, de_AT:de-AT, de_CH:de-CH, en_BR:en-BR, en_DE:en-DE, en_IT:en-IT, en_GB:en-GB, et_EE:et-EE, es_AR:es-AR, es_CL:es-CL, es_419:es-LA, es_PE:es-PE, es_MX:es-MX, es_TX:es-TX, es_PY:es-PY, el_GR:el-GR, fa_IR:fa-IR, fi_FI:fi, fr_FR:fr-FR, fr_CH:fr-CH, gl_ES:gl-ES, gu_IN:gu-IN, hi_IN:hi-IN, hu_HU:hu, id_ID:id, mn_MN:mn, ms_MY:ms-MY, lv_LV:lv, pt_BR:pt-BR, ro_RO:ro, ru_UA:ru-UA, sl_SI:sl, uk_UA:uk-UA, zh_CN:zh-CN, zh_TW:zh-TW, zh_Hans:zh-Hans, zh_HK:zh-HK
[wekan.application]
file_filter = i18n/<lang>.i18n.json
file_filter = imports/i18n/data/<lang>.i18n.json
source_lang = en
type = KEYVALUEJSON

17
.vscode/launch.json vendored
View file

@ -17,6 +17,23 @@
"outputCapture": "std",
"port": 9229,
"timeout": 60000
},
{
"type": "node",
"request": "launch",
"name": "Test: Node",
"runtimeExecutable": "meteor",
"runtimeArgs": [
"test",
"--inspect-brk=9229",
"--port=4040",
"--exclude-archs=web.browser.legacy,web.cordova",
"--driver-package=meteortesting:mocha",
"--settings=settings.json"
],
"outputCapture": "std",
"port": 9229,
"timeout": 60000
}
],
"compounds": [

View file

@ -42,7 +42,7 @@ template(name="addReactionPopup")
span.add-comment-reaction(data-codepoint="#{codepoint}") !{codepoint}
template(name="activity")
.activity
.activity(data-id=activity._id)
+userAvatar(userId=activity.user._id)
p.activity-desc
span.activity-member
@ -152,10 +152,10 @@ template(name="activity")
+editOrDeleteComment
if($eq activity.activityType 'deleteComment')
| {{{_ 'activity-deleteComment' currentData.commentId}}}.
| {{{_ 'activity-deleteComment' activity.commentId}}}.
if($eq activity.activityType 'editComment')
| {{{_ 'activity-editComment' currentData.commentId}}}.
| {{{_ 'activity-editComment' activity.commentId}}}.
else
//- if we are not in card mode we only display a summary of the comment
if($eq activity.activityType 'addComment')

View file

@ -1,4 +1,5 @@
import DOMPurify from 'dompurify';
import { TAPi18n } from '/imports/i18n';
const activitiesPerPage = 500;

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
const subManager = new SubsManager();
const { calculateIndex } = Utils;
const swimlaneWhileSortingHeight = 150;
@ -267,9 +269,10 @@ BlazeComponent.extendComponent({
openNewListForm() {
if (this.isViewSwimlanes()) {
this.childComponents('swimlane')[0]
.childComponents('addListAndSwimlaneForm')[0]
.open();
// The form had been removed in 416b17062e57f215206e93a85b02ef9eb1ab4902
// this.childComponents('swimlane')[0]
// .childComponents('addListAndSwimlaneForm')[0]
// .open();
} else if (this.isViewLists()) {
this.childComponents('listsGroup')[0]
.childComponents('addListForm')[0]

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
/*
const DOWNCLS = 'fa-sort-down';
const UPCLS = 'fa-sort-up';

View file

@ -13,7 +13,7 @@ template(name="boardList")
select.js-AllBoardOrgs#jsAllBoardOrgs("multiple")
option(value="-1") {{_ 'organizations'}} :
each orgsDatas
option(value="{{orgId}}") {{_ orgDisplayName}}
option(value="{{orgId}}") {{orgDisplayName}}
//li.AllBoardTemplates
// if userHasTemplates

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
const subManager = new SubsManager();
Template.boardListHeaderBar.events({
@ -33,7 +35,6 @@ BlazeComponent.extendComponent({
}
if (userLanguage) {
TAPi18n.setLanguage(userLanguage);
T9n.setLanguage(userLanguage);
}
},

View file

@ -20,7 +20,7 @@ template(name="attachmentsGalery")
each attachments
.attachment-item
a.attachment-thumbnail.swipebox(href="{{link}}" title="{{name}}")
if link
if isUploaded
if isImage
img.attachment-thumbnail-img(src="{{link}}")
else if($eq extension 'mp3')
@ -38,7 +38,7 @@ template(name="attachmentsGalery")
else
span.attachment-thumbnail-ext= extension
else
+spinner
span.attachment-thumbnail-ext= extension
p.attachment-details
= name
span.file-size ({{fileSize size}} KB)

View file

@ -1,3 +1,5 @@
import moment from 'moment';
import { TAPi18n } from '/imports/i18n';
import { DatePicker } from '/client/lib/datepicker';
import Cards from '/models/cards';

View file

@ -1,3 +1,5 @@
import moment from 'moment';
import { TAPi18n } from '/imports/i18n';
import { DatePicker } from '/client/lib/datepicker';
Template.dateBadge.helpers({

View file

@ -1,3 +1,5 @@
import moment from 'moment';
import { TAPi18n } from '/imports/i18n';
import { DatePicker } from '/client/lib/datepicker';
import Cards from '/models/cards';
import Boards from '/models/boards';
@ -7,7 +9,6 @@ import Users from '/models/users';
import Lists from '/models/lists';
import CardComments from '/models/cardComments';
import { ALLOWED_COLORS } from '/config/const';
import moment from 'moment';
import { UserAvatar } from '../users/userAvatar';
const subManager = new SubsManager();
@ -1795,6 +1796,7 @@ Template.cardAssigneePopup.helpers({
return user && user.isBoardAdmin() ? 'admin' : 'normal';
},
/*
presenceStatusClassName() {
const user = Users.findOne(this.userId);
const userPresence = presences.findOne({ userId: this.userId });
@ -1804,7 +1806,7 @@ Template.cardAssigneePopup.helpers({
return 'active';
else return 'idle';
},
*/
isCardAssignee() {
const card = Template.parentData();
const cardAssignees = card.getAssignees();

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
BlazeComponent.extendComponent({
template() {
return 'editCardSpentTime';

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
import Cards from '/models/cards';
import Boards from '/models/boards';

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
// Template.cards.events({
// 'click .member': Popup.open('cardMember')
// });

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
require('/client/lib/jquery-ui.js')
const { calculateIndex } = Utils;

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
import { Spinner } from '/client/lib/spinner';
const subManager = new SubsManager();
@ -42,7 +43,6 @@ BlazeComponent.extendComponent({
const position = this.currentData().position;
const title = textarea.val().trim();
const formComponent = this.childComponents('addCardForm')[0];
let sortIndex;
if (position === 'top') {
sortIndex = Utils.calculateIndex(null, firstCardDom).base;
@ -50,6 +50,7 @@ BlazeComponent.extendComponent({
sortIndex = Utils.calculateIndex(lastCardDom, null).base;
}
const formComponent = this.cardFormComponent();
const members = formComponent.members.get();
const labelIds = formComponent.labels.get();
const customFields = formComponent.customFields.get();
@ -131,6 +132,16 @@ BlazeComponent.extendComponent({
}
},
cardFormComponent() {
for (const inlinedForm of this.childComponents('inlinedForm')) {
const [addCardForm] = inlinedForm.childComponents('addCardForm');
if (addCardForm) {
return addCardForm;
}
}
return null;
},
scrollToBottom() {
const container = this.firstNode();
$(container).animate({

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
let listsColors;
Meteor.startup(() => {
listsColors = Lists.simpleSchema()._schema.color.allowedValues;

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
import { CardSearchPagedComponent } from '../../lib/cardSearch';
import Boards from '../../../models/boards';
import { Query, QueryErrors } from '../../../config/query-classes';

View file

@ -1,10 +1,6 @@
BlazeLayout.setRoot('body');
import { TAPi18n } from '/imports/i18n';
const i18nTagToT9n = i18nTag => {
// t9n/i18n tags are same now, see: https://github.com/softwarerero/meteor-accounts-t9n/pull/129
// but we keep this conversion function here, to be aware that that they are different system.
return i18nTag;
};
BlazeLayout.setRoot('body');
let alreadyCheck = 1;
let isCheckDone = false;
@ -73,11 +69,6 @@ Template.userFormsLayout.onRendered(() => {
AccountsTemplates.state.form.keys,
validator,
);
const i18nTag = navigator.language;
if (i18nTag) {
T9n.setLanguage(i18nTagToT9n(i18nTag));
}
EscapeActions.executeAll();
});
@ -102,11 +93,11 @@ Template.userFormsLayout.helpers({
getLegalNoticeWithWritTraduction(){
let spanLegalNoticeElt = $("#legalNoticeSpan");
if(spanLegalNoticeElt != null && spanLegalNoticeElt != undefined){
spanLegalNoticeElt.html(TAPi18n.__('acceptance_of_our_legalNotice', {}, T9n.getLanguage() || 'en'));
spanLegalNoticeElt.html(TAPi18n.__('acceptance_of_our_legalNotice', {}));
}
let atLinkLegalNoticeElt = $("#legalNoticeAtLink");
if(atLinkLegalNoticeElt != null && atLinkLegalNoticeElt != undefined){
atLinkLegalNoticeElt.html(TAPi18n.__('legalNotice', {}, T9n.getLanguage() || 'en'));
atLinkLegalNoticeElt.html(TAPi18n.__('legalNotice', {}));
}
return true;
},
@ -124,116 +115,27 @@ Template.userFormsLayout.helpers({
},
languages() {
return _.map(TAPi18n.getLanguages(), (lang, code) => {
const tag = code;
let name = lang.name;
if (lang.name === 'br') {
name = 'Brezhoneg';
} else if (lang.name === 'ar-EG') {
// ar-EG = Arabic (Egypt), simply Masri (مَصرى, [ˈmɑsˤɾi], Egyptian, Masr refers to Cairo)
name = 'مَصرى';
} else if (lang.name === 'cs-CZ') {
name = 'čeština (Česká republika)';
} else if (lang.name === 'de-CH') {
name = 'Deutsch (Schweiz)';
} else if (lang.name === 'de-AT') {
name = 'Deutsch (Österreich)';
} else if (lang.name === 'en-BR') {
name = 'English (Brazil)';
} else if (lang.name === 'en-DE') {
name = 'English (Germany)';
} else if (lang.name === 'et-EE') {
name = 'eesti keel (Eesti)';
} else if (lang.name === 'fa-IR') {
// fa-IR = Persian (Iran)
name = 'فارسی/پارسی (ایران‎)';
} else if (lang.name === 'fr-BE') {
name = 'Français (Belgique)';
} else if (lang.name === 'fr-CA') {
name = 'Français (Canada)';
} else if (lang.name === 'fr-CH') {
name = 'Français (Schweiz)';
} else if (lang.name === 'gu-IN') {
// gu-IN = Gurajati (India)
name = 'ગુજરાતી';
} else if (lang.name === 'hi-IN') {
// hi-IN = Hindi (India)
name = 'हिंदी (भारत)';
} else if (lang.name === 'ig') {
name = 'Igbo';
} else if (lang.name === 'lv') {
name = 'Latviešu';
} else if (lang.name === 'latviešu valoda') {
name = 'Latviešu';
} else if (lang.name === 'ms-MY') {
// ms-MY = Malay (Malaysia)
name = 'بهاس ملايو';
} else if (lang.name === 'en-IT') {
name = 'English (Italy)';
} else if (lang.name === 'el-GR') {
// el-GR = Greek (Greece)
name = 'Ελληνικά (Ελλάδα)';
} else if (lang.name === 'Español') {
name = 'español';
} else if (lang.name === 'es_419') {
name = 'español de América Latina';
} else if (lang.name === 'es-419') {
name = 'español de América Latina';
} else if (lang.name === 'Español de América Latina') {
name = 'español de América Latina';
} else if (lang.name === 'es-LA') {
name = 'español de América Latina';
} else if (lang.name === 'Español de Argentina') {
name = 'español de Argentina';
} else if (lang.name === 'Español de Chile') {
name = 'español de Chile';
} else if (lang.name === 'Español de Colombia') {
name = 'español de Colombia';
} else if (lang.name === 'Español de México') {
name = 'español de México';
} else if (lang.name === 'es-PY') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Paraguayo') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Perú') {
name = 'español de Perú';
} else if (lang.name === 'Español de Puerto Rico') {
name = 'español de Puerto Rico';
} else if (lang.name === 'gl-ES') {
name = 'Galego (España)';
} else if (lang.name === 'oc') {
name = 'Occitan';
} else if (lang.name === 'ru-UA') {
name = 'Русский (Украина)';
} else if (lang.name === 'st') {
name = 'Sãotomense';
} else if (lang.name === 'uk-UA') {
name = 'українська (Україна)';
} else if (lang.name === '繁体中文(台湾)') {
// Traditional Chinese (Taiwan)
name = '繁體中文(台灣)';
}
return { tag, name };
}).sort(function(a, b) {
if (a.name === b.name) {
return 0;
} else {
return a.name > b.name ? 1 : -1;
}
});
return TAPi18n.getSupportedLanguages()
.map(({ isoCode, name }) => ({ tag: isoCode, name }))
.sort((a, b) => {
if (a.name === b.name) {
return 0;
} else {
return a.name > b.name ? 1 : -1;
}
});
},
isCurrentLanguage() {
const t9nTag = i18nTagToT9n(this.tag);
const curLang = T9n.getLanguage() || 'en';
return t9nTag === curLang;
const curLang = TAPi18n.getLanguage();
return this.tag === curLang;
},
});
Template.userFormsLayout.events({
'change .js-userform-set-language'(event) {
const i18nTag = $(event.currentTarget).val();
T9n.setLanguage(i18nTagToT9n(i18nTag));
const tag = $(event.currentTarget).val();
TAPi18n.setLanguage(tag);
event.preventDefault();
},
'click #at-btn'(event, templateInstance) {

View file

@ -71,14 +71,14 @@ template(name="myCards")
.my-cards-board-badge(class=board.colorClass, id="header")
.my-cards-card-title-table
a.minicard-wrapper(href=card.originRelativeUrl)
{{card.title}}
| {{card.title}}
td
{{list.title}}
| {{list.title}}
td
a(href=board.originRelativeUrl)
{{board.title}}
| {{board.title}}
td
{{swimlane.title}}
| {{swimlane.title}}
unless isMiniScreen
td
@ -90,10 +90,10 @@ template(name="myCards")
.div
each label in card.labelIds
span.card-label(class="card-label-{{labelColor board label}}" title=name)
{{labelName board label}}
| {{labelName board label}}
td
if card.dueAt
{{ moment card.dueAt 'LLL' }}
| {{ moment card.dueAt 'LLL' }}
template(name="myCardsViewChangePopup")
if currentUser

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
BlazeComponent.extendComponent({
onCreated() {
this.subscribe('allRules');

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
import { AttachmentStorage } from '/models/attachments';
import { CardSearchPagedComponent } from '/client/lib/cardSearch';
import SessionData from '/models/usersessiondata';

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
BlazeComponent.extendComponent({
onCreated() {
this.info = new ReactiveVar({});

View file

@ -403,7 +403,7 @@ template(name="editUserPopup")
select.js-orgs#jsOrgs
option(value="-1") {{_ 'organizations'}} :
each value in orgsDatas
option(value="{{value._id}}") {{_ value.orgDisplayName}}
option(value="{{value._id}}") {{value.orgDisplayName}}
input#jsUserOrgsInPut.js-userOrgs(type="text" value=user.orgsUserBelongs, disabled)
input#jsUserOrgIdsInPut.js-userOrgIds.hide(type="text" value=user.orgIdsUserBelongs)
label
@ -543,7 +543,7 @@ template(name="newUserPopup")
select.js-orgsNewUser#jsOrgsNewUser
option(value="-1") {{_ 'organizations'}} :
each value in orgsDatas
option(value="{{value._id}}") {{_ value.orgDisplayName}}
option(value="{{value._id}}") {{value.orgDisplayName}}
input#jsUserOrgsInPutNewUser.js-userOrgsNewUser(type="text" value=user.orgsUserBelongs, disabled)
input#jsUserOrgIdsInPutNewUser.js-userOrgIdsNewUser.hide(type="text" value=user.orgIdsUserBelongs)
label

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
import { ALLOWED_WAIT_SPINNERS } from '/config/const';
BlazeComponent.extendComponent({

View file

@ -529,7 +529,7 @@ template(name="addBoardOrgPopup")
select.js-boardOrgs#jsBoardOrgs
option(value="-1") {{_ 'organizations'}} :
each value in orgsDatas
option(value="{{value._id}}") {{_ value.orgDisplayName}}
option(value="{{value._id}}") {{value.orgDisplayName}}
template(name="removeBoardOrgPopup")
form

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
Sidebar = null;
const defaultView = 'home';

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
//archivedRequested = false;
const subManager = new SubsManager();

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
BlazeComponent.extendComponent({
customFields() {
return CustomFields.find({

View file

@ -26,6 +26,7 @@ Template.userAvatar.helpers({
return user && user.isBoardAdmin() ? 'admin' : 'normal';
},
/*
presenceStatusClassName() {
const user = Users.findOne(this.userId);
const userPresence = presences.findOne({ userId: this.userId });
@ -35,6 +36,8 @@ Template.userAvatar.helpers({
return 'active';
else return 'idle';
},
*/
});
Template.userAvatarInitials.helpers({

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
Template.headerUserBar.events({
'click .js-open-header-member-menu': Popup.open('memberMenu'),
'click .js-change-avatar': Popup.open('changeAvatar'),
@ -256,105 +258,15 @@ Template.changePasswordPopup.onRendered(function() {
Template.changeLanguagePopup.helpers({
languages() {
return _.map(TAPi18n.getLanguages(), (lang, code) => {
// Same code in /client/components/main/layouts.js
// TODO : Make code reusable
const tag = code;
let name = lang.name;
if (lang.name === 'br') {
name = 'Brezhoneg';
} else if (lang.name === 'ar-EG') {
// ar-EG = Arabic (Egypt), simply Masri (مَصرى, [ˈmɑsˤɾi], Egyptian, Masr refers to Cairo)
name = 'مَصرى';
} else if (lang.name === 'cs-CZ') {
name = 'čeština (Česká republika)';
} else if (lang.name === 'de-CH') {
name = 'Deutsch (Schweiz)';
} else if (lang.name === 'de-AT') {
name = 'Deutsch (Österreich)';
} else if (lang.name === 'en-BR') {
name = 'English (Brazil)';
} else if (lang.name === 'en-DE') {
name = 'English (Germany)';
} else if (lang.name === 'et-EE') {
name = 'eesti keel (Eesti)';
} else if (lang.name === 'fa-IR') {
// fa-IR = Persian (Iran)
name = 'فارسی/پارسی (ایران‎)';
} else if (lang.name === 'fr-BE') {
name = 'Français (Belgique)';
} else if (lang.name === 'fr-CA') {
name = 'Français (Canada)';
} else if (lang.name === 'fr-CH') {
name = 'Français (Schweiz)';
} else if (lang.name === 'gu-IN') {
// gu-IN = Gurajati (India)
name = 'ગુજરાતી';
} else if (lang.name === 'hi-IN') {
// hi-IN = Hindi (India)
name = 'हिंदी (भारत)';
} else if (lang.name === 'ig') {
name = 'Igbo';
} else if (lang.name === 'lv') {
name = 'Latviešu';
} else if (lang.name === 'latviešu valoda') {
name = 'Latviešu';
} else if (lang.name === 'ms-MY') {
// ms-MY = Malay (Malaysia)
name = 'بهاس ملايو';
} else if (lang.name === 'en-IT') {
name = 'English (Italy)';
} else if (lang.name === 'el-GR') {
// el-GR = Greek (Greece)
name = 'Ελληνικά (Ελλάδα)';
} else if (lang.name === 'Español') {
name = 'español';
} else if (lang.name === 'es_419') {
name = 'español de América Latina';
} else if (lang.name === 'es-419') {
name = 'español de América Latina';
} else if (lang.name === 'Español de América Latina') {
name = 'español de América Latina';
} else if (lang.name === 'es-LA') {
name = 'español de América Latina';
} else if (lang.name === 'Español de Argentina') {
name = 'español de Argentina';
} else if (lang.name === 'Español de Chile') {
name = 'español de Chile';
} else if (lang.name === 'Español de Colombia') {
name = 'español de Colombia';
} else if (lang.name === 'Español de México') {
name = 'español de México';
} else if (lang.name === 'es-PY') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Paraguayo') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Perú') {
name = 'español de Perú';
} else if (lang.name === 'Español de Puerto Rico') {
name = 'español de Puerto Rico';
} else if (lang.name === 'gl-ES') {
name = 'Galego (España)';
} else if (lang.name === 'oc') {
name = 'Occitan';
} else if (lang.name === 'ru-UA') {
name = 'Русский (Украина)';
} else if (lang.name === 'st') {
name = 'Sãotomense';
} else if (lang.name === 'uk-UA') {
name = 'українська (Україна)';
} else if (lang.name === '繁体中文(台湾)') {
// Traditional Chinese (Taiwan)
name = '繁體中文(台灣)';
}
return { tag, name };
}).sort(function(a, b) {
if (a.name === b.name) {
return 0;
} else {
return a.name > b.name ? 1 : -1;
}
});
return TAPi18n.getSupportedLanguages()
.map(({ isoCode, name }) => ({ tag: isoCode, name }))
.sort((a, b) => {
if (a.name === b.name) {
return 0;
} else {
return a.name > b.name ? 1 : -1;
}
});
},
isCurrentLanguage() {

View file

@ -1,3 +1,7 @@
import { Blaze } from 'meteor/blaze';
import { Session } from 'meteor/session';
import moment from 'moment';
Blaze.registerHelper('currentBoard', () => {
const ret = Utils.getCurrentBoard();
return ret;
@ -30,3 +34,9 @@ Blaze.registerHelper('isShowDesktopDragHandles', () =>
Blaze.registerHelper('isMiniScreenOrShowDesktopDragHandles', () =>
Utils.isMiniScreenOrShowDesktopDragHandles(),
);
Blaze.registerHelper('moment', (...args) => {
args.pop(); // hash
const [date, format] = args;
return moment(date).format(format);
});

View file

@ -1,7 +0,0 @@
Presence.configure({
state() {
return {
currentBoardId: Session.get('currentBoard'),
};
},
});

View file

@ -1,3 +1,4 @@
import { TAPi18n } from '/imports/i18n';
import Cards from '../../models/cards';
import SessionData from '../../models/usersessiondata';
import {QueryDebug} from "../../config/query-classes";

View file

@ -1,3 +1,6 @@
import { TAPi18n } from '/imports/i18n';
import moment from 'moment';
// Helper function to replace HH with H for 24 hours format, because H allows also single-digit hours
function adjustedTimeFormat() {
return moment

View file

@ -1,3 +1,5 @@
import moment from 'moment';
// Filtered view manager
// We define local filter objects for each different type of field (SetFilter,
// RangeFilter, dateFilter, etc.). We then define a global `Filter` object whose
@ -721,7 +723,7 @@ Filter = {
isFilterActive = true;
selectors.push(this.advanced._getMongoSelector());
}
if(isFilterActive) {
return {
$or: selectors,

View file

@ -1,27 +1,21 @@
import { TAPi18n } from '/imports/i18n';
// We save the user language preference in the user profile, and use that to set
// the language reactively. If the user is not connected we use the language
// information provided by the browser, and default to english.
Meteor.startup(() => {
TAPi18n.conf.i18n_files_route = Meteor._relativeToSiteRootUrl('/tap-i18n');
const currentUser = Meteor.user();
let language;
if (currentUser) {
language = currentUser.profile && currentUser.profile.language;
}
if (!language) {
if (navigator.languages) {
language = navigator.languages[0];
} else {
language = navigator.language || navigator.userLanguage;
}
}
// Select first available language
const [language] = [
// User profile
currentUser?.profile?.language,
// Browser locale
navigator.languages?.at(0),
navigator.language,
navigator.userLanguage,
].filter(Boolean);
if (language) {
TAPi18n.setLanguage(language);
// eslint-disable-next-line no-console
// console.log('language set!');
T9n.setLanguage(language);
}
});

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
window.Popup = new (class {
constructor() {
// The template we use to render popups

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
const passwordField = AccountsTemplates.removeField('password');
const emailField = AccountsTemplates.removeField('email');
let disableRegistration = false;

View file

@ -1,3 +1,5 @@
import moment from 'moment';
import { TAPi18n } from '/imports/i18n';
import {
OPERATOR_ASSIGNEE,
OPERATOR_BOARD,
@ -46,7 +48,6 @@ import {
PREDICATE_YEAR,
} from './search-const';
import Boards from '../models/boards';
import moment from 'moment';
export class QueryDebug {
predicate = null;

View file

@ -1,3 +1,5 @@
import { TAPi18n } from '/imports/i18n';
let previousPath;
FlowRouter.triggers.exit([
({ path }) => {

63
imports/i18n/accounts.js Normal file
View file

@ -0,0 +1,63 @@
// Load all useraccounts translations at once
import { Tracker } from 'meteor/tracker';
import { T9n } from 'meteor-accounts-t9n';
import { TAPi18n } from './tap';
T9n.setTracker({ Tracker });
T9n.map('ar', require('meteor-accounts-t9n/build/ar').ar);
T9n.map('ca', require('meteor-accounts-t9n/build/ca').ca);
T9n.map('cs', require('meteor-accounts-t9n/build/cs').cs);
T9n.map('da', require('meteor-accounts-t9n/build/da').da);
T9n.map('de', require('meteor-accounts-t9n/build/de').de);
T9n.map('el', require('meteor-accounts-t9n/build/el').el);
T9n.map('en', require('meteor-accounts-t9n/build/en').en);
T9n.map('es', require('meteor-accounts-t9n/build/es').es);
T9n.map('es-ES', require('meteor-accounts-t9n/build/es_ES').es_ES);
T9n.map('es-ES-formal', require('meteor-accounts-t9n/build/es_ES_formal').es_ES_formal);
T9n.map('es-formal', require('meteor-accounts-t9n/build/es_formal').es_formal);
T9n.map('et', require('meteor-accounts-t9n/build/et').et);
T9n.map('fa', require('meteor-accounts-t9n/build/fa').fa);
T9n.map('fi', require('meteor-accounts-t9n/build/fi').fi);
T9n.map('fr', require('meteor-accounts-t9n/build/fr').fr);
T9n.map('fr-CA', require('meteor-accounts-t9n/build/fr_CA').fr_CA);
T9n.map('he', require('meteor-accounts-t9n/build/he').he);
T9n.map('hr', require('meteor-accounts-t9n/build/hr').hr);
T9n.map('hu', require('meteor-accounts-t9n/build/hu').hu);
T9n.map('id', require('meteor-accounts-t9n/build/id').id);
T9n.map('it', require('meteor-accounts-t9n/build/it').it);
T9n.map('ja', require('meteor-accounts-t9n/build/ja').ja);
T9n.map('kh', require('meteor-accounts-t9n/build/kh').kh);
T9n.map('ko', require('meteor-accounts-t9n/build/ko').ko);
T9n.map('nl', require('meteor-accounts-t9n/build/nl').nl);
T9n.map('no-NB', require('meteor-accounts-t9n/build/no_NB').no_NB);
T9n.map('pl', require('meteor-accounts-t9n/build/pl').pl);
T9n.map('pt', require('meteor-accounts-t9n/build/pt').pt);
T9n.map('pt-PT', require('meteor-accounts-t9n/build/pt_PT').pt_PT);
T9n.map('ro', require('meteor-accounts-t9n/build/ro').ro);
T9n.map('ru', require('meteor-accounts-t9n/build/ru').ru);
T9n.map('sk', require('meteor-accounts-t9n/build/sk').sk);
T9n.map('sl', require('meteor-accounts-t9n/build/sl').sl);
T9n.map('sv', require('meteor-accounts-t9n/build/sv').sv);
T9n.map('th', require('meteor-accounts-t9n/build/th').th);
T9n.map('tr', require('meteor-accounts-t9n/build/tr').tr);
T9n.map('uk', require('meteor-accounts-t9n/build/uk').uk);
T9n.map('vi', require('meteor-accounts-t9n/build/vi').vi);
T9n.map('zh-CN', require('meteor-accounts-t9n/build/zh_CN').zh_CN);
T9n.map('zh-HK', require('meteor-accounts-t9n/build/zh_HK').zh_HK);
T9n.map('zh-TW', require('meteor-accounts-t9n/build/zh_TW').zh_TW);
// Reactively adjust useraccounts:core translations
Tracker.autorun(() => {
const language = TAPi18n.getLanguage();
try {
T9n.setLanguage(language);
} catch (err) {
// Try to extract & set the language part only (e.g. "en" instead of "en-UK")
try {
T9n.setLanguage(language.split('-')[0]);
} catch (err) {
console.error(err);
}
}
});

8
imports/i18n/blaze.js Normal file
View file

@ -0,0 +1,8 @@
import { Blaze } from 'meteor/blaze';
import { TAPi18n } from './tap';
Blaze.registerHelper('_', (...args) => {
const { hash } = args.pop();
const [key] = args.splice(0, 1);
return TAPi18n.__(key, { ...hash, sprintf: args });
});

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more