← Back to team overview

dhis2-devs team mailing list archive

Re: updating display names independently from name

 

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@xxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxx | 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@xxxxxxxxx> 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
> <https://docs.dhis2.org/master/en/developer/html/webapi_browsing_the_web_api.html#webapi_translation>
> .
>
> 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@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxx
>> 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@xxxxxxxxx
> http://www.dhis2.org <https://www.dhis2.org/>
>
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>

PNG image


Follow ups

References