znuny / Znuny4OTRS-Repo

A package manager addon for OTRS and ((OTRS)) Community Edition, to add support for private and public Znuny repositories.
https://www.znuny.com/add-ons/znuny4otrs-repository
12 stars 5 forks source link

Chinese translations of Article Types break Core.Form.Znuny4OTRSInput.Get #17

Closed thorsteneckel closed 6 years ago

thorsteneckel commented 6 years ago

The following Chinese translations of the ArticleTypes cause an error:

        'email-external' => ' (郵件-外部)',
        'email-internal' => ' (郵件-内部)',
        'note-external' => ' (備註-外部)',
        'note-internal' => ' (備註-内部)',
        'note-report' => ' (備註-報告)',
        'phone' => ' (電話)',
        'sms' => ' (短信)',
        'webrequest' => ' (Web請求)',

To rebuild/reverse the tree structure of an select field Core.Form.Znuny4OTRSInput uses the spaced indentation to detect the level. The listed indentations in the Chinese translation cause this code to go bananas and end in an endless loop. Because of the leading single whitespace a wrong level is detected which causes the loop to start. But since there are no other levels present the loop won't stop.

thorsteneckel commented 6 years ago

Fixed with commits above.