User tests: Successful: 0 Unsuccessful: 0
This is a redo of #13451 ### Summary of Changes
As discussed in #13421
Deprecate _QQ_
and normalize parsing of ini language files.
Apply patch
Check all language strings show as usual. Including the ones with "_QQ_"
Confirm language debug still works.
Enable debug language in global config and system debug plugin.manually make some parsing errors in the en-GB.ini file and reload the page
Confirm language overrrides still works.
For instance, load a language string that uses escaped quotes (ex: JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED) and make some changes in the override. Save it and load it again to check if ok.
Confirm quoting in server side and client side still works (ex: add to isis template index.php)
$app->enqueueMessage('Server side Test 1 (click to proceed to Client side Test 3): ' . JText::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'));
JText::script('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED');
$this->addScriptDeclaration("alert('Client side Test 1: ' + Joomla.JText._('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'));");
$this->addScriptDeclaration("alert('Client side Test 2: " . JText::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED', true) . "');");
$this->addScriptDeclaration("window.addEventListener('click', function () { Joomla.renderMessages({'error': ['Client side Test 3: ' + Joomla.JText._('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED')]}) });");
None
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_languages Libraries |
please mark your test - thanks
Labels |
Added:
?
|
I have tested this item
Nightly build 3.8.8-dev Wednesday, 09 May 2018 02:03:14 UTC.
Tested with no changes in language files.
Tested after replacement of "_QQ_"
with \"
in all language files.
Tested with and without Debug Language mode.
tested in FE and BE.
Tested with de-DE and en-GB.
I have tested this item
After earlier successful test above this time only code review
I have tested this item
looks fine to me. @mbabker please also test before merge.
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Labels |
Added:
?
?
Removed: ? |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-12 18:36:37 |
Closed_By | ⇒ | mbabker |
thanks
Hi
@brianteeman beware hosts without parse_ini_file active will not be able to parse the language files.
Basicly the issue solved with #15620 and latter with wilh #17332 will happen again
@mbabker
Don't know why, but I was thinking this would be for 4.0
@andrepereiradasilva is damned right. We have to deal with parse_ini as this is a 3.x release.
this is just a redo of @andrepereiradasilva original pr which needed a new owner. That pr was also was against staging
Should just be copying this block and replacing this line.
I see the code in Language.php here.
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Language/Language.php#L832-L846
Are you sure it is missing somewhere?
OK, this is for 3.9 as 3.8 is fine.
I do not have a 3.9 fork here atm, therefore someone has to create a PR towards 3.9
Looks OK here for what it is supposed to do (tested all cases)
NOTE to @rdeutz while I think of it.
If I remember well, you are the one who made the patch to accept
\"
in core without triggering a debug error.At that time, as we were just updating core to accept it (
"_QQ_"
had to be present twice in the value), we forced a double use of it (\"text\"
is OK but a single\"
IS triggering a debug error.This is not necessary anymore for 4.0 where we will force the use of the escaped double quote everywhere.
Can you already think about getting rid of that limitation for 4.0?