[MGNLUI-2259] BasicUploadField i18n property file strings should use a 'variable' instead of redundant strings for each media type. Created: 09/Oct/13  Updated: 18/Oct/13  Resolved: 18/Oct/13

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.1
Fix Version/s: 5.1.1

Type: Improvement Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Chunhua Liu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-2185 i18n: Asset App Detail: asset field s... Closed
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)
Epic Link: i18n Epic
Sprint: 5.1.1

 Description   

The /magnolia-ui-admincentral/src/main/resources/mgnl-i18n/uploadField-messages_en.properties contains redundant strings for
image, video, audio, flash etc.
Their should rather be translations for each of these media types,
and then the rest of the strings shoudl accept it as a variable.

The code fix is probably in BasicUploadField#getCaption

Probably we need to also i18n-ize the captionExtension - that is - use it as a key to get translations for the filetypes.

We need to avoid some pitfalls in this though as some wording changes depending on whether the file name starts with an A.

Updated version:

  1. Video Upload text
    CHANGE*** field.upload.select.new = Select {0} to upload...
    field.upload.select.another = Upload a new {0}

    ...
    field.upload.select.edit = Edit

    {0}...
    CHANGE*** field.upload.drop.hint = or <em>drag {0}

    into this area</em> to upload it
    field.upload.file.detail.header =

    {0} detail
    field.upload.note.success = Your {0}

    has been uploaded successfully<br>

    {0}
    field.upload.note.warning = The upload of your {0}

    was aborted due to<br>

    {0}
    field.upload.note.error = An error occurred while uploading your {0}

    <br>

    {0}


    Old version
    # Video Upload text
    field.upload.select.new.video = Select a video to upload...
    field.upload.select.another.video = Upload a new Video...
    field.upload.select.edit.video = Edit video...
    field.upload.drop.hint.video = or <em>drag a video into this area</em> to upload it
    field.upload.file.detail.header.video = Video detail
    field.upload.note.success.video = Your video has been uploaded successfully<br>{0}

    field.upload.note.warning.video = The upload of your video was aborted due to<br>

    {0}
    field.upload.note.error.video = An error occurred while uploading your video<br>{0}

Generated at Mon Feb 12 08:54:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.