-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
JIRA: CPOUI5FOUNDATION-296
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import manifestEnhancer from "../processors/manifestEnhancer.js"; | ||
import fsInterface from "@ui5/fs/fsInterface"; | ||
|
||
/* eslint "jsdoc/check-param-names": ["error", {"disableExtraPropertyReporting":true}] */ | ||
/** | ||
* Task for transforming the manifest.json file. | ||
* Adds missing information based on the available project resources, | ||
* for example the locales supported by the present i18n resources. | ||
* | ||
* @public | ||
* @function default | ||
* @static | ||
* | ||
* @param {object} parameters Parameters | ||
* @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files | ||
* @param {object} parameters.options Options | ||
* @param {string} parameters.options.projectNamespace Namespace of the application | ||
* @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written | ||
*/ | ||
export default async function({workspace, options}) { | ||
const {projectNamespace} = options; | ||
|
||
// Note: all "manifest.json" files in the given namespace | ||
const resources = await workspace.byGlob(`/resources/${projectNamespace}/**/manifest.json`); | ||
|
||
const processedResources = await manifestEnhancer({ | ||
resources, | ||
fs: fsInterface(workspace), | ||
}); | ||
|
||
await Promise.all(processedResources.map((resource) => workspace.write(resource))); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
welcome=Hello world |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
welcome=Hello EN world |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
welcome=Hello EN US world |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
welcome=Hello EN US sapprc world |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Application O</title> | ||
<script id="sap-ui-bootstrap" src="test.js"> | ||
</script> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"_version": "1.22.0", | ||
"sap.app": { | ||
"id": "application.o", | ||
"type": "application", | ||
"applicationVersion": { | ||
"version": "1.0.0" | ||
}, | ||
"title": "{{title}}", | ||
"i18n": { | ||
"bundleUrl": "i18n/i18n.properties", | ||
"supportedLocales": [ | ||
"", | ||
"en", | ||
"en_US", | ||
"en_US_sapprc" | ||
] | ||
} | ||
}, | ||
"sap.ui5": { | ||
"models": { | ||
"i18n": { | ||
"type": "sap.ui.model.resource.ResourceModel", | ||
"settings": { | ||
"bundleName": "application.o.i18n.i18n", | ||
"supportedLocales": [ | ||
"", | ||
"en", | ||
"en_US", | ||
"en_US_sapprc" | ||
] | ||
} | ||
}, | ||
"i18n-ui5": { | ||
"type": "sap.ui.model.resource.ResourceModel", | ||
"settings": { | ||
"bundleUrl": "ui5://application/o/i18n/i18n.properties", | ||
"supportedLocales": [ | ||
"", | ||
"en", | ||
"en_US", | ||
"en_US_sapprc" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sap.ui.define([ | ||
], () => { | ||
test((paramA) => { | ||
const variableA = paramA; | ||
console.log(variableA); | ||
}) | ||
test(); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
||
<name>library.o</name> | ||
<vendor>SAP SE</vendor> | ||
<copyright>${copyright}</copyright> | ||
<version>1.0.0</version> | ||
|
||
<title>{{title}}</title> | ||
<documentation>{{description}}</documentation> | ||
|
||
</library> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*! | ||
* Some fancy copyright | ||
*/ | ||
sap.ui.define([ | ||
'sap/ui/core/Core', | ||
], (Core) => { | ||
"use strict"; | ||
|
||
sap.ui.getCore().initLibrary({ | ||
name : "library.o", | ||
version: "1.0.0", | ||
dependencies : [] | ||
}); | ||
|
||
return thisLib; | ||
|
||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"_version": "1.58.0", | ||
"sap.app": { | ||
"id": "library.o", | ||
"type": "library", | ||
"embeds": [], | ||
"applicationVersion": { | ||
"version": "1.0.0" | ||
}, | ||
"title": "{{title}}", | ||
"description": "{{description}}", | ||
"resources": "resources.json", | ||
"offline": true | ||
}, | ||
"sap.ui": { | ||
"technology": "UI5", | ||
"supportedThemes": [] | ||
}, | ||
"sap.ui5": { | ||
"dependencies": { | ||
"libs": {} | ||
}, | ||
"library": { | ||
"i18n": { | ||
"bundleUrl": "messagebundle.properties", | ||
"terminologies": { | ||
"sports": { | ||
"bundleUrl": "sports.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"supportedLocales": [ | ||
"", | ||
"de", | ||
"en" | ||
] | ||
}, | ||
"travel": { | ||
"bundleUrl": "travel.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"supportedLocales": [ | ||
"", | ||
"de", | ||
"en" | ||
] | ||
} | ||
}, | ||
"enhanceWith": [ | ||
{ | ||
"bundleUrl": "myfolder1/i18n.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"terminologies": { | ||
"sports": { | ||
"bundleUrl": "myfolder1/soccer.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"supportedLocales": [ | ||
"", | ||
"de", | ||
"en" | ||
] | ||
}, | ||
"travel": { | ||
"bundleUrl": "myfolder1/vehicles.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"supportedLocales": [ | ||
"", | ||
"de", | ||
"en" | ||
] | ||
} | ||
}, | ||
"supportedLocales": [ | ||
"", | ||
"en" | ||
] | ||
}, | ||
{ | ||
"bundleUrl": "myfolder2/i18n.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"terminologies": { | ||
"travel": { | ||
"bundleUrl": "myfolder2/bicycles.properties", | ||
"bundleUrlRelativeTo": "manifest", | ||
"supportedLocales": [ | ||
"", | ||
"de", | ||
"en" | ||
] | ||
} | ||
}, | ||
"supportedLocales": [ | ||
"", | ||
"en" | ||
] | ||
} | ||
], | ||
"supportedLocales": [ | ||
"", | ||
"de", | ||
"en" | ||
] | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a title | ||
description=a description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a title | ||
description=a description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a title | ||
description=a description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my company 1 title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my company 1 title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my soccer title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=Mein Fussball Titel |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my soccer title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my vehicle title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=Mein Fahrzeugstitel |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my vehicle title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my bicycle title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=Mein Fahrradtitel |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my bicycle title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my company 2 title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=my company 2 title |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a sports title | ||
description=a sports description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=ein Sporttitel | ||
description=eine Sportbeschreibung |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a sports title | ||
description=a sports description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a travel title | ||
description=a travel description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=ein Reisetitel | ||
description=eine Reisebeschreibung |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a travel title | ||
description=a travel description |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "application.o", | ||
"version": "1.0.0", | ||
"description": "Simple SAPUI5 based application", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
specVersion: "3.2" | ||
type: application | ||
metadata: | ||
name: application.o |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
welcome=Hello world |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
welcome=Hello EN world |