Walkthrough step 8: Translatable Texts, invalid ResouceModel instatiation
OpenUI5 version: current version from https://sapui5.hana.ondemand.com/resources/sap-ui-core.js
Steps to reproduce the problem: Follow the instruction from this page https://openui5.hana.ondemand.com/topic/df86bfbeab0645e5b764ffa488ed57dc
If the ResourceModel is instantiated as shown in the docs then openui5 will not try to load translations according to the browsers locale.
var i18nModel = new ResourceModel({
bundleName: "sap.ui.demo.walkthrough.i18n.i18n",
supportedLocales: [""],
fallbackLocale: ""
});
You actually have to either, set supportedLocales to the supported locales and fallbackLocale to your default locale, in which case you don't need the i18n.properties. Or remove the parameters to get the behavior described in the paragraph before the code sample.
At least that has been my findings after stumbling over that and trying a few different combinations.
Hello adsworth,
thank you for submitting this issue. I have forwarded your issue to the responsible development team. They will contact you directly for further processing. Please refer to the internal incident 2180121430 for further questions.
Regards Sebastian
Hello @adsworth , I fixed the issue with OpenUI5 1.88
Hi @KlattG ,
thanks. Did you by chance have a look at the rest of the Walkthrough. There are a few other places that uses the ResourceModel in the same way. I found them after submitting this ticket and forgot to update it.
Hi @adsworth , thanks for letting us know. We had another look at the Walkthrough and adapted some sample code / text in the two subsequent steps as well.