J4 Issue ?
avatar rgjoyce
rgjoyce
20 Dec 2018

Steps to reproduce the issue

turn on debug mode for language.

Expected result

For the system to list the language file and the line number where the problem is.

Actual result

listing the file with absolute path.
/administrator/components/com_registrationmanagerking/language/en-GB/en-GB.com_registrationmanagerking.ini
13 times for 13 errors.

System information (as much as possible)

Joomla 4 nightly build 6

I would have expected the line numbers to have been provided too. To find the problem lines, I had to load the language file in a Joomla 3.9.1 site.

Additional comments

avatar rgjoyce rgjoyce - open - 20 Dec 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Dec 2018
avatar infograf768 infograf768 - change - 20 Dec 2018
Labels Added: J4 Issue
avatar infograf768 infograf768 - labeled - 20 Dec 2018
avatar infograf768
infograf768 - comment - 20 Dec 2018

Issue confirmed.

avatar infograf768 infograf768 - change - 20 Dec 2018
Title
Language debug mode not showing line numbers.
[4.0] Language debug mode not showing line numbers.
avatar infograf768 infograf768 - edited - 20 Dec 2018
avatar infograf768
infograf768 - comment - 20 Dec 2018

@elkuku
Not only we do not have any more the lines in error, but the Tabs are not translated.

avatar elkuku
elkuku - comment - 20 Dec 2018

Confirmed.
This is only true for plain text. You can set the xdebug.file_link_format in your php.ini to open the file in your favorite text editor / IDE ?

avatar rgjoyce
rgjoyce - comment - 20 Dec 2018

This may very well be. But most users of Joomla aren’t developers and won’t know that.

It is more user friendly if the info is presented in a user friendly presentable fashion so that there is no confusion and no additional user work other than opening the specified file and investigating the reported line.

From: Nikolai Plath [mailto:notifications@github.com]
Sent: Thursday, December 20, 2018 9:06 PM
To: joomla/joomla-cms
Cc: rgjoyce; Author
Subject: Re: [joomla/joomla-cms] [4.0] Language debug mode not showing line numbers. (#23305)

Confirmed.
This is only true for plain text. You can set the xdebug.file_link_format in your php.ini to open the file in your favorite text editor / IDE ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #23305 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AFMGLIGLvw83Eh2Op8bfYFTPaD7MB55Fks5u66dlgaJpZM4ZbueE . https://github.com/notifications/beacon/AFMGLOg-Ix96X1yf7tLGQPS3-I-F93evks5u66dlgaJpZM4ZbueE.gif


This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

avatar elkuku
elkuku - comment - 20 Dec 2018

Totally agree with you ?
So there's #23308 which should fix this issue.
Not sure if you can test it, otherwise you have to wait until it gets merged and included in the next nightly.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Dec 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-12-20 16:00:37
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 20 Dec 2018
avatar Quy Quy - change - 20 Dec 2018
Closed_Date 2018-12-20 16:00:37 2018-12-20 16:00:39
Closed_By joomla-cms-bot Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 20 Dec 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23305

avatar Quy
Quy - comment - 20 Dec 2018

Please test PR #23308.


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

avatar Quy
Quy - comment - 20 Dec 2018

Please test PR #23308.


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

avatar infograf768
infograf768 - comment - 20 Dec 2018

@elkuku
will test tomorrow. what about the tabs? (Queries, Untranslated, Errors)

avatar elkuku
elkuku - comment - 20 Dec 2018

what about the tabs?

There has never been an effort, nor a request, to translate anything in the new debug thing (apart from the config settings).

avatar infograf768
infograf768 - comment - 21 Dec 2018

There has never been an effort, nor a request, to translate anything in the new debug thing (apart from the config settings).

I understand there were no efforts. Time to implement it I guess...
We have in 3.x
screen shot 2018-12-21 at 07 19 12

In J4, the Tabs names are defined in the DataCollector/various files in the getWidgets() methods

Therefore I guess that we could for example use in /plugins/system/debug/DataCollector/LanguageStringsCollector.php:

[...]
use Joomla\CMS\Language\Text;
[...]
	public function getWidgets(): array
	{
		return [
			Text::_('PLG_DEBUG_UNTRANSLATED_STRINGS')       => [
				'icon'    => 'question-circle',
				'widget'  => 'PhpDebugBar.Widgets.languageStringsWidget',
				'map'     => $this->name . '.data',
				'default' => ''
			],
			Text::_('PLG_DEBUG_UNTRANSLATED_STRINGS') . ':badge' => [
				'map'     => $this->name . '.count',
				'default' => 'null'
			]
		];
	}

As the string already exists, this would give for French:

screen shot 2018-12-21 at 08 31 46

What do you think?

avatar infograf768
infograf768 - comment - 21 Dec 2018

Closing this as we have #23308

Translations would be for another PR.

avatar infograf768
infograf768 - comment - 21 Dec 2018

Note: some translations have to be done in the widjet.js files.

Add a Comment

Login with GitHub to post a comment