Is your feature request related to a problem? Please describe.
Similar to #1084, there is an equivalent i18n case.
A library's manifest.json can declare its i18n configuration via the /sap.ui5/library/i18n descriptor entry. When a library ships no translatable texts, this should be set to false. Otherwise, the framework would fall back to requesting multiple resource bundles at runtime unnecessarily that end up with 404.
<lib namespace>/messagebundle_<locale>.properties --> 404
<lib namespace>/messagebundle.properties --> 404
How the framework interprets /sap.ui5/library/i18n
| Value |
Meaning |
false |
Telling that the library has no own resource bundle --> no unnecessary request |
true or omitted |
messagebundle*.properties requests |
| URL string |
Shorthand for { bundleUrl: "..." } --> requests |
| object |
Requests in accordance with { bundleUrl, bundleName, supportedLocales, fallbackLocale, ... } |
Only false prevents bundle loading. Every other value causes the framework to request a bundle. So a library that provides no *.properties bundle but doesn't set i18n: false triggers an avoidable 404.
Describe the solution you'd like
For a project of type "library", warn when all of the following apply:
- The (generated)
manifest.json would not set /sap.ui5/library/i18n to false, and
- the library ships no matching
*.properties file
--> A resolved *.properties file that is effectively empty (only comments or blank lines) should count as "no i18n" too in my view.
Autofix
Set "i18n": false under /sap.ui5/library in manifest.json:
{
"sap.ui5": {
"library": {
+ "i18n": false
Is your feature request related to a problem? Please describe.
Similar to #1084, there is an equivalent i18n case.
A library's
manifest.jsoncan declare its i18n configuration via the/sap.ui5/library/i18ndescriptor entry. When a library ships no translatable texts, this should be set tofalse. Otherwise, the framework would fall back to requesting multiple resource bundles at runtime unnecessarily that end up with 404.How the framework interprets
/sap.ui5/library/i18nfalsetrueor omittedmessagebundle*.propertiesrequests{ bundleUrl: "..." }--> requests{ bundleUrl, bundleName, supportedLocales, fallbackLocale, ... }Only
falseprevents bundle loading. Every other value causes the framework to request a bundle. So a library that provides no*.propertiesbundle but doesn't seti18n: falsetriggers an avoidable 404.Describe the solution you'd like
For a project of type
"library", warn when all of the following apply:manifest.jsonwould not set/sap.ui5/library/i18ntofalse, and*.propertiesfile--> A resolved
*.propertiesfile that is effectively empty (only comments or blank lines) should count as "no i18n" too in my view.Autofix
Set
"i18n": falseunder/sap.ui5/libraryinmanifest.json:{ "sap.ui5": { "library": { + "i18n": false