dhis2-devs-core team mailing list archive
-
dhis2-devs-core team
-
Mailing list archive
-
Message #00656
Re: Problem with translations and displayName
You can try it out with ?locale=XX
--
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org
On Fri, Jul 1, 2016 at 5:43 PM, Morten Olav Hansen <morten@xxxxxxxxx> wrote:
> Hi Halvdan
>
> All our "demo db" users have null as locale, which means default.. no
> translation, did you remember to change the user locale?
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Fri, Jul 1, 2016 at 5:39 PM, Halvdan Grelland <halvdanhg@xxxxxxxxx>
> wrote:
>
>> Hi Morten (and devs),
>>
>> There seems to be an issue with translations currently. The expected
>> behaviour would be for the displayName to be populated by the translated
>> name of the object, but this is currently not happening.
>>
>> Example:
>>
>> POST french translation of “Reproductive health” to dev:
>>
>> curl 'https://play.dhis2.org/dev/api/24/dataSets/QX4ZTUbOt3a/translations' -X PUT -u admin:district 'Content-Type: application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' --data-binary $'{"translations":[{"property":"NAME","locale":"en_GB","value":"PHUF 3 - Reproductive health services"},{"property":"SHORT_NAME","locale":"en_GB","value":"PHUF 3"},{"property":"NAME","locale":"fr","value":"La sant\xe9 reproductive"},{"property":"SHORT_NAME","locale":"fr","value":"La sant\xe9 reproductive"}]}'
>>
>> GET the object
>>
>> curl 'https://play.dhis2.org/dev/api/24/dataSets/QX4ZTUbOt3a?fields=displayName,translations' 'Accept: application/json, text/javascript, */*; q=0.01'
>>
>> Output:
>>
>> {
>> displayName: "Reproductive Health",
>> translations:
>> [
>> {
>> property: "SHORT_NAME",
>> locale: "fr",
>> value: "La santé reproductive"
>> },
>> {
>> property: "SHORT_NAME",
>> locale: "en_GB",
>> value: "PHUF 3"
>> },
>> {
>> property: "NAME",
>> locale: "fr",
>> value: "La santé reproductive"
>> },
>> {
>> property: "NAME",
>> locale: "en_GB",
>> value: "PHUF 3 - Reproductive health services"
>> }
>> ]
>> }
>>
>>
>>
>> --
>> Mailing list: https://launchpad.net/~dhis2-devs-core
>> Post to : dhis2-devs-core@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs-core
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
Follow ups
References