adobe / aem-core-forms-components

Standardized components to build forms with AEM Forms
Apache License 2.0
26 stars 59 forks source link

Translations not picked up for Text component #1330

Closed hiralvasa closed 2 months ago

hiralvasa commented 3 months ago

Hi Team,

I have created a form and dictionary entries are present for different locale(en,fr,de). After adding the form on a page with lang fr, a few of the translations are not picked up for "/apps/core/fd/components/form/text/v1/text" component on dispatcher or when refreshed the page with "view as published".

Without adding "wcmmode=disabled" to the url, all the translations work as expected. When refreshed the form with "wcmmode=disabled&afAcceptLang=fr-fr", all the translations work well.

Can you please let me know if I am doing something wrong or this is an issue/any workarounds?

AEM version 6.5.17 core components version 1.1.27-wcmB004

Thanks in advance!

rismehta commented 3 months ago

I have created a form and dictionary entries are present for different locale(en,fr,de). After adding the form on a page with lang fr,

How are you adding the form to the page? Are you using the Form Embed component? If so, are you embedding the form in iframe or non-iframe mode?

a few of the translations are not picked up for "/apps/core/fd/components/form/text/v1/text" component on dispatcher or when refreshed the page with "view as published".

Can you clarify what you mean by "a few translations"? Are some text components translated while others are not? Have you tried clearing the dispatcher cache?

hiralvasa commented 3 months ago

Hi @rismehta,

Form gets embedded as non-iframe mode.

Trying to get the translation working on local : Text on form :

image

Dict value for the Text :

image

This is just for one component - /apps/core/fd/components/form/text/v1/text. Rest all the components are translated successfully. Infact, this is the same behaviour on publish as well. Apart from the Text component, all other components works fine.

rismehta commented 3 months ago

Form gets embedded as non-iframe mode. Trying to get the translation working on local

@hiralvasa Are you still on 6.5 SP17? The translation framework was enhanced in newer service packs to support rich text translation. The core component now supports translation via this new translation framework by default. The old framework was not tested with the core component. Can you upgrade to SP20 and re-create the dictionary?

hiralvasa commented 3 months ago

Sure @rismehta,

But is there a workaround with SP17 that I can accommodate? Since, upgrading to SP20 will need to go through a long process and might take some time.

rismehta commented 3 months ago

But is there a workaround with SP17 that I can accommodate? Since, upgrading to SP20 will need to go through a long process and might take some time.

@dmaurya929 Can you check if workaround exists for SP 17 to unblock the current use-case

hiralvasa commented 3 months ago

@rismehta @dmaurya929 ,

This is only happening for the Text Component (/apps/core/fd/components/form/text/v1/text). All other core components, like email, textinput, dropdown, checkbox, etc are getting translated properly.

Kindly help me with a workaround for the above scenario. Thanks.

rismehta commented 3 months ago

@rismehta @dmaurya929 ,

This is only happening for the Text Component (/apps/core/fd/components/form/text/v1/text). All other core components, like email, textinput, dropdown, checkbox, etc are getting translated properly.

Kindly help me with a workaround for the above scenario. Thanks.

@hiralvasa We have identified and backported the fix, and the changes have been merged into the corresponding branch. You can review the details here: https://github.com/adobe/aem-core-forms-components/pull/1333.

To unblock your use-case, I have created a new release that includes these changes, https://github.com/adobe/aem-core-forms-components/releases/tag/core-forms-components-reactor-1.1.27-wcmB014

rismehta commented 2 months ago

Closing this issue