Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] manifestBundler: Add support for i18n object configuration #458

Merged
merged 3 commits into from
May 19, 2020

Conversation

tobiasso85
Copy link
Contributor

The manifestBundler task can handle i18n objects configured in the manifest.json "sap.app" "i18n" section.

It is able to support strings:

{
	"sap.app": {
		"i18n": "i18n/i18n.properties"
	}
}

as well as objects.

{
	"sap.app": {
		"i18n": {
			"bundleUrl": "i18n/i18n.properties",
			"supportedLocales": ["en", "de"],
			"fallbackLocale": "en"
		}
	}
}

fixes #457

add test for manifestBundler

refs: #457
was adding the first resource twice, therefore added "else"

getDescriptorI18nInfo now handles i18n section of sap.app
for strings and objects
@coveralls
Copy link

coveralls commented May 14, 2020

Coverage Status

Coverage increased (+0.06%) to 91.461% when pulling bce6166 on manifestbundler-support-i18n-object into 57d0cba on master.

@tobiasso85 tobiasso85 requested review from RandomByte and matz3 May 14, 2020 12:24
@RandomByte
Copy link
Member

As discussed: we are awaiting feedback on whether a terminologies bundleUrl should also be handled and included in the manifest bundle

Copy link
Member

@RandomByte RandomByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Nice to have some dedicated tests for the manifestBundler processor. Now we could also enhance the integration tests of the generateManifestBundler tasks: https://github.com/SAP/ui5-builder/blob/master/test/lib/tasks/bundlers/generateManifestBundle.integration.js

But I would rather merge this now. We anyways need to come back to this topic once we know whether terminologies *.properties files should be bundled as well.

@RandomByte RandomByte changed the title [FIX] Manifestbundler support i18n object [FIX] manifestBundler: Add support for i18n object configuration May 19, 2020
@RandomByte RandomByte merged commit 85c4e19 into master May 19, 2020
@RandomByte RandomByte deleted the manifestbundler-support-i18n-object branch May 19, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generateManifestBundle task fails with sap.app>i18n object in manifest.json
3 participants