Fix loading empty translation in ts format
CHANGELOG
| 19 | 19 | * When editing a project, system specific fields were not shown | |
| 20 | 20 | * Unsupported formats raises a specific exception that can be caught by the UI | |
| 21 | 21 | * Stop crashing when an error occurs during project fetching | |
| 22 | + | * Properly load empty translations in ts format | |
| 22 | 23 | ||
| 23 | 24 | Changes since 0.2 | |
| 24 | 25 | ----------------- |
offlate/formats/entry.py
| 93 | 93 | translationtype = child.get('type') | |
| 94 | 94 | if numerus: | |
| 95 | 95 | for form in child: | |
| 96 | - | translation.append(form.text) | |
| 96 | + | txt = form.text | |
| 97 | + | translation.append("" if txt is None else txt) | |
| 97 | 98 | else: | |
| 98 | - | translation = child.text | |
| 99 | + | txt = child.text | |
| 100 | + | translation = "" if txt is None else txt | |
| 99 | 101 | if numerus: | |
| 100 | 102 | sourcestring = [sourcestring, sourcestring] | |
| 101 | 103 | else: |