This commit is contained in:
@@ -14,8 +14,8 @@ export default {
|
||||
//step 1: build an array of keys that we don't have already
|
||||
//Note: this will ensure only unique keys go into the store so it's safe to call this with dupes as can happen
|
||||
//for example datatables have dynamic column names so they need to fetch on demand
|
||||
var needIt = [];
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
let needIt = [];
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
if (
|
||||
!window.$gz._.has(window.$gz.store.state.translationText, keys[i])
|
||||
) {
|
||||
@@ -167,13 +167,13 @@ export default {
|
||||
//translate each and return the string translated
|
||||
//
|
||||
translateString(s) {
|
||||
var ret = s;
|
||||
var pattern = /\[(.*?)\]/g;
|
||||
var match;
|
||||
let ret = s;
|
||||
let pattern = /\[(.*?)\]/g;
|
||||
let match;
|
||||
while ((match = pattern.exec(s)) != null) {
|
||||
var foundMatch = match[0];
|
||||
var tKey = match[1];
|
||||
var newValue = this.get(tKey);
|
||||
let foundMatch = match[0];
|
||||
let tKey = match[1];
|
||||
let newValue = this.get(tKey);
|
||||
ret = ret.replace(foundMatch, newValue);
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user