Commit caa19bbb authored by YunQiang Su's avatar YunQiang Su

Merge tag 'upstream/0.1.2'

Upstream version 0.1.2
parents e37ed08c a8ce4aa3
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Alisha <alisha.4m@gmail.com>, 2012.
# Weng Xuetian <wengxt@gmail.com>, 2012.
......@@ -12,32 +12,25 @@ msgstr ""
"POT-Creation-Date: 2012-01-09 00:00+0800\n"
"PO-Revision-Date: 2012-03-03 16:03+0000\n"
"Last-Translator: Alisha <alisha.4m@gmail.com>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.net/projects/p/fcitx/language/zh_TW/)\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.net/projects/p/fcitx/"
"language/zh_TW/)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_TW\n"
"Plural-Forms: nplurals=1; plural=0\n"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:3
msgid "Add Phrase Forward"
msgstr "前方加詞"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:8
msgid "Backward phrase choice"
msgstr "後方選擇字詞"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:13
msgid "Automatically shift cursor"
msgstr "選字完畢自動移到下一個字"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:18
msgid "Space as selection key"
msgstr "使用空白鍵選擇候選字詞"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:23
msgid "Keyboard Layout"
msgstr "鍵盤佈局"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:8
msgid "Backward phrase choice"
msgstr "後方選擇字詞"
# unknown
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:1
......@@ -45,6 +38,10 @@ msgstr "鍵盤佈局"
msgid "Chewing"
msgstr "新酷音"
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:2
msgid "Chewing Wrapper For Fcitx"
msgstr "Fcitx 的新酷音封装"
#: unknown
msgid "DACHEN_CP26 Keyboard"
msgstr "大千26鍵"
......@@ -61,14 +58,14 @@ msgstr "Dvorak 鍵盤"
msgid "Dvorak Keyboard with Hsu's support"
msgstr "Dvorak 鍵盤 + 許氏注音"
#: unknown
msgid "ETen26 Keyboard"
msgstr "倚天26鍵鍵盤"
#: unknown
msgid "ETen Keyboard"
msgstr "倚天鍵盤"
#: unknown
msgid "ETen26 Keyboard"
msgstr "倚天26鍵鍵盤"
#: unknown
msgid "Gin-Yieh Keyboard"
msgstr "精業鍵盤"
......@@ -85,6 +82,10 @@ msgstr "許氏鍵盤"
msgid "IBM Keyboard"
msgstr "IBM 鍵盤"
#: /home/saber/Develop/fcitx-chewing/build/po/tmp/fcitx-chewing.conf.in.h:2
msgid "Chewing Wrapper For Fcitx"
msgstr "Fcitx 的新酷音封装"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:23
msgid "Keyboard Layout"
msgstr "鍵盤佈局"
#: /home/saber/Develop/fcitx-chewing/data/fcitx-chewing.desc:18
msgid "Space as selection key"
msgstr "使用空白鍵選擇候選字詞"
......@@ -158,16 +158,22 @@ INPUT_RETURN_VALUE FcitxChewingDoInput(void* arg, FcitxKeySym sym, unsigned int
FcitxInputState *input = FcitxInstanceGetInputState(chewing->owner);
ChewingContext * ctx = chewing->context;
int zuin_len;
FcitxCandidateWordList* candList = FcitxInputStateGetCandidateList(input);
if (FcitxCandidateWordGetListSize(FcitxInputStateGetCandidateList(input)) > 0
&& (FcitxHotkeyIsHotKeyDigit(sym, state) || FcitxHotkeyIsHotKey(sym, state, FCITX_RIGHT) || FcitxHotkeyIsHotKey(sym, state, FCITX_LEFT)))
return IRV_TO_PROCESS;
if (FcitxCandidateWordGetListSize(candList) > 0) {
if (FcitxHotkeyIsHotKeyDigit(sym, state) || FcitxHotkeyIsHotKey(sym, state, FCITX_RIGHT) || FcitxHotkeyIsHotKey(sym, state, FCITX_LEFT))
return IRV_TO_PROCESS;
if (FcitxHotkeyIsHotKey(sym, state, FCITX_SPACE)) {
if (FcitxCandidateWordGoNextPage(candList))
return IRV_DISPLAY_MESSAGE;
else
return IRV_DO_NOTHING;
}
}
if (FcitxHotkeyIsHotKeySimple(sym, state)) {
if (chewing_buffer_Len(ctx) < CHEWING_MAX_LEN-5) {
int scan_code = (int) sym & 0xff;
chewing_handle_Default(ctx, scan_code);
}
int scan_code = (int) sym & 0xff;
chewing_handle_Default(ctx, scan_code);
} else if (FcitxHotkeyIsHotKey(sym, state, FCITX_BACKSPACE)) {
char * zuin_str = chewing_zuin_String(ctx, &zuin_len);
chewing_free(zuin_str);
......@@ -214,9 +220,10 @@ INPUT_RETURN_VALUE FcitxChewingDoInput(void* arg, FcitxKeySym sym, unsigned int
return IRV_TO_PROCESS;
} else if (chewing_commit_Check(ctx)) {
char* str = chewing_commit_String(ctx);
strcpy(FcitxInputStateGetOutputString(input), str);
FcitxInputContext* ic = FcitxInstanceGetCurrentIC(chewing->owner);
FcitxInstanceCommitString(chewing->owner, ic, str);
chewing_free(str);
return IRV_COMMIT_STRING;
return IRV_DISPLAY_CANDWORDS;
} else
return IRV_DISPLAY_CANDWORDS;
}
......@@ -276,11 +283,11 @@ INPUT_RETURN_VALUE FcitxChewingGetCandWords(void* arg)
FcitxLog(DEBUG, "%s %s", buf_str, zuin_str);
int index = 0;
/* if not check done, so there is candidate word */
if (!chewing_cand_CheckDone(ctx)) {
//get candidate word
chewing_cand_Enumerate(ctx);
int index = 0;
while (chewing_cand_hasNext(ctx)) {
char* str = chewing_cand_String(ctx);
FcitxCandidateWord cw;
......@@ -297,12 +304,15 @@ INPUT_RETURN_VALUE FcitxChewingGetCandWords(void* arg)
index ++;
}
}
/* there is nothing */
if (strlen(zuin_str) == 0 && strlen(buf_str) == 0 && index == 0)
return IRV_DISPLAY_CANDWORDS;
// setup cursor
FcitxInputStateSetShowCursor(input, true);
int buf_len = chewing_buffer_Len(ctx);
int cur = chewing_cursor_Current(ctx);
FcitxLog(DEBUG, "buf len: %d, cur: %d", buf_len, cur);
FcitxLog(DEBUG, "cur: %d", cur);
int rcur = FcitxChewingGetRawCursorPos(buf_str, cur);
FcitxInputStateSetCursorPos(input, rcur);
FcitxInputStateSetClientCursorPos(input, rcur);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment