mirror of
https://github.com/wekan/wekan.git
synced 2026-03-01 03:10:16 +01:00
Switch tap:i18n to custom TAPi18n implementation
This commit is contained in:
parent
40265144af
commit
60af7766bf
157 changed files with 1991 additions and 5190 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import escapeForRegex from 'escape-string-regexp';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import {
|
||||
ALLOWED_BOARD_COLORS,
|
||||
ALLOWED_COLORS,
|
||||
|
|
@ -7,7 +9,6 @@ import {
|
|||
} from '/config/const';
|
||||
import Users from "./users";
|
||||
|
||||
const escapeForRegex = require('escape-string-regexp');
|
||||
Boards = new Mongo.Collection('boards');
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import moment from 'moment';
|
||||
import {
|
||||
ALLOWED_COLORS,
|
||||
TYPE_CARD,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { TAPi18n } from '/imports/i18n';
|
||||
import { runOnServer } from './runOnServer';
|
||||
|
||||
runOnServer(function() {
|
||||
|
|
@ -49,12 +50,12 @@ runOnServer(function() {
|
|||
isAdmin: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
let userLanguage = 'en';
|
||||
if(user && user.profile){
|
||||
userLanguage = user.profile.language
|
||||
}
|
||||
|
||||
|
||||
const exporterExcel = new ExporterExcel(boardId, userLanguage);
|
||||
if (exporterExcel.canExport(user) || impersonateDone) {
|
||||
if (impersonateDone) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { TAPi18n } from '/imports/i18n';
|
||||
import { runOnServer } from './runOnServer';
|
||||
|
||||
runOnServer(function() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import moment from 'moment';
|
||||
const Papa = require('papaparse');
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
|
||||
// exporter maybe is broken since Gridfs introduced, add fs and path
|
||||
export class Exporter {
|
||||
|
|
@ -209,7 +211,7 @@ export class Exporter {
|
|||
delimiter: userDelimiter,
|
||||
header: true,
|
||||
newline: "\r\n",
|
||||
skipEmptyLines: false,
|
||||
skipEmptyLines: false,
|
||||
escapeFormulae: true,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import { createWorkbook } from './createWorkbook';
|
||||
|
||||
// exporter maybe is broken since Gridfs introduced, add fs and path
|
||||
|
|
@ -432,7 +434,7 @@ class ExporterExcel {
|
|||
|
||||
//add blank row
|
||||
ws.addRow().values = ['', '', '', '', '', ''];
|
||||
|
||||
|
||||
//add board description
|
||||
ws.addRow().values = [
|
||||
TAPi18n.__('description','',this.userLanguage),
|
||||
|
|
@ -442,7 +444,7 @@ class ExporterExcel {
|
|||
ws.mergeCells('B3:H3');
|
||||
ws.getRow(3).height = 40;
|
||||
// In MS Excel, we can't use the AutoFit feature on a column that contains a cell merged with cells in other columns.
|
||||
// Likewise, we can't use AutoFit on a row that contains a cell merged with cells in other rows.
|
||||
// Likewise, we can't use AutoFit on a row that contains a cell merged with cells in other rows.
|
||||
ws.getRow(3).font = {
|
||||
name: TAPi18n.__('excel-font'),
|
||||
size: 10,
|
||||
|
|
@ -459,7 +461,7 @@ class ExporterExcel {
|
|||
vertical: 'middle',
|
||||
};
|
||||
cellCenter('A3');
|
||||
|
||||
|
||||
//add blank row
|
||||
ws.addRow().values = ['', '', '', '', '', ''];
|
||||
|
||||
|
|
@ -494,7 +496,7 @@ class ExporterExcel {
|
|||
},
|
||||
numFmt: 'yyyy/mm/dd hh:mm:ss',
|
||||
};
|
||||
|
||||
|
||||
cellCenter('A5');
|
||||
cellCenter('B5');
|
||||
cellCenter('C5');
|
||||
|
|
@ -502,7 +504,7 @@ class ExporterExcel {
|
|||
cellCenter('E5');
|
||||
cellLeft('F5');
|
||||
ws.getRow(5).height = 20;
|
||||
|
||||
|
||||
allBorder('A5');
|
||||
allBorder('B5');
|
||||
allBorder('C5');
|
||||
|
|
@ -786,7 +788,7 @@ class ExporterExcel {
|
|||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//add title line
|
||||
ws2.mergeCells('A1:F1');
|
||||
ws2.getCell('A1').value = result.title;
|
||||
|
|
@ -813,7 +815,7 @@ class ExporterExcel {
|
|||
TAPi18n.__('card','',this.userLanguage),
|
||||
TAPi18n.__('owner','',this.userLanguage),
|
||||
TAPi18n.__('createdAt','',this.userLanguage),
|
||||
TAPi18n.__('last-modified-at','',this.userLanguage),
|
||||
TAPi18n.__('last-modified-at','',this.userLanguage),
|
||||
];
|
||||
ws2.getRow(3).height = 20;
|
||||
ws2.getRow(3).font = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { TAPi18n } from '/imports/i18n';
|
||||
//var nodemailer = require('nodemailer');
|
||||
|
||||
// Sandstorm context is detected using the METEOR_SETTINGS environment variable
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
import moment from 'moment';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
|
||||
const DateString = Match.Where(function(dateAsString) {
|
||||
check(dateAsString, String);
|
||||
return moment(dateAsString, moment.ISO_8601).isValid();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
//var nodemailer = require('nodemailer');
|
||||
import { SyncedCron } from 'meteor/percolate:synced-cron';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import ImpersonatedUsers from './impersonatedUsers';
|
||||
|
||||
// Sandstorm context is detected using the METEOR_SETTINGS environment variable
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
const DateString = Match.Where(function(dateAsString) {
|
||||
check(dateAsString, String);
|
||||
return moment(dateAsString, moment.ISO_8601).isValid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue