[ZBX-2925] locale editor adds empty strings to the final file Created: 2010 Aug 24  Updated: 2017 May 30  Resolved: 2010 Aug 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 1.8.4

Type: Incident report Priority: Blocker
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

if "leave empty" is chosen in the locale editor, final file contains empty values - ones defined as ''

"leave empty" is the most usable editing option, but empty values in the file result in no text in the frontend. empty values should not be written in the resulting file at all.



 Comments   
Comment by Alexey Fukalov [ 2010 Aug 25 ]

branches/1.8 14094

Comment by richlv [ 2010 Aug 25 ]

confirming the fix in trunk rev 14090.

Comment by Oleksii Zagorskyi [ 2010 Aug 31 ]

Serious problem founded.
En locale contain tree empty string and after download locale is dropped and as a result it will probably undefined variable .

'S_CHART4_HEADER_TITLE_PART1'=> '',
'S_CHART5_HEADER_TITLE_PART1'=> '',
'S_GRAPH_DELETED_FROM_HOSTS_PART3'=> '',

Reopen this issue for resolve situation.

Comment by Oleksii Zagorskyi [ 2010 Aug 31 ]

oops, wrong. it will not undefined variable, everything should be fine . But this is an unexpected result from these changes.

Comment by richlv [ 2010 Aug 31 ]

hmm, yes, introduction of empty strings to combine final string is interesting... hopefully this problem will be gone in 2.0 and proper placeholders will be used

Comment by richlv [ 2010 Sep 02 ]

hmm... actually one problematic situation might be like follows :

english locale defines some string;
in the translated version that part of the string must be empty;
in the end english text gets incorrectly used.

looks like gettexting everything is needed badly...

Comment by Oleksii Zagorskyi [ 2010 Sep 02 ]

aha. I was thinking that you can remove all these empty variables, checked and discovered that the Japanese language uses 'S_GRAPH_DELETED_FROM_HOSTS_PART3'
In all the other this tree strings are empty.
Can offer Japanese translator to change a little combination of lines and generally remove these blank lines from the interface at all? To me, they just did not like - and this figure

Comment by richlv [ 2010 Sep 02 ]

no, if they are using a string that is not defined in english, it is ok. if somebody tries to undefine a string that is defined in english translation, then it would be a problem.

i believe we'll just have to live with this situation until a proper gettexting happens

Comment by Oleksii Zagorskyi [ 2010 Sep 02 ]

Everything is fine, I understand where the problem immediately.
I remember when there were these empty lines, they appeared as a side effect due to the unsuccessful use of the function 'sprintf' by Maxim and the subsequent division into parts.
I mean that was not user requests for the division one sentence as much as three parts - and I am absolutely sure that it is useless now. It even complicates the translation I would say. Therefore propose to abandon the empty rows and delete them at all and fix the php-scripts of course.

Generated at Sat Apr 27 07:34:14 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.