updating display names independently from name

Dear Devs,

I have been trying to change the display names (displayName, displayFormName etc…) of some data elements so that they are different to the name, displayName etc… I have a use case where data entry on computer will be in one language but on the android data capture app will be another. In previous threads it was mentioned that from 2.24 the android app will read the displayX property for what it displays.

My question: Is it possible to change the displayFormName independently of the formName? If so, how please? So far I have used xml updates and partial payload updates but to no avail. However simply changing the form name does the trick (which I don’t want to do.)

Many thanks,

Blake

Hi Blake,

the displayName is not a persisted property of the data model. This property gets populated based on the translations available for the object for the currently selected locale.

Example from the demo:

https://play.dhis2.org/demo/api/dataElements/FTRrcoaog83?fields=id,name,code,translations

This dataelement has 8 translations available, including one for the french locale for the name property.

When you have set the db locale for your user to french, the system will render that french translation (“Accute French”) as the displayName property value.

The idea is that all clients should use the displayName (or display***) property for their UIs. This is a transient field which is populated by DHIS 2.

To store translations in DHIS 2 for a specific locale, you can POST the translation part of the object itself in the same format as it is rendered (see URL example above). Docs here.

This can of course also be done through the maintenance app UI.

best regards,

Lars

···

On Thu, Jan 26, 2017 at 11:20 AM, Blake Hansen bhansen@baosystems.com wrote:

Dear Devs,

I have been trying to change the display names (displayName, displayFormName etc…) of some data elements so that they are different to the name, displayName etc… I have a use case where data entry on computer will be in one language but on the android data capture app will be another. In previous threads it was mentioned that from 2.24 the android app will read the displayX property for what it displays.

My question: Is it possible to change the displayFormName independently of the formName? If so, how please? So far I have used xml updates and partial payload updates but to no avail. However simply changing the form name does the trick (which I don’t want to do.)

Many thanks,

Blake


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Thank you Lars!

That is curious then, because our data elements are already translated, the users language is set to the locale the translations exist for and yet in the android data capture app the only language displayed is english. Is there a setting that needs to be changed somewhere on the app or the server to ensure the android data capture app UI uses the display* property value?

Blake Hansen
Projects Implementation Manager, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

···

On Thu, Jan 26, 2017 at 11:20 AM, Blake Hansen bhansen@baosystems.com wrote:

Dear Devs,

I have been trying to change the display names (displayName, displayFormName etc…) of some data elements so that they are different to the name, displayName etc… I have a use case where data entry on computer will be in one language but on the android data capture app will be another. In previous threads it was mentioned that from 2.24 the android app will read the displayX property for what it displays.

My question: Is it possible to change the displayFormName independently of the formName? If so, how please? So far I have used xml updates and partial payload updates but to no avail. However simply changing the form name does the trick (which I don’t want to do.)

Many thanks,

Blake


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Great point. The android data capture app uses another API endpoint where the form name was not properly handling translations. I have made a fix now to (to the DHIS 2 server application) in 2.25 and 2.24.

Builds ready in 15 min. Let me know if it works.

Lars

image

···

On Thu, Jan 26, 2017 at 1:35 PM, Blake Hansen bhansen@baosystems.com wrote:

Thank you Lars!

That is curious then, because our data elements are already translated, the users language is set to the locale the translations exist for and yet in the android data capture app the only language displayed is english. Is there a setting that needs to be changed somewhere on the app or the server to ensure the android data capture app UI uses the display* property value?

Blake Hansen
Projects Implementation Manager, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

On 26 Jan 2017, at 12:16, Lars Helge Øverland lars@dhis2.org wrote:

Hi Blake,

the displayName is not a persisted property of the data model. This property gets populated based on the translations available for the object for the currently selected locale.

Example from the demo:

https://play.dhis2.org/demo/api/dataElements/FTRrcoaog83?fields=id,name,code,translations

This dataelement has 8 translations available, including one for the french locale for the name property.

When you have set the db locale for your user to french, the system will render that french translation (“Accute French”) as the displayName property value.

The idea is that all clients should use the displayName (or display***) property for their UIs. This is a transient field which is populated by DHIS 2.

To store translations in DHIS 2 for a specific locale, you can POST the translation part of the object itself in the same format as it is rendered (see URL example above). Docs here.

This can of course also be done through the maintenance app UI.

best regards,

Lars

On Thu, Jan 26, 2017 at 11:20 AM, Blake Hansen bhansen@baosystems.com wrote:

Dear Devs,

I have been trying to change the display names (displayName, displayFormName etc…) of some data elements so that they are different to the name, displayName etc… I have a use case where data entry on computer will be in one language but on the android data capture app will be another. In previous threads it was mentioned that from 2.24 the android app will read the displayX property for what it displays.

My question: Is it possible to change the displayFormName independently of the formName? If so, how please? So far I have used xml updates and partial payload updates but to no avail. However simply changing the form name does the trick (which I don’t want to do.)

Many thanks,

Blake


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


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

You will have to ensure a fresh download of metadata from the server for this to take effect.

image

···

On Thu, Jan 26, 2017 at 2:06 PM, Lars Helge Øverland lars@dhis2.org wrote:

Great point. The android data capture app uses another API endpoint where the form name was not properly handling translations. I have made a fix now to (to the DHIS 2 server application) in 2.25 and 2.24.

Builds ready in 15 min. Let me know if it works.

Lars

On Thu, Jan 26, 2017 at 1:35 PM, Blake Hansen bhansen@baosystems.com wrote:

Thank you Lars!

That is curious then, because our data elements are already translated, the users language is set to the locale the translations exist for and yet in the android data capture app the only language displayed is english. Is there a setting that needs to be changed somewhere on the app or the server to ensure the android data capture app UI uses the display* property value?

Blake Hansen
Projects Implementation Manager, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

On 26 Jan 2017, at 12:16, Lars Helge Øverland lars@dhis2.org wrote:

Hi Blake,

the displayName is not a persisted property of the data model. This property gets populated based on the translations available for the object for the currently selected locale.

Example from the demo:

https://play.dhis2.org/demo/api/dataElements/FTRrcoaog83?fields=id,name,code,translations

This dataelement has 8 translations available, including one for the french locale for the name property.

When you have set the db locale for your user to french, the system will render that french translation (“Accute French”) as the displayName property value.

The idea is that all clients should use the displayName (or display***) property for their UIs. This is a transient field which is populated by DHIS 2.

To store translations in DHIS 2 for a specific locale, you can POST the translation part of the object itself in the same format as it is rendered (see URL example above). Docs here.

This can of course also be done through the maintenance app UI.

best regards,

Lars


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

On Thu, Jan 26, 2017 at 11:20 AM, Blake Hansen bhansen@baosystems.com wrote:

Dear Devs,

I have been trying to change the display names (displayName, displayFormName etc…) of some data elements so that they are different to the name, displayName etc… I have a use case where data entry on computer will be in one language but on the android data capture app will be another. In previous threads it was mentioned that from 2.24 the android app will read the displayX property for what it displays.

My question: Is it possible to change the displayFormName independently of the formName? If so, how please? So far I have used xml updates and partial payload updates but to no avail. However simply changing the form name does the trick (which I don’t want to do.)

Many thanks,

Blake


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


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org