Minor fixes

This commit is contained in:
Igor Kulikov 2020-05-05 13:46:26 +03:00
parent 9953853f71
commit f7efb79015
3 changed files with 24 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@ -1944,14 +1944,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -1971,8 +1969,7 @@
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
@ -2120,7 +2117,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}

View File

@ -109,8 +109,10 @@ export function aspectCache(imageUrl: string): Observable<number> {
}
}
export type TranslateFunc = (key: string, defaultTranslation?: string) => string;
function parseTemplate(template: string, data: { $datasource?: Datasource, [key: string]: any },
translateFn?: (key: string) => string) {
translateFn?: TranslateFunc) {
let res = '';
try {
if (template.match(/<link-act/g)) {
@ -146,8 +148,6 @@ function parseTemplate(template: string, data: { $datasource?: Datasource, [key:
return res;
}
type TranslateFunc = (key: string, defaultTranslation?: string) => string;
export const parseWithTranslation = {
translateFn: null,