overwrite default region translations (.po)

36 views
Skip to first unread message

Francisco Maria Moyano Casco

unread,
Dec 6, 2017, 6:12:23 PM12/6/17
to tryton
Hi,
Is it there anyway to overwrite a translations with a *.po file. I want to make a module to have my region translations of es_AR.po.

P.e., I need to translate "appointments" to "turnos", not to "citas".

I don't know if I make myself clear.

Thanks.
Francisco

Francisco Maria Moyano Casco

unread,
Dec 6, 2017, 6:14:27 PM12/6/17
to tryton
BTW, I'm using tryton 3.8

Karla Stenger

unread,
Dec 6, 2017, 10:02:47 PM12/6/17
to try...@googlegroups.com
​Hello Francisco,​

​Here is the official documentation​ [1]
The tricky part is the msgctxt content "type:name:module.xml_id"
The doc reads "The xml_id part is optional and can be omitted if it is None", but it may not be clear that in this case your msgctxt must end up with a dot (inside the quotes). I personally don't know in which cases it would not be None, but your use case seems like None will be ok.

Cheers,
Karla.


--
-------------------------
Karla  Mª  Stenger  Sábat
karla....@gmail.com

Cédric Krier

unread,
Dec 7, 2017, 1:30:06 AM12/7/17
to tryton
On 2017-12-06 15:12, Francisco Maria Moyano Casco wrote:
> Hi,
> Is it there anyway to overwrite a translations with a *.po file. I want to make a module to have my region translations of es_AR.po.
>
> P.e., I need to translate "appointments" to "turnos", not to "citas".

Check out http://doc.tryton.org/4.6/trytond/doc/topics/translation.html#override-translations

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Message has been deleted
Message has been deleted

Karla Stenger

unread,
Dec 7, 2017, 9:06:55 AM12/7/17
to try...@googlegroups.com
2017-12-07 10:50 GMT-03:00 Francisco Maria Moyano Casco <moyanocasco...@gmail.com>:
El miércoles, 6 de diciembre de 2017, 20:12:23 (UTC-3), Francisco Maria Moyano Casco escribió:
I tried to do this on a es_ES.po file under a locale/override dir
​​
msgctxt "model:ir.ui.menu,name:gnuhealth_appointment_menu:gnuhealth_appointment_menu"

​Add a single dot at the end​, like this:

​msgctxt "model:ir.ui.menu,name:gnuhealth_appointment_menu:gnuhealth_appointment_menu."

What I tried to explain before about xml_id beeing None
 
msgid "Appointments"
msgstr "Turnos"

but it didn't work.

Anyother clue?
Thanks
    Francisco

--
You received this message because you are subscribed to the Google Groups "tryton" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/68eea093-67fb-483b-80b2-45ff9568006e%40googlegroups.com.

Francisco Maria Moyano Casco

unread,
Dec 7, 2017, 11:10:21 AM12/7/17
to tryton
Hi

> I tried to do this on a es_ES.po file under a locale/override dir
>
>
> ​​msgctxt "model:ir.ui.menu,name:gnuhealth_appointment_menu:gnuhealth_appointment_menu"
>
>
>
>
> ​Add a single dot at the end​, like this:
>
>
> ​msgctxt "model:ir.ui.menu,name:gnuhealth_appointment_menu:gnuhealth_appointment_menu."

Thanks, but no. The right way is:

msgctxt "model:ir.ui.menu,name:health.gnuhealth_appointment_menu"
msgid "Appointments"
msgstr "Turnos"

It's tricky, bit the last part goes like module.fs_id. In this case, health is the module, and gnuhealth_appointment_menu the fs_id.

Thank you all for the answers.

Francisco
Reply all
Reply to author
Forward
0 new messages