nearly duplicate translation strings (ZBX-4001)

[ZBX-5321] Almost duplicate translation strings Created: 2012 Jul 13  Updated: 2013 Feb 20  Resolved: 2013 Feb 19

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

Type: Sub-task Priority: Trivial
Reporter: Volker Fröhlich Assignee: richlv
Resolution: Fixed Votes: 0
Labels: duplicates, simplification, translation, typo
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File duplicates-ZBX5321.patch    
Issue Links:
Duplicate
duplicates ZBX-4001 nearly duplicate translation strings Open

 Description   

Here's a small list of almost duplicate translation strings. It also contains some cases where gettext's plural could be used.

include/views/configuration.hostgroups.list.php:31 – (Only Super Admins can create group)
include/views/configuration.host.edit.php:193 include/views/configuration.template.edit.php:140 – (Only superadmins can create group)

include/classes/import/CXmlImport18.php:632 – Cannot add image.
adm.images.php:52 – Cannot add image

api/classes/CMaintenance.php:441 – You do not have permission to perform this operation
CAlert.php:504 api/classes/CApplication.php:825 api/classes/CApplication.php:836 ... – You do not have permission to perform this operation.

include/users.inc.php:98 include/users.inc.php:109 include/users.inc.php:144 – User cannot change status of himself.
api/classes/CUserGroup.php:421 api/classes/CUserGroup.php:532 – User cannot change status of himself

include/classes/import/CConfigurationImport.php:816 include/classes/import/CConfigurationImport.php:893 – No permission for Graph "%1$s".
include/classes/import/CXmlImport18.php:1567 – No permission for graph "%1$s".

include/views/configuration.item.edit.php:127 include/views/configuration.item.massupdate.php:77 include/views/js/configuration.item.edit.js.php:7 – No interface found
api/classes/CItemGeneral.php:229 – No interface found.

Plural:

host_discovery.php:250 --Cannot delete discovery rules
api/classes/CDiscoveryRule.php:624 discoveryconf.php:135 host_discovery.php:166 – Cannot delete discovery rule

adm.macros.php:147 – Cannot update macros
adm.macros.php:93 – Cannot update macro.

Typo:

"Unable to uploade file because "file_uploads" is disabled." – include/classes/helpers/CUploadFile.php:58

Possible simplifications:

include/page_footer.php:98 – Zabbix %s Copyright %s-%s by Zabbix SIA
include/views/general.login.php:47 – Zabbix %s Copyright 2001-2012 by Zabbix SIA

Why would I want to translate "Opera" or "Internet Exploder"?



 Comments   
Comment by Oleksii Zagorskyi [ 2012 Jul 14 ]

A main issue where we discuss such duplicates is ZBX-4001, linked

I'd recommend to copy-paste there a comment and close this issue.

Comment by richlv [ 2012 Jul 14 ]

the problem with adding all this to the original issue is that it becomes really large, which in turn scares all developers from even looking at it

Comment by Volker Fröhlich [ 2012 Sep 08 ]

Some more for 2.0.3:

User group for database down message – include/views/administration.general.other.edit.php:38
User group for database down message. – adm.other.php:86

SQL statement execution has failed "%1$s" – include/classes/db/DB.php:632
SQL statement execution has failed "%1$s". – include/classes/db/DB.php:412 include/classes/db/DB.php:467

No target selected – triggers.php:350
No target selected. – graphs.php:294 items.php:598

Percentile line

{Left,left,Right,right}

– include/views/configuration.graph.edit.php:144; graphs.php:55

That one doesn't make sense to me:

Service "%1$s" cannot be deleted, because it is dependent on another service. – api/classes/CService.php:1300

Comment by Volker Fröhlich [ 2013 Jan 22 ]

Addresses most cases where the difference is not a trailing dot

Comment by Volker Fröhlich [ 2013 Jan 22 ]

Applies to Trunk

Comment by richlv [ 2013 Feb 13 ]

mostly fixed in svn://svn.zabbix.com/branches/dev/ZBX-5321

the following changes have been made :

1. previusly we had :
include/views/configuration.template.edit.php: $tmp_label .= SPACE._('(Only superadmins can create group)');
include/views/configuration.host.edit.php: $tmp_label .= SPACE._('(Only superadmins can create group)');
include/views/configuration.hostgroups.list.php: $tmp_item = new CSubmit('form', ('Create host group').SPACE.('(Only Super Admins can create group)'));

these have been unified to "Only superadmins can create group"

2. previously we had :
include/views/configuration.graph.edit.php: $graphFormList->addRow(_('Percentile line (left)'), array($percentLeftCheckbox, SPACE, $percentLeftTextBox));
include/views/configuration.graph.edit.php: $graphFormList->addRow(_('Percentile line (right)'), array($percentRightCheckbox, SPACE, $percentRightTextBox));
graphs.php: 'percent_left' => array(T_ZBX_DBL, O_OPT, null, BETWEEN(0, 100), null, _('Percentile line (Left)')),
graphs.php: 'percent_right' => array(T_ZBX_DBL, O_OPT, null, BETWEEN(0, 100), null, _('Percentile line (Right)')),

these have been unified to "left" and "right" respectively

3. a typo ("uploade") was fixed
classes/helpers/CUploadFile.php: throw new Exception(_('Unable to uploade file because "file_uploads" is disabled.'));

4. previously we had :
include/classes/import/CConfigurationImport.php: throw new Exception(_s('No permission for Graph "%1$s".', $graph['name']));
include/classes/import/CConfigurationImport.php: throw new Exception(_s('No permission for Graph "%1$s".', $graph['name']));
include/classes/import/CXmlImport18.php: throw new Exception(_s('No permission for graph "%1$s".', $graph_db['name']));

these have been unified to "graph"

5. two sql queries were reformatted to avoid including tabs in actual queries in include/classes/import/CConfigurationImport.php

in r33601 more similar query formatting was done in include/classes/import/CImportReferencer.php, api/classes/CUserGroup.php, api/classes/CTemplateScreen.php and api/classes/CProxy.php

Comment by richlv [ 2013 Feb 13 ]

as a result, 3 translatable strings should go away, and one was changed

Comment by Pavels Jelisejevs (Inactive) [ 2013 Feb 18 ]

(1) Regarding "(Only superadmins can create group)".

1. Why change Super Admins to superadmins when we use the first spelling almost everywhere?
2. Shouldn't it be "(Only superadmins can create groupS)"? Or even better "... host groups".

<richlv>
1. the capitalisation was changed as per https://zabbix.org/wiki/Docs/specs/syntax#Syntax
as for using the space or not, i'm open to opinions
"super admins" seemed strange, but concatenating them to create one word (as now is done) isn't too correct. preferences ?
2. "host groups" can not be used as this also appears when we try to create group from template properties.
we could use different strings from template and host properties, but that would increase the amount of translatable strings... currently it seems to me that staying with just "group[s]" might be a more uniform approach.
changed to plural in r33708.

jelisejev Super admin seems OK to me. It's also quite common https://www.google.com/search?sugexp=chrome,mod=0&%7Bgoogle:instantFieldTrialGroupParameter%7Dsourceid=chrome&client=ubuntu&channel=cs&ie=UTF-8&q=super+offer#hl=en&client=ubuntu&hs=BUl&tbo=d&channel=cs&sclient=psy-ab&q=super+admin&oq=super+admin&gs_l=serp.3..0l2j0i20j0.5210.6614.0.6841.10.8.0.2.2.0.164.523.7j1.8.0.les%3B..0.0...1c.1.3.psy-ab.3tm_rJhWcZI&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.42553238,d.bGE&fp=441c6ae33e57dd12&biw=1231&bih=912

<richlv> changed to "super admins" in r33737, also in one comment. note that this was not changed in other strings at this time
RESOLVED

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Feb 18 ]

(2) The SQL have been formatted incorrectly. They now cause errors similar to this one in proxies, user groups, templated screens and may be somewhere else:

Error in query [SELECT g.*FROM usrgrp gWHERE g.usrgrpid BETWEEN 000000000000000 AND 099999999999999 ORDER BY g.name LIMIT 1001 OFFSET 0] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'g.usrgrpid BETWEEN 000000000000000 AND 099999999999999 ORDER BY g.name LIMIT 100' at line 1]
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:572]
mysql_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:573]

<richlv> oops, i'm terribly sorry about this. i believe i found all the problematic locations - should be fixed in r33709.
RESOLVED

jelisejev Fixed two more queries in r33746. CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Feb 19 ]

TESTED.

Comment by richlv [ 2013 Feb 19 ]

merged to 2.0 in 33769 (changelog entry added in 33770), merge to trunk in 33771.

for trunk, resolved conflicts in frontends/php/api/classes/CUserGroup.php and frontends/php/api/classes/CTemplateScreen.php, might be useful to verify

Comment by Pavels Jelisejevs (Inactive) [ 2013 Feb 20 ]

Everything is OK.

CLOSED.

Generated at Sat Apr 20 03:07:47 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.