No Code Attached Yet bug
avatar csbalazs
csbalazs
26 Sep 2019

Wrong menu item sorting under Hungarian langauge in Component menu in Joomla! admin.
In the Hungarian alphabet, the second letter is the "á" ("Á"), but the "Átirányítás" (Redirect) component almost the last in the menu.
screen shot 2019-09-26 at 14 32 38

avatar csbalazs csbalazs - open - 26 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 Sep 2019
avatar brianteeman
brianteeman - comment - 26 Sep 2019

Unfortunately this is the case with all languages that have extended accented characters. @ot2sen and myself looked at this before and if I recall correctly it requires a change in the mysql database collation for each specific language.

avatar brianteeman
brianteeman - comment - 26 Sep 2019

see #11609

avatar csbalazs
csbalazs - comment - 26 Sep 2019

Hungarian alphabetical rule: Short (a, e, i, o, ö, u, ü) and long (á, é, í, ó, ő, ú, ű) vowels appear anywhere in words, they are always considered equal. So, for the letters "a" and "á", neither the letter "a" nor the letter "á" takes precedence, but the order of the letters following them.

For example, articles ordering by title looks good in admin:
Jegyzet 2019-09-26 222703

avatar SharkyKZ
SharkyKZ - comment - 27 Sep 2019

We do sort admin menu items in PHP here:

$item->components = ArrayHelper::sortObjects($item->components, 'text', 1, false, true);

We could do it the same way we sort components in com_config:

$result[$component] = JApplicationHelper::stringURLSafe(JText::_($component)) . '_' . $component;

But it's not completely accurate either.

avatar brianteeman
brianteeman - comment - 27 Sep 2019

Interesting - ArrayHelper::sortObjects supports an option locale parameter

* @param mixed $locale Boolean or array of booleans to let sort occur using the locale language or not

avatar SharkyKZ
SharkyKZ - comment - 27 Sep 2019

I tried that once but it doesn't work on Windows, apparently. See #22542.

avatar brianteeman
brianteeman - comment - 27 Sep 2019

Where we you getting the locale from,? The language file or the OS. it should be the language file.

avatar SharkyKZ
SharkyKZ - comment - 27 Sep 2019

The language file.

avatar Hackwar Hackwar - change - 19 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 19 Feb 2023

Add a Comment

Login with GitHub to post a comment