Issue Bug Rejected

#66934Saving translation label of old extensions throws exception

Sk no-lastname-given 05/13/15, 12:30 updated 05/13/15, 13:20

Description

Hi
the current version of snowbabel does not able to save labels of old extension with old format xml language file of following xml structure.

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
    <meta type="array">
        <type>module</type>
        <description>Language labels for extension 'ext'</description>
    </meta>
    <data type="array">
        <languageKey index="default" type="array">
            <label index="title">Title</label>
        </languageKey>
    </data>
</T3locallang>

saving these labels produces exceptions. while debugging the code it is found that there was no code to handle the old formated xml language file and only saves languages files with format as follows

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" target-language="ch" datatype="plaintext" original="messages" date="2015-05-12T11:56:04Z" product-name="ext">
        <header/>
        <body>
            <trans-unit id="Title" approved="yes">
                <source></source>
                <target>Title</target>
            </trans-unit>
        </body>
    </file>
</xliff>

i have fix the issue by adding function to handle old formatted xml language files and you can found it on attachment. could you please review the code and add it to snowbabel extension with next release.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.