Open joomlagate opened 7 years ago
Per http://php.net/manual/en/configuration.file.php #
comments are deprecated and removed in PHP 7.
Honestly though, I don't think the component should attempt to auto-convert these things. That seems like it's asking for trouble.
Steps to reproduce the issue
If the reference language file (ini format) contains "#" symbol which was put at the beginning of a line (the old way for "comments symbol"), com_localise will NOT save those lines in the translation language file when saving.
Expected result
I hope com_localise will convert "#" comments to ";" comments instead of REMOVING them.
Actual result
com_localise just pick up those old fashion "#" comments line and avoid to save them into the translation file. And it will show some warning message like:
System information (as much as possible)
Joomla 3.6.5 com_localise 4.0.29 dev PHP 7.0
Additional comments
We know that in Joomla 1.5 days, we use "#" as the comment beginner symbol in the language file. Later in Joomla 3 days, we change that rule to use ";" character as the comment beginner symbol. So, if com_localise "see" a "#" symbol at the line beginning, I hope com_localise will think "oh, this is a line of comment, but the author forgot to modify the # character to ; character, I will do this for him". Then, com_localise will convert that "#" to ";" and save that comment line to the translation file. Instead of showing warning, it will show some friendly notice like:
Thank you.