Add the possibility to define a postfix and prefix for opening hours

This commit is contained in:
Pieter Vander Vennet 2021-10-29 03:42:33 +02:00
parent 9c147b6ec6
commit a2306c2c6f
10 changed files with 281 additions and 81 deletions

View file

@ -85,7 +85,9 @@ export class SubstitutedTranslation extends VariableUiElement {
const partAfter = SubstitutedTranslation.ExtractSpecialComponents(matched[4], extraMappings);
const args = knownSpecial.args.map(arg => arg.defaultValue ?? "");
if (argument.length > 0) {
const realArgs = argument.split(",").map(str => str.trim());
const realArgs = argument.split(",").map(str => str.trim()
.replace(/&LPARENS/g, '(')
.replace(/&RPARENS/g, ')'));
for (let i = 0; i < realArgs.length; i++) {
if (args.length <= i) {
args.push(realArgs[i]);