วันนี้ลอง Export PO มาดูเล่น อยากรู้ว่าแปลผ่าน Rosetta แล้ว PO มันออกมาเป็นไง พบว่าหน้าตาเป็นงี๊
: slides/ubuntu/firefox.html:1
msgid "Browse the web with Firefox"
msgstr "ท่องเว็บด้วย Firefox"
: slides/ubuntu/firefox.html:2
msgid ""
"Ubuntu comes with the widely acclaimed Firefox 3.5 web browser."
msgstr ""
"Ubuntu มาพร้อมกับโปรแกรมท่องเว็บ Firefox รุ่น 3.5 "
"ซึ่งเป็นที่ยอมรับกันอย่างกว้างขวาง"
: slides/ubuntu/firefox.html:3
msgid ""
"It protects your privacy and personal information so you can surf worry free."
msgstr ""
"มันช่วยปกป้องความเป็นส่วนตัวและข้อมูลส่วนบุคคลของคุณ "
"ดังนั้นคุณจึงสามารถท่องเว็บได้อย่างไร้กังวล"
สังเกตุดูว่า msg id บางตัวมันมีบรรทัดเกินขึ้นมา จากที่ original msg มีบรรทัดเดียว แต่ข้อความแปลดันมีสองบรรทัด ทั้งที่ใน rosetta ที่แปลไว้มันก็บรรทัดเดียว
คิดว่าคงต้องไปแจ้งบั๊กละ จะเมลตรงหาจรูญก็ไม่ดี ทำงานตามระบบเขาดีกว่า
กำลังหาทาง ว่าจะแปลผ่าน bzr ได้ยังไง (คือไม่รู้ว่าแตก branch มาแล้ว จะ commit เข้าทางไหน) แล้วก็ เท่าที่ไล่ดู branch ต่างๆ ยังไม่เจอ branch ไหนที่ดึงไปทำเฉพาะงานแปลเลย (จะดูเป็นตัวอย่างซะหน่อย) อ่านใน help ก็ไม่มีอธิบาย เหมือนเขาจะพยายามให้ใช้ rosetta เป็นหลัก
คือตะก่อนผมก็ว่าแปลผ่านเว็บดีนะ แต่พอลงมาทำเป็นกิจกรรมหลักแล้ว การแปลผ่านหน้าเว็บไม่สนุกเลย คือเวลาทำเป็นงานอดิเรกมันก็ง่ายดีหรอก แต่พอทำจริงจังแล้วเป็น po มานั่งทำเป็นชิ้นๆ สะดวกกว่า อันนี้ก็คงแล้วแต่พฤติกรรมการแปลด้วย





Actually, it's still one line!
This is just how the gettext format works. The translations are still one line each! These two are exactly the same in gettext:
msgid "x"
msgstr "foo bar"
==
msgid "x"
msgstr ""
"foo "
"bar"
No difference. In both cases the msgstr is "foo bar".
If you want a newline, you type "\n". So this is a translation with 2 lines:
msgid "x"
msgstr ""
"foo \n"
"bar"
The parts between "quotes" are just concatenated together. You can even write:
msgid "x"
msgstr "foo " "bar"
Still one line.
Jeroen
Jeroen
msgid
msgid หนึ่ง ๆ เวลาคอมไพล์เป็น mo มันจะเอาบรรทัดต่าง ๆ มาต่อกันเป็นก้อนเดียวอยู่แล้วครับ ที่แบ่งเป็นหลายบรรทัดก็แค่เป็นการตัดให้อยู่ใน 80 คอลัมน์เท่านั้น อย่าเพิ่งไป file bug เชียว
ส่วนเรื่องการ commit ผ่าน git/bzr โดยธรรมชาติของ distributed VCS มันจะ checkout source ทั้งโครงการอยู่แล้วครับ ไม่เหมือนสมัยใช้ cvs หรือ svn ที่แยก checkout แค่ส่วน po ได้
เราก็ checkout source มาทั้งหมด แล้วทำงานแค่ใน po/ ก็พอครับ ส่วน source code ที่มาด้วย ก็เอาไว้ใช้ตรวจสอบบริบทในกรณีที่สงสัยได้ครับ (เช่น ตัวอย่างที่ผมพูดถึงบ่อย ๆ คือ sending file จะแปลว่า กำลังส่งแฟ้ม หรือ การส่งแฟ้ม ก็ตรวจสอบ source เอาได้ เป็นต้น)
จรูญตอบไปแล้ว
อ้าว มัวแต่พิมพ์ยาว จรูญตอบไปเรียบร้อยแล้วครับ :-)
Translating in Launchpad using bzr
Here's a blog post I wrote to explain how you can try out translation using bzr on Launchpad.
http://blog.launchpad.net/general/trying-out-launchpad-translations
The article shows you how to try it out on staging.launchpad.net. This is a copy of Launchpad that we use to test and try things. Don't be afraid to play around; we wipe that server every day (or almost every day) and replace it with a fresh copy of launchpad.net.
Jeroen
โอ้ ขอบคุณยิ่งทั้งคู่เลยครับ
โอ้ ขอบคุณยิ่งทั้งคู่เลยครับ เดี๋ยวจะไปอ่านใน blog อีกที ขอบคุณครับ
Post new comment