Public bug reported: Dear all,
Related to thread: https://lists.launchpad.net/dhis2-users/msg07563.html When making a new pivot table or graph using the data visualizer the dataelements and indicators that are available for selection (in the left side) are displayed not in the language of the profile. So if in the profile settings, display and database language is set to french it is expected that those indicators and elements are in that language as well (of course when for each element and indicator the translations have been added). Looking into the access log in Tomcat we saw the following call server:portNumber/dhis/api/dataElements.json?fields=id,name&filter=domainType:eq:AGGREGATE&_dc=1435848215196&page=1&pageSize=50 copying that into a browser results in the elements returned in the reference name which is in our case English. Name is always the reference value and not the translation but changing that to displayName and adding translate=true to the call the fields are returned in the language of the user profile which is french. Perhaps this is a possible solution? To adjust the api call in the app.js to use "translate=true" and to change name to displayName? See an example below, we tested the call on itself and the data elements are returned in the language of the profile that is logged in ( french) with this call. server:portNumber/dhis/api/dataElements.json?translate=true&fields=id,displayName&filter=domainType:eq:AGGREGATE&_dc=1435848215196&page=1&pageSize=50 What do you think? ** Affects: dhis2 Importance: Undecided Status: New ** Tags: 2.19 translate -- You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. https://bugs.launchpad.net/bugs/1471276 Title: available selection of data elements and indicators in wrong language in version 2.19 Status in DHIS 2: New Bug description: Dear all, Related to thread: https://lists.launchpad.net/dhis2-users/msg07563.html When making a new pivot table or graph using the data visualizer the dataelements and indicators that are available for selection (in the left side) are displayed not in the language of the profile. So if in the profile settings, display and database language is set to french it is expected that those indicators and elements are in that language as well (of course when for each element and indicator the translations have been added). Looking into the access log in Tomcat we saw the following call server:portNumber/dhis/api/dataElements.json?fields=id,name&filter=domainType:eq:AGGREGATE&_dc=1435848215196&page=1&pageSize=50 copying that into a browser results in the elements returned in the reference name which is in our case English. Name is always the reference value and not the translation but changing that to displayName and adding translate=true to the call the fields are returned in the language of the user profile which is french. Perhaps this is a possible solution? To adjust the api call in the app.js to use "translate=true" and to change name to displayName? See an example below, we tested the call on itself and the data elements are returned in the language of the profile that is logged in ( french) with this call. server:portNumber/dhis/api/dataElements.json?translate=true&fields=id,displayName&filter=domainType:eq:AGGREGATE&_dc=1435848215196&page=1&pageSize=50 What do you think? To manage notifications about this bug go to: https://bugs.launchpad.net/dhis2/+bug/1471276/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp