[ZBX-3204] Translate 'popup_trexpr.php'. Patch. Created: 2010 Nov 09  Updated: 2017 May 30  Resolved: 2012 Dec 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 2.0.4rc1, 2.0.5rc1, 2.1.0

Type: Incident report Priority: Minor
Reporter: Oleksii Zagorskyi Assignee: Oleg Egorov (Inactive)
Resolution: Fixed Votes: 0
Labels: localization, trivial
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 1.EN-UA_trigger_helper.png     File popup_trexpr.php.diff    

 Description   

I want to draw your attention.
It's hard to read descriptions of the trigger, and the reason is not English

For example:
'N = X, where X is 1 - if last and previous values differs, 0 - otherwise.'

might be simpler and more important - more readable like this:
'N = 1 - if last and previous values differs, 0 - otherwise.'

Why use such complex design of the word?
I strongly recommend you to consider this improvement.
I copied the English text is 100% as he was, but take a look to attached picture, I hope you will understand something, the main thing - unification, and a simple writing, which is easy to read, no extra variables of type "X" which only confuse the brain.



 Comments   
Comment by Alexander Vladishev [ 2012 Jun 19 ]

Oleksiy,

It still actual for latest 2.0 code?

Comment by Oleksii Zagorskyi [ 2012 Jun 19 ]

Yes, it's still actual for 2.0.
Of course for 2.0 the given patch is not suitable, for 2.0 codebase (with a gettext) changes will be a bit simpler.

But I suppose for translating those strings we should not use

{OP}

inside strings, but use PHP placeholders, so there code should be changed to be parsed correctly by gettext and to be clear for translators.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Sep 20 ]

(1) The function descriptions should be translatable, and the

{OP}

placeholder should be replaced with %1$s.
oleg.egorov RESOLVED

Vedmak CLOSED

