cap-js / change-tracking

CDS plugin providing out-of-the box support for automatic capturing, storing, and viewing of the change records of modeled entities.
https://cap.cloud.sap/docs
Apache License 2.0
16 stars 6 forks source link

SAP Fiori Elements Localization (@i18n) not working properly with @changelog #55

Closed jbibal-pdc closed 4 months ago

jbibal-pdc commented 8 months ago

Hello,

The plugin doesn't seem to properly recognize i18n texts as needed for localization.

Following the guide from SAP: Localization of UI Texts

We assigned the status field the @Common.Label annotation as seen below:
image

However, the localized text isn't getting rendered properly. image

Not sure what I am doing wrong. I also tried @changelog: ['{@i18n>status}'], but to no avail.

Hoping for your feedback.

Thanks, John

nkaputnik commented 8 months ago

Hello @jbibal-pdc can you take a look whether this answer here also fixes your issue? https://github.com/cap-js/change-tracking/issues/48

JocelynGu135 commented 7 months ago

Hi @jbibal-pdc,

I have reproduced this issue in my local.

And I find the reason why not showing the localized text is because of the incorrect definition for i18n.

From your sample: status: @Common : {Label: '{@i18n>status}'} @changelog

Correct definition: status: @Common : {Label: '{i18n>status}'} @changelog

There is no need to add @ before i18n.

Hope this will fix your issue. If you encounter any other problems, please let us know.

Best Regards Jocelyn