[MTE-74] Use i18n "best practices" in MTK Created: 02/Feb/16  Updated: 15/Apr/16  Resolved: 21/Mar/16

Status: Closed
Project: Magnolia Templating Essentials
Component/s: None
Affects Version/s: None
Fix Version/s: 0.10

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0d
Time Spent: 2d 5h 5m
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLEESOLR-96 Change i18n keys used from MTE and fi... Closed
is causing MTE-81 Translate label for component 'image' Closed
dependency
depends upon MAGNOLIA-6559 Support i18n directory in light module Closed
depends upon MGNLUI-3764 I18n: I can reuse the keys between mo... Closed
is depended upon by MTE-49 More sophisticated main page template Closed
is depended upon by MTE-76 Make sure that i18n keys may be reuse... Closed
relation
is related to MGNLDEMO-114 Use i18n "best practices" on the trav... Closed
supersession
supersedes MTE-82 Image component translations are broken 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)
Release notes required:
Yes
Date of First Response:
Epic Link: Introduction of new i18n
Sprint: Kromeriz 30, Kromeriz 36
Story Points: 5

 Description   

Do not set i18n-basename, label, description on dialogs and templates - instead make use of autogenerated keys and use bundles within i18n folder.

Move keys from "old" bundles into i18n folder wherever possible.



 Comments   
Comment by Christopher Zimmermann [ 03/Feb/16 ]

I am really looking forwards to this!

Comment by Christopher Zimmermann [ 04/Feb/16 ]

Please include me in review.

Comment by Roman Kovařík [ 05/Feb/16 ]

czimmermann You might want to wait for MTE-74.

Comment by Evzen Fochr [ 05/Feb/16 ]

I think release notes will be required for this ticket. We are changing i18n keys, so if somebody use them in their yaml ...

Comment by Christopher Zimmermann [ 08/Feb/16 ]

Im out of work for at least a week - so you can ignore my review request.

Comment by Roman Kovařík [ 08/Feb/16 ]

For release notes:

  • old i18n files were dropped, you might need to get rid of hardcoded i18n keys (labels, descriptions) from MTE in your custom dialogs/templates and use auto generated keys instead.
Comment by Milan Divilek [ 08/Feb/16 ]

This ticket breaks labels/descriptions in travel-demo, solr module ... This is caused by usage of new i18n mechanism and autogenerated keys. This will be fixed in follow up tickets MTE-76, MGNLDEMO-114 and MGNLEESOLR-96

Comment by Christopher Zimmermann [ 18/Feb/16 ]

Reopening because all files associated with a light module must be in the main/src/resources/[module-name] directory. In this case, the i18n files should be in a directory within "mtk".
I need to be able to drop the mtk directory in the webapp resources directory and have mtk work.
See related ticket: https://jira.magnolia-cms.com/browse/DEV-135

Comment by Christopher Zimmermann [ 22/Feb/16 ]

Also the keys for mtk translations should not specify the modulename - this is because it must be easy for people to base their own templates on the mtk templates, for example by copying them into their own module.
MTK includes the components that would likely be used in any project.
It will be most convenient if they get the translations out of the box for the 5 (or however many) language translations that we provide.

So we should use keys without the modulename - for example:
dialogs.<dialogPath>.form.tabs.<tabName>.fields.<fieldName>.label
(See comment on https://jira.magnolia-cms.com/browse/MGNLUI-3764)

Comment by Christopher Zimmermann [ 22/Feb/16 ]

Keys for textimage tabImage should be usable in other components, like the image component.
So the keys should not specify the component.
Instead of this pattern:
mtk.components.textImage.tabImage.image.label

use this pattern:
form.tabs.tabImage.fields.image.label

Then we can remove the redundant keys introduced for the image component
https://jira.magnolia-cms.com/browse/MTE-48

Generated at Mon Feb 12 07:41:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.