OSQA translation issue: strings not present in django.po

你离开我真会死。 提交于 2019-12-23 03:32:19

问题


Trying to create a translation for OSQA

Fist I copied the FR locale to RU, updated the settings. Fine, Most things are working but now everything in the django.po file has been translated but still a few lines show up in English and I I cannot find them..

For example the string

"Most recently updated questions"

in the upper sidebar content right underneath the number of questions. The string is just not present in the django.po

PS: I installed OSQA on webfaction using the wiki script. Any help will be appreciated.

Update

The template sort_tabs contains

{% load i18n %} 
{% trans "active" %} {% trans "newest" %} {% trans "hottest" %} {% trans "most voted" %} 

but I think the string is coming from the count.html template

{% spaceless %} {% load i18n humanize extra_tags %} {% declare %} answer_count =     questions.children_count('answer') {% enddeclare %} 
{{ questions.paginator.count }}{{ list_description }} 
{% if answer_count %} 
{{ answer_count }}{% trans "answers" %} 
{% endif %} 
{{ questions.paginator.sort_description }} 

{% endspaceless %}

that might narrow it down to questions.paginator.sort_description ?


回答1:


Looking at OSQA source code "most recently updated questions" string is defined for translation in sort_tabs.html template and it is included in django.po (line 5466).

Please note that "Most recently updated questions" string from your example is different string then is found in found in OSQA repository (uppercased Most), I can only guess that you are using some other templates that ones provided.

If that is not the case, please use following command in OSQA source directory to find files which includes missing translation string:

$ find . -name "*.po" -exec grep -l "Most recently updated questions" {} \;


来源:https://stackoverflow.com/questions/8342161/osqa-translation-issue-strings-not-present-in-django-po

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!