@sap-ux/preview-middleware 0.20.71 → 0.20.72

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.
@@ -15,6 +15,7 @@ const logger_1 = require("@sap-ux/logger");
15
15
  const ejs_1 = require("ejs");
16
16
  const path_1 = require("path");
17
17
  const project_access_1 = require("@sap-ux/project-access");
18
+ const i18n_1 = require("@sap-ux/i18n");
18
19
  const fs_1 = require("fs");
19
20
  const test_1 = require("./test");
20
21
  const mem_fs_editor_1 = require("mem-fs-editor");
@@ -239,11 +240,10 @@ function getAppName(manifest, intent) {
239
240
  * @returns i18n text of the property
240
241
  */
241
242
  async function getI18nTextFromProperty(projectRoot, propertyValue, logger) {
242
- //i18n model format could be {{key}} or {i18n>key}
243
- if (!projectRoot || !propertyValue || propertyValue.search(/{{\w+}}|{i18n>\w+}/g) === -1) {
243
+ const propertyI18nKey = (0, i18n_1.extractDoubleCurlyBracketsKey)(propertyValue ?? '');
244
+ if (!projectRoot || !propertyI18nKey) {
244
245
  return propertyValue;
245
246
  }
246
- const propertyI18nKey = propertyValue.replace(/i18n>|[{}]/g, '');
247
247
  const projectAccess = await (0, project_access_1.createProjectAccess)(projectRoot);
248
248
  const applicationIds = projectAccess.getApplicationIds();
249
249
  try {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.20.71",
12
+ "version": "0.20.72",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -25,13 +25,14 @@
25
25
  "ejs": "3.1.10",
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
- "@sap-ux/adp-tooling": "0.15.8",
28
+ "@sap-ux/adp-tooling": "0.15.9",
29
29
  "@sap-ux/btp-utils": "1.1.0",
30
30
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.8",
31
31
  "@sap-ux/feature-toggle": "0.3.0",
32
32
  "@sap-ux/logger": "0.7.0",
33
- "@sap-ux/project-access": "1.30.8",
34
- "@sap-ux/system-access": "0.6.11"
33
+ "@sap-ux/project-access": "1.30.9",
34
+ "@sap-ux/system-access": "0.6.11",
35
+ "@sap-ux/i18n": "0.3.2"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@sap-ux-private/playwright": "0.2.0",
@@ -51,7 +52,6 @@
51
52
  "supertest": "7.1.4",
52
53
  "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.14.11",
53
54
  "@sap-ux/axios-extension": "1.22.4",
54
- "@sap-ux/i18n": "0.3.1",
55
55
  "@sap-ux/store": "1.1.2",
56
56
  "@sap-ux/ui5-info": "0.12.1"
57
57
  },