@ui5/webcomponents-tools 2.18.0 → 2.19.0-rc.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.19.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.18.0...v2.19.0-rc.0) (2026-01-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **i18n:** handle utf-8 escape sequences in message bundle properties files ([#12784](https://github.com/UI5/webcomponents/issues/12784)) ([54a3f15](https://github.com/UI5/webcomponents/commit/54a3f15a8d23de8683db5829c78255307ef3f8b5))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.18.0](https://github.com/UI5/webcomponents/compare/v2.18.0-rc.3...v2.18.0) (2026-01-05)
7
18
 
8
19
  **Note:** Version bump only for package @ui5/webcomponents-tools
@@ -14,8 +14,31 @@ const assets = require('../../assets-meta.js');
14
14
 
15
15
  const allLanguages = assets.languages.all;
16
16
 
17
+ /**
18
+ * The translation system has a configuration whether to return UTF-8 sequences
19
+ * or the actual characters. This function inlines UTF-8 sequences to actual characters.
20
+ *
21
+ * For example, it converts "Keine Produkte erf\u00FCgbar" to "Keine Produkte verfügbar"
22
+ * This makes the JSON files more readable and smaller.
23
+ */
24
+ function inlineUTF(properties) {
25
+ for (const key in properties) {
26
+ if (Object.prototype.hasOwnProperty.call(properties, key)) {
27
+ try {
28
+ // escape double quotes to avoid JSON parse error
29
+ const escaped = properties[key].replaceAll("\"", "\\\"");
30
+ properties[key] = JSON.parse(`"${escaped}"`); // utilize JSON parser to decode UTF-8 sequences
31
+ } catch (e) {
32
+ // in case of error, just keep the original string
33
+ console.log(`Warning: failed to inline UTF-8 for key "${key}" with value "${properties[key]}"`);
34
+ }
35
+ }
36
+ }
37
+ return properties;
38
+ }
39
+
17
40
  const convertToJSON = async (file, distPath) => {
18
- const properties = PropertiesReader(file)._properties;
41
+ const properties = inlineUTF(PropertiesReader(file)._properties);
19
42
  const filename = path.basename(file, path.extname(file));
20
43
  const language = filename.match(/^messagebundle_(.*?)$/)[1];
21
44
  if (!allLanguages.includes(language)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.18.0",
3
+ "version": "2.19.0-rc.0",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -82,5 +82,5 @@
82
82
  "esbuild": "^0.25.0",
83
83
  "yargs": "^17.5.1"
84
84
  },
85
- "gitHead": "e03b1c2b6315fbe4594f6563e1cb301a38fff885"
85
+ "gitHead": "73753f6b8c6d08421f9e270b07df370f632faed7"
86
86
  }