Issue
- When exporting a language key from one instance and then import it to another instance, the translated sentence appears incomplete.
- Steps to reproduce:
1. Start the server.(Let's say-Instance 1)
2. Navigate to the Control Panel > Language Override.
3. Click on the 'New' button and create a new language key. Say-secondinstancekey. Also, add the translation override in en-US and click on 'Save'.
4. After creating this, click on the ellipses dot in the top right corner and click on 'Export Overridden Translation' and export the key.
5. Shut down the server.
6. Now start the second instance of the same version.
7. Navigate to the Control Panel > Language Override.
8. Click on the ellipses dot in the top right corner and click on 'Import Translations'
9. Then select the exported file (Language_en_US.properties)
10. After importing, search for the imported language key.
Observed Behaviour: The sentence in the translation override in en-US is not completed.
Expected Behavior: The sentence in the translation override in en-US should be completed.
Environment
- Liferay Quarterly Release
Resolution
- This concern is the expected behaviour since the “value” field can contain HTML content. For instance, the user could add a key like this
my-key=Please, add your content inside the <h1> tag
For security reasons, this content has been sanitized, or, in other words, prevent potentially malicious code from being executed. - However, if still want the expected behaviour then:
- Navigate to Control Panel > System Settings > Security Tools > AntiSamy Sanitizer.
-
Add this
com.liferay.portal.language.override.model.PLOEntryis in the whitelist in the AntiSamy system configuration in both instances.