@sap-ux/adp-tooling 0.18.92 → 0.18.94
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/base/change-utils.js +9 -0
- package/dist/preview/adp-preview.d.ts +7 -1
- package/dist/preview/adp-preview.js +10 -0
- package/dist/preview/ovp-routes-handler.d.ts +38 -0
- package/dist/preview/ovp-routes-handler.js +113 -0
- package/dist/writer/i18n/key-user-translations.d.ts +33 -0
- package/dist/writer/i18n/key-user-translations.js +109 -0
- package/package.json +3 -3
|
@@ -18,6 +18,7 @@ const node_fs_1 = require("node:fs");
|
|
|
18
18
|
const project_access_1 = require("@sap-ux/project-access");
|
|
19
19
|
const types_1 = require("../types");
|
|
20
20
|
const ejs_1 = require("ejs");
|
|
21
|
+
const key_user_translations_1 = require("../writer/i18n/key-user-translations");
|
|
21
22
|
/**
|
|
22
23
|
* Writes annotation changes to the specified project path using the provided `mem-fs-editor` instance.
|
|
23
24
|
*
|
|
@@ -83,6 +84,14 @@ async function writeKeyUserChanges(projectPath, config, fs) {
|
|
|
83
84
|
if (!change['fileName']) {
|
|
84
85
|
continue;
|
|
85
86
|
}
|
|
87
|
+
const fileName = change['fileName'];
|
|
88
|
+
const contentTexts = change['texts'];
|
|
89
|
+
const topLevelTexts = entry.texts;
|
|
90
|
+
// Replace content.texts values with i18n bindings and write translations to .properties files
|
|
91
|
+
if (contentTexts && topLevelTexts && Object.keys(topLevelTexts).length > 0) {
|
|
92
|
+
change['texts'] = (0, key_user_translations_1.replaceTextsWithI18nBindings)(contentTexts, fileName);
|
|
93
|
+
await (0, key_user_translations_1.writeKeyUserTranslations)(projectPath, fileName, topLevelTexts, fs);
|
|
94
|
+
}
|
|
86
95
|
const transformedChange = transformKeyUserChangeForAdp(change, config.app.id, config.app.layer);
|
|
87
96
|
await writeChangeToFolder(projectPath, transformedChange, fs);
|
|
88
97
|
}
|
|
@@ -13,7 +13,9 @@ export declare const enum ApiRoutes {
|
|
|
13
13
|
FRAGMENT = "/adp/api/fragment",
|
|
14
14
|
CONTROLLER = "/adp/api/controller",
|
|
15
15
|
CODE_EXT = "/adp/api/code_ext",
|
|
16
|
-
ANNOTATION = "/adp/api/annotation"
|
|
16
|
+
ANNOTATION = "/adp/api/annotation",
|
|
17
|
+
OVP_DATA_SOURCES = "/adp/api/ovp/datasources",
|
|
18
|
+
OVP_METAMODEL = "/adp/api/ovp/metamodel"
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Instance of an adaptation project handling requests and data transformation.
|
|
@@ -35,6 +37,10 @@ export declare class AdpPreview {
|
|
|
35
37
|
* Routes handler class to handle API requests
|
|
36
38
|
*/
|
|
37
39
|
private routesHandler;
|
|
40
|
+
/**
|
|
41
|
+
* Routes handler for OVP bridge functions
|
|
42
|
+
*/
|
|
43
|
+
private ovpRoutesHandler;
|
|
38
44
|
private lrep;
|
|
39
45
|
private descriptorVariantId;
|
|
40
46
|
private projectTypeValue?;
|
|
@@ -7,6 +7,7 @@ exports.AdpPreview = void 0;
|
|
|
7
7
|
const adm_zip_1 = __importDefault(require("adm-zip"));
|
|
8
8
|
const system_access_1 = require("@sap-ux/system-access");
|
|
9
9
|
const routes_handler_1 = __importDefault(require("./routes-handler"));
|
|
10
|
+
const ovp_routes_handler_1 = __importDefault(require("./ovp-routes-handler"));
|
|
10
11
|
const change_handler_1 = require("./change-handler");
|
|
11
12
|
const descriptor_change_handler_1 = require("./descriptor-change-handler");
|
|
12
13
|
const helper_1 = require("../base/helper");
|
|
@@ -31,6 +32,10 @@ class AdpPreview {
|
|
|
31
32
|
* Routes handler class to handle API requests
|
|
32
33
|
*/
|
|
33
34
|
routesHandler;
|
|
35
|
+
/**
|
|
36
|
+
* Routes handler for OVP bridge functions
|
|
37
|
+
*/
|
|
38
|
+
ovpRoutesHandler;
|
|
34
39
|
lrep;
|
|
35
40
|
descriptorVariantId;
|
|
36
41
|
projectTypeValue;
|
|
@@ -102,6 +107,7 @@ class AdpPreview {
|
|
|
102
107
|
this.descriptorVariantId = descriptorVariant.id;
|
|
103
108
|
this.provider = await (0, system_access_1.createAbapServiceProvider)(this.config.target, { ignoreCertErrors: this.config.ignoreCertErrors }, true, this.logger);
|
|
104
109
|
this.routesHandler = new routes_handler_1.default(this.project, this.util, this.provider, this.logger);
|
|
110
|
+
this.ovpRoutesHandler = new ovp_routes_handler_1.default(this.provider, this.logger);
|
|
105
111
|
this.lrep = this.provider.getLayeredRepository();
|
|
106
112
|
// fetch a merged descriptor from the backend
|
|
107
113
|
await this.lrep.getCsrfToken();
|
|
@@ -205,6 +211,10 @@ class AdpPreview {
|
|
|
205
211
|
router.post("/adp/api/controller" /* ApiRoutes.CONTROLLER */, this.routesHandler.handleWriteControllerExt);
|
|
206
212
|
router.get("/adp/api/code_ext" /* ApiRoutes.CODE_EXT */, this.routesHandler.handleGetControllerExtensionData);
|
|
207
213
|
router.get("/adp/api/annotation" /* ApiRoutes.ANNOTATION */, this.routesHandler.handleGetAllAnnotationFilesMappedByDataSource);
|
|
214
|
+
if (this.ovpRoutesHandler) {
|
|
215
|
+
router.get("/adp/api/ovp/datasources" /* ApiRoutes.OVP_DATA_SOURCES */, this.ovpRoutesHandler.handleGetDataSources);
|
|
216
|
+
router.post("/adp/api/ovp/metamodel" /* ApiRoutes.OVP_METAMODEL */, this.ovpRoutesHandler.handleGetMetaModel);
|
|
217
|
+
}
|
|
208
218
|
}
|
|
209
219
|
/**
|
|
210
220
|
* Handles different types of change requests to project files.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ToolsLogger } from '@sap-ux/logger';
|
|
2
|
+
import type { NextFunction, Request, Response } from 'express';
|
|
3
|
+
import type { AbapServiceProvider } from '@sap-ux/axios-extension';
|
|
4
|
+
/**
|
|
5
|
+
* Server-side handler for OVP bridge function API routes.
|
|
6
|
+
* Provides data source catalog and service metadata endpoints
|
|
7
|
+
* consumed by the client-side OVP bridge functions.
|
|
8
|
+
*/
|
|
9
|
+
export default class OvpRoutesHandler {
|
|
10
|
+
private readonly provider;
|
|
11
|
+
private readonly logger;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of OvpRoutesHandler.
|
|
14
|
+
*
|
|
15
|
+
* @param provider AbapServiceProvider instance for backend communication
|
|
16
|
+
* @param logger Logger instance
|
|
17
|
+
*/
|
|
18
|
+
constructor(provider: AbapServiceProvider, logger: ToolsLogger);
|
|
19
|
+
/**
|
|
20
|
+
* Handler for fetching available OData V2 services from the catalog.
|
|
21
|
+
*
|
|
22
|
+
* @param _req Request
|
|
23
|
+
* @param res Response
|
|
24
|
+
* @param next Next function
|
|
25
|
+
*/
|
|
26
|
+
handleGetDataSources: (_req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Handler for fetching service info and annotation URLs for a selected data source.
|
|
29
|
+
* Returns the service URL and annotation details so the client can create
|
|
30
|
+
* a real UI5 ODataModel with annotations merged for full metamodel support.
|
|
31
|
+
*
|
|
32
|
+
* @param req Request containing dataSource in body
|
|
33
|
+
* @param res Response
|
|
34
|
+
* @param next Next function
|
|
35
|
+
*/
|
|
36
|
+
handleGetMetaModel: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=ovp-routes-handler.d.ts.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const axios_extension_1 = require("@sap-ux/axios-extension");
|
|
4
|
+
/**
|
|
5
|
+
* Converts an absolute URL to a relative path.
|
|
6
|
+
* Annotation URIs from the catalog service are absolute (e.g. https://host/sap/opu/...).
|
|
7
|
+
* The client needs relative paths so requests go through the backend proxy.
|
|
8
|
+
*
|
|
9
|
+
* @param uri Absolute or relative URI
|
|
10
|
+
* @returns Relative path
|
|
11
|
+
*/
|
|
12
|
+
function toRelativePath(uri) {
|
|
13
|
+
try {
|
|
14
|
+
return new URL(uri).pathname;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return uri;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Server-side handler for OVP bridge function API routes.
|
|
22
|
+
* Provides data source catalog and service metadata endpoints
|
|
23
|
+
* consumed by the client-side OVP bridge functions.
|
|
24
|
+
*/
|
|
25
|
+
class OvpRoutesHandler {
|
|
26
|
+
provider;
|
|
27
|
+
logger;
|
|
28
|
+
/**
|
|
29
|
+
* Creates an instance of OvpRoutesHandler.
|
|
30
|
+
*
|
|
31
|
+
* @param provider AbapServiceProvider instance for backend communication
|
|
32
|
+
* @param logger Logger instance
|
|
33
|
+
*/
|
|
34
|
+
constructor(provider, logger) {
|
|
35
|
+
this.provider = provider;
|
|
36
|
+
this.logger = logger;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Handler for fetching available OData V2 services from the catalog.
|
|
40
|
+
*
|
|
41
|
+
* @param _req Request
|
|
42
|
+
* @param res Response
|
|
43
|
+
* @param next Next function
|
|
44
|
+
*/
|
|
45
|
+
handleGetDataSources = async (_req, res, next) => {
|
|
46
|
+
try {
|
|
47
|
+
const catalogService = this.provider.catalog(axios_extension_1.ODataVersion.v2);
|
|
48
|
+
const response = await catalogService.get('/ServiceCollection', {
|
|
49
|
+
params: { $format: 'json' }
|
|
50
|
+
});
|
|
51
|
+
const services = response.odata();
|
|
52
|
+
res.status(200 /* HttpStatusCodes.OK */).json({ results: services });
|
|
53
|
+
this.logger.debug(`OVP: Fetched ${services.length} data sources from catalog`);
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
this.logger.error(`OVP: Failed to fetch data sources: ${e.message}`);
|
|
57
|
+
res.status(500 /* HttpStatusCodes.INTERNAL_SERVER_ERROR */).json({
|
|
58
|
+
message: `Failed to fetch data sources: ${e.message}`
|
|
59
|
+
});
|
|
60
|
+
next(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Handler for fetching service info and annotation URLs for a selected data source.
|
|
65
|
+
* Returns the service URL and annotation details so the client can create
|
|
66
|
+
* a real UI5 ODataModel with annotations merged for full metamodel support.
|
|
67
|
+
*
|
|
68
|
+
* @param req Request containing dataSource in body
|
|
69
|
+
* @param res Response
|
|
70
|
+
* @param next Next function
|
|
71
|
+
*/
|
|
72
|
+
handleGetMetaModel = async (req, res, next) => {
|
|
73
|
+
try {
|
|
74
|
+
const { dataSource } = req.body;
|
|
75
|
+
this.logger.debug(`OVP: getMetaModel called for service ${dataSource?.Title ?? 'unknown'}`);
|
|
76
|
+
if (!dataSource?.Title) {
|
|
77
|
+
res.status(400 /* HttpStatusCodes.BAD_REQUEST */).json({ message: 'dataSource with Title is required' });
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const catalogService = this.provider.catalog(axios_extension_1.ODataVersion.v2);
|
|
81
|
+
const filterOptions = dataSource.ID ? { id: dataSource.ID } : { title: dataSource.Title };
|
|
82
|
+
const annotations = await catalogService.getAnnotations(filterOptions);
|
|
83
|
+
if (annotations.length === 0) {
|
|
84
|
+
res.status(200 /* HttpStatusCodes.OK */).json(null);
|
|
85
|
+
this.logger.debug(`OVP: No annotations found for service ${dataSource.Title}`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const serviceURI = `/sap/opu/odata/sap/${dataSource.Title}`;
|
|
89
|
+
res.status(200 /* HttpStatusCodes.OK */).json({
|
|
90
|
+
serviceUrl: `${serviceURI}/`,
|
|
91
|
+
annotations: annotations.map((a) => ({
|
|
92
|
+
TechnicalName: a.TechnicalName,
|
|
93
|
+
Uri: toRelativePath(a.Uri)
|
|
94
|
+
})),
|
|
95
|
+
modelInformation: {
|
|
96
|
+
serviceURI,
|
|
97
|
+
serviceAnnotation: annotations[0].TechnicalName,
|
|
98
|
+
serviceAnnotationURI: toRelativePath(annotations[0].Uri)
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
this.logger.debug(`OVP: Fetched service info for ${dataSource.Title} with ${annotations.length} annotations`);
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
this.logger.error(`OVP: Failed to fetch metamodel: ${e.message}`);
|
|
105
|
+
res.status(500 /* HttpStatusCodes.INTERNAL_SERVER_ERROR */).json({
|
|
106
|
+
message: `Failed to fetch metamodel: ${e.message}`
|
|
107
|
+
});
|
|
108
|
+
next(e);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
exports.default = OvpRoutesHandler;
|
|
113
|
+
//# sourceMappingURL=ovp-routes-handler.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Editor } from 'mem-fs-editor';
|
|
2
|
+
import type { KeyUserTextTranslations } from '@sap-ux/axios-extension';
|
|
3
|
+
/**
|
|
4
|
+
* Normalizes a backend language key to the locale suffix used in i18n .properties file names.
|
|
5
|
+
*
|
|
6
|
+
* The backend (LRep) already normalizes language keys to ISO 639 via T002/T002X lookup,
|
|
7
|
+
* so this function primarily converts BCP47 separators (`-`) to underscores (`_`) for
|
|
8
|
+
* .properties file naming and applies old-to-new ISO 639 mapping as a safety net.
|
|
9
|
+
*
|
|
10
|
+
* @param lang - Language key from the backend response (e.g., '', 'en', 'iw', 'pt-BR', 'zh-Hans').
|
|
11
|
+
* @returns The normalized locale suffix for .properties file naming (e.g., '', 'en', 'he', 'pt_BR', 'zh_Hans').
|
|
12
|
+
*/
|
|
13
|
+
export declare function normalizeLanguageForI18n(lang: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Replaces the `value` property of each entry in `content.texts` with an i18n binding expression.
|
|
16
|
+
* The generated key follows the pattern `<fileName>_<textId>`.
|
|
17
|
+
*
|
|
18
|
+
* @param contentTexts - The `texts` object from inside the change content.
|
|
19
|
+
* @param fileName - The file name of the change, used as key prefix.
|
|
20
|
+
* @returns The modified texts object with i18n bindings replacing values.
|
|
21
|
+
*/
|
|
22
|
+
export declare function replaceTextsWithI18nBindings(contentTexts: Record<string, Record<string, unknown>>, fileName: string): Record<string, Record<string, unknown>>;
|
|
23
|
+
/**
|
|
24
|
+
* Writes translations from the top-level `texts` object of a key-user change
|
|
25
|
+
* into the project's i18n .properties files.
|
|
26
|
+
*
|
|
27
|
+
* @param projectPath - The root path of the project.
|
|
28
|
+
* @param fileName - The file name of the change, used as key prefix.
|
|
29
|
+
* @param topLevelTexts - The top-level `texts` object from the API response entry.
|
|
30
|
+
* @param fs - The `mem-fs-editor` instance used for file operations.
|
|
31
|
+
*/
|
|
32
|
+
export declare function writeKeyUserTranslations(projectPath: string, fileName: string, topLevelTexts: KeyUserTextTranslations, fs: Editor): Promise<void>;
|
|
33
|
+
//# sourceMappingURL=key-user-translations.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeLanguageForI18n = normalizeLanguageForI18n;
|
|
4
|
+
exports.replaceTextsWithI18nBindings = replaceTextsWithI18nBindings;
|
|
5
|
+
exports.writeKeyUserTranslations = writeKeyUserTranslations;
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const project_access_1 = require("@sap-ux/project-access");
|
|
8
|
+
const i18n_1 = require("@sap-ux/i18n");
|
|
9
|
+
/**
|
|
10
|
+
* Old-to-new ISO 639 language code mappings. Safety net for legacy systems that may still return deprecated codes.
|
|
11
|
+
* Source: sap/base/i18n/Localization.js M_ISO639_OLD_TO_NEW
|
|
12
|
+
*/
|
|
13
|
+
const M_ISO639_OLD_TO_NEW = {
|
|
14
|
+
'iw': 'he',
|
|
15
|
+
'ji': 'yi'
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Normalizes a backend language key to the locale suffix used in i18n .properties file names.
|
|
19
|
+
*
|
|
20
|
+
* The backend (LRep) already normalizes language keys to ISO 639 via T002/T002X lookup,
|
|
21
|
+
* so this function primarily converts BCP47 separators (`-`) to underscores (`_`) for
|
|
22
|
+
* .properties file naming and applies old-to-new ISO 639 mapping as a safety net.
|
|
23
|
+
*
|
|
24
|
+
* @param lang - Language key from the backend response (e.g., '', 'en', 'iw', 'pt-BR', 'zh-Hans').
|
|
25
|
+
* @returns The normalized locale suffix for .properties file naming (e.g., '', 'en', 'he', 'pt_BR', 'zh_Hans').
|
|
26
|
+
*/
|
|
27
|
+
function normalizeLanguageForI18n(lang) {
|
|
28
|
+
if (!lang) {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
// Parse BCP47 tag: language[-Script][-Region][-variant][-extension][-privateuse]
|
|
32
|
+
const parts = lang.split(/[-_]/);
|
|
33
|
+
let language = parts[0].toLowerCase();
|
|
34
|
+
// Apply old-to-new ISO 639 mapping as safety net
|
|
35
|
+
language = M_ISO639_OLD_TO_NEW[language] ?? language;
|
|
36
|
+
// Collect script and region subtags, skip variants/extensions/private use
|
|
37
|
+
const subtags = [];
|
|
38
|
+
for (const part of parts.slice(1)) {
|
|
39
|
+
if (/^[A-Za-z]{4}$/.test(part)) {
|
|
40
|
+
// Script subtag (e.g., Hans, Hant, Latn)
|
|
41
|
+
subtags.push(part[0].toUpperCase() + part.slice(1).toLowerCase());
|
|
42
|
+
}
|
|
43
|
+
else if (/^[A-Za-z]{2}$/.test(part)) {
|
|
44
|
+
// Region subtag (e.g., GB, TW, BR)
|
|
45
|
+
subtags.push(part.toUpperCase());
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return subtags.length ? `${language}_${subtags.join('_')}` : language;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Replaces the `value` property of each entry in `content.texts` with an i18n binding expression.
|
|
52
|
+
* The generated key follows the pattern `<fileName>_<textId>`.
|
|
53
|
+
*
|
|
54
|
+
* @param contentTexts - The `texts` object from inside the change content.
|
|
55
|
+
* @param fileName - The file name of the change, used as key prefix.
|
|
56
|
+
* @returns The modified texts object with i18n bindings replacing values.
|
|
57
|
+
*/
|
|
58
|
+
function replaceTextsWithI18nBindings(contentTexts, fileName) {
|
|
59
|
+
const result = {};
|
|
60
|
+
for (const textId of Object.keys(contentTexts)) {
|
|
61
|
+
const entry = { ...contentTexts[textId] };
|
|
62
|
+
const generatedKey = `${fileName}_${textId}`;
|
|
63
|
+
entry.value = `{i18n>${generatedKey}}`;
|
|
64
|
+
result[textId] = entry;
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Writes translations from the top-level `texts` object of a key-user change
|
|
70
|
+
* into the project's i18n .properties files.
|
|
71
|
+
*
|
|
72
|
+
* @param projectPath - The root path of the project.
|
|
73
|
+
* @param fileName - The file name of the change, used as key prefix.
|
|
74
|
+
* @param topLevelTexts - The top-level `texts` object from the API response entry.
|
|
75
|
+
* @param fs - The `mem-fs-editor` instance used for file operations.
|
|
76
|
+
*/
|
|
77
|
+
async function writeKeyUserTranslations(projectPath, fileName, topLevelTexts, fs) {
|
|
78
|
+
const webappPath = await (0, project_access_1.getWebappPath)(projectPath, fs);
|
|
79
|
+
const entriesByLanguage = {};
|
|
80
|
+
for (const textId of Object.keys(topLevelTexts)) {
|
|
81
|
+
const textEntry = topLevelTexts[textId];
|
|
82
|
+
const textType = textEntry.type;
|
|
83
|
+
const values = textEntry.values;
|
|
84
|
+
if (!values) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const generatedKey = `${fileName}_${textId}`;
|
|
88
|
+
for (const lang of Object.keys(values)) {
|
|
89
|
+
const normalizedLang = normalizeLanguageForI18n(lang);
|
|
90
|
+
if (!entriesByLanguage[normalizedLang]) {
|
|
91
|
+
entriesByLanguage[normalizedLang] = [];
|
|
92
|
+
}
|
|
93
|
+
const entry = {
|
|
94
|
+
key: generatedKey,
|
|
95
|
+
value: values[lang]
|
|
96
|
+
};
|
|
97
|
+
if (textType) {
|
|
98
|
+
entry.annotation = { textType };
|
|
99
|
+
}
|
|
100
|
+
entriesByLanguage[normalizedLang].push(entry);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (const lang of Object.keys(entriesByLanguage)) {
|
|
104
|
+
const propertiesFileName = lang ? `i18n_${lang}.properties` : 'i18n.properties';
|
|
105
|
+
const i18nFilePath = (0, node_path_1.join)(webappPath, 'i18n', propertiesFileName);
|
|
106
|
+
await (0, i18n_1.createPropertiesI18nEntries)(i18nFilePath, entriesByLanguage[lang], undefined, fs);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=key-user-translations.js.map
|
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%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.18.
|
|
12
|
+
"version": "0.18.94",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"prompts": "2.4.2",
|
|
37
37
|
"sanitize-filename": "1.6.3",
|
|
38
38
|
"uuid": "11.1.0",
|
|
39
|
-
"@sap-ux/axios-extension": "1.25.
|
|
39
|
+
"@sap-ux/axios-extension": "1.25.24",
|
|
40
40
|
"@sap-ux/btp-utils": "1.1.10",
|
|
41
41
|
"@sap-ux/i18n": "0.3.9",
|
|
42
42
|
"@sap-ux/inquirer-common": "0.11.24",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@sap-ux/project-access": "1.35.13",
|
|
47
47
|
"@sap-ux/project-input-validator": "0.6.68",
|
|
48
48
|
"@sap-ux/store": "1.5.10",
|
|
49
|
-
"@sap-ux/system-access": "0.6.
|
|
49
|
+
"@sap-ux/system-access": "0.6.66",
|
|
50
50
|
"@sap-ux/ui5-config": "0.29.21",
|
|
51
51
|
"@sap-ux/ui5-info": "0.13.15"
|
|
52
52
|
},
|