? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
2 Jan 2017

Summary of Changes

As discussed in #13421

Deprecate _QQ_ and normalize parsing of ini language files.

  • creates a new method JLanguageHelper::parseIniFile and marks LanguagesHelper::parseFile (helper of com_languages) as deprecated.
  • makes the necessary adaptations

Testing Instructions

  1. Apply patch

  2. Check all language strings show as usual. Including the ones with "_QQ_"

  3. 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

  4. 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.

  5. 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')]}) });");
  1. Any other test you could remember

Documentation Changes Required

None

avatar andrepereiradasilva andrepereiradasilva - open - 2 Jan 2017
avatar andrepereiradasilva andrepereiradasilva - change - 2 Jan 2017
Status New Pending
avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Jan 2017

@frankmayer please check

avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2017
Category Administration com_languages Libraries
avatar andrepereiradasilva andrepereiradasilva - change - 2 Jan 2017
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - change - 2 Jan 2017
Title
[Deprecate _QQ_ 3] Mark _QQ_ as deprecated and normalize language ini parsin
[Deprecate _QQ_ 3] Mark _QQ_ as deprecated and normalize language ini parsing
avatar andrepereiradasilva andrepereiradasilva - change - 2 Jan 2017
Title
[Deprecate _QQ_ 3] Mark _QQ_ as deprecated and normalize language ini parsin
[Deprecate _QQ_ 3] Mark _QQ_ as deprecated and normalize language ini parsing
avatar andrepereiradasilva andrepereiradasilva - edited - 2 Jan 2017
avatar frankmayer
frankmayer - comment - 2 Jan 2017

I have tested this item successfully on 71ea180

Tested according to instructions: OK
Code review: OK


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

avatar frankmayer frankmayer - test_item - 2 Jan 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 8 Jan 2017

Conflicts

avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Jan 2017

conflicts fixed

avatar brianteeman
brianteeman - comment - 8 May 2018

I have tried locally to resolve the merge conflicts on this PR but I get
Error: Class 'Joomla\CMS\Language\JLanguageHelper' not found: Class 'Joomla\CMS\Language\JLanguageHelper' not found

I am guessing it is something to do with

creates a new method JLanguageHelper::parseIniFile and marks LanguagesHelper::parseFile (helper of com_languages) as deprecated.

Any clues?

avatar mbabker
mbabker - comment - 9 May 2018

Any calls to JLanguageHelper in the libraries/src directory should either be prefixed with a leading slash (i.e. \JLanguageHelper) or use the full namespaced class name (i.e. Joomla\CMS\Language\LanguageHelper).

avatar brianteeman
brianteeman - comment - 9 May 2018

Thanks. I will check it in the morning

avatar brianteeman
brianteeman - comment - 9 May 2018

Closed see #20321

avatar brianteeman brianteeman - change - 9 May 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-05-09 08:01:23
Closed_By brianteeman
Labels Added: ?
avatar brianteeman brianteeman - close - 9 May 2018

Add a Comment

Login with GitHub to post a comment