nox-validation 1.6.4 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/validate.js +9 -7
- package/package.json +1 -1
package/lib/validate.js
CHANGED
|
@@ -536,19 +536,21 @@ const validateMetaRules = (
|
|
|
536
536
|
langPath = rebuildFullPath(node.value, node.key, (path) =>
|
|
537
537
|
path.replace(/create\[0\]\./, `create[${index}].`)
|
|
538
538
|
);
|
|
539
|
-
transformedPath = rebuildFullPath(
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
539
|
+
transformedPath = rebuildFullPath(
|
|
540
|
+
node.value,
|
|
541
|
+
node.key,
|
|
542
|
+
(path) => {
|
|
543
|
+
const newPath = path.replace(/\[0\]\./, `.${lang}.`);
|
|
544
|
+
return newPath;
|
|
545
|
+
}
|
|
543
546
|
);
|
|
544
547
|
} else {
|
|
545
548
|
langPath = rebuildFullPath(node.value, node.key, (path) => {
|
|
546
549
|
return path.replace(/create\./, `create[${index}].`);
|
|
547
550
|
});
|
|
551
|
+
|
|
548
552
|
transformedPath = rebuildFullPath(node.value, node.key, (path) =>
|
|
549
|
-
path
|
|
550
|
-
.replace(/create\./, `create[${index}].`)
|
|
551
|
-
.replace(/\[0\]\./, `[${lang}].`)
|
|
553
|
+
path.replace(/\[0\]\./, `.${lang}.`)
|
|
552
554
|
);
|
|
553
555
|
}
|
|
554
556
|
|