[LANG-72] FR: field.upload.select.another.media is too long -> one can not delete the binary Created: 15/Aug/17  Updated: 30/Sep/21  Resolved: 30/Sep/21

Status: Closed
Project: Language Bundles
Component/s: French
Affects Version/s: 1.0.10
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Christian Ringele Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: y2k
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File DamUploadField.png     PNG File DialogFullScreen.png    
Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

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.



 Comments   
Comment by Marta Kobus [ 30/Sep/21 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

 

Thank you,

The Magnolia Team

Generated at Mon Feb 12 02:19:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.