Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: better rule to treat "#" symbols at the line begnning #316

Open
joomlagate opened this issue Mar 19, 2017 · 1 comment
Open

Comments

@joomlagate
Copy link

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:

Detected a parsing error within this file. The line ; $Id: en-GB.com_acesef.ini 1.5.0 2010-08-29 has not been added to the language file.
Detected a parsing error within this file. The line #AM Resurrected has not been added to the language file.
Detected a parsing error within this file. The line #Ads Factory has not been added to the language file.
Detected a parsing error within this file. The line #iJoomla Ad Agency has not been added to the language file.
Detected a parsing error within this file. The line #BearLeague has not been added to the language file.
Detected a parsing error within this file. The line #BeeHeard has not been added to the language file.
Detected a parsing error within this file. The line #CMS Shop Builder has not been added to the language file.
Detected a parsing error within this file. The line #Community Answers has not been added to the language file.
Detected a parsing error within this file. The line #DJ-Catalog has not been added to the language file.
Detected a parsing error within this file. The line #Documents Seller has not been added to the language file.
Detected a parsing error within this file. The line #EasyBlog has not been added to the language file.
Detected a parsing error within this file. The line #Fabrik has not been added to the language file.
Detected a parsing error within this file. The line #FLEXIcontent has not been added to the language file.
Detected a parsing error within this file. The line #Glossary has not been added to the language file.
Detected a parsing error within this file. The line #iJoomla Digistore has not been added to the language file.
Detected a parsing error within this file. The line #JispCom has not been added to the language file.
Detected a parsing error within this file. The line #JEvents has not been added to the language file.
Detected a parsing error within this file. The line #Jomres has not been added to the language file.
Detected a parsing error within this file. The line #JomSocial has not been added to the language file.
Detected a parsing error within this file. The line #Kunena Forum has not been added to the language file.
Detected a parsing error within this file. The line #MediaLibrary has not been added to the language file.
Detected a parsing error within this file. The line #NeoRecruit has not been added to the language file.
Detected a parsing error within this file. The line #Property has not been added to the language file.
Detected a parsing error within this file. The line #QPersonel has not been added to the language file.
Detected a parsing error within this file. The line #Sermon Speaker has not been added to the language file.

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:

detected xxx "#" characters at line beginning, which had been converted to ";" characters and saved.

Thank you.

@mbabker
Copy link
Contributor

mbabker commented Mar 19, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants