New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template localization doesn't work completely #786
Comments
Hey Daria, First of, thanks for taking moment to file this issue. That one second is most likely the moment when Misago displays fallback html template. Stuff turns into english the moment JavaScript kicks in and takes over the UI. I could swear I've tested JS's i18n with polish language and it worked, but that was while now and this may be regression. Could you go to http://127.0.0.1:8000/django-i18n.js on your installation and confirm that its same as default english one? |
Can you please confirm that there are no JS errors/warnings in your browser's js console? |
Thank you for the answer!! :)
|
One second, I am checking web developer console. |
When I open the source of the page I see right translation (!), but when I open Firebug I see English. |
Oh, I've just noticed in your op:
Thise three lines mean respectively:
You are missing Here's the makemessages script that I'm using that makes language strings for both backend and frontend. |
Yes, I make Javascript file djangojs.po like this:
And I change it on Russian. |
This is because you have html that is rendered on server and uses What you are seeing is following events taking place:
Are you sure your |
I removed them *.mo and create again by compilemessages. |
the part of my djangojs.po:
|
Honestly, I think you are right about djangojs.po, because all my changes in it I don't see in the forum. |
That view is cached aggressively, so perhaps its that, but then in runserver cache should be turned off. |
Rafał! When I make error in django.po like this (i removed 's):
And try to compile, the compiler throws the error:
But, when I make the same error in djangojs.po compilation is ok and djangojs.mo is created. |
Could you upload your |
Yes Rafał of course, one second. |
djangojs.po https://yadi.sk/d/YdpTZBGy3GgC9E |
Thanks, I'll check this out when I'm back home and reach back to you what I've found. |
Thank you very much! |
Allright, time for wrap up! I've fixed the logic behind JS catalog. Turns out it explicitly requires one to specify packages to search for javascript translations. This will land in next alpha release, perhaps in two weeks. Next thing, I'm unsure how you've created your po files, but
Whereas correct one generated by
Incorrect plural forms declaration caused Misago to error with Just a note on translations from fellow slav: it looks like makemessages will not generate more than two blanks for plural strings:
Whereas slavic languages have more forms. You'll need to fill in missing blanks manually apparenlty, by adding them as needed to your
Apparently last form may be optional for now. There's discussion on Django's bugtracker. |
Glad I've helped;) On sidenote, if you are interested in translating Misago to Russian, there's already an translation project on Misago's transifex that you may help with: |
I'm not professional, but I can load my translation when I finish. |
Well, then here's link to project's page: |
Ok, I see now, thanks! :) |
Hello, guys!
I don't know this is the issue or this is my fault.
I tried to localize Misago forum.
I added new locale with
django-admin.py makemessages -l ru
The localization of the templates doesn't work completely (the part of text translated). I changed django.po file:
/usr/local/lib/python2.7/dist-packages/misago/locale/ru/LC_MESSAGES/django.po
I made
django-admin compilemessages
and I seeWhen I reload the forum page I see my changes in during one second, but after all becomes the same as before. Web browser developer console shows that forum files were reloaded (Status 200, not 304).
This is the view of the forum page while it's loading. Right translations I marked red circles:
This is the page after loading. I marked changing places:
The part of my
ru/LC_MESSAGES/django.po
For Javascript file I made the same localization.
Please, tell me why this happened? What did i miss? Where was I wrong?
I really like this engine! I don't want to use another. Please, help me!
The text was updated successfully, but these errors were encountered: