? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
15 Oct 2018

Summary of Changes

As title says.

Testing Instructions

Enable action logs.
Update, install, uninstall extension.
Display the action logs
/administrator/index.php?option=com_actionlogs

Before patch

The extensions name will have the form com_something, mod_something, etc.

screen shot 2018-10-15 at 09 26 12

After patch

The extension names will be translated
screen shot 2018-10-15 at 09 29 08

avatar infograf768 infograf768 - open - 15 Oct 2018
avatar infograf768 infograf768 - change - 15 Oct 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2018
Category Front End Plugins
avatar infograf768 infograf768 - change - 15 Oct 2018
The description was changed
avatar infograf768 infograf768 - edited - 15 Oct 2018
avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2018

Extension names are translated in getHumanReadableLogMessage().

avatar infograf768
infograf768 - comment - 15 Oct 2018

Well, as demonstrated above, they are not.
What do you suggest?

avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2018

Language files are not loaded. Because your extension name is uppercase:
<name>PLG_CONTENT_JOSTAG</name>

Need to pass lowercase version to loadTranslationFiles() or change it to lowercase inside.

avatar infograf768
infograf768 - comment - 15 Oct 2018

<name>com_localise</name> is lowercase.

avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2018

It lacks extension name (COM_LOCALISE) string in main language file. Note loadTranslationFiles() doesn't load .sys file.

avatar infograf768
infograf768 - comment - 15 Oct 2018

hmm

avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2018

Perhaps we should load .sys files too. In case an extension doesn't come with main file (e.g. plugins without any params)?

avatar infograf768
infograf768 - comment - 15 Oct 2018

We should cope for both issues imho. Uppercase and .sys.ini

avatar infograf768
infograf768 - comment - 15 Oct 2018

Issue for uppercase can be easily solved by modifying loadTranslationFiles()

	public static function loadTranslationFiles($extension)
	{
		static $cache = array();
		$extension = strtolower($extension);

then we do not need any more to strtolower to load the lang file.

And also force load the sys.ini file in that same file.

I can do that or you do?

avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2018

Just do it ✔️

avatar infograf768
infograf768 - comment - 15 Oct 2018

not as simple as I thought for .sys as they may depend on the client of the extension.
I may just let this one alone.

This made me realise we have 2 other issues:

case 'mod':
				$source = JPATH_SITE . '/modules/' . $extension;
				break;

does not take into account admin modules.
and

			case 'tpl':
				$source = JPATH_BASE . '/templates/' . substr($extension, 4);
				break;

does not take into account admin templates.

This method really need some improvement. On it.

avatar infograf768
infograf768 - comment - 15 Oct 2018

Forget modules and templates. It looks like they are using the title and not the extension name.
Therefore loading their ini files is useless.
Will not touch it. Only the strtolower

avatar infograf768
infograf768 - comment - 15 Oct 2018

Please see #22637

avatar infograf768 infograf768 - change - 15 Oct 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-10-15 10:48:43
Closed_By infograf768
Labels Added: ?
avatar infograf768 infograf768 - close - 15 Oct 2018

Add a Comment

Login with GitHub to post a comment