Translation Workflow should not translate file names
Related to #9037 When you create a File Asset and upload a file such as a txt file, this workflow is translating the txt file name to another language(s) which is a wrong behavior, because it should translate only the file title but not the file name This could be happening because the txt file name is a text field as well as the txt title. Perhaps need to create a way to exclude file asset’s name out of the translation.
Steps to reproduce:
- Generate the jar file "plugin-dotcms-actionlet-google-translate-0.1.jar”
- Login to Dotcms and upload the jar file in Dynamic Plugins portlet:
- Now navigate to Content Types> Workflow Schemes
- Click on Default Scheme
- Inside Initial State, create a new Workflow Action “Translation_test" and hit Save
- Now Add the Sub-action “Translate Content" such as below and hit Save:
- Click Translate Content to verify it’s set to translate text fields:
- Create a new File Asset and upload a txt file
- Navigate to Content> Content Search.
- Look for the file asset you just created and execute Translation_test workflow:
- You will see the file asset name (as well as the file asset title) is translated to other languages:
- New Resource Links of translated file assets return a 404 error:
http://localhost:8080/archivo+de+prueba+en+diferentes+languages.txt?languageid=2 http://localhost:8080/Fichier+de+test+dans+languages.txt+diff%C3%A9rent?languageid=3
Tested locally in: master-3.6 // Mac OS 10.10 // MySQL 5.6.23 // Firefox
Fixed here: https://github.com/dotCMS/core/issues/9262
Passed QA. Translation Workflow is not translating file names, only fields specified in Translate Field Types (text, texarea, etc). Tested locally in: master-3.6 // Mac OS 10.10 // MySQL 5.6.23 // Firefox