@sap-ux/ui5-proxy-middleware 1.5.6 → 1.5.7
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/dist/i18n.d.ts +2 -1
- package/dist/i18n.js +4 -2
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
package/dist/i18n.js
CHANGED
|
@@ -3,16 +3,18 @@ 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 ui5_proxy_middleware_i18n_json_1 = __importDefault(require("./translations/ui5-proxy-middleware.i18n.json"));
|
|
10
11
|
const NS = 'ui5-proxy-middleware';
|
|
12
|
+
exports.i18n = i18next_1.default.createInstance();
|
|
11
13
|
/**
|
|
12
14
|
* Initialize i18next with the translations for this module.
|
|
13
15
|
*/
|
|
14
16
|
async function initI18n() {
|
|
15
|
-
await
|
|
17
|
+
await exports.i18n.init({
|
|
16
18
|
resources: {
|
|
17
19
|
en: {
|
|
18
20
|
[NS]: ui5_proxy_middleware_i18n_json_1.default
|
|
@@ -32,7 +34,7 @@ async function initI18n() {
|
|
|
32
34
|
* @returns {string} localized string stored for the given key
|
|
33
35
|
*/
|
|
34
36
|
function t(key, options) {
|
|
35
|
-
return
|
|
37
|
+
return exports.i18n.t(key, options);
|
|
36
38
|
}
|
|
37
39
|
initI18n().catch(() => {
|
|
38
40
|
// Ignore any errors since the middleware will still work
|
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%3Aui5-proxy-middleware"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.5.
|
|
12
|
+
"version": "1.5.7",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dotenv": "16.3.1",
|
|
25
25
|
"http-proxy-middleware": "2.0.9",
|
|
26
26
|
"https-proxy-agent": "5.0.1",
|
|
27
|
-
"i18next": "
|
|
27
|
+
"i18next": "25.3.0",
|
|
28
28
|
"proxy-from-env": "1.1.0",
|
|
29
29
|
"@sap-ux/logger": "0.7.0",
|
|
30
30
|
"@sap-ux/ui5-config": "0.29.0"
|