[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

让 po.vim 支持 win32



po.vim(ftplugin for easier editing of GNU gettext PO files)[1] 很久没有更新,不支持
在 windows 机器上执行 msgfmt 检查和统计。

实际上,借助 gettext 的 windows 版本,实际上这是很容易就能办到[2]。不更新文档
的补丁如下:

...\ftplugin>diff po.vim.12 po.vim.13
237c237
< if has("unix")
---
> if has("unix") || has("win32")
266c266,270
<          exe "!msgfmt --statistics -o /dev/null %"
---
>          if has("unix")
>             exe "!msgfmt -c --statistics -o /dev/null %"
>          else
>             exe "!msgfmt -c --statistics -o NUL %"
>          endif
273c277,281
<          exe "make! " . args . " -o /dev/null %"
---
>          if has("unix")
>             exe "make! " . args . " -o /dev/null %"
>          else
>             exe "make! " . args . " -o NUL %"
>          endif

[1] http://www.vim.org/scripts/script.php?script_id=695
[2] http://i18n-zh.googlecode.com/svn/trunk/lib/tools/po.vim

---
Dongsheng Song


Reply to: