[ZBX-2319] After each downloads new locale automatically added unnecessary escape characters \ Created: 2010 Apr 15  Updated: 2017 May 30  Resolved: 2010 Jul 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.2
Fix Version/s: 1.8.3, 1.9.0 (alpha)

Type: Incident report Priority: Minor
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

last branch and trunk


Attachments: PNG File translate_error.png    

 Description   

After each download new locale automatically added unnecessary escape characters \ before every " and \\\\ (combination \' this exception)
In result after multiple released and downloads new locale escape characters repeated become very much.

Result example: '????????? ?????? ?????? ??? ???? ??????? ?? ????? \\\\\"???? ????????\\\\\"',



 Comments   
Comment by Artem Suharev (Inactive) [ 2010 May 19 ]

When adding spacial chars there is no need to escape it, it will be done automatically..

Comment by Oleksii Zagorskyi [ 2010 May 19 ]

Artem, maybe I'm doing wrong, but I tested the /branches/dev/zbx-2201/. The problem still remained.

Comment by Artem Suharev (Inactive) [ 2010 May 25 ]

Please, place a screen shot of the screen with values which get unnecessary escaping just prior to save the locale.

Comment by Oleksii Zagorskyi [ 2010 May 27 ]

on screen shot source file 'ua_ua.inc.php' already in format \"Сума графіків\"after one cycle of download and put it to the www-directory.
After this i put it to www-directory again and receive additional symbols \\\"Сума графіків\\\" on translation page.
Unnecessary symbols added on downloading step !!!.

Comment by Artem Suharev (Inactive) [ 2010 May 27 ]

Remove escape characters, or it will be escaped also. All chars that requires escaping will be escaped automatically.

Comment by Oleksii Zagorskyi [ 2010 May 27 ]

Artem, firstly sorry for my English, maybe I somewhere not exactly explain.
Just try to download the English locale, as if creating a new, and looking changed variable 'S_ANOTHER_ITEM_SUM' in the new DOWNLOADED file and you will understand me.
Extra \ characters are added always to " and \ in new file.

Before dowload:
'S_ANOTHER_ITEM_SUM'=> 'Cannot add more than one item with type "Graph sum"',
After dowloaad:
'S_ANOTHER_ITEM_SUM'=> 'Cannot add more than one item with type \"Graph sum\"',

For non-english locale translators this is problem, because we are "updating" the locale file through the GUI to remove the droped string and easily find new string to translate. I do this several times between releases, and I think others do the same. The proof - I have several times seen in the Russian locale a large amount of characters \\\\\. You can ask the DotNeft (russian locale translator). I think he will confirm this.

Sorry, but I re-open request the last time, the more I will not bother.

Comment by richlv [ 2010 May 27 ]

looks like doublequotes are incorrectly populated in the locale screen. if you download locale without manually escaping doublequotes, they are escaped in the resulting file.
if you try to edit a locale with escaped doublequotes, they are escaped already in your editing form. if you do that multiple times, you indeed end up with \\\\\\\\\\"

Comment by Artem Suharev (Inactive) [ 2010 May 27 ]

Fixed directly in 1.8 & trunk

P.S.
Sorry you are right, there was a problem.
Guess made tests with some changes that prevented this issue..

Comment by Oleksii Zagorskyi [ 2010 May 27 ]

guys, I know that I was tired, but new problem:

'S_DOESNT_EXIST'=> 'doesn\'t exist',
after download:
'S_DOESNT_EXIST'=> 'does\'t exist',

now symbol before escape always deleted.

With doublequotes now all fine.
Sorry, again reopen

Comment by Artem Suharev (Inactive) [ 2010 May 28 ]

Missed this one..
Fixed.

Comment by Oleksii Zagorskyi [ 2010 May 28 ]

heh, now all fine.
Thank you for your patience.

Comment by Artem Suharev (Inactive) [ 2010 May 29 ]

Thank You.

Comment by Oleksii Zagorskyi [ 2010 Jun 22 ]

After starting of using escaped symbol ' in START !!!! of strings new problem founded.
for example:

original string:
'S_EXPRESSION_FUNCTION_DOES_NOT_ACCEPTS_PARAMS_ERROR_PART2'=> '\' does not accept parameters.',
'S_CHECK_EXPRESSION_PART_STARTING_FROM_PART2'=> '\'',

after downloading locale through frontend:
S_EXPRESSION_FUNCTION_DOES_NOT_ACCEPTS_PARAMS_ERROR_PART2'=> '' does not accept parameters.',
'S_CHECK_EXPRESSION_PART_STARTING_FROM_PART2'=> ''',

escape symbol for first ' symbol is rejected in result and this is problem.

Is no problems with escaping ' symbol in other position in string.

Comment by richlv [ 2010 Jun 30 ]

i can confirm the problem with initial apostrophe in trunk rev 13109

Comment by richlv [ 2010 Jul 05 ]

confirming the fix in dev branch rev 13186.

Comment by Oleksii Zagorskyi [ 2010 Jul 05 ]

i tested also . now all fine in dev branch rev 13186.

Comment by Artem Suharev (Inactive) [ 2010 Jul 06 ]

Implemented

Generated at Thu Apr 25 20:05:10 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.