SAP / open-ux-tools

Enable community collaboration to jointly promote and facilitate best in class tooling capabilities
Apache License 2.0
83 stars 35 forks source link

BUG - i18n issues when working with adaptation projects #1852

Open tobiasqueck opened 6 months ago

tobiasqueck commented 6 months ago

Related Feature

Feature request: issue number

Description

The i18n support when working with adaptation projects is only partially working.

  1. When can preview my adaptation project in a different language by e.g. adding sap-language=de as query parameter to the preview url then I correctly get translated strings from the backend as well as my local translations are loaded from e.g. the i18n_de.properties file, however, this does not work when starting the editor.
  2. Title and description in the FLP tile in the preview always show only { instead of the text (independent of the language settings).

Steps to Reproduce

Steps to reproduce the behavior:

  1. Take a working adaptation project
  2. Copy the webapp/i18n/i18n.properties file to webapp/i18n/i18n_de.properties
  3. Modify the title in the webapp/i18n/i18n_de.properties file to e.g. Der Title.
  4. Start the editor
  5. Add ?sap-language=de to the editor url and refresh

For the 2nd issue, just open the local FLP in your project without an intent so that the shell is visible.

Expected results

My adapted German title and everything else in German as well.

Actual results

Everything is in English.

Screenshots

If applicable, add screenshots to help explain the problem.

Version/Components/Environment

Add any other context about the problem here OS:

Root Cause Analysis

Problem

(1) the url parameter sap-language from the url is not used in the iframe loading the app (2) The same issue was fixed for Fiori apps but it seems the fix does not work for adaptation projects

Fix

(1) Set all url parameters starting with sap- also on the iframe (2) Review https://github.com/SAP/open-ux-tools/commit/25ecdb902bc73657e5499f03eff15c7187d25c59 and enhance it for adaptation projects

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we don’t want to see this type of issues anymore what we should do to prevent}

tobiasqueck commented 6 months ago

@ManfredLerner here is the follow up issue.