Could you please check the steps to enable reviewboard to display other language?

瀏覽次數:100 次
跳到第一則未讀訊息

Brant

未讀,
2012年5月17日 凌晨3:11:202012/5/17
收件者:reviewboard
Could anyone please check the steps to enable reviewboard to display
other language?

Could anyone please check my steps to enable reviewboard to display
other language?
It doesn't work.
Thank you in advanced.

Environment:
Ubuntu 12.04 LTS
python 2.7
ReviewBoard: 1.6.6
Installed by easy_install
English language show well.
System default locale: zh_CN.UTF-8

My steps to enable it to show zh_CN language:
1. Modify following places in "/usr/local/lib/python2.7/dist-packages/
ReviewBoard-1.6.6-py2.7.egg/reviewboard/settings.py":
(1) LANGUAGE_CODE = 'zh_CN'
(2) USE_I18N = True
LANGUAGES = (
('zh', _('Chinese')),
)
2. Compile settings.py by a python script:
import py_compile

py_compile.compile(r'/usr/local/lib/python2.7/dist-packages/
ReviewBoard-1.6.6-py2.7.egg/reviewboard/settings.py')

3. Under /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.6-
py2.7.egg/reviewboard ,run:
mkdir -p locale/zh_CN/LC_MESSAGES/
django-admin.py makemessages -l zh_CN

Now we got django.po.

4. Fill out locale/zh_CN/LC_MESSAGES/django.po with my Chinese
translation.

5. Under /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.6-
py2.7.egg/reviewboard ,run:
django-admin.py compilemessages -l zh_CN

Now we got django.mo.

6. Restart apatch2:
apachectl -k restart

7. Refresh ReviewBoard portal.

Unfortunately, Nothing happened :(

Question 1:
1. Could you please point me what should I do with above steps?

2. I tried copying /usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-
py2.7.egg/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo
to
/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.6-py2.7.egg/
reviewboard/locale/zh_CN/LC_MESSAGES/django.mo
Then restart apache, now it works partly
But after I refresh portal again, it went back to English....
Do you know why?

Thank you very much ~~

Po-Chien Lin

未讀,
2012年5月21日 凌晨3:45:352012/5/21
收件者:revie...@googlegroups.com
Hi Brant,

The  LANGUAGE_CODE should be in the form: (It is also mentioned in settings.py)

In your case, I think it should be:
LANGUAGE_CODE = 'zh-cn' 

Try it, Good luck :)

- linpc

Brant於 2012年5月17日星期四UTC+8下午3時11分20秒寫道:
訊息已遭刪除

Po-Chien Lin

未讀,
2012年5月21日 上午9:05:232012/5/21
收件者:revie...@googlegroups.com
Oh,

I forgot that ``LANGUAGES'' item need also be modified to be the same with your ``LANGUAGE_CODE'' setting

LANGUAGE_CODE = 'zh-cn'  
USE_I18N = True
LANGUAGES = ( 
         ('zh-cn', _('Chinese')), 
        )  

But keep your django.po file under ``locale/zh_CN/LC_MESSAGES/'' as you already did.

-linpc

Po-Chien Lin於 2012年5月21日星期一UTC+8下午3時45分35秒寫道:

Brant Chen

未讀,
2012年5月30日 晚上11:34:262012/5/30
收件者:revie...@googlegroups.com
Thank you Po-Chien!
我发现zh_CN也可以。
我之前的错误在于:
我翻译了mo里面的某一句话,并找到显示那句话的页面,结果发现编译后那就话的页面仍然是英文。
后来我才发现原因所在:我找到显示那句话的页面错了。。。。

非常感谢您的帮助!


BR/Brant.



2012/5/21 Po-Chien Lin <li...@cs.nctu.edu.tw>
--
Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to reviewboard...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

回覆所有人
回覆作者
轉寄
0 則新訊息