-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add zh translation #29
Conversation
Current coverage is
|
zh-hant becomes zh due to some Django internal process.
問一下,Transifex 是會自動 pull 新的字串嗎? |
不會,要手動 push / pull |
從 Transifex pull 回 repo 是應該要有個人負責手動沒錯,但從 repo push 到 Transifex 感覺可以接到 Travis CI 上。不過我好像沒在文件裡找到指令,有 pointer 嗎? |
|
Travis Transifex integration source code: https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/transifex.rb 這邊有範例: 所以應該是做得到? |
剛試了一下好像要權限才能 push
可能要再設定一下(或者以後就交給你負責了這樣我也 OK!) |
不不,果斷開啊 |
綜合上面 Travis,開個 |
email ? |
我創好了,email 先設 web [at] pycon.tw,@daikeren 麻煩幫認證一下了。 |
No idea why pathlib.Paht.home() fails. Whatever.
OK 我搞定了 Travis,不過現在的 話說其實我不是很確定 ignore |
把 .mo 檔塞進去 repo 不小心也會被某人蓋掉,所以我還是會在實際 deploy 的機器上面跑 compilemessages。不過還是會把 .mo 檔加進去 .gitignore 吧,這樣子不需要管翻譯的人可以不需要在 local 跑 compilemessages,開發會比較方便一點。 |
Since developer may not want to run compilemessages in develop time, let's put .mo in repo!
剛剛想到可以在 Travis 上多加一個 |
這部分流程(文件 XD)就讓 @ccwang002 決定(寫下來)吧! |
現在的流程應該很自動化了,我整理一下:
Transifex 就歡迎大家自己翻,翻完如果沒出現在自己的環境,就 ping 我或 TP |
那我 merge 了,雖然還沒有實作 lang URL。 |
@ccwang002 你 merge 太快了 ... 好歹讓我再確認一下吧 orz |
krdai.info 沒有設定 transifex-client 現在 deploy 會出錯 應該是這部份啦 |
是說這種會跟 deploy 環境有關的以後可能讓我 merge 吧 |
是說,以後大家就乖乖 pull request,讓 @daikeren 負責 merge master 吧? |
QQ... 好的… |
說到切換語系,我覺得這可能直接做在每一頁裡比較好,例如像 Pinkoi 是做在 footer 最右下角我覺得不錯。不太確定我們現在的版有沒有 footer,沒有的話做在 navbar 也是個選擇。麻煩 @flywindy 和設計師討論的時候記得考慮到這個東西~ |
我目前是隨便做個能動的,因為加到 navbar 會炸 layout |
https://github.com/pycontw/pycontw2016/blob/master/fabfile.py#L95 不應該讓 Travis CS 自動把 translation 結果上傳上去,不然上面的記錄會被蓋掉。只要 |
To resolve #18
Set up Transifex client
Refer to Transifex client doc, add the file
~/.transifexrc
.Upload the raw messages to Transifex
python manage.py makemessages -l zh
to update the po files (will do fuzzy match).src/
, runtx push -s
update source file.Update the translation from Transifex
src/
, runtx pull -l zh-Hant
to download translated po files from Transifexpython manage.py compilemessages -l zh
to compile mo filesUse the translation
Use http://localhost:8000/i18n/ to change the locale in use.
To disable it, revert 55fd904.
(這個應該要改成用 URL 來做的,但我太懶了)