? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
14 Mar 2018

Pull Request for Issue #19898

Summary of Changes

Load mod_menu.ini lang files when populating the manager

Testing Instructions

Go to Menu Manager
Add a new Menu, type administrator, select one of the options predefined Joomla / predefined modern
Store the new menu.
Reopen it - you get the predefined Entries

Expected result

The Language Keys (menu titles) from predefined xmls are translated

Actual result

see screenshotscreen shot 2018-03-13 at 21 15 37

After patch

screen shot 2018-03-14 at 10 01 14

Documentation Changes Required

None

@chmst @ReLater

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar infograf768 infograf768 - open - 14 Mar 2018
avatar infograf768 infograf768 - change - 14 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2018
Category Administration com_menus
avatar brianteeman
brianteeman - comment - 14 Mar 2018

Shouldnt the check also be checking to ensure that these are admin menu items

avatar chmst
chmst - comment - 14 Mar 2018

This works :) The language keys also are used in the form (title).

avatar chmst
chmst - comment - 14 Mar 2018

I have tested this item 🔴 unsuccessfully on 3f0d5f0

The patch works very well on menuitems. But when editing an item, the language key is not translated.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19900.

avatar chmst chmst - test_item - 14 Mar 2018 - Tested unsuccessfully
avatar infograf768
infograf768 - comment - 14 Mar 2018

The patch works very well on menuitems. But when editing an item, the language key is not translated.

I guess it is voluntary in order to propose this custom admin menu what ever the language used in back-end.
@izharaazmi Is'nt it?

avatar brianteeman
brianteeman - comment - 14 Mar 2018

Please also see existing PR #19802

avatar infograf768
infograf768 - comment - 14 Mar 2018

Shouldnt the check also be checking to ensure that these are admin menu items

The patch does it by checking clientId.

+		// Load mod_menu.ini file when client is administrator
+		if ($clientId == 1)
etc.
avatar izharaazmi
izharaazmi - comment - 14 Mar 2018

@infograf768 Yes, during editing if we translate it in the title field, it will no longer remain translatable.

avatar infograf768
infograf768 - comment - 14 Mar 2018

@chmst Please change your review 😃 as this is intended behaviour.

avatar csthomas
csthomas - comment - 14 Mar 2018

I do not know this problem, maybe I'm wrong, but IMO loading the translation or translation of the title in the model in general (PR #19802) is strange. May be it should be transferred for ex. to the controller (this PR) and to the view (PR #19802).

avatar infograf768
infograf768 - comment - 14 Mar 2018

@csthomas
This would mean, for this PR, adding a new method in the controller. Looks like overkill.

avatar chmst
chmst - comment - 14 Mar 2018

I have tested this item ✅ successfully on 3f0d5f0

Items are translated as described. Thank you @infograf768


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19900.

avatar chmst chmst - test_item - 14 Mar 2018 - Tested successfully
avatar Quy
Quy - comment - 14 Mar 2018

When editing, should Parent Item and Ordering dropdowns show the translated text?

avatar infograf768
infograf768 - comment - 15 Mar 2018

@Quy
That is a very good idea. Easy enough by adding the same code in edit.php
I think though that it should be a different PR. I am preparing it now.

In the mean while, can you test this one so that we RTC it?

avatar infograf768
infograf768 - comment - 15 Mar 2018

Also, if you folks like, I can add in that new PR some code to display the translation of the menu Title. Needs one lang string to add.

We would get:
screen shot 2018-03-15 at 10 33 39

and the translations for Parent Item and Ordering
screen shot 2018-03-15 at 10 34 40

What do you think?

avatar izharaazmi
izharaazmi - comment - 15 Mar 2018

Translate parent item and ordering is great. However we need to indicate that the translated title is not dynamic and will be updated on save. Or are we really going to make it on ajax?

avatar infograf768
infograf768 - comment - 15 Mar 2018

@izharaazmi
While working on this, I found out that the presets do NOT fill the Menu Item Type.
It forces therefore, for any modification, to use the Select button and find again the correct menu item in the modal to allow saving.
Can you look at that issue?

ADDED: see #19904

If the Title is modified and the item is saved, the new value will be updated as you correctly state. Not sure I understand your concern.

But I think we should have this debate in the new PR to come.
In the mean while, le'ts get a RTC on this one as it is specific to the manager please. ;)

avatar infograf768
infograf768 - comment - 15 Mar 2018

Please also test #19916 concerning editing one of these menu items created by presets.

avatar Quy
Quy - comment - 15 Mar 2018

I have tested this item ✅ successfully on 3f0d5f0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19900.

avatar Quy Quy - test_item - 15 Mar 2018 - Tested successfully
avatar Quy Quy - change - 15 Mar 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 15 Mar 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19900.

avatar mbabker mbabker - change - 17 Mar 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-03-17 15:33:23
Closed_By mbabker
Labels Added: ? ?
avatar mbabker mbabker - close - 17 Mar 2018
avatar mbabker mbabker - merge - 17 Mar 2018

Add a Comment

Login with GitHub to post a comment