Comment by Oleg Egorov (Inactive) [ 2012 Sep 24 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-3204

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

(2)
Quality of preparing so many and important phrases is very very important to not do extra work for translators.
I hope in your understanding.
Let's go.

Some strings:
'N = 1 - if last and previous values differs, 0 - otherwise.'
'N = 1 - if timestamp is equal with Zabbix server time for T seconds, 0 - otherwise'
'N = 1 - last value matches regular expression V for last T seconds, 0 - otherwise.'
'N = 1 - last value matches regular expression V for last T seconds, 0 - otherwise. (non case-sensitive)'
'N = 1 - last Event ID matches regular expression T, 0 - otherwise.'
'N < 1 - last log source of the last log entry matches T, 0 - otherwise.'
'N < 1 - no data received during period of T seconds, 0 - otherwise'

These all strings (and their variations) should be transformed and should look similarly to other descriptions. I showed that on the screenshot (see such transformation in Ukrainian translation).

For example, first string would be:
'Last and previous values differs - then N = 1, 0 - otherwise.'

richlv we should clean them up, but probably not spend too much time on it - that dialog should be completely redesigned anyway
the first one would make more sense to me as :
"If last two values are the same, N = 0, if they differ N = 1"

zalex_ua
Taking into account my suggestions from (4) and (5) here are my suggestion for new strings above:

Timestamp does not differ from Zabbix server time for more than T seconds - then N = 1, 0 - otherwise'
Check regular expression V in last (most recent) value of a period T. N = 1 - if matches, 0 - otherwise'
Check regular expression V in last (most recent) value of a period T. N = 1 - if matches, 0 - otherwise. (non case-sensitive)'
Event ID of the last log entry matches regular expression T - then N = 1, 0 - otherwise.'
Log source of the last log entry matches parameter T - then N = 1, 0 - otherwise.'
No data received during period of time T - then N = 1, 0 - otherwise'

oleg.egorov RESOLVED

martins-v I would suggest these strings:

'Different last and preceding values is N = 1, 0 - otherwise.'
'Timestamp not different from Zabbix server time for more than T seconds is N = 1, 0 - otherwise.'
'Regular expression V matching last value in period T is N = 1, 0 - otherwise.'
'Regular expression V matching last value in period T is N = 1, 0 - otherwise. (non case-sensitive)'
'Regular expression T matching last log entry event ID is N = 1, 0 - otherwise.'
'Log source of the last log entry matching parameter T is N = 1, 0 - otherwise.'
'No data received during period of time T is N = 1, 0 - otherwise.'

zalex_ua
your suggestion - 'Different last and preceding values is N = 1, 0 - otherwise.'
If we accept this style then we need rewrite all rest strings in this style.
But personally I do not like replacement "then" to "is", it looks not clear for me.
And I agree for improved "timestamp...".

martins-v Well. it's the best I could do that is logically and grammatically correct (hopefully) and does not start with "If". Perhaps it is important to realize that this set of messages is a bit more complex than the other messages in the list. So, whichever way we go, someone will not like it.

martins-v also, you can find "is" in the other messages too.

zalex_ua but in other messages the "is" word located in another place (Something is > N) and has another meaning

martins-v OK, I'll throw in another set of suggestions:

'Difference between last and preceding values, if N = 1, 0 - otherwise.'
'Timestamp not different from Zabbix server time for more than T seconds, if N = 1, 0 - otherwise.'
'Regular expression V matching last value in period T, if N = 1, 0 - otherwise.'
'Regular expression V matching last value in period T, if N = 1, 0 - otherwise (non case-sensitive).'
'Regular expression T matching last log entry event ID, if N = 1, 0 - otherwise.'
'Log source of the last log entry matching parameter T, if N = 1, 0 - otherwise.'
'No data received during period of time T, if N = 1, 0 - otherwise.'

Perhaps these work better in that silly form. Basically the message should only explain the function (as the field says 'Function'), not the meanings of N. Values of N could be listed, with their meanings, against the N (in that case a dropdown or something), depending on the chosen function...that is, if the form was designed differently and actually made sense

oleg.egorov RESOLVED

zalex_ua sorry, I cannot agree.
I agree that my English is ... as it is, but my logic should be ok (IMO).
Changes above break logic. I believe that regular zabbix user considers trigger expression in another way (logic). We do not consider what is the N (right part), but consider what is the expression (left part) itself !
That's why I suggest replace "if" to "then" and some other changes.

My renewed suggestions:
'Difference between last and preceding values, then N = 1, 0 - otherwise.'
'Timestamp not different from Zabbix server time for more than T seconds, then N = 1, 0 - otherwise.'
'Regular expression V matching last value in period T, then N = 1, 0 - otherwise.'
'Regular expression V matching last value in period T, then N = 1, 0 - otherwise (non case-sensitive).'
'Event ID of last log entry matching regular expression T, then N = 1, 0 - otherwise.'
'Log source of the last log entry matching parameter T, then N = 1, 0 - otherwise.'

martins-v If users would be better off this way, OK.

oleg.egorov RESOLVED

zalex_ua fuhhh, thanks ! CLOSED

zalex_ua We forgot to return back "then" instead of "if" (used temporary in the middle of development) for "nodata" function.
REOPENED

oleg.egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31172

zalex_ua checked, CLOSED

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

(3)
I suggest to replace:
'Find string T last value. N = 1 - if found, 0 - otherwise'
to:
'Find string T in last (most recent) value. N = 1 - if found, 0 - otherwise'

'Find if string T length < N'
to
'Length of last (most recent) T value in characters is < N'

'Last value < N'
to
'Last (most recent) T value < N'

oleg.egorov RESOLVED

zalex_ua Checked, CLOSED

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

(4)
When do we use a word "is", when not? Is there all consistent ?

"is" used for functions: date, dayofweek, dayofmonth, logseverity, now

I suggest to add it also to: abschange, avg, delta, change, count, last, max, min, prev, str, strlen, sum and other which I suggested to be transformed in (2) sub-issue

<richlv> got confused. can you show with/without examples ?

<zalex> in current trunk check the "is" word presence for "date" description and missing for "sum" description

oleg.egorov RESOLVED

zalex_ua not resolved actually.
We need Martins' help here.
For example a string:
Absolute difference between last and previous value < N
maybe could more unified and correct when add the "is":
Absolute difference between last and previous value is < N

Martins, please consider all rest of strings to estimate this point and what do you think ?

martins-v It is necessary to insert "is" in such sentences... since, for example, "<" in text means "less than", and not "is less than".

So:

'Absolute difference between last and previous value is < N'
'Absolute difference between last and previous value is > N'
'Absolute difference between last and previous value is = N'
'Absolute difference between last and previous value is NOT N'

oleg.egorov RESOLVED

zalex_ua CLOSED

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

(5)
What we are using:
"of T times" (used for: avg, delta, change)
or
"for period of time T" (used for: count, sum)
?

There should be unification, I'd suggest to use another variant - "of a period T"
We use this text (already scrupulously selected and approved) in the documentation for functions which support sec or #num.
For nodata function use "period of time T"

oleg.egorov "for period of time T" - it's more literary style

zalex_ua note please that most of functions allow to use seconds or #num as the parameter, but the phrase "for period of time T" conflicts with #num logic
That's why in the doc we are using "of a period T" (note missing of time here) which let's say doesn't conflict logically with the #num option.
If to say simply - follow documentation

oleg.egorov RESOLVED

zalex_ua Interesting, how it can be resolved as it is NOT resolved ?

oleg.egorov Sorry, it is my mistake

oleg.egorov RESOLVED in r30690

zalex_ua Do you like this ?:
'Average value for period of a period T is < N'
I'd suggest this:
'Average value of a period T is < N'

oleg.egorov RESOLVED in r30717

zalex_ua checked, CLOSED

zalex_ua hey, you forgot to change description for "sum" function in "<" and "NOT" variants.
Do they as done already for ">" and "=" variants.

REOPENED

oleg.egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31172

zalex_ua checked, CLOSED

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

(6)
Should we mention 3rd and 4th parameters in description ?
For example for "count" function.

oleg.egorovI think it's better, when can see parameters in description

zalex_ua
To make this correct the form should have additional variables and fields for 3rd (operator) 4th (time shift) parameters.
Maybe just mentioning that there is also 3rd would be enough (the "time shift", which is 4th, we do not mention in description).

Current:
Number of successfully retrieved values V for period of time T > N

Suggested:
Number of successfully retrieved values V (which fulfill operator O) for period of time T > N

zalex_ua moved to (4) in ZBX-5637. CLOSED

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

(7)
Usage of trailing dot "." should be selected and implemented.
Currently there is inconsistency in this meaning.

I'd suggest to remove trailing dots.

oleg.egorov I agree.
RESOLVED

zalex_ua Checked, CLOSED

Comment by Oleksii Zagorskyi [ 2012 Sep 25 ]

REOPENED to fix 2-7 sub-issues

all they resolved and CLOSED

Comment by Oleksii Zagorskyi [ 2012 Oct 04 ]

(8) just now realized.
Why there are these strings?
'No data received during period of time T - then N < 1, 0 - otherwise'
'No data received during period of time T - then N > 1, 0 - otherwise'

the "nodata" function can return only 1 or 0.

The strings should be removed.

oleg.egorov RESOLVED

zalex_ua CLOSED

Comment by Oleg Egorov (Inactive) [ 2012 Oct 10 ]

Fixed in pre-2.0.4 r30763 and pre-2.1.0 (trunk) r30764.

Comment by Oleksii Zagorskyi [ 2012 Oct 30 ]

for (4)
in r30641 there WRONG position selected for a word "is" for functions max, min.
wrong:
Maximum value for period of time is T < N
correct:
Maximum value for period of time T is < N

for (5)
I don't know why I skipped it but for max, min functions words "of time" still being used and it's wrong

Taking into account changes for (4) above, correct style is:
Maximum value for period T is < N

REOPENED

tomtom I believe "Maximum value for period T is N" is correct.

zalex_ua Toms, no, it's not correct!
All 4 correct forms are:
Maximum value for period T is < N
Maximum value for period T is > N
Maximum value for period T is = N
Maximum value for period T is NOT N

oleg.egorov

correct:
Maximum value for period of time T is < N
All 4 correct forms are:
Maximum value for period T is < N
...
First or second variant is correct?

RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31161

zalex_ua checked, CLOSED

Comment by Oleksii Zagorskyi [ 2012 Oct 31 ]

Ready to review by another dev.

Comment by Kodai Terashima [ 2012 Oct 31 ]

"Log source of the last log entry matching parameter T, then N < 1, 0 - otherwise" has 4 types (=, #, <, >). However, it seems that logsource() can return only 0 or 1.

  • Log source of the last log entry matching parameter T, then N < 1, 0 - otherwise
  • Log source of the last log entry matching parameter T, then N > 1, 0 - otherwise

Are these strings correct?

oleg.egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-3204 r31178

zalex_ua tested, CLOSED

Comment by Oleg Egorov (Inactive) [ 2012 Dec 10 ]

FIXED IN 2.0.5rc1 r31998, 2.1.0 r31999
CLOSED

Comment by Oleksii Zagorskyi [ 2012 Dec 10 ]

Fix Version/s: filled incorrectly, REOPENED
Note that bigger part of this change has been included to 2.0.4, so I'd recommend to add both - 2.0.4 and 2.0.5rc1 to the "Fix Version/s"

The same for ZBX-5637

Comment by Oleksii Zagorskyi [ 2012 Dec 10 ]

I see it closed correctly now, thanks.
Would be good to add a couple of words to avoid visiting an "All" tab to check history

Generated at Thu Jul 03 09:01:37 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.