adobe / aem-core-forms-components

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

Translation values not picked up from dictionary #1345

Closed shravanthprasad closed 2 months ago

shravanthprasad commented 2 months ago

Link from examples content http://localhost:4502/content/forms/af/core-components-it/samples/af2-form-translation.html?afAcceptLang=de AEM version 6.5.20 core forms component version 1.1.38

rismehta commented 2 months ago

@shravanthprasad You might have overlooked some translation steps, as this use-case is part of the automation pipeline. Additionally, could you upgrade to the latest core component version compatible with 6.5.20, as specified here: https://github.com/adobe/aem-core-forms-components/blob/release/650/VERSIONS.md?

You could also refer, https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/forms/adaptive-forms-authoring/authoring-adaptive-forms-core-components/create-an-adaptive-form-on-forms-cs/using-aem-translation-workflow-to-localize-adaptive-forms-core-components

shravanthprasad commented 2 months ago

@rismehta All the translation steps were followed and this was working fine in older version. Here is a snapshot of the i18n resources on new version(1.1.38) vs old version(1.1.27) Code -com.adobe.cq.forms.core.components.util.AbstractComponentImpl#translate(@NotNull String propertyName, @Nullable String propertyValue)

v1 1 27-translationkeyresources v1 1 38-translationresourcesnil
rismehta commented 2 months ago

What are the paths to the dictionary in both the old and new versions?

rismehta commented 2 months ago

The issue was caused by missing values in the includedPath property of the Apache Sling I18N Resource Bundle Provider (org.apache.sling.i18n.impl.JcrResourceBundleProvider). Specifically, the values /content/forms/af and /content/dam/formsanddocuments were not included due to the in-place upgrade.

shravanthprasad commented 2 months ago

Appreciate your quick support @rismehta