Project

General

Profile

Actions

Bug #66934

closed

Saving translation label of old extensions throws exception

Added by Sk no-lastname-given over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Could have
Category:
-
Target version:
-
Start date:
2015-05-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Files

Translations.php (37.2 KB) Translations.php Sk no-lastname-given, 2015-05-13 12:30
Actions

Also available in: Atom PDF