1. Chris Beaven
  2. django-countries
  3. Pull requests

Pull requests

#4 Declined

Fixed pycountry_translate.py to identify misses properly

  1. Krzysztof Bandurski

For Polish, the results were:

265 entries processed 248 entries translated 17 entries not translated

MUCH less work for translators :)

Now, to auto-generate pretranslated po files for all languages:

django-admin.py makemessages -l <list_of_language_codes> pycountry_translate.py <list_of_language_codes>

So all you need is the list of language codes. Unfortunately, there seems to be no way to tell django to makemessages for all the languages it knows, so this list_of_language_codes has to be created in some other way. I think you can just get it from django.conf.global_settings....

Comments (5)

  1. Chris Beaven repo owner

    Great job, Kris. The script is a good idea I wonder if we could just create all of the possible languages at once.

    I keep thinking I should document this better, but I'm using transifex to store the translations. I guess I can take this po and upload it there.

    1. Krzysztof Bandurski author

      I actually wanted to create them all at once - I thought it would be more impressive :) But the thing is that pycountry doesn't have translations for everything. There were some entries that I had to translate by hand. There weren't too many of them though - I think around 30 out of nearly 300. So it is much less work for translators. My script could still be improved to properly handle cases where the translated string is exactly the same as msgid. But that's for another day, I guess...

      1. Chris Beaven repo owner

        Exactly - it'd be good to upload all of those to transifex so that translators have a great start. Then I can just pull in the 100% translations.