[MGNLDEMO-160] Separate i18n UI messages and template messages in Travel-Demo Created: 02/May/16  Updated: 24/Mar/17  Resolved: 24/Mar/17

Status: Closed
Project: Magnolia Demo Projects
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Martin DrĂ¡pela Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MGNLDEMO-212 Move Travel Demo template labels into... 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)
Date of First Response:

 Description   

1) The main issue:

At the end of https://documentation.magnolia-cms.com/display/DOCS/Types+of+translatable+text we recommend that app designers keep i18n messages for UI and for templates into two separate .properties files in a message bundle. This best practice is not followed in Travel Demo included in Magnolia 5.4.6 where both the UI messages and the Template messages are stored in one file:

module-travel-demo-messages_en.properties

2) A corollary to this issue is that
in i18n documentation we should eventually start recommending the designers to use a specific infix in the filename which will hold template massages, e.g.

<bundle-name><templates><locale>.properties

to distinguish them from UI messages, which could remain in

<bundle-name>_<locale>.properties

(Alternatively, to make it consistent, the recommended filename for UI messages could be
<bundle-name><UI><locale>.properties )

3) Furthermore
if the suggestion in 2) is adopted, the bundle of DE messages for Travel Demo should logically also include two files:

module-travel-demo-messages_de.properties
module-travel-demo-messages_templates_de.properties

4) A side note:
I miss

navigation.login=Log in
navigation.logout=Log out
navigation.registration=Register

in
lang/de/src/main/resources/mgnl-i18n/travel-demo/module-travel-demo-messages_de.properties

Shouldn't this file also include template keys like

navigation.login=Anmelden
navigation.logout=Abmelden
navigation.registration=Konto erstellen



 Comments   
Comment by Martin DrĂ¡pela [ 02/May/16 ]

The point is how to interpret the suggestion "Create separate message bundles for user interface labels and template labels."

By definition, a message bundle is "a collection of .properties files". Having two separate .properties files for each language version would mean eventually doubling the number of .properties files in each i18n folder.

An alternative (and narrower) interpretation of a "message bundle" would be to treat a group of i18n keys stored within a single .properties file as a bundle.

Comment by Antti Hietala [ 24/Mar/17 ]

Duplicates MGNLDEMO-212

Generated at Mon Feb 12 05:16:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.