Describe the bug
When a new language is addd to a component that contains an underscore, the created xliff file will have as target-language the language with underscore. From my understanding an underscore is not permitted in the field target-language as the xliff spec (https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd) defines the field as <xsd:attribute name="target-language" type="xsd:language" use="optional"/> where xsd:language is defined as [a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})* (http://www.datypic.com/sc/xsd/t-xsd_language.html)
To Reproduce
Steps to reproduce the behavior:
en_UStarget-language="en_US"Expected behavior
I think the correct thing to do would be to replace the _ with a - in the xlf file and leave the filename as _.
Server configuration and status
* Weblate 3.3
* Python 2.7.13
* Django 1.11.17
* Celery 4.2.1
* celery-batches 0.2
* six 1.12.0
* social-auth-core 2.0.0
* social-auth-app-django 3.1.0
* django-appconf 1.0.2
* translate-toolkit 2.3.1
* Whoosh 2.7.4
* defusedxml 0.5.0
* Git 2.11.0
* Pillow 5.3.0
* python-dateutil 2.7.5
* lxml 4.2.5
* django-crispy-forms 1.7.2
* django_compressor 2.2
* djangorestframework 3.9.0
* user-agents 1.1.0
* jellyfish 0.6.1
* pytz 2018.7
* Database backends: django.db.backends.mysql
* Cache backends: default:LocMemCache
* Celery: memory://, N/A, eager
* Platform: Linux 4.9.0-8-amd64 (x86_64)
Thank you for your report, the issue you have reported has just been fixed.
Most helpful comment
Thank you for your report, the issue you have reported has just been fixed.