diff --git a/honoka/plugins/asciiplugin.cpp b/honoka/plugins/asciiplugin.cpp index 9f07368..75d2381 100644 --- a/honoka/plugins/asciiplugin.cpp +++ b/honoka/plugins/asciiplugin.cpp @@ -49,6 +49,12 @@ _("input the path of Words file."), HONOKA_DEFAULT_WORDSPREDICTION_FILE )); + page->append(new HonokaSetupBoolItem( + _("_Add a space after word: "), + String(HONOKA_CONFIG_WORDSPREDICTION_ADDSAW), + _("At WordsPrediction, if you want to add a space after the committed word ,check it."), + HONOKA_DEFAULT_WORDSPREDICTION_ADDSAW + )); page->append(new HonokaSetupKeyItem( _("Low priority key: "), String(HONOKA_CONFIG_ASCIIINPUT_LOW_PRIORITY_KEY), diff --git a/honoka/plugins/asciiplugin.h b/honoka/plugins/asciiplugin.h index cb1857d..6ccf254 100644 --- a/honoka/plugins/asciiplugin.h +++ b/honoka/plugins/asciiplugin.h @@ -35,6 +35,8 @@ #define HONOKA_CONFIG_WORDSPREDICTION_FILE "/IMEngine/Honoka/WordsPrediction/WordsFile" #define HONOKA_DEFAULT_WORDSPREDICTION_FILE "/usr/share/dict/words" +#define HONOKA_CONFIG_WORDSPREDICTION_ADDSAW "/IMEngine/Honoka/WordsPrediction/AddSpaceAfterWord" +#define HONOKA_DEFAULT_WORDSPREDICTION_ADDSAW false #define HONOKA_CONFIG_ASCIIINPUT_LOW_PRIORITY_KEY "/IMEngine/Honoka/AsciiInput/LowPriorityKey" #define HONOKA_DEFAULT_ASCIIINPUT_LOW_PRIORITY_KEY "" #define HONOKA_CONFIG_ASCIIINPUT_AUTO_COMMIT_KEY "/IMEngine/Honoka/AsciiInput/AutoCommitKey" diff --git a/honoka/plugins/wordsprediction.cpp b/honoka/plugins/wordsprediction.cpp index 11e3666..e10be2f 100644 --- a/honoka/plugins/wordsprediction.cpp +++ b/honoka/plugins/wordsprediction.cpp @@ -43,6 +43,7 @@ String file = cfg->read(HONOKA_CONFIG_WORDSPREDICTION_FILE,String(HONOKA_DEFAULT_WORDSPREDICTION_FILE)); dic = new WordsDic(file); pos = 0; + addSpace = cfg->read(HONOKA_CONFIG_WORDSPREDICTION_ADDSAW,HONOKA_DEFAULT_WORDSPREDICTION_ADDSAW); } @@ -73,7 +74,8 @@ l.Title = utf8_mbstowcs(String(_("lookup result"))); l.kType = PREDICTION; for(vector::iterator it = res.begin();it != res.end();it ++) { - l.kouho.push_back(ResultEntry(prewords + utf8_mbstowcs(*it) + utf8_mbstowcs(" "),utf8_mbstowcs(*it))); + if (addSpace) l.kouho.push_back(ResultEntry(prewords + utf8_mbstowcs(*it) + utf8_mbstowcs(" "),utf8_mbstowcs(*it))); + else l.kouho.push_back(ResultEntry(prewords + utf8_mbstowcs(*it),utf8_mbstowcs(*it))); } return l; } diff --git a/honoka/plugins/wordsprediction.h b/honoka/plugins/wordsprediction.h index 32063f7..5b9b3f0 100644 --- a/honoka/plugins/wordsprediction.h +++ b/honoka/plugins/wordsprediction.h @@ -50,6 +50,7 @@ protected: WordsDic *dic; int pos; + bool addSpace; }; } #endif diff --git a/honoka/po/honoka.pot b/honoka/po/honoka.pot index 5befa9c..3cf8a0f 100644 --- a/honoka/po/honoka.pot +++ b/honoka/po/honoka.pot @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-26 15:20+0900\n" +"POT-Creation-Date: 2006-02-04 01:14+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -455,7 +455,7 @@ #: plugins/wnnplugin.cpp:78 plugins/anthyplugin.cpp:46 #: plugins/simpleprediction.cpp:53 plugins/primeprediction.cpp:71 #: plugins/skkdicconversion.cpp:53 plugins/cannaconversion.cpp:57 -#: plugins/asciiplugin.cpp:71 +#: plugins/asciiplugin.cpp:77 msgid "shortcut keys: " msgstr "" @@ -558,7 +558,7 @@ #: plugins/wnnconversion.cpp:412 plugins/anthyconversion.cpp:169 #: plugins/anthyprediction.cpp:60 plugins/simpleprediction.cpp:91 #: plugins/primeprediction.cpp:179 plugins/skkdicconversion.cpp:122 -#: plugins/cannaconversion.cpp:201 plugins/wordsprediction.cpp:73 +#: plugins/cannaconversion.cpp:201 plugins/wordsprediction.cpp:74 msgid "lookup result" msgstr "" @@ -727,35 +727,45 @@ msgstr "" #: plugins/asciiplugin.cpp:53 -msgid "Low priority key: " +msgid "_Add a space after word: " msgstr "" #: plugins/asciiplugin.cpp:55 -msgid "set the key that lowers priority." +msgid "" +"At WordsPrediction, if you want to add a space after the committed word ," +"check it." msgstr "" #: plugins/asciiplugin.cpp:59 -msgid "Use automatic committing: " +msgid "Low priority key: " msgstr "" #: plugins/asciiplugin.cpp:61 +msgid "set the key that lowers priority." +msgstr "" + +#: plugins/asciiplugin.cpp:65 +msgid "Use automatic committing: " +msgstr "" + +#: plugins/asciiplugin.cpp:67 msgid "" "if you want to commit the string when you press the specific key,check it." msgstr "" -#: plugins/asciiplugin.cpp:65 +#: plugins/asciiplugin.cpp:71 msgid "Automatic committing key: " msgstr "" -#: plugins/asciiplugin.cpp:67 +#: plugins/asciiplugin.cpp:73 msgid "set the key that commit the string automatic." msgstr "" -#: plugins/asciiplugin.cpp:73 +#: plugins/asciiplugin.cpp:79 msgid "Ascii Input: " msgstr "" -#: plugins/asciiplugin.cpp:79 +#: plugins/asciiplugin.cpp:85 msgid "Words Prediction: " msgstr "" @@ -767,7 +777,7 @@ msgid "AsciiInput" msgstr "" -#: plugins/wordsprediction.cpp:114 +#: plugins/wordsprediction.cpp:116 msgid "WordsPrediction" msgstr "" diff --git a/honoka/po/ja.po b/honoka/po/ja.po index f0c66e7..7e1c13a 100644 --- a/honoka/po/ja.po +++ b/honoka/po/ja.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: ja\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-26 15:20+0900\n" +"POT-Creation-Date: 2006-02-04 01:14+0900\n" "PO-Revision-Date: 2004-12-01 14:29+0900\n" "Last-Translator: TAM (Teppei Tamra) \n" "Language-Team: Japanese\n" @@ -461,7 +461,7 @@ #: plugins/wnnplugin.cpp:78 plugins/anthyplugin.cpp:46 #: plugins/simpleprediction.cpp:53 plugins/primeprediction.cpp:71 #: plugins/skkdicconversion.cpp:53 plugins/cannaconversion.cpp:57 -#: plugins/asciiplugin.cpp:71 +#: plugins/asciiplugin.cpp:77 msgid "shortcut keys: " msgstr "ショートカットキー:" @@ -566,7 +566,7 @@ #: plugins/wnnconversion.cpp:412 plugins/anthyconversion.cpp:169 #: plugins/anthyprediction.cpp:60 plugins/simpleprediction.cpp:91 #: plugins/primeprediction.cpp:179 plugins/skkdicconversion.cpp:122 -#: plugins/cannaconversion.cpp:201 plugins/wordsprediction.cpp:73 +#: plugins/cannaconversion.cpp:201 plugins/wordsprediction.cpp:74 msgid "lookup result" msgstr "候補一覧" @@ -728,44 +728,56 @@ #: plugins/asciiplugin.cpp:47 msgid "Words _file: " -msgstr "単語ファイル:" +msgstr "単語ファイル(_f):" #: plugins/asciiplugin.cpp:49 msgid "input the path of Words file." msgstr "単語ファイルを指定します" #: plugins/asciiplugin.cpp:53 +msgid "_Add a space after word: " +msgstr "単語末のスペース追加(_A):" + +#: plugins/asciiplugin.cpp:55 +msgid "" +"At WordsPrediction, if you want to add a space after the committed word ," +"check it." +msgstr "" +"英単語予測において確定単語の後にスペースを追加させたい場合は" +"ここをチェックしてください。" + +#: plugins/asciiplugin.cpp:59 msgid "Low priority key: " msgstr "優先度を下げるキー:" -#: plugins/asciiplugin.cpp:55 +#: plugins/asciiplugin.cpp:61 msgid "set the key that lowers priority." msgstr "優先度を下げるキーを指定します。" -#: plugins/asciiplugin.cpp:59 +#: plugins/asciiplugin.cpp:65 msgid "Use automatic committing: " msgstr "自動確定を使う:" -#: plugins/asciiplugin.cpp:61 +#: plugins/asciiplugin.cpp:67 msgid "" "if you want to commit the string when you press the specific key,check it." msgstr "" "指定したキーが押された場合に自動的に確定したい場合はここをチェックして下さ" "い。" -#: plugins/asciiplugin.cpp:65 +#: plugins/asciiplugin.cpp:71 msgid "Automatic committing key: " msgstr "自動確定キー:" -#: plugins/asciiplugin.cpp:67 +#: plugins/asciiplugin.cpp:73 msgid "set the key that commit the string automatic." msgstr "自動確定を行うキーを指定します。" -#: plugins/asciiplugin.cpp:73 +#: plugins/asciiplugin.cpp:79 msgid "Ascii Input: " msgstr "英数字入力:" -#: plugins/asciiplugin.cpp:79 +#: plugins/asciiplugin.cpp:85 msgid "Words Prediction: " msgstr "英単語予測:" @@ -777,7 +789,7 @@ msgid "AsciiInput" msgstr "英数字入力" -#: plugins/wordsprediction.cpp:114 +#: plugins/wordsprediction.cpp:116 msgid "WordsPrediction" msgstr "英単語予測"