Sphinx 1.1 i18n 機能紹介

  • 5,141 views
Uploaded on

Sphinx 1.1 のi18n 新機能 …

Sphinx 1.1 のi18n 新機能

PyCon Mini 2011/01/29 に発表

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,141
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
12
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Sphinx 1.1 の i18n 機能紹介
  • 2. お前、誰よ
    • イアンというのよ
    • 3. BeProud に働いているのよ
    • 4. Google Appengine API 公式エキスパート
    • 5. Python/Django 好き、 仕事で Python 使っているぜ
    • 6. RedBull 飲んでいるよ
    • 7. feiz--
  • 8. Bucho 好き!
  • 9. Sphinx ってなによ!
  • 10. 渋川先生に聞きましょう
  • 11. しらないの?
  • 12. あららー
  • 13. あらららららー
  • 14. あらららららららららー
  • 15. あらららららららららららららー
  • 16. せっかく sphinx-users.jp 運用しているのに!
  • 17. http://sphinx-users.jp
  • 18. Sphinx はなによ
    • http://sphinx.pocoo.org/
    • 19. Python で作られたドキュメント生成ツール
    • 20. ReStructuredText を使う
    • 21. ファイル中間参照
    • 22. Autodoc ソースから作られたドキュメント
    • 23. HTML, PDF, LaTeX 出力
    • 24. 最新の Python 公式ドキュメント
  • 25. ReST/Sphinx での翻訳
  • 26. Sphinx ドキュメントって どうやって国際化するの?
  • 27. 盗品です。 http://www.flickr.com/photos/shibukawa/4067856691/
  • 28. 盗品です。 http://www.flickr.com/photos/shibukawa/4067856691/
  • 29. ってことは 完全に別ドキュメントとして管理 ?
  • 30. だよねぇ (´ ・ ω ・ `)
  • 31.
      元ドキュメントが変更された 場合、翻訳物をどう更新したら いいかわからない
    メンテが大変
  • 32. じゃ、どうするか
  • 33. 盗品です。 http://sphinx.pocoo.org/latest/intl.html Sphinx 1.1 ( 未リリース )
  • 34. やっぱり gettext だねぇ (´ ・ ω ・ `)
  • 35. それでいいのか?
  • 36. 盗品です。 http://sphinx.pocoo.org/latest/intl.html Sphinx 1.1
  • 37. sphinx-build gettext
    • index.rst
    • 38. other.rst
    • 39. directory/
      • subfile.rst
    • index.pot
    • 40. other.pot
    • 41. directory/
      • subfile.pot
  • 42. sphinx-build gettext bpssl Documentation ==================== What is bpssl? ----------------------------------- bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page. Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at: #b6395b85f34144a1a91a23a1bce5aa37 msgid "What is bpssl?" msgstr "" #2a85f8ce621c4e88897b51f59d868a55 msgid "Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at:" msgstr "" #3ec7b8f0c3e0425baac65f2a0f97394c msgid "bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page." msgstr "" #46cbf44fbb2040d983af60128148537d msgid "bpssl Documentation" msgstr ""
  • 43. sphinx-build gettext bpssl Documentation ==================== What is bpssl? ----------------------------------- bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page. Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at: #b6395b85f34144a1a91a23a1bce5aa37 msgid "What is bpssl?" msgstr "bpssl とは? " #2a85f8ce621c4e88897b51f59d868a55 msgid "Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at:" msgstr "" #3ec7b8f0c3e0425baac65f2a0f97394c msgid "bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page." msgstr "" #46cbf44fbb2040d983af60128148537d msgid "bpssl Documentation" msgstr ""
  • 44. sphinx-build gettext bpssl Documentation ==================== What is bpssl? ----------------------------------- bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page. Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at: #b6395b85f34144a1a91a23a1bce5aa37 msgid "What is bpssl?" msgstr "" #2a85f8ce621c4e88897b51f59d868a55 msgid "Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at:" msgstr "" #3ec7b8f0c3e0425baac65f2a0f97394c msgid "bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page." msgstr "" #46cbf44fbb2040d983af60128148537d msgid "bpssl Documentation" msgstr ""
  • 45. sphinx-build gettext bpssl Documentation ==================== What is bpssl? ----------------------------------- bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page. Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at: #b6395b85f34144a1a91a23a1bce5aa37 msgid "What is bpssl?" msgstr "" #2a85f8ce621c4e88897b51f59d868a55 msgid "Specifying views and urls as secure is supported as are `flatpages`_. `Fastcgi`_ and HTTP proxy setups are also well supported. See the sourcecode/homepage at:" msgstr "" #3ec7b8f0c3e0425baac65f2a0f97394c msgid "bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view '/login' is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page." msgstr "" #46cbf44fbb2040d983af60128148537d msgid "bpssl Documentation" msgstr "" 残念!
  • 46. 盗品です。 http://sphinx.pocoo.org/latest/intl.html Sphinx 1.1 ( 未リリース )
  • 47. 盗品です。 http://sphinx.pocoo.org/latest/intl.html ? Sphinx 1.1 ( 未リリース )
  • 48. 結局、自分でやらないといけねぇかよ (´ ・ ω ・ `)
  • 49. INDIR = $1 OUTDIR = $2 LOCALES = `cd $OUTDIR && ls -d */ | sed 's//$//'` for LOCALE in $LOCALES ; do echo "Updating locale $LOCALE..." for FILE in `cd $INDIR && find . -name "*.pot"` ; do OUTFILE = `echo " $FILE " | sed 's/.pot$/.po/'` OUTFILE = `echo " $OUTFILE " | cut -b 1-2 --complement` INFILE = `echo " $FILE " | cut -b 1-2 --complement` pybabel update -l $LOCALE -i $INDIR / $INFILE -o $OUTDIR $LOCALE /LC_MESSAGES/ $OUTFILE done done
  • 50. init_trans.sh / update_trans.sh
    • index.pot
    • 51. other.pot
    • 52. directory/
      • subfile.pot
    • en/
      • LC_MESSAGES/
    • ja/
      • ...
    • de/
      • ...
  • 55. 盗品です。 http://sphinx.pocoo.org/latest/intl.html ? Sphinx 1.1 ( 未リリース )
  • 56. 盗品です。 http://sphinx.pocoo.org/latest/intl.html ? ? Sphinx 1.1 ( 未リリース )
  • 57. compile_trans.sh
  • 62. 盗品です。 http://sphinx.pocoo.org/latest/intl.html Sphinx 1.1 ( 未リリース )
  • 63. sphinx-build -Dlanguage=ja +
  • 68. まとめ
    • 新しい機能なので、ま、ま。。。。
    • 69. 小さいプロジェクトにはまだ面倒かな
    • 70. gettext は便利なのか、不便なのか
  • 71. まとめ
    • 大きいプロジェクトにはいいかも
      • 翻訳ファイルの管理ツール
      • 72. 更新が多い
    • ドキュメント更新された時、翻訳のどこを更新すればいいか、 gettext が 働いてくれるのがうれしい
  • 73. 皆さん、どんどんPythonドキュメント 翻訳しよう!! ご清聴ありがとうございました! 質問!! [email_address] @IanMLewis