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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to