[MGNLDEMO-212] Move Travel Demo template labels into a separate message bundle Created: 24/Mar/17 Updated: 28/Nov/17 Resolved: 19/May/17 |
|
| Status: | Closed |
| Project: | Magnolia Demo Projects |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.4 |
| Type: | Task | Priority: | Neutral |
| Reporter: | Antti Hietala | Assignee: | Robert Šiška |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoR: |
Empty
|
||||||||||||
| Documentation update required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Sprint: | Kromeriz 96 | ||||||||||||
| Story Points: | 2 | ||||||||||||
| Description |
|
We have a best practice about template labels:
But we don't follow our own advice. Doc update required when completed: In the best practice box, provide a link to the separate template label bundle in Travel Demo code so users can look at the example and follow suit. |
| Comments |
| Comment by Roman Kovařík [ 10/May/17 ] |
|
We need a precise format of file names, e.g. WDYT, ahietala? |
| Comment by Mikaël Geljić [ 10/May/17 ] |
|
I would not make it a recommendation to split by def-type.
Templating keys on the other hand are for visitors—and not even all of them:
Re: naming, I couldn't come up with anything clearer than -author/-authoring vs. -visitor; maybe worth asking those who implemented such split in real life? EDIT: I seem to remember -frontend was an option too. Other keys (the majority) could remain unsuffixed. Simplifying to the extreme, we don't need an app or module prefix either.
|
| Comment by Christoph Meier [ 10/May/17 ] |
|
Concerning naming: existing file: edit:i have read Mikas proposal above a bit late. Sounds good for me too (actually his naming is more obvious when it comes to the meaning of the file). Concerning splitting up files: |
| Comment by Antti Hietala [ 10/May/17 ] |
|
Some points:
Preference:
|
| Comment by Christoph Meier [ 10/May/17 ] |
|
If i remember correctly, The documented recommendations are the outcome of some concept pages from Greg (i would say). We can adapt them. But this is |
| Comment by Mikaël Geljić [ 10/May/17 ] |
Module- or app- prefixes don't matter; even in our own modules we're not fully consistent.
The messages suffix is more historical than legacy; in past versions (before the M5 new i18n), you would simply put "messages_xx.properties" in your module package and set the base-name accordingly. With the M5 i18n, everything went to the mgnl-i18n directory, the human-friendly differentiator had to become part of the file name. But "messages" was never required there, it just stayed out of unspoken convention. Happy to keep calling the first token a <module-name>, as it's clear enough also in the context of light modules; then for the rest no need to be overly specific—developers can judge if they need different naming or splitting. Looks like we have a winner? |