Hi,

> Le 31 août 2016 à 11:01, Jeppe Vesterbæk <[email protected]> a écrit :
> 
> I'm sending requests with "Accept-Language: da". Translations originating 
> from Django (eg. "This field is required.") and translations in my own apps 
> work. Strings in rest framework always are always returned in english, eg. 
> "This field may not be blank.". Looking into the locale folder of rest 
> framework, I can see both "da" and "da_DK" where "da_DK" contains empty 
> strings only. 
> 
> If I delete the da_DK folder in rest_framework, the Danish translations work.
> 
> I'm not sure how Django / gettext resolves a translation key, but it somehow 
> seems to get confused by the empty string found in da_DK and instead use the 
> key (english base).

Thanks for reporting. Translations seems to be somewhat hard to get right.
Your issue may indicate that Danish translation has been claimed but not 
performed on transiflex.
DRF has a - small - common set of translatable strings with Django. 
Unfortunately in your case, DRF takes precedence over Django.
I though empty string would be considered as non existant by the Django 
translation engine.

The options are:
- we remove the danish translation from transifex
- someone performs the translation (via transiflex)

Regards,
Xavier,
Linovia.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to