给定一个 ES 模块dictionaryAPI.mjs:
export const DICTIONARY_API = Object.freeze({\n someKey: "someValue"\n});\nRun Code Online (Sandbox Code Playgroud)\n我想将其导入到我的 UI5 控制器中。据我了解,UI5 不支持.mjs扩展,因此我已将扩展名从 更改.mjs为.js. 然后,我尝试将其添加到 UI5 控制器中,准确地说,添加到实用程序控制器中ControllerUtilities.js:
sap.ui.define([\n "com/myApp/dictionaryAPI"\n ],\n (dictionaryAPI) => ({\xe2\x80\xa6}));\nRun Code Online (Sandbox Code Playgroud)\n当我运行该应用程序时,出现错误:
\n\'com/myApp/controller/ControllerUtilities.js\': Unexpected token \'export\'\n\nsap-ui-core.js:53 Uncaught (in promise) ModuleError: Failed to resolve dependencies of \'com/myApp/controller/Login.controller.js\'\n -> \'com/myApp/controller/BaseController.js\'\n -> \'com/myApp/controller/ControllerUtilities.js\': Unexpected token \'export\'\n at p1 (https://openui5nightly.hana.ondemand.com/resources/sap-ui-core.js:53:213)\n at j1.failWith (https://openui5nightly.hana.ondemand.com/resources/sap-ui-core.js:40:43)\n at https://openui5nightly.hana.ondemand.com/resources/sap-ui-core.js:65:1556\nCaused by: SyntaxError: Unexpected token \'export\'\nRun Code Online (Sandbox Code Playgroud)\n看起来,UI5 无法识别exportES 模块中的 …
我们即将关闭SAPUI5应用程序,最后一步是制作Component-Preload.js文件以提高性能.我在网上阅读了不同的指南,所有这些指南都需要我安装的Node.js.我不是那个包的专家,我无法想象如何使其中一个指南工作.我正在使用NetBeans进行开发.据我所知,没有官方工具(我是对的吗?)来生成该文件.有比我更多经验的人能否提出一份有效的,解释良好的指南来执行该任务?
I have a SAPUI5 application. The translated text is shown wrongly in a dialog, while the translation is shown correct in the launchpad. Please see the following picture:
While the translation file is loaded for German language, it does not show [ÖÄÜß] correctly in the dialog. However it doesshows ö correctly in the launchpad page.
How can I solve it?