jakul / django-transifex

Django integration with python-transifex
20 stars 8 forks source link

upload_translations ignores LANGUAGE_MAPPING #14

Open akifd opened 9 years ago

akifd commented 9 years ago

pull_translations does map from Transifex codes to Django codes and it works well, but it seems that upload_translations just uses the Django's language code, ignoring the mapping, which then creates the language as duplicate into the Transifex. As an example:

TRANSIFEX_LANGUAGE_MAPPING = {
    "ru_ee": "ru",
    "cs_CZ": "cs",
}

Now doing ./manage.py tx upload_translations ru causes "Russian" to be created in Transifex, even though we already have "Russian (Estonia)" there and it is mapped in settings.

Not sure if this is intended behaviour, but personally I think it would be logical to also map the language codes when uploading.