Version 1.1

* remove warning about not using Python interface
* messages translate into English as fcitx supports more and more languages
This commit is contained in:
lilydjwg 2012-05-17 00:00:00 +00:00 committed by Able Scraper
parent 748342ed76
commit f83971b7f4
3 changed files with 21 additions and 18 deletions

View file

@ -16,7 +16,7 @@ def fcitxtalk(command=None):
try:
sock.connect(fcitxsocketfile)
except socket.error:
vim.command('echohl WarningMsg | echo "fcitx.vim: socket 连接出错" | echohl NONE')
vim.command('echohl WarningMsg | echo "fcitx.vim: socket connection error" | echohl NONE')
return
try:
if not command:
@ -27,7 +27,7 @@ def fcitxtalk(command=None):
elif command == 'o':
sock.send(FCITX_OPEN)
else:
raise ValueError('未知命令')
raise ValueError('unknown fcitx command')
finally:
sock.close()

View file

@ -1,7 +1,8 @@
scriptencoding utf-8
" fcitx.vim 记住插入模式小企鹅输入法的状态
" fcitx.vim remember fcitx's input state for each buffer
" Author: lilydjwg
" Maintainer: lilydjwg
" Version: 1.1
" URL: http://www.vim.org/scripts/script.php?script_id=3764
" ---------------------------------------------------------------------
" Load Once:
if &cp || exists("g:loaded_fcitx") || !exists('$DISPLAY') || exists('$SSH_TTY')
@ -12,9 +13,6 @@ if has("python3")
elseif has("python")
let python3 = 0
else
echohl WarningMsg
echomsg "fcitx.vim: 没有 Python 支持,尝试使用旧版本。"
echohl None
runtime so/fcitx.vim
finish
endif
@ -30,7 +28,7 @@ if !filewritable(s:fcitxsocketfile) "try again
let s:fcitxsocketfile = s:fcitxsocketfile . '.0'
if !filewritable(s:fcitxsocketfile)
echohl WarningMsg
echomsg "没有找到 fcitx 的 socket 文件fcitx.vim 没有载入。"
echomsg "socket file of fcitx not found, fcitx.vim not loaded."
echohl None
finish
endif