joomla-projects / com_localise

forked version of the original com_localise for experimental purposes
GNU General Public License v2.0
24 stars 36 forks source link

Option to disable warning messages! #311

Open hennysmafter opened 8 years ago

hennysmafter commented 8 years ago

Dear @infograf768 ,

Thank you for this really good extension. It is nice to have installed on a development server and saves such a huge amount of time!

I would like to request a feature as I believe it is not possible yet. If I am wrong about this let me know.

So we use sometimes the language files to show warnings in the backend of Joomla. We do it in the language file as it keeps everything needed for translation there. But the moment we have a multi line string it shows up as errors in Localise. I understand that it should bring this up as a error as it is not the normal way of doing it.

The moment it shows as a error we no longer can open it and we have to do it via the source. So we where hoping that in the future there will be a option to disable the warning system or the ability to ignore it and still open the translation page.

Below some code that we use in the .ini


MOD_SOMENAME_LABEL="
  <button type='button' class='close' data-dismiss='alert'>×</button>
    <div class='alert alert-warning'>
        <h4 class='alert-heading'>Warning</h4>
      <p>You need to select a theme</p>
    </div>
"
infograf768 commented 8 years ago

Looking into it.

infograf768 commented 8 years ago

The problem is that, although a value on multiple lines does work, it throws the error, in com_localise as well as in Joomla core.

elkuku commented 8 years ago

Only PHP doesn't complain...

mbabker commented 8 years ago

I don't know where core PHP lists all rules for INI files, but at a minimum JLanguage (and any related tools) should respect these notes regarding the parse_ini_string() function. Anything beyond that is arguably a Joomla enforced thing.

infograf768 commented 8 years ago

In http://php.net/manual/en/function.parse-ini-file.php (parse_ini_file() not parse_ini_string() ) I found: Changelog

5.0.0 Values enclosed in double quotes can contain new lines.