-
Bug
-
Resolution: Obsolete
-
Neutral
-
None
-
1.0.10
This translation in the french language bundle is too long:
field.upload.select.another.media = Sélectionnez un nouveau/une nouvelle {0}...
When using it in a info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition it results that the label of the field overlaps/pushes to the right the delete button:
-> one can not delete the binary anymore. (see print screen 'DamUploadField.png').
Work around:
Nr 1: Fastest and least nice:
Use the Dialog's full screen option, see print screen 'DialogFullScreen.png'.
Nr 2: Set a fix 'label:
If you don't need it translated, one can set a fix 'labeling' of this button.
Add this to the field configuration:
selectAnotherCaption: A fix button 'label'
Nr 3: Override the the value of the original translation key:
The original key is set in the constructor of the info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition field definition:
setSelectAnotherCaption("field.upload.select.another");
When a media is already uploaded it gets the following key automatically (a '.media') is added:
field.upload.select.another.media
Add to your module a i18n folder and add into a french message file the key field.upload.select.another.media with a new translated value.
https://documentation.magnolia-cms.com/display/DOCS/i18n+API#i18nAPI-AutomaticloadingofmessagebundlesfromtheMagnoliai18nfolder
Ensure that your module is loaded after the language modules by setting a dependency on them -> manages the loading order by the dependencies.
Example how it looks in the fr message bundle you'd create:
a.key.to.translate.media = My overriding translation (in French of course)
Nr4: Define your own translatable key and value:
Instead of setting a fix String as a button label you can also define a key to be translated. Add this to the field configuration:
selectAnotherCaption: a.key.to.translate
As in Nr 3 you define your own i18n folder with a message bundle and add a translation by the key you defined:
a.key.to.translate.media = My new translation (in French of course)
Remember the .media which is automatically added to the key's end when a media is already uploaded.