Fix loading empty translation in ts format

Julien LepillerTue Aug 27 22:29:31+0200 2019

28dd2ac

Fix loading empty translation in ts format

CHANGELOG

1919
* When editing a project, system specific fields were not shown
2020
* Unsupported formats raises a specific exception that can be caught by the UI
2121
* Stop crashing when an error occurs during project fetching
22+
* Properly load empty translations in ts format
2223
2324
Changes since 0.2
2425
-----------------

offlate/formats/entry.py

9393
                translationtype = child.get('type')
9494
                if numerus:
9595
                    for form in child:
96-
                        translation.append(form.text)
96+
                        txt = form.text
97+
                        translation.append("" if txt is None else txt)
9798
                else:
98-
                    translation = child.text
99+
                    txt = child.text
100+
                    translation = "" if txt is None else txt
99101
        if numerus:
100102
            sourcestring = [sourcestring, sourcestring]
101103
        else: