@eui/tools 6.11.22 → 6.11.24
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/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.11.
|
|
1
|
+
6.11.24
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.11.24 (2023-06-01)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* eUI not taken into account in i18n compilation pre-build - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([02b06f1c](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/02b06f1c4346060dead95958c16d5c6d0232e72a))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.11.23 (2023-05-31)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* adapted pre-build translations compilation tool for handling additional folders through config - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([183da80a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/183da80a893ec264306290f754aa65c2945e9fd8))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.11.22 (2023-05-15)
|
|
2
20
|
|
|
3
21
|
##### Chores
|
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
72
72
|
tools.logInfo(`langs: ${langs}`);
|
|
73
73
|
tools.logInfo(`dest folder: ${destFolder}`);
|
|
74
74
|
tools.logInfo(`total packages: ${packages.length}`);
|
|
75
|
-
tools.logInfo(packages);
|
|
75
|
+
tools.logInfo(JSON.stringify(packages, null, 1));
|
|
76
76
|
})
|
|
77
77
|
|
|
78
78
|
.then(() => {
|
|
@@ -88,25 +88,16 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
88
88
|
addTranslation(file, lang);
|
|
89
89
|
|
|
90
90
|
// Add module translations
|
|
91
|
-
packages.forEach((
|
|
91
|
+
packages.forEach((pkgDeps) => {
|
|
92
92
|
let baseI18nPath = 'i18n';
|
|
93
|
-
if (
|
|
93
|
+
if (pkgDeps.scope === '@eui') {
|
|
94
94
|
baseI18nPath = 'i18n-eui';
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
addTranslation(file, lang)
|
|
102
|
-
} else {
|
|
103
|
-
file = path.join(pkg.folder, `assets/i18n/${lang}.json`);
|
|
104
|
-
if (tools.isFileExists(file)) {
|
|
105
|
-
tools.logInfo(`${file} found...adding`);
|
|
106
|
-
addTranslation(file, lang)
|
|
107
|
-
} else {
|
|
108
|
-
tools.logInfo(`${file} not found...skipping`);
|
|
109
|
-
}
|
|
96
|
+
processTranslationsFolder(pkgDeps, baseI18nPath, lang);
|
|
97
|
+
|
|
98
|
+
// process additional translation folders if set as option in config
|
|
99
|
+
if (pkg.build && pkg.build.translationAdditionalFolders) {
|
|
100
|
+
processTranslationsFolder(pkgDeps, pkg.build.translationAdditionalFolders, lang);
|
|
110
101
|
}
|
|
111
102
|
});
|
|
112
103
|
|
|
@@ -138,6 +129,26 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
138
129
|
}
|
|
139
130
|
}
|
|
140
131
|
}
|
|
132
|
+
|
|
133
|
+
function processTranslationsFolder(pkg, folder, lang) {
|
|
134
|
+
tools.logInfo(`------>Scanning ${folder}`);
|
|
135
|
+
|
|
136
|
+
let file = path.join(pkg.folder, `assets/${folder}/${lang}.json`);
|
|
137
|
+
|
|
138
|
+
tools.logInfo(`Adding translations from ${pkg.folder}`);
|
|
139
|
+
if (tools.isFileExists(file)) {
|
|
140
|
+
tools.logInfo(`${file} found...adding`);
|
|
141
|
+
addTranslation(file, lang)
|
|
142
|
+
} else {
|
|
143
|
+
file = path.join(pkg.folder, `assets/i18n/${lang}.json`);
|
|
144
|
+
if (tools.isFileExists(file)) {
|
|
145
|
+
tools.logInfo(`${file} found...adding`);
|
|
146
|
+
addTranslation(file, lang)
|
|
147
|
+
} else {
|
|
148
|
+
tools.logInfo(`${file} not found...skipping`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
141
152
|
})
|
|
142
153
|
.catch((e) => {
|
|
143
154
|
throw e;
|