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

[FEATURE] manifest.json: Auto-fill supportedLocales #957

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

flovogt
Copy link
Member

@flovogt flovogt commented Nov 20, 2023

After the UI5 Tooling build, the supportedLocales property in the manifest.json of a UI5 library/application will be filled automatically with the available locales determined by the existence of the respective .properties file.

To disable the automatic generation of the supportedLocales, set supportedLocales to any desired value.

Scenario: Application

- webapp/i18n/
  - i18n.properties
  - i18n_en.properties
  - i18n_en_US.properties
  - i18n_de.properties
  - i18n_de_DE.properties 

In the manifest.json the supportedLocales property will be enhanced as following:

Source

"models": {
  "i18n": {
    "type": "sap.ui.model.resource.ResourceModel",
    "settings": {
	    "bundleName": "sap.ui.demo.todo.i18n.i18n"
    }
 }

Build Result

"models": {
  "i18n": {
    "type": "sap.ui.model.resource.ResourceModel",
    "settings": {
	    "bundleName": "my.app.i18n.i18n"
	    "supportedLocales": [
                 "",
                  "de",
                  "de_DE",
                  "en",
                  "en_US"
	    ]
    }
 }

JIRA: CPOUI5FOUNDATION-296

Depends on:

Demo: SAP/openui5-sample-app#220

@flovogt flovogt force-pushed the manifest-transformer branch 3 times, most recently from d1979d7 to 7e27f80 Compare November 28, 2023 16:46
@flovogt flovogt force-pushed the manifest-transformer branch 2 times, most recently from 9d33676 to c214217 Compare December 8, 2023 15:16
@coveralls
Copy link

coveralls commented Dec 8, 2023

Coverage Status

coverage: 94.811% (+0.2%) from 94.642%
when pulling 9c3f46d on manifest-transformer
into d59f0ac on main.

@flovogt flovogt force-pushed the manifest-transformer branch 3 times, most recently from 99195d7 to c5d9cee Compare April 17, 2024 13:02
@flovogt flovogt requested a review from matz3 April 17, 2024 13:03
@flovogt flovogt force-pushed the manifest-transformer branch from c5d9cee to 2c2886e Compare April 17, 2024 13:22
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.

Just a few small findings

@flovogt flovogt force-pushed the manifest-transformer branch from 180d183 to 39cddc8 Compare April 19, 2024 11:43
@flovogt flovogt requested a review from RandomByte April 19, 2024 11:53
@flovogt flovogt force-pushed the manifest-transformer branch from b857ce4 to 580d3e9 Compare April 19, 2024 13:06
@flovogt flovogt dismissed stale reviews from RandomByte and matz3 April 19, 2024 13:08

outdated

@matz3 matz3 force-pushed the manifest-transformer branch from 580d3e9 to 9c3f46d Compare April 29, 2024 12:52
Copy link
Member

@matz3 matz3 left a comment

Choose a reason for hiding this comment

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

LGTM

@flovogt flovogt force-pushed the manifest-transformer branch 2 times, most recently from 87a8a6a to f09d85b Compare July 9, 2024 15:20
flovogt added a commit to SAP/ui5-project that referenced this pull request Jul 12, 2024
@flovogt flovogt force-pushed the manifest-transformer branch 3 times, most recently from 7b03366 to 517d766 Compare July 12, 2024 13:29
matz3
matz3 previously approved these changes Jul 12, 2024
@flovogt flovogt force-pushed the manifest-transformer branch 3 times, most recently from 4c84c7f to 26b59e2 Compare July 12, 2024 13:57
@flovogt flovogt force-pushed the manifest-transformer branch from 26b59e2 to c423ade Compare July 12, 2024 14:01
@flovogt flovogt merged commit b085634 into main Jul 12, 2024
6 of 16 checks passed
@flovogt flovogt deleted the manifest-transformer branch July 12, 2024 14:06
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.

6 participants