[ZBX-11331] Discovery rules -> Checks -> Button "New" - not work in UA language - interface user. Created: 2016 Oct 07  Updated: 2017 May 30  Resolved: 2016 Oct 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.5, 3.2.0
Fix Version/s: 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1

Type: Incident report Priority: Blocker
Reporter: alex Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: javascript, quoting, syntax
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 1.png    

 Description   

Discovery rules -> Checks -> Button "New" - not work in UA language - interface user. printscreen.
IE 11, Firefox 49.0.1 Zabbix Appliance 3.2.1



 Comments   
Comment by Oleksii Zagorskyi [ 2016 Oct 10 ]

hmm, indeed, CONFIRMED.
Will work on it now.

Comment by Oleksii Zagorskyi [ 2016 Oct 14 ]

There is a string translation in UA po file:

#: include/views/js/configuration.discovery.edit.js.php:602
msgid "Cannot validate discovery check: invalid request or connection to Zabbix server failed."
msgstr "Не вдалося валідувати перевірку виявлення: помилковий запит або невдале з'єднання з Zabbix сервером."

note apostrophe inside the string and it was the same in 2.4, without issues.

It causes this javascript generation on the page:

overlayDialogue({
						'title': 'Помилка перевірки виявлення',
						'content': jQuery('<span>').text('Не вдалося валідувати перевірку виявлення: помилковий запит або невдале з'єднання з Zabbix сервером.'),
						'buttons': [
							{
								'title': 'Скасувати та повернутись',
								'cancel': true,
								'focused': true,
								'action': function() {}
							}
						]
					});

which of course causes rendering error in browser: discoveryconf.php?form=update&druleid=2:575 Uncaught SyntaxError: missing ) after argument list

There are a lot of apostrophes in UA translations, and the same for many other languages too:

# grep -R "'" * | grep msgstr | cut -d'/' -f1 | sort | uniq
el
es
fr
it
nl
pl
tr
uk

that's just a question of a luck that other language could catch the same issue as well, or even en_GB default locale.

Broken in trunk r56200 (ZBXNEXT-2662)
PHP devs intrusion is required.
Increasing priority to blocker.

Comment by Oleksii Zagorskyi [ 2016 Oct 14 ]

@alex, if you want to continue to use the UA locale before this issue will be fixed - you could remove the apostrophe character from the string, then run make_mo.sh script in "locale" folder of frontend and finally restart apache (required to avoid possible troubles).

Comment by Oleg Egorov (Inactive) [ 2016 Oct 17 ]

(1) No string changes

gunarspujats CLOSED

Comment by Oleg Egorov (Inactive) [ 2016 Oct 17 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-11331 r63183, 63219

Comment by Gunars Pujats (Inactive) [ 2016 Oct 18 ]

Tested.

Comment by Oleg Egorov (Inactive) [ 2016 Oct 18 ]

Fixed in:

  • pre-3.0.6rc1 r63240 and r63284
  • pre-3.2.2rc1 r63242 and r63285
  • pre-3.3.0 (trunk) r63243 and r63286
Comment by Alexander Vladishev [ 2016 Oct 19 ]

(2)

  1. we use (from version 3.0) short open tags <?= instead of <?php echo
  2. semicolon ; can be removed here
'content': jQuery('<span>').text(<?php echo CJs::encodeJson(
    _('Cannot validate discovery check: invalid request or connection to Zabbix server failed.')
); ?>),

oleg.egorov Fixed in:

  • pre-3.0.6rc1 r63284
  • pre-3.2.2rc1 r63285
  • pre-3.3.0 (trunk) r63286

CLOSED

Generated at Fri Mar 29 10:00:16 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.