[ZBX-5371] problems with import related translation strings Created: 2012 Jul 26  Updated: 2017 May 30  Resolved: 2012 Jul 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.0.2rc2
Fix Version/s: 2.0.3rc1, 2.1.0

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


 Description   

all problems listed separately and should be very carefully reviewed both by the person fixing them and reviewing - lots of similarities, so very easy to make mistakes. extra care should be paid to make sure new strings all follow the same style and are identical where they should be.

(1) probably "exported" should be removed from 1.8 version to make strings exactly the same. also spot the missing doublequote in the last string.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find map "%1$s" used in exported screen "%2$s".',
./include/classes/import/CXmlImport18.php: $error = _s('Cannot find map "%1$s" used in exported map "%2$s".',
./include/classes/import/importers/CAbstractScreenImporter.php: throw new Exception(_s('Cannot find map "%1$s" used in screen "%2$s".',
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find map "%1$s" used in map %2$s".',

(2) probably "exported" should be removed from 1.8 version to make strings exactly the same. also spot the missing doublequote in the next to last string.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find trigger "%1$s" used in exported map "%2$s".',
./include/classes/import/CXmlImport18.php: $error = _s('Cannot find trigger "%1$s" used in exported map "%2$s".',
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find trigger "%1$s" used in map %2$s".',
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find trigger "%1$s" for map "%2$s".',

(3) probably "exported" should be removed from 1.8 version to make strings exactly the same.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find screen "%1$s" used in exported screen "%2$s".',
./include/classes/import/importers/CAbstractScreenImporter.php: throw new Exception(_s('Cannot find screen "%1$s" used in screen "%2$s".',

(4) probably "exported" should be removed from 1.8 version to make strings exactly the same.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find graph "%1$s" used in exported screen "%2$s".',
./include/classes/import/CXmlImport18.php: $error = _s('Cannot find graph "%1$s" used in exported screen "%2$s".',
./include/classes/import/importers/CAbstractScreenImporter.php: throw new Exception(_s('Cannot find graph "%1$s" used in screen "%2$s".',

(5) probably "exported" should be removed from 1.8 version to make strings exactly the same.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find host "%1$s" used in exported screen "%2$s".',
./include/classes/import/CXmlImport18.php: $error = _s('Cannot find host "%1$s" used in exported map "%2$s".',
./include/classes/import/importers/CAbstractScreenImporter.php: throw new Exception(_s('Cannot find host "%1$s" used in screen "%2$s".',
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find host "%1$s" used in map "%2$s".',

(6) probably "exported" should be removed from 1.8 version to make strings exactly the same. for 1.8, "hostgroup" probably should be changed to just "group", like in 2.0 currently.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find hostgroup "%1$s" used in exported screen "%2$s".',
./include/classes/import/CXmlImport18.php: $error = _s('Cannot find hostgroup "%1$s" used in exported map "%2$s".',
./include/classes/import/importers/CAbstractScreenImporter.php: throw new Exception(_s('Cannot find group "%1$s" used in screen "%2$s".',
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find group "%1$s" used in map "%2$s".',

(7) probably "exported" should be removed from 1.8 version to make strings exactly the same.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find item "%1$s" used in exported screen "%2$s".',
./include/classes/import/CXmlImport18.php: $error = _s('Cannot find item "%1$s" used in exported screen "%2$s".',
./include/classes/import/importers/CAbstractScreenImporter.php: throw new Exception(_s('Cannot find item "%1$s" used in screen "%2$s".',

(8) probably "exported" should be removed from 1.8 version to make strings exactly the same. notice the 2.0 string using different syntax than other strings ("for map" instead of "used in map") - is there a good reason for that ? if not, it should be unified with other strings.
also, image name is missing in 2.0 import code. spot th missing doublequote in 2.0 import code as well.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: error(_s('Cannot find background image "%1$s" used in exported map "%2$s".',
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find background image for map "%1$s.', $map['name']));

(9) probably "exported" should be removed from 1.8 version to make strings exactly the same. it should also be decided whether it's icon or image and used consistently - and documented at https://zabbix.org/wiki/Docs/specs/syntax#Entities .
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find image "%1$s" used in exported map "%2$s".', $selement[$icon]['name'], $sysmap['name']);
./include/classes/import/importers/CMapImporter.php: throw new Exception(_s('Cannot find icon "%1$s" for map "%2$s".',

(10) not import, but quite similar. some strings use "on", some use "on host". should be unified.
all occurrences of this string should get a comment, saying that if this string is modified, other instances of it should be modified as well

./include/items.inc.php: error(_s('Cannot find host interface on "%1$s" for item key "%2$s".', $dstHost['host'], $srcItem['key_']));
./include/items.inc.php: error(_s('Cannot find host interface on "%1$s" for item key "%2$s".', $dstHost['host'], $srcItem['key_']));
./api/classes/CItemGeneral.php: 'noInterface' => _('Cannot find host interface on "%1$s" for item key "%2$s".')
./api/classes/CDiscoveryRule.php: self::exception(ZBX_API_ERROR_PARAMETERS, _s('Cannot find host interface on "%1$s" for item key "%2$s".', $dstHost['name'], $dstDiscovery['key_']));
./api/classes/CDiscoveryRule.php: self::exception(ZBX_API_ERROR_PARAMETERS, _s('Cannot find host interface on host "%1$s" for item key "%2$s".', $dstHost['name'], $prototype['key_']));

(11) 1.8, as far as anybody can remember, didn't have icon maps - but it's import code has some block about that. it should be checked why that code is there and whether it is needed at all.

./include/classes/import/CXmlImport18.php: $error = _s('Cannot find icon map "%1$s" used in exported map "%2$s".', $sysmap['iconmap'], $sysmap['name']);



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 27 ]

(9) I think we should go with "icon" to distinguish them from backgrounds.

<pavels> Added to https://zabbix.org/wiki/Docs/specs/syntax#Entities. CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 30 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-5371.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 31 ]

Fixed in 2.0.3rc1 r29268 and 2.1.0 r29269.

CLOSED.

Generated at Fri Apr 19 01:12:00 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.