A part of a menu item string is not translated without having a file metadata.xml in corresponding view folder. Ex. Articles » featured is shown instead of Articles » Featured Articles on menu items list (option=com_menus&view=items). The file has to contain xml header, a metadata root element and a view element with a non-empty title attribute.
Expected result
A menu item string should be fully translated using layout xml file only.
Actual result
A menu item is fully translated only if a metadata.xml file is present in view folder.
System information (as much as possible)
joomla 3.4.3
Additional comments
If actual result is intended, it is needed to mention it in the tutorial. I've found only https://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_a_menu_type_to_the_site_part and there is nothing about metadata.xml in view folder.
Title |
|
Labels |
Added:
?
|
Thx for your response. I've just seen the code you are proposing and if I'm not wrong, you're proposing the presence of a file metadata.xml to be a condition for showing title from layout xml file. I would rather prefer a file metadata.xml to be absolutely optional for showing a title from a layout file.
In other words - if there is no metadata.xml show "component" » "layout" and if there is the file metadata.xml present with non-empty title, show "component" » "view" » "layout".
There is actually already code there dealing with cases where the file is completely missing (Using the view name directly).
I would have to look into it if it can be changed in a B/C way without screwing up 3rd party extensions.
I agree with you that this should ideally be completely optional. It makes no sense to have an empty file there.
I will try to revive this PR and see if there is more interest now. It may take a few days till I have time to do it
Yes, that's the case. I want to see a title from layout xml file not the view name if the metadata.xml is missing. I think view name should be used only if there is neither metadata.xml, neither layout xml file.
Thank you for your time :)
@tomasduracka See #7654
Closing this issue as there is a PR
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-08-07 22:20:53 |
Closed_By | ⇒ | Bakual |
In one of my first Pull Requests I tried to solve that, but nobody was interested so I closed it.
Currently, the view title is required to be present, but never used anywhere. So I thought we can make it optional and show the title if present.
PR was #288. I can restore the branch and update the PR if there is an interest.
My own goal was for my own extension which uses the view files for the menu item instead of the layout files. I use the layout files as what they really are: different layouts for the same view. Currently that will only show the component name in the menu item with no indication what view it is.