? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
25 Jul 2021

On a site with multiple admin languages you would expect that the name of the menu could be translated.

Test instructions

Create an admin menu and give it a title such as JADMINISTRATOR
Create a site menu and give it a title such as JSITE

Expected behaviour

The names of both menus are translated

Actual behaviour

Only the name of the admin menu is translated

Solution

I have no idea why but there is an extra space at the end of $item->title so the string being passed through JText is "JSITE " which obviously doesn't match. I have no idea why there is not an extra space for the admin menu

image

This PR trims $item->title so that now the site menu name is also translated.

No idea if this is a hack/bandage or the correct solution but its been bugging me for hours and I can't find the space

Before

image

image

After

image

image

avatar brianteeman brianteeman - open - 25 Jul 2021
avatar brianteeman brianteeman - change - 25 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2021
Category Administration com_menus
avatar brianteeman brianteeman - change - 25 Jul 2021
Labels Added: ?
avatar brianteeman
brianteeman - comment - 25 Jul 2021

Will check in the morning but looks like it could be

On Mon, 26 Jul 2021, 00:37 Richard Fath, @.***> wrote:

@brianteeman https://github.com/brianteeman Can it be that the space
comes from here?
https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_menus/presets/default.xml#L147


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#34905 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJ4P4NT4YL5HUASD3ZWBGDTZSN5DANCNFSM5A67QUFQ
.

avatar brianteeman
brianteeman - comment - 26 Jul 2021

Thanks @richard67 well spotted.

avatar brianteeman brianteeman - change - 26 Jul 2021
The description was changed
avatar brianteeman brianteeman - edited - 26 Jul 2021
avatar brianteeman brianteeman - change - 26 Jul 2021
The description was changed
avatar brianteeman brianteeman - edited - 26 Jul 2021
avatar richard67
richard67 - comment - 26 Jul 2021

@brianteeman I know it's not related to this PR. but as you are touching that file, maybe you could fix the typo in the comment here, too?

https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_menus/presets/default.xml#L133

"The repeated elements are place" should be changed to "The repeated elements are placed".

avatar wilsonge wilsonge - change - 26 Jul 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-07-26 18:28:21
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Jul 2021
avatar wilsonge wilsonge - merge - 26 Jul 2021
avatar wilsonge
wilsonge - comment - 26 Jul 2021

Thanks!

avatar brianteeman
brianteeman - comment - 26 Jul 2021

thx

Add a Comment

Login with GitHub to post a comment