Add:Server setting for default language #1103

This commit is contained in:
advplyr 2022-11-08 18:09:07 -06:00
parent 400e34a4c7
commit 6e064eeafb
8 changed files with 91 additions and 24 deletions

View file

@ -134,4 +134,14 @@ Vue.prototype.$parseCronExpression = (expression) => {
return {
description: `Run every ${weekdayText} at ${pieces[1]}:${pieces[0].padStart(2, '0')}`
}
}
export function supplant(str, subs) {
// source: http://crockford.com/javascript/remedial.html
return str.replace(/{([^{}]*)}/g,
function (a, b) {
var r = subs[b]
return typeof r === 'string' || typeof r === 'number' ? r : a
}
)
}