@sap-ux/ui-service-sub-generator 0.1.39 → 0.1.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
|
export declare function initI18n(): Promise<void>;
|
|
3
4
|
/**
|
|
4
5
|
* Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used.
|
package/generators/utils/i18n.js
CHANGED
|
@@ -3,13 +3,19 @@ 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"));
|
|
9
10
|
const ui_service_generator_i18n_json_1 = __importDefault(require("../translations/ui-service-generator.i18n.json"));
|
|
10
11
|
const uiServiceGeneratorNs = 'ui-service-generator';
|
|
12
|
+
exports.i18n = i18next_1.default.createInstance();
|
|
11
13
|
async function initI18n() {
|
|
12
|
-
await
|
|
14
|
+
await exports.i18n.init({
|
|
15
|
+
lng: 'en',
|
|
16
|
+
fallbackLng: 'en'
|
|
17
|
+
});
|
|
18
|
+
exports.i18n.addResourceBundle('en', uiServiceGeneratorNs, ui_service_generator_i18n_json_1.default);
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used.
|
|
@@ -22,7 +28,7 @@ function t(key, options) {
|
|
|
22
28
|
if (!options?.ns) {
|
|
23
29
|
options = Object.assign(options ?? {}, { ns: uiServiceGeneratorNs });
|
|
24
30
|
}
|
|
25
|
-
return
|
|
31
|
+
return exports.i18n.t(key, options);
|
|
26
32
|
}
|
|
27
33
|
initI18n().catch(() => {
|
|
28
34
|
// Needed for lint
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui-service-sub-generator",
|
|
3
3
|
"description": "Generator for creating UI Service",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.40",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@sap-devx/yeoman-ui-types": "1.16.9",
|
|
23
|
-
"i18next": "
|
|
23
|
+
"i18next": "25.3.0",
|
|
24
24
|
"yeoman-generator": "5.10.0",
|
|
25
25
|
"@sap-ux/axios-extension": "1.22.3",
|
|
26
26
|
"@sap-ux/btp-utils": "1.1.0",
|
|
27
27
|
"@sap-ux/feature-toggle": "0.3.0",
|
|
28
|
-
"@sap-ux/fiori-generator-shared": "0.12.
|
|
29
|
-
"@sap-ux/inquirer-common": "0.7.
|
|
28
|
+
"@sap-ux/fiori-generator-shared": "0.12.16",
|
|
29
|
+
"@sap-ux/inquirer-common": "0.7.21",
|
|
30
30
|
"@sap-ux/logger": "0.7.0",
|
|
31
|
-
"@sap-ux/system-access": "0.6.
|
|
32
|
-
"@sap-ux/telemetry": "0.6.
|
|
33
|
-
"@sap-ux/ui-service-inquirer": "0.1.
|
|
31
|
+
"@sap-ux/system-access": "0.6.10",
|
|
32
|
+
"@sap-ux/telemetry": "0.6.9",
|
|
33
|
+
"@sap-ux/ui-service-inquirer": "0.1.39"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@sap/service-provider-apis": "2.1.5",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"rimraf": "5.0.5",
|
|
48
48
|
"yeoman-test": "6.3.0",
|
|
49
49
|
"@sap-ux/jest-file-matchers": "0.2.3",
|
|
50
|
-
"@sap-ux/store": "1.1.
|
|
50
|
+
"@sap-ux/store": "1.1.2"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=20.x"
|