The jinja2_makemessages command isn't picking up some strings -- they don't even appear in the .po file.
For example "Sort by »" on the main /questions/ page is picked up correctly, but all the "by activity", "by date" texts next to it are not.
I looked in the source at skins/default/templates/main_page/tab_bar.html:
{{macros.reversible_sort_button(
button_sort_criterium = 'activity',
label = gettext('by activity'),
asc_tooltip = gettext('click to see the least recently updated questions'),
desc_tooltip = gettext('click to see the most recently updated questions'),
current_sort_method = sort
)
}}
Why is the gettext directive ignored? And how to fix this?
The error was entirely on my part and completely unrelated. Sorry for the noise.
The cause of this issue was pretty bizzare and I'll explain below for those interested, but TL;DR is there's nothing wrong with askbot or jinja2_makemessages. So the django version thing that Evgeny mentions must be unrelated.
Being new to django and rosetta, I completely missed the fact that you have to select a 3rd party catalogue for translation (top-right corner of the initial rosetta view, not visible in later views; defaults to "Project only").
The reason this sort of worked for us and we didn't notice anything for a long time was that because of django.staticfiles, most of the askbot strings were actually picked up for translation! managy.py collectstatic copied askbot templates to a local dir under project, where makemessages found them and presented them for translation in rosetta. So when we were thinking we're translating askbot, we were actually translating its (partially) cloned version in STATIC_DIR! Heh.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2011-12-11 10:52:03 -0500
Seen: 68 times
Last updated: Dec 20 '11
Why do some messages on Askbot appear in Turkish?
Some page is rendered partially in English and partially in Chinese
Internal Server Error when trying to edit personal pro
Where are the badges in a fresh install? [fixed]
HTML Tags in titles getting eaten <fixed/>
Unknown column 'auth_user.is_approved' in 'field list' [fixed]
email for comments: link missing a href [fixed]
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
Try downgrading Django to 1.2, maybe that will help. There is also known bug with extracting messages from javascript - supposedly fixed in the dev version, but they might have broken something else. I've noticed that some of the messages were lost - even in the English locale.
Evgeny ( 2011-12-11 13:24:02 -0500 )edit