@sap-ux/generator-adp 0.3.39 → 0.3.40

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.
@@ -1,4 +1,5 @@
1
- import type { TOptions } from 'i18next';
1
+ import type { i18n as i18nNext, TOptions } from 'i18next';
2
+ export declare const i18n: i18nNext;
2
3
  /**
3
4
  * Initialize i18next with the translations for this module.
4
5
  */
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.i18n = void 0;
6
7
  exports.initI18n = initI18n;
7
8
  exports.t = t;
8
9
  const i18next_1 = __importDefault(require("i18next"));
@@ -10,11 +11,16 @@ const inquirer_common_1 = require("@sap-ux/inquirer-common");
10
11
  const project_input_validator_1 = require("@sap-ux/project-input-validator");
11
12
  const generator_adp_i18n_json_1 = __importDefault(require("../translations/generator-adp.i18n.json"));
12
13
  const adpGeneratorI18nNamespace = 'generator-adp';
14
+ exports.i18n = i18next_1.default.createInstance();
13
15
  /**
14
16
  * Initialize i18next with the translations for this module.
15
17
  */
16
18
  async function initI18n() {
17
- await i18next_1.default.init({ lng: 'en', fallbackLng: 'en' }, () => i18next_1.default.addResourceBundle('en', adpGeneratorI18nNamespace, generator_adp_i18n_json_1.default));
19
+ await exports.i18n.init({
20
+ lng: 'en',
21
+ fallbackLng: 'en'
22
+ });
23
+ exports.i18n.addResourceBundle('en', adpGeneratorI18nNamespace, generator_adp_i18n_json_1.default);
18
24
  (0, inquirer_common_1.addi18nResourceBundle)();
19
25
  (0, project_input_validator_1.addi18nResourceBundle)();
20
26
  }
@@ -29,7 +35,7 @@ function t(key, options) {
29
35
  if (!options?.ns) {
30
36
  options = Object.assign(options ?? {}, { ns: adpGeneratorI18nNamespace });
31
37
  }
32
- return i18next_1.default.t(key, options);
38
+ return exports.i18n.t(key, options);
33
39
  }
34
40
  initI18n().catch(() => {
35
41
  // Needed for lint
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "SAPUI5 Adaptation Project",
4
4
  "homepage": "https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/ada9567b767941aba8d49fdb4fdedea7.html",
5
5
  "description": "Adaptation project allows you to create an app variant for an existing SAP Fiori elements-based or SAPUI5 freestyle application, without changing the original application.",
6
- "version": "0.3.39",
6
+ "version": "0.3.40",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -27,21 +27,21 @@
27
27
  "dependencies": {
28
28
  "@sap-devx/yeoman-ui-types": "1.16.9",
29
29
  "@sap-devx/feature-toggle-node": "2.0.3",
30
- "i18next": "23.5.1",
30
+ "i18next": "25.3.0",
31
31
  "yeoman-generator": "5.10.0",
32
32
  "uuid": "10.0.0",
33
- "@sap-ux/adp-tooling": "0.14.38",
33
+ "@sap-ux/adp-tooling": "0.14.39",
34
34
  "@sap-ux/axios-extension": "1.22.3",
35
35
  "@sap-ux/btp-utils": "1.1.0",
36
36
  "@sap-ux/feature-toggle": "0.3.0",
37
- "@sap-ux/inquirer-common": "0.7.20",
37
+ "@sap-ux/inquirer-common": "0.7.21",
38
38
  "@sap-ux/logger": "0.7.0",
39
39
  "@sap-ux/project-access": "1.30.6",
40
- "@sap-ux/store": "1.1.1",
41
- "@sap-ux/system-access": "0.6.9",
42
- "@sap-ux/project-input-validator": "0.6.9",
43
- "@sap-ux/fiori-generator-shared": "0.12.15",
44
- "@sap-ux/adp-flp-config-sub-generator": "0.1.38"
40
+ "@sap-ux/store": "1.1.2",
41
+ "@sap-ux/system-access": "0.6.10",
42
+ "@sap-ux/project-input-validator": "0.6.10",
43
+ "@sap-ux/fiori-generator-shared": "0.12.16",
44
+ "@sap-ux/adp-flp-config-sub-generator": "0.1.39"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@jest/types": "29.6.3",
@@ -56,7 +56,7 @@
56
56
  "fs-extra": "10.0.0",
57
57
  "rimraf": "5.0.5",
58
58
  "yeoman-test": "6.3.0",
59
- "@sap-ux/deploy-config-sub-generator": "0.3.34"
59
+ "@sap-ux/deploy-config-sub-generator": "0.3.35"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=20.x"