? ? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
9 Dec 2017

Replaces all instances of _QQ_in the language files with \"as per @nikosdion comments

I am unsure that I need to also change

		$strings  = @parse_ini_string($contents);

to set it to use $scanner_mode = INI_SCANNER_RAW

Please advise

avatar brianteeman brianteeman - open - 9 Dec 2017
avatar brianteeman brianteeman - change - 9 Dec 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Dec 2017
Category Administration Language & Strings Installation Front End Plugins
avatar brianteeman brianteeman - change - 9 Dec 2017
The description was changed
avatar brianteeman brianteeman - edited - 9 Dec 2017
avatar nikosdion
nikosdion - comment - 9 Dec 2017

In order to retain compatibility with Joomla! 3.x language files you should replace it with:

$contents = str_replace('"_QQ_"', '\\"', $contents);
$strings  = @parse_ini_string($contents, INI_SCANNER_RAW);

The str_replace line can be removed in Joomla! 5.0.

Moreover you will have to update the documentation https://docs.joomla.org/Specification_of_language_files to reflect that double quotes are now escaped with \" just like anyone would expect.

Moreover, since you are using INI_SCANNER_RAW, you no longer need the note about not being able to use YES, NO, TRUE, FALSE etc in values (right hand side). The RAW mode removes the parsing of such constants.

avatar brianteeman
brianteeman - comment - 9 Dec 2017

Thanks for that I will update shortly

avatar brianteeman brianteeman - change - 9 Dec 2017
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 9 Dec 2017
Category Administration Language & Strings Installation Front End Plugins Administration com_languages Language & Strings Installation Libraries Front End Plugins
avatar brianteeman brianteeman - change - 9 Dec 2017
The description was changed
avatar brianteeman brianteeman - edited - 9 Dec 2017
avatar Quy
Quy - comment - 9 Dec 2017

Do a search on <a href='. Do you want it to be consistent and change it to <a href=\"?

avatar infograf768
infograf768 - comment - 9 Dec 2017

Tests should be done with debug language on.

avatar wilsonge
wilsonge - comment - 9 Dec 2017

Thanks @brianteeman and @nikosdion :)

avatar wilsonge wilsonge - change - 9 Dec 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-12-09 20:04:16
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 9 Dec 2017
avatar wilsonge wilsonge - merge - 9 Dec 2017
avatar brianteeman
brianteeman - comment - 9 Dec 2017

thanks

Add a Comment

Login with GitHub to post a comment