-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to load Custom Locale Translation Strings for i18n languages provided under /apps/core/fd/af-clientlibs/core-forms-components-runtime-all/resources/i18n #1497
Comments
The process for incorporating a custom locale is documented here: Additionally, we have an automated test case for this use case (loading custom language specific translation strings) available at the following links: |
@rismehta - we have followed same steps to add custom language initialisation. Issue is happening when we have custom language initialisation for the same lan(ex:ko-kr). Since the above language data(core components) is already loaded, the condition |
Thank you. Could you describe your use case for loading custom strings based on the product locale? It seems we already have a TODO in the code to support this in the future: Link to Code. |
@rismehta - Two UseCases where we use Rule Editor and Custom Functions to fetch translated string from central location and load it to the form
|
@shravanthprasad This issue should be addressed via this PR. If you need to override any product locale, the recommended approach is to first copy the existing set of data and then apply your incremental changes on top of it. You can see an example of this approach here: diff of the changes. To simplify the implementation, it's preferable to maintain a copy of the original and then extend it with custom modifications. While we could potentially merge the JSON from the custom and product configurations, managing priority rules in such a merge would introduce additional complexity. |
@shravanthprasad The PR has been merged. If you'd like the fix to be applied to version 1.1.39-enumB010, could you please submit a hotfix request through the support channel? |
Thank you for the quick fix @rismehta - I will get a hotfix request raised |
Expected Behaviour
Should be able to add custom language translation strings using clientlibs like - /apps/forms-core-components-it/clientlibs/clientlib-it-custom-locale/js/languageinit.js
Actual Behaviour
Cannot override translation strings present under core clientlibs - /apps/core/fd/af-clientlibs/core-forms-components-runtime-all/resources/i18n
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version
AEM6.5.20
AEM Version (mention the exact version in case of cloud SDK)
AEM6.5.20
AEM Forms Version
1.1.39-enumB010
Sample Code that illustrates the problem
Logs taken while reproducing problem
The following code in
aem-core-forms-components/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/site/js/formcontainerview.js
Line 141 in c55cca8
does not let custom translation strings to be loaded as the #langData already has entry for the given locale from ko-kr.json under /apps/core/fd/af-clientlibs/core-forms-components-runtime-all/resources/i18n/ko-kr.json
The text was updated successfully, but these errors were encountered: