OSQA翻译问题:字符串不存在于django.po [英] OSQA translation issue: strings not present in django.po

查看:143
本文介绍了OSQA翻译问题:字符串不存在于django.po的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试为OSQA创建翻译

Trying to create a translation for OSQA

拳头我将FR语言环境复制到RU,更新了设置。很好,大多数事情都在工作,但现在django.po文件中的所有内容都已经被翻译,但是仍然有几行显示英文,二是无法找到它们。

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..

例如字符串


最近更新的问题

"Most recently updated questions"

在上边栏的内容正下方的问题数量。该字符串不存在于django.po中

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

PS:
我在使用wiki脚本的webfaction上安装了OSQA。任何帮助将不胜感激。

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

更新

模板sort_tabs包含



The template sort_tabs contains

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

但我认为字符串是来自count.html模板

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 %}

可能会将其缩小到questions.paginator.sort_description?

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

推荐答案

查看OSQA源代码最近更新的问题字符串是为了翻译而定义的 sort_tabs.html 模板和它已包含在 django.po (line 5466)。

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).

请注意,您的示例中的最近更新的问题字符串是不同的字符串,然后在OSQA存储库中找到(最上面的大多数),我只能假设您正在使用其他提供的模板。

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.

如果不是这种情况,请在OSQA源目录中使用以下命令查找包含缺少翻译字符串的文件:

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" {} \;

这篇关于OSQA翻译问题:字符串不存在于django.po的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