Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5371

problems with import related translation strings

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2rc2
    • Fix Version/s: 2.0.3rc1, 2.1.0
    • Component/s: API (A)
    • Labels:

      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']);

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              richlv richlv
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: