[DOCU-1040] Fallbacking of ${content.windowTitle!content.title!} in i18n-ized content Created: 09/Jun/17 Updated: 30/Sep/19 Resolved: 30/Sep/19 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Neutral |
| Reporter: | Martin DrĂ¡pela | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | cli, freemaker, i18n, outdated | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoR: |
Empty
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | Internationalization | ||||||||
| Description |
|
The mgnl CLI (2.1.0) command mgnl create-page hello will produce a FreeMarker file where the <title> element for the page is generated in the following way: <title>${content.windowTitle!content.title!}</title>
From the author perspective, the command should default to the content of title if nothing is found for windowTitle. In an i18n-ized project, however, this may be rather tricky: The resolver may actually provide a fallback windowTitle value from the JCR instead of the FreeMarker default title, even though the content for the title does exist for the given language version of the page. Thus, under the following definition of page properties, The English variant:
The German variant:
the <title> element in the German version will be rendered with the English "This is the homepage". This could be documented somewhere (i18n / mgnl-cli). Q for the DEVs: Could this behavior be fixed by making windowTitle a child of title in the class and, consequently, modifying also the print command to fallback to the parent? |
| Comments |
| Comment by Martin DrĂ¡pela [ 09/Jun/17 ] |
|
The issue comes to be even more counterintuitive if a user starts with this configuration of properties: The English variant: title (en): The German variant: title (de): "Dies ist die Homepage." in which case the German version will have the <title> rendered in German, but then after the user adds the windowTitle (en) property, the German page renders the <title> with the English content. |
| Comment by Julie Legendre [ 30/Sep/19 ] |
|
In order to better focus our efforts on DOCU tickets that are still relevant and important, all tickets older than 18 months have been labelled as outdated and are being automatically closed. |