Translation of django-js not work

616 views
Skip to first unread message

Harifetra Ramamonjy

unread,
Apr 13, 2017, 4:20:58 AM4/13/17
to openedx-translation
Hi everyone,

I try to translate openedx in my local installation. 
For django.po, i see my translation after running "django-admin.py compilemessages" and a restart but for djangojs.po, i don't see my translation after doing the same step.

Can someone help me please?

Thanks in advance.
RAMAMONJY Harifetra

openedX Developer

unread,
Apr 13, 2017, 1:41:24 PM4/13/17
to openedx-translation
Dear Ramamonjy,

can you confirm that the `djangojs.mo` file is correctly generated? If not, you could try to manually generate it by changing dir to the one where the `djangojs.po` file is and then executing:
msgfmt djangojs.po -o djangojs.mo
This command should silently exit and generate a new `djangojs.mo` file. 

Let me know if this helps. 
Regards. 

Harifetra Ramamonjy

unread,
May 12, 2017, 5:10:40 AM5/12/17
to openedx-translation
Hi,

Thanks for your response. Excuse me for my late reply, i am passed to an other task and i haven't time to test your  command.

This command does not resolve my translation.

I'll list all the steps I'm doing, i take the text in the button to delete in confirmation popup :













1- i modify the "conf/locale/fr/LC_MESSAGES/djangojs.po" to add the translation of  msgid "Yes, delete this {xblock_type}" for msgstr "Oui, supprimer ce {xblock_type}".
2- i change dir to edx-platform (folder parent of conf)  
3- i run this command "django-admin.py compilemessages" (or i run before the command "msgfmt djangojs.po -o djangojs.mo")
4- i restart the edxapp

Does i do something wrong? 

Thanks in advance.
RAMAMONJY Harifetra


Andy Armstrong

unread,
May 12, 2017, 2:00:15 PM5/12/17
to openedx-t...@googlegroups.com
Hi,

This is a great question that has been asked before. I've created a wiki answer that hopefully explains how to manage JavaScript translations:


I hope this helps.

 - Andy


--
You received this message because you are subscribed to the Google Groups "openedx-translation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-translation+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-translation/a1c46e0d-b758-4c0b-b6fd-da7609b30887%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Andy Armstrong

edX | UI Architect  | an...@edx.org  

141 Portland Street, 9th floor

Cambridge, MA 02139

http://www.edx.org

http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566

Harifetra Ramamonjy

unread,
May 22, 2017, 10:03:40 AM5/22/17
to openedx-translation
Hi, 

Thank you for the wiki. 
I follow the regeneration of javascript translations and i find the text in the djangojs.js in cms/static/js/i18n/fr.
But the source code in browser don't have the translation:

I always restart edxapp and clean all cache in my browser after all change i do.
Have you any ideas of the problem?

Thanks in advance.

Harifetra Ramamonjy

unread,
May 22, 2017, 10:48:05 AM5/22/17
to openedx-translation
Finally, i find the problem. I must run the command "bin/edxapp-update-assets-cms" after  the regeneration.

Thanks a lot for your help.
RAMAMONJY Harifetra
Reply all
Reply to author
Forward
0 new messages