← Back to team overview

dhis2-devs team mailing list archive

Re: Translation project for Dari and Pashto languages

 

Hi Jason,

Find attached the translated DHIS2 Dari (Afghanistan Persian) files for
upload to the DHIS2. It is the first draft that will be fine tuned as the
end users test the system. The Pushto translation will follow hopefully
within a month.


And on another note, using the DHIS2 translation manual, we have been
working on a translation template for the metadata. Unfortunately the
CREATE statement below has failed to run in 2.25. Can you please help to
verify if something has changed that should also be reflected in the
manual.

curl -X POST -u admin:Pa$$w0rd "http://localhost:8282/dhis/api/translations/";
-H "Content-Type: application/json" -d'{"id":"U5QzK3jiuKF",
"objectId":"iJP7k1NOjJq", "className":"DataElement", "locale":"fa",
"property":"name", "value":"demo name translation"}'

I am attaching the error file as well as an xml of the data element in
question.

Regards,
Sam.


Sam Kasozi
+256 788-993-565
Skype: sam.kasoziug

On Wed, Nov 9, 2016 at 12:31 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

> Hi Sam,
> We need to do some setup on our side first. Those languages are for the
> user interface of the translation server, not the actual translation
> language.
>
> I have now enabled translation for Dari Persian (language code = prs) and
> Pashto ( language code = ps) for the core translations.
>
> There are many others which need to be translated, but I would suggest
> that you start with the "dhis-service-core" folder, and then we can go from
> there.
>
> Once you finish that, please get in touch with my via direct email, as I
> will need to sync these with the source code.
>
> Translation files can be downloaded for offline translation, using a tool
> like "POEdit". You can get the translation template from
> https://translate.dhis2.org/export/?path=/prs/dhis2-
> translations/dhis-service-core/dhis-service-core-prs.po for instance.
>
> If you have any other problems, let us know.
>
> Also, thanks for pointing out the manual is out of date. We will try and
> get it updated.
>
> Regards,
> Jason
>
>
>
> On Wed, Nov 9, 2016 at 10:07 AM, Sam Kasozi <kasozis@xxxxxxxxx> wrote:
>
>> Hi Jason,
>>
>> We would like to work on the translation for 2 languages: Dari and Pashto
>> in the DHIS 2. The translation guide in the implementer's manual provides
>> some instructions that are slightly different from the current translation
>> server user interface. I have a couple of questions.
>>
>> - Do we have an updated guide?
>> - Do you need to setup the project first before we can do anything (Under
>> settings -> Translation, -> Alternative source language, I see Pashto-ps
>> and not Dari)
>> - Then also does it have a provision for downloading a translation
>> template which can be populated and used to update the server afterward?
>>
>> regards,
>>
>>
>> Sam Kasozi
>> +256 788-993-565
>> Skype: sam.kasoziug
>>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+46764147049 <+46%2076%20414%2070%2049>
>
C:\>curl -X POST -u admin:Pa$$w0rd "http://localhost:8282/dhis/api/translations/"; -H "Content-Type: application/json" -d'{"id":"U5QzK3jiuKF", "objectId":"iJP7k1NOjJq", "className":"DataElement", "locale":"fa", "property":"name", "value":"demo name translation"}' -v

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying ::1...
* Connected to localhost (::1) port 8282 (#0)
* Server auth using Basic with user 'admin'
> POST /dhis/api/translations/ HTTP/1.1
> Host: localhost:8282
> Authorization: Basic YWRtaW46UGEkJHcwcmQ=
> User-Agent: curl/7.46.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 17
>
* upload completely sent off: 17 out of 17 bytes
< HTTP/1.1 404
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Set-Cookie: JSESSIONID=B67C478E7803087521A0166D53538CC6;path=/dhis;HttpOnly
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 990
< Date: Thu, 19 Jan 2017 05:56:11 GMT
<
<!DOCTYPE html><html><head><title>Apache Tomcat/8.5.5 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 404 - </h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.5.5</h3></body></html>* Connection #0 to host localhost left intact
Note: Unnecessary use of -X or --request, POST is already inferred.
* Rebuilt URL to: objectId:iJP7k1NOjJq,/
* Could not resolve host: objectId
* Closing connection 1
curl: (6) Could not resolve host: objectId
Note: Unnecessary use of -X or --request, POST is already inferred.
* Rebuilt URL to: className:DataElement,/
* Could not resolve host: className
* Closing connection 2
curl: (6) Could not resolve host: className
Note: Unnecessary use of -X or --request, POST is already inferred.
* Rebuilt URL to: locale:fa,/
* Could not resolve host: locale
* Closing connection 3
curl: (6) Could not resolve host: locale
Note: Unnecessary use of -X or --request, POST is already inferred.
* Rebuilt URL to: property:name,/
* Could not resolve host: property
* Closing connection 4
curl: (6) Could not resolve host: property
curl: (3) [globbing] unmatched close brace/bracket in column 28

Attachment: Dari Translation of DHIS 2-20170119T060403Z.zip
Description: Zip archive

<dataElement xmlns="http://dhis2.org/schema/dxf/2.0"; lastUpdated="2017-01-13T09:54:35.097" id="iJP7k1NOjJq" href="http://localhost:8282/dhis/api/25/dataElements/iJP7k1NOjJq"; created="2017-01-13T09:54:35.097" name="Malaria" shortName="Malaria">
<aggregationType>SUM</aggregationType>
<domainType>AGGREGATE</domainType>
<displayName>Malaria</displayName>
<publicAccess>rw------</publicAccess>
<displayShortName>Malaria</displayShortName>
<externalAccess>false</externalAccess>
<valueType>NUMBER</valueType>
<dimensionItem>iJP7k1NOjJq</dimensionItem>
<displayFormName>Malaria</displayFormName>
<zeroIsSignificant>true</zeroIsSignificant>
<optionSetValue>false</optionSetValue>
<dimensionItemType>DATA_ELEMENT</dimensionItemType>
<access>
<read>true</read>
<update>true</update>
<externalize>false</externalize>
<delete>true</delete>
<write>true</write>
<manage>true</manage>
</access>
<categoryCombo id="bjDvmb4bfuf"/>
<user id="M5zQapPyTZI"/>
<dataSetElements>
<dataSetElements id="cgkaV06iJsu"/>
</dataSetElements>
<translations>
<translation property="NAME" locale="fa" value="persian_name"/>
<translation property="SHORT_NAME" locale="fa" value="persian_shortname"/>
</translations>
</dataElement>

Follow ups

References