跳到主要內容

Gvim and Lokalize

在翻译过程中,使用最多的工具当属于 Gvim 和 Lokalize

此处先讲一下如何使用这两种工具快速进入翻译的工作,后面将会有博客专门讲如何更好的使用 vim 这一强大的工具。

简单的说,Gvim 在翻译篇幅不长的文件,同类文件参考时有奇效。

1. Gvim 配置

https://code.google.com/p/i18n-zh/wiki/EditPoFilesWithVimOrEmacs

按照链接中配置好后,就可以开始翻译了。

vim 中的survive级别命令就不介绍了。直接讲一些翻译中常用的快捷键。

原版的po.vim是这样的:                                                  
"     Action                            Key mappings                 Insert   Normal
"     =================================================================
"     Move to a string (transl. or untransl) forward           \m     \m
"     Move to a string (transl. or untransl) backward        \M     \M
"     Begain to comment this entry                                   \C     \C
"     Move to an untransl. string forward                         \u     \u
"     Move to an untransl. string backward                      \U     \U
"     Copy the msgid string to msgstr                               \c    
"     Delete the msgstr string                                            \d    
"     Move to the next fuzzy translation                           \f     \f
"     Move to the previous fuzzy translation                    \F     \F
"     Label the translation fuzzy                                       \z     \z
"     Remove the fuzzy label                                           \Z     \Z
"     Show msgfmt statistics for the file(*)                       \s     \s
"     Browse through msgfmt errors for the file(*)           \e     \e
"     Put the translator info in the header                          \t     \t
"     Put the lang. team info in the header                        \l     \l
"     Format the whole file(wrap the lines etc.)                \W     \W
"     -----------------------------------------------------------------
"     (*) Only available on UNIX computers.

翻译版本:

插入模式下:                                         图形模式       文本模式    ======================================================================                                              
移至下一个未翻译的字符串                             Shift-F1           \m移至上一个未翻译的字符串                             Shift-F2           \p msgid 的内容复制到 msgstr                         Shift-F3           \c删除 msgstr 的内容                                   Shift-F4           \d移至下一个模糊的翻译                                 Shift-F5           \f移至上一个模糊的翻译                                 Shift-F6           \b将翻译标记为模糊翻译                                 Shift-F7           \z删除模糊翻译标记                                     Shift-F8           \r检查并显示翻译中的 msgfmt statistic 统计信息(*)      Shift-F11          \s检查并浏览翻译中的 msgfmt 统计错误信息(*)            Shift-F12          \e将译者信息放入文件头                                    \t              \t将翻译组织信息放入文件头                                \l              \l---------------------------------------------------------------
正常模式下:                                          图形模式       文本模式    ======================================================================                                              
移至下一个未翻译的字符串                              Shift-F1           \m移至上一个未翻译的字符串                              Shift-F2           \p移至下一个模糊的翻译                                  Shift-F5           \f移至上一个模糊的翻译                                  Shift-F6           \b将翻译标记为模糊翻译                                  Shift-F7           \z删除模糊翻译标记                                      Shift-F8           \r在当前光标处分屏打开文件                                gf               gf检查并显示翻译中的 msgfmt statistic 统计信息(*)       Shift-F11          \s检查并浏览翻译中的 msgfmt 统计错误信息(*)             Shift-F12          \e将译者信息放入文件头                                     \t              \t将翻译组织信息放入文件头                                 \l              \l--------------------------------------------------------------- 

个人还是比较喜欢Shift的快捷键。



补全


类似文件对比

========================================================================
Lokalize

http://userbase.kde.org/Lokalize


lokalize在翻译大文件的时候有很好的优势,可以在过滤中找出empty,not-ready的来翻译。有需要前后参照时可以在搜索框中搜索。
在输入框中调整每行的字数多少。在Gvim中由于每行的首尾都有",所以修改起来麻烦。

更好的功能是相似的会有建议是否采用之前的翻译,可以大大节省时间。用于桌面的翻译比较好,但是像网站这种第一次翻译的东西,就只能从0开始了。55555555

趁着今天想到这两样需要比较,先粗略写写,过两天加上更合适的截图以及相关英文翻译。

=======================================================================
剩下的时间可能定期把vim的一些用法普及下,vim是非常非常好的工具,可惜我还比较皮毛,所以也是共同学习的过程吧。
今年的Gnome Asia主题和desktop有关,正好在翻译中涉及到许多官方的评价,以及设计师的访谈。后续会至少再写一篇,宣传下gnome 3.8 的设计理念。
作为中国码农,中科红旗的事情,让各位码农的心里都。。。网站中也提到中科红旗和GNOME的合作,翻译完可以放出来缅怀一下。。。
另外,我和mentor都希望把网站的翻译po文件如何编译,然后本地搭建一下网站,看看翻译过来的效果如何,有问题再调整。但是mentor很忙,本人能力较菜,有熟悉gettext的朋友,希望不吝赐教。
还有千余条巨长无比的官方发言,且待我慢慢翻译。




留言

這個網誌中的熱門文章

Summary about Translation Work

I am so not good at summary, because it is so hard to make it meaningful and worth sharing. But looking back, review the condition of our translation work, will be at least helpful to help newer like me get involved more easily. 我非常不擅长总结,这个工作要做到有意义值的分享很有难度。但是回顾一下,理清现在中文翻译的情况,特别是从新人的角度,希望帮助其他加入者了解怎样成长更快,怎样对用户使用中文 GNOME 帮助更大。 After reading another intern who also works on translation, JuditGyimesi, whose blog is in different style. I changed my mind to share statics and skills. Maybe because I am a Chinese who was educated from a young age that every share need to give reader knowledge. From her blog I have learnt sharing when translating the translator feel happy still make sense. 在我参考了另外一位翻译实习生 JuditGyimesi 的 博客  以后,把这篇文章的风格修改了一下,不知道是不是因为自己是中国人的原因,过于希望在博客里分享知识,怎样做,能学会什么,或者简简单单的分享自己做了些什么,觉得很开心就好了。 Talk about the growth in the translation program, the most important must be understanding the important or urgent situation of each program need translated. And finding out the parts

Useful Gvim Skills for translation work

As I use linux as normal operating system, and prefer gvim very much. I would like to share some skills to help keep your hands away from mouse bracing the high efficient way of working. Especially for the survive stage vim newbees. I hope the article will help you get into the translation work faster than spending long time learning vim from 0. 因为日常使用linux系统,翻译工作的工具又比较偏爱gvim,所以分享一些小技巧,希望帮助大家远离“鼠标+键盘”的低效工作模式,特别是刚刚处于survive阶段的vim轻度用户。快速在翻译工作中高效使用vim。 1.MOVE    移动 1.1 move between msgstr       msgstr间移动 The basic item of .po file is msgstr, when whose state is untranslated and fuzzy need working on. So jump between the msgstr is very simple: 在翻译中基本单位是msgstr,需要翻译的状态是:未翻译和fuzzy,在这两种状态直接的跳跃方法很简单: In both normal and insert state, SHIFT+F1, next untranslated,  SHIFT+F2, pre untranslated  SHIFT+F5, next fuzzy, SHIFT+F6, pre fuzzy. 两种状态下,SHIFT+F1,下一条未翻译,SHIFT+F2,上一条未翻译。 SHIFT+F5,下一条fuzzy,SHIFT+F6,上一条fuzzy。 If you would like to find a pre msgstr which you j

Back to Blogger

Start up my blogger spot again~ After working in a frequent re-organizing business unit in a big company for nearly 10 years, struggling in the seas of system, Bigdata, ML/DL, cloud, etc. On one hand I feel myself like Columbus overrun the seven seas(OSI) dreaming for land, on the other hand I feel like farming the four seasons, harvesting less for climate change or tribes migrate.  This year I have a new plan, to start a journey back to land. To farm on a small, stable land, growing something I like. Ref: little forest   Why I choose back to blogger, my expectation of my renew blog: - To track the thoughts - To incubate articles - To communicate on related topics    My previous ways: - github issue     - Pro: quiet enough for me:)     - Con: no feedback and discussion for the thoughts - local obsidian notes/xmind     - Pro: very efficient to trace and summary     - Con: I am the only reader The only way I could find to seek meaningful communication through blog, of course to write in