diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b4b205..cef1625 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,18 +18,17 @@ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_SHARED_LINKER_FLAGS}") set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_MODULE_LINKER_FLAGS}") -find_package(Fcitx 4.2.3 REQUIRED) +find_package(Fcitx 4.2.7 REQUIRED) find_package(Libiconv REQUIRED) find_package(Gettext REQUIRED) find_package(Qt4) +pkg_check_modules(FCITX_QT "fcitx-qt>=4.2.7") + configure_file(config.h.in config.h) +add_subdirectory(po) add_subdirectory(unikey) add_subdirectory(src) add_subdirectory(data) -add_subdirectory(po) - -if (QT_FOUND) add_subdirectory(macro-editor) -endif(QT_FOUND) \ No newline at end of file diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 66ff013..817ee1b 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,6 +1,2 @@ -fcitx_add_addon_conf_file(fcitx-unikey.conf) -fcitx_add_configdesc_file(fcitx-unikey.desc) -fcitx_add_inputmethod_conf_file(unikey.conf) - -install(FILES unikey.png DESTINATION ${FCITX4_PREFIX}/share/fcitx/skin/default/) -install(FILES unikey.png RENAME fcitx-unikey.png DESTINATION share/icons/hicolor/256x256/apps/) \ No newline at end of file +install(FILES unikey.png DESTINATION ${FCITX4_PREFIX}/share/fcitx/skin/imicon/) +install(FILES unikey.png RENAME fcitx-unikey.png DESTINATION share/icons/hicolor/256x256/apps/) diff --git a/data/fcitx-unikey.conf.in b/data/fcitx-unikey.conf.in deleted file mode 100644 index 2bf856d..0000000 --- a/data/fcitx-unikey.conf.in +++ /dev/null @@ -1,10 +0,0 @@ -[Addon] -Name=fcitx-unikey -_GeneralName=Unikey -_Comment=Unikey Wrapper For Fcitx -Category=InputMethod -Enabled=True -Library=fcitx-unikey.so -Type=SharedLibrary -IMRegisterMethod=ConfigFile -SubConfig=Macro:program:fcitx-unikey-macro-editor,fcitx-unikey:domain \ No newline at end of file diff --git a/data/fcitx-unikey.desc b/data/fcitx-unikey.desc deleted file mode 100644 index 723366a..0000000 --- a/data/fcitx-unikey.desc +++ /dev/null @@ -1,56 +0,0 @@ -[Unikey/InputMethod] -Type=Enum -DefaultValue=Telex -Description=Input Method -EnumCount=4 -Enum0=Telex -Enum1=Vni -Enum2=STelex -Enum3=STelex2 - -[Unikey/OutputCharset] -Type=Enum -DefaultValue=Unicode -Description=Output Charset -EnumCount=8 -Enum0=Unicode -Enum1=TCVN3 -Enum2=VNI Win -Enum3=VIQR -Enum4=BK HCM 2 -Enum5=CString -Enum6=NCR Decimal -Enum7=NCR Hex - -[Unikey/SpellCheck] -Type=Boolean -DefaultValue=True -Description=Enable spell check - -[Unikey/Macro] -Type=Boolean -DefaultValue=False -Description=Enable macro - -[Unikey/ModernStyle] -Type=Boolean -DefaultValue=False -Description=Use oà, _uý (instead of òa, úy) - -[Unikey/FreeMarking] -Type=Boolean -DefaultValue=True -Description=Allow type with more freedom - -[Unikey/AutoNonVnRestore] -Type=Boolean -DefaultValue=True -Description=Auto restore keys with invalid words - -[Unikey/ProcessWAtBegin] -Type=Boolean -DefaultValue=True -Description=Process W at word begin - -[DescriptionFile] -LocaleDomain=fcitx-unikey diff --git a/macro-editor/CMakeLists.txt b/macro-editor/CMakeLists.txt index 35dd300..fbb2482 100644 --- a/macro-editor/CMakeLists.txt +++ b/macro-editor/CMakeLists.txt @@ -1,14 +1,4 @@ -include_directories( - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${PROJECT_SOURCE_DIR}/unikey - ) -link_directories( -${FCITX4_FCITX_UTILS_LIBRARY_DIRS} -${FCITX4_FCITX_CONFIG_LIBRARY_DIRS} -) set(MACRO_EDITOR_SRCS model.cpp @@ -20,10 +10,36 @@ model.h editor.h dialog.h + main.h ) +fcitx_translate_add_sources( + ${MACRO_EDITOR_SRCS} + ${MACRO_EDITOR_HDRS}) + +if (NOT QT_FOUND OR NOT FCITX_QT_FOUND) + return() +endif (NOT QT_FOUND OR NOT FCITX_QT_FOUND) + +include_directories( + ${FCITX_QT_INCLUDE_DIRS} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${PROJECT_SOURCE_DIR}/unikey + ) + +link_directories( +${FCITX4_FCITX_UTILS_LIBRARY_DIRS} +${FCITX4_FCITX_CONFIG_LIBRARY_DIRS} +${FCITX_QT_LIBRARY_DIRS} +) qt4_wrap_cpp(MACRO_EDITOR_MOCS ${MACRO_EDITOR_HDRS}) qt4_wrap_ui(MACRO_EDITOR_SRCS editor.ui dialog.ui) -add_executable(fcitx-unikey-macro-editor ${MACRO_EDITOR_SRCS} ${MACRO_EDITOR_MOCS}) +add_library(fcitx-unikey-macro-editor + MODULE ${MACRO_EDITOR_SRCS} ${MACRO_EDITOR_MOCS}) +set_target_properties(fcitx-unikey-macro-editor PROPERTIES + LINK_FLAGS "-Wl,--no-undefined" +) target_link_libraries(fcitx-unikey-macro-editor debug ${QT_QTCORE_LIBRARY_DEBUG} debug ${QT_QTDBUS_LIBRARY_DEBUG} @@ -34,6 +50,7 @@ unikey ${FCITX4_FCITX_UTILS_LIBRARIES} ${FCITX4_FCITX_CONFIG_LIBRARIES} + ${FCITX_QT_LIBRARIES} ) -install(TARGETS fcitx-unikey-macro-editor DESTINATION ${FCITX4_PREFIX}/bin) \ No newline at end of file +install(TARGETS fcitx-unikey-macro-editor DESTINATION ${FCITX4_ADDON_INSTALL_DIR}/qt) diff --git a/macro-editor/common.h b/macro-editor/common.h index c87ce50..2083b93 100644 --- a/macro-editor/common.h +++ b/macro-editor/common.h @@ -22,6 +22,6 @@ #include -#define _(x) QString::fromUtf8(gettext(x)) +#define _(x) QString::fromUtf8(dgettext("fcitx-unikey", x)) -#endif // _FCITX_UNIKEY_COMMON_H \ No newline at end of file +#endif // _FCITX_UNIKEY_COMMON_H diff --git a/macro-editor/editor.cpp b/macro-editor/editor.cpp index 9b394e8..4d9943c 100644 --- a/macro-editor/editor.cpp +++ b/macro-editor/editor.cpp @@ -34,15 +34,13 @@ namespace fcitx_unikey { -MacroEditor::MacroEditor(QWidget* parent): QMainWindow(parent) +MacroEditor::MacroEditor(QWidget* parent): FcitxQtConfigUIWidget(parent) ,m_ui(new Ui::Editor) { m_ui->setupUi(this); m_ui->addButton->setText(_("&Add")); m_ui->deleteButton->setText(_("&Delete")); m_ui->clearButton->setText(_("De&lete All")); - m_ui->exitButton->setText(_("&Quit")); - m_ui->saveButton->setText(_("&Save")); m_ui->importButton->setText(_("&Import")); m_ui->exportButton->setText(_("&Export")); m_ui->macroTableView->setSelectionMode(QAbstractItemView::SingleSelection); @@ -54,9 +52,6 @@ connect(m_ui->clearButton, SIGNAL(clicked(bool)), this, SLOT(deleteAllWord())); connect(m_ui->importButton, SIGNAL(clicked(bool)), this, SLOT(importMacro())); connect(m_ui->exportButton, SIGNAL(clicked(bool)), this, SLOT(exportMacro())); - connect(m_ui->exitButton, SIGNAL(clicked(bool)), this, SLOT(aboutToQuit())); - connect(m_ui->saveButton, SIGNAL(clicked(bool)), this, SLOT(saveMacro())); - load(); itemFocusChanged(); } @@ -66,55 +61,15 @@ delete m_ui; } -void MacroEditor::aboutToQuit() -{ - if (!m_model->needSave()) - qApp->quit(); - else { - QMessageBox* dialog = new QMessageBox(this); - dialog->setIcon(QMessageBox::Warning); - dialog->setWindowTitle(_("Quit Macro Editor")); - dialog->setText(_("Macro table still contains unsaved changes. Do you want to save?")); - dialog->setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); - dialog->setDefaultButton(QMessageBox::Save); - dialog->setAttribute(Qt::WA_DeleteOnClose, true); - dialog->open(); - connect(dialog, SIGNAL(finished(int)), this, SLOT(quitConfirmDone(int))); - } -} - -void MacroEditor::quitConfirmDone(int result) -{ - switch(result) { - case QMessageBox::Save: - saveMacro(); - case QMessageBox::Discard: - qApp->quit(); - break; - } -} - -void MacroEditor::closeEvent(QCloseEvent* event) -{ - if (m_model->needSave()) { - event->ignore(); - - QMessageBox* dialog = new QMessageBox(this); - dialog->setIcon(QMessageBox::Warning); - dialog->setWindowTitle(_("Quit Macro Editor")); - dialog->setText(_("Macro table still contains unsaved changes. Do you want to save?")); - dialog->setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); - dialog->setDefaultButton(QMessageBox::Save); - dialog->setAttribute(Qt::WA_DeleteOnClose, true); - dialog->open(); - connect(dialog, SIGNAL(finished(int)), this, SLOT(quitConfirmDone(int))); - } - else { - event->accept(); - qApp->quit(); - } -} - +QString MacroEditor::addon() +{ + return "fcitx-unikey"; +} + +QString MacroEditor::title() +{ + return _("Unikey Macro Editor"); +} void MacroEditor::itemFocusChanged() { @@ -196,17 +151,11 @@ m_ui->macroTableView->verticalHeader()->setVisible(false); m_ui->macroTableView->setModel(m_model); connect(m_ui->macroTableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(itemFocusChanged())); - connect(m_model, SIGNAL(needSaveChanged(bool)), this, SLOT(needSaveChanged(bool))); - -} - -void MacroEditor::needSaveChanged(bool needSave) -{ - m_ui->saveButton->setEnabled(needSave); -} - - -void MacroEditor::saveMacro() + connect(m_model, SIGNAL(needSaveChanged(bool)), this, SIGNAL(changed(bool))); + +} + +void MacroEditor::save() { m_model->save(m_table); FILE* f = FcitxXDGGetFileUserWithPrefix("unikey", "macro", "w", NULL); @@ -251,4 +200,4 @@ -} \ No newline at end of file +} diff --git a/macro-editor/editor.h b/macro-editor/editor.h index ce5ae05..e51ab75 100644 --- a/macro-editor/editor.h +++ b/macro-editor/editor.h @@ -17,7 +17,7 @@ * * ***************************************************************************/ -#include +#include class CMacroTable; namespace Ui { @@ -27,32 +27,29 @@ namespace fcitx_unikey { class MacroModel; -class MacroEditor : public QMainWindow { +class MacroEditor : public FcitxQtConfigUIWidget { Q_OBJECT public: explicit MacroEditor(QWidget* parent = 0); virtual ~MacroEditor(); + virtual void load(); + virtual void save(); + virtual QString title(); + virtual QString addon(); static QString getData(CMacroTable* table, int i, bool iskey); -protected: - virtual void closeEvent(QCloseEvent* event ); private slots: void addWord(); void deleteWord(); void deleteAllWord(); void itemFocusChanged(); - void aboutToQuit(); - void saveMacro(); - void load(); void addWordAccepted(); void importMacro(); void exportMacro(); void importFileSelected(); void exportFileSelected(); - void needSaveChanged(bool needSave); - void quitConfirmDone(int result); private: Ui::Editor* m_ui; CMacroTable* m_table; MacroModel* m_model; }; -} \ No newline at end of file +} diff --git a/macro-editor/editor.ui b/macro-editor/editor.ui index 1ea203a..794aa9c 100644 --- a/macro-editor/editor.ui +++ b/macro-editor/editor.ui @@ -1,7 +1,7 @@ Editor - + 0 @@ -14,133 +14,99 @@ MainWindow - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + diff --git a/macro-editor/main.cpp b/macro-editor/main.cpp index 6e3a652..12b769a 100644 --- a/macro-editor/main.cpp +++ b/macro-editor/main.cpp @@ -18,20 +18,38 @@ ***************************************************************************/ #include +#include #include #include +#include "main.h" #include "editor.h" -int main(int argc, char* argv[]) +#include "model.h" + +MacroEditorPlugin::MacroEditorPlugin(QObject* parent): FcitxQtConfigUIPlugin(parent) { - setlocale(LC_ALL, ""); - char* path = fcitx_utils_get_fcitx_path("localedir"); - bindtextdomain("fcitx-unikey", path); - free(path); - bind_textdomain_codeset("fcitx-unikey", "UTF-8"); - textdomain("fcitx-unikey"); - QApplication app(argc, argv); - fcitx_unikey::MacroEditor window; - window.show(); - return app.exec(); -} \ No newline at end of file +} + +FcitxQtConfigUIWidget* MacroEditorPlugin::create(const QString& key) +{ + Q_UNUSED(key); + return new fcitx_unikey::MacroEditor; +} + +QStringList MacroEditorPlugin::files() +{ + return QStringList("unikey/macro"); +} + +QString MacroEditorPlugin::name() +{ + return "unikey-macro-editor"; +} + +QString MacroEditorPlugin::domain() +{ + return "fcitx-unikey"; +} + + +Q_EXPORT_PLUGIN2 (fcitx_macro_editor, MacroEditorPlugin) diff --git a/macro-editor/main.h b/macro-editor/main.h new file mode 100644 index 0000000..dfd06fc --- /dev/null +++ b/macro-editor/main.h @@ -0,0 +1,35 @@ +/*************************************************************************** + * Copyright (C) 2012~2012 by CSSlayer * + * wengxt@gmail.com * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + * * + ***************************************************************************/ + +#ifndef _MAIN_H_ +#define _MAIN_H_ + +#include + +class MacroEditorPlugin : public FcitxQtConfigUIPlugin { + Q_OBJECT +public: + explicit MacroEditorPlugin(QObject* parent = 0); + virtual QString name(); + virtual QStringList files(); + virtual QString domain(); + virtual FcitxQtConfigUIWidget* create(const QString& key); +}; + +#endif // FCITX_TOOLS_GUI_MAIN_H_ diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index a55d30e..2886bc5 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -1,23 +1,5 @@ -file(GLOB PO_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po) -file(RELATIVE_PATH REL_SOURCE_ROOT ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}) -if ("${REL_SOURCE_ROOT}" STREQUAL "") - set(REL_SOURCE_ROOT ".") -endif("${REL_SOURCE_ROOT}" STREQUAL "") - -set(POT_FILE fcitx-unikey.pot) - -configure_file(POTFILES.in.in ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in) - -extract_fcitx_addon_conf_postring() -extract_fcitx_desc_file_postring() - -add_custom_target( - pot - COMMAND INTLTOOL_EXTRACT=${INTLTOOL_EXTRACT} srcdir=${CMAKE_CURRENT_BINARY_DIR} ${INTLTOOL_UPDATE} --gettext-package fcitx-unikey --pot - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/conf.po ${CMAKE_CURRENT_BINARY_DIR}/desc.po - ) - -# Update .po files and compile them to binary .gmo files -gettext_create_translations(${POT_FILE} ALL ${PO_FILES}) - +set(PO_LANGS zh_CN vi zh_TW) +foreach(lang ${PO_LANGS}) + fcitx_translate_add_po_file("${lang}" "${lang}.po") +endforeach() +fcitx_translate_set_pot_target(pot fcitx-unikey fcitx-unikey.pot) diff --git a/po/POTFILES.in.in b/po/POTFILES.in.in index f654768..f8f2785 100644 --- a/po/POTFILES.in.in +++ b/po/POTFILES.in.in @@ -10,5 +10,5 @@ @REL_SOURCE_ROOT@/macro-editor/editor.cpp @REL_SOURCE_ROOT@/macro-editor/main.cpp @REL_SOURCE_ROOT@/macro-editor/model.cpp -@REL_SOURCE_ROOT@/data/fcitx-unikey.conf.in +@REL_SOURCE_ROOT@/data/fcitx-unikey.conf.in.in @REL_SOURCE_ROOT@/data/unikey.conf.in diff --git a/po/fcitx-unikey.pot b/po/fcitx-unikey.pot index d92efc5..cbe288e 100644 --- a/po/fcitx-unikey.pot +++ b/po/fcitx-unikey.pot @@ -7,194 +7,89 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-20 22:29-0400\n" +"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" +"POT-Creation-Date: 2013-01-18 15:51-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: \n" +"Language: LANG\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:4 -msgid "Input Method" +#: macro-editor/editor.cpp:41 +msgid "&Add" msgstr "" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:14 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:156 +#: macro-editor/editor.cpp:42 +msgid "&Delete" +msgstr "" + +#: macro-editor/editor.cpp:43 +msgid "De&lete All" +msgstr "" + +#: macro-editor/editor.cpp:44 +msgid "&Import" +msgstr "" + +#: macro-editor/editor.cpp:45 +msgid "&Export" +msgstr "" + +#: macro-editor/editor.cpp:48 macro-editor/editor.cpp:71 +msgid "Unikey Macro Editor" +msgstr "" + +#: macro-editor/model.cpp:44 src/unikey-ui.cpp:127 src/unikey-ui.cpp:187 +#: src/fcitx-unikey.conf.in:10 +msgid "Macro" +msgstr "" + +#: macro-editor/model.cpp:46 +msgid "Word" +msgstr "" + +#: src/unikey-im.cpp:152 src/fcitx-unikey.conf.in:3 +msgid "Unikey" +msgstr "" + +#: src/unikey-ui.cpp:105 src/unikey-ui.cpp:172 +msgid "Choose input method" +msgstr "" + +#: src/unikey-ui.cpp:113 src/unikey-ui.cpp:178 +msgid "Choose output charset" +msgstr "" + +#: src/unikey-ui.cpp:119 src/unikey-ui.cpp:182 +msgid "Spell Check" +msgstr "" + +#: src/unikey-ui.cpp:120 src/unikey-ui.cpp:183 +msgid "Enable Spell Check" +msgstr "" + +#: src/unikey-ui.cpp:128 src/unikey-ui.cpp:188 +msgid "Enable Macro" +msgstr "" + +#: src/unikey-ui.cpp:142 +msgid "Unikey Input Method" +msgstr "" + +#: src/unikey-ui.cpp:156 msgid "Output Charset" msgstr "" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:28 -msgid "Enable spell check" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:33 -msgid "Enable macro" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:38 -msgid "Use oà, _uý (instead of òa, úy)" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:43 -msgid "Allow type with more freedom" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:48 -msgid "Auto restore keys with invalid words" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:53 -msgid "Process W at word begin" -msgstr "" - -# unknown -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/fcitx-unikey.conf.in.h:1 -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/unikey.conf.in.h:1 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-im.cpp:150 -msgid "Unikey" -msgstr "" - -#: unknown -msgid "BK HCM 2" -msgstr "" - -#: unknown -msgid "CString" -msgstr "" - -#: unknown -msgid "NCR Decimal" -msgstr "" - -#: unknown -msgid "NCR Hex" -msgstr "" - -#: unknown -msgid "STelex" -msgstr "" - -#: unknown -msgid "STelex2" -msgstr "" - -#: unknown -msgid "TCVN3" -msgstr "" - -#: unknown -msgid "Telex" -msgstr "" - -#: unknown -msgid "Unicode" -msgstr "" - -#: unknown -msgid "VIQR" -msgstr "" - -#: unknown -msgid "Vni" -msgstr "" - -#: unknown -msgid "VNI Win" -msgstr "" - -#: unknown -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:127 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:187 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/model.cpp:25 -msgid "Macro" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/fcitx-unikey.conf.in.h:2 -msgid "Unikey Wrapper For Fcitx" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:105 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:172 -msgid "Choose input method" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:113 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:178 -msgid "Choose output charset" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:119 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:182 -msgid "Spell Check" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:120 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:183 -msgid "Enable Spell Check" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:128 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:188 -msgid "Enable Macro" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:142 -msgid "Unikey Input Method" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:182 +#: src/unikey-ui.cpp:182 msgid "No Spell Check" msgstr "" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:187 +#: src/unikey-ui.cpp:187 msgid "No Macro" msgstr "" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:21 -msgid "&Add" +#: src/fcitx-unikey.conf.in:4 +msgid "Unikey Wrapper For Fcitx" msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:22 -msgid "&Delete" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:23 -msgid "De&lete All" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:24 -msgid "&Quit" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:25 -msgid "&Save" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:26 -msgid "&Import" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:27 -msgid "&Export" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:30 -msgid "Unikey Macro Editor" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:56 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:84 -msgid "Quit Macro Editor" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:57 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:85 -msgid "Macro table still contains unsaved changes. Do you want to save?" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/model.cpp:27 -msgid "Word" -msgstr "" diff --git a/po/vi.po b/po/vi.po index 8af11e7..9dc6ce4 100644 --- a/po/vi.po +++ b/po/vi.po @@ -1,298 +1,98 @@ -# Vietnamese translations for ibus-unikey package -# Bản dịch Việt ngữ cho gói tin ibus-unikey. -# Copyright (C) 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the ibus-unikey package. +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # +# Translators: # Lê Quốc Tuấn , 2009. -# Weng Xuetian , 2012. +# Weng Xuetian , 2012-2013. msgid "" msgstr "" -"Project-Id-Version: ibus-unikey 0.6.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-20 22:29-0400\n" -"PO-Revision-Date: 2012-10-20 22:33-0400\n" -"Last-Translator: Weng Xuetian \n" -"Language-Team: Chinese Simplified \n" -"Language: zh_CN\n" +"Project-Id-Version: fcitx\n" +"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" +"POT-Creation-Date: 2013-01-18 15:51-0500\n" +"PO-Revision-Date: 2013-01-18 20:49+0000\n" +"Last-Translator: Xuetian Weng \n" +"Language-Team: Vietnamese (http://www.transifex.com/projects/p/fcitx/" +"language/vi/)\n" +"Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Poedit-Language: Vietnamese\n" -"X-Poedit-Country: VIET NAM\n" -"X-Poedit-SourceCharset: utf-8\n" -"X-Generator: Lokalize 1.5\n" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:21 +#: macro-editor/editor.cpp:41 msgid "&Add" -msgstr "" +msgstr "&Thêm" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:22 +#: macro-editor/editor.cpp:42 msgid "&Delete" msgstr "&Xóa" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:27 +#: macro-editor/editor.cpp:45 msgid "&Export" msgstr "&Xuất" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:26 +#: macro-editor/editor.cpp:44 msgid "&Import" msgstr "&Nhập" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:24 -msgid "&Quit" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:25 -msgid "&Save" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:43 -msgid "Allow type with more freedom" -msgstr "Tự động trả phím khi gõ từ không hợp lệ" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:48 -msgid "Auto restore keys with invalid words" -msgstr "Tự động trả phím khi gõ từ không hợp lệ" - -#: unknown -msgid "BK HCM 2" -msgstr "BK HCM 2" - -#: unknown -msgid "CString" -msgstr "CString" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:105 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:172 +#: src/unikey-ui.cpp:105 src/unikey-ui.cpp:172 msgid "Choose input method" msgstr "Chọn kiểu gõ" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:113 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:178 +#: src/unikey-ui.cpp:113 src/unikey-ui.cpp:178 msgid "Choose output charset" msgstr "Chọn bảng mã" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:23 +#: macro-editor/editor.cpp:43 msgid "De&lete All" msgstr "Xóa &hết" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:128 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:188 +#: src/unikey-ui.cpp:128 src/unikey-ui.cpp:188 msgid "Enable Macro" msgstr "Bật gõ tắt" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:120 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:183 +#: src/unikey-ui.cpp:120 src/unikey-ui.cpp:183 msgid "Enable Spell Check" msgstr "Bật kiểm tra chính tả" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:33 -msgid "Enable macro" -msgstr "Bật gõ tắt" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:28 -msgid "Enable spell check" -msgstr "Bật kiểm tra chính tả" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:4 -msgid "Input Method" -msgstr "Kiểu gõ" - -#: unknown -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:127 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:187 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/model.cpp:25 +#: macro-editor/model.cpp:44 src/unikey-ui.cpp:127 src/unikey-ui.cpp:187 +#: src/fcitx-unikey.conf.in:10 msgid "Macro" msgstr "gõ tắt" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:57 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:85 -msgid "Macro table still contains unsaved changes. Do you want to save?" -msgstr "" +#: src/unikey-ui.cpp:187 +msgid "No Macro" +msgstr "Tắt gõ tắt" -#: unknown -msgid "NCR Decimal" -msgstr "NCR Decimal" +#: src/unikey-ui.cpp:182 +msgid "No Spell Check" +msgstr "Tắt kiểm tra chính tả" -#: unknown -msgid "NCR Hex" -msgstr "NCR Hex" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:187 -#, fuzzy -msgid "No Macro" -msgstr "gõ tắt" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:182 -#, fuzzy -msgid "No Spell Check" -msgstr "kiểm tra chính tả" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:14 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:156 +#: src/unikey-ui.cpp:156 msgid "Output Charset" msgstr "Bảng mã" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:53 -msgid "Process W at word begin" -msgstr "Xử lý phím W ở đầu từ" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:56 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:84 -msgid "Quit Macro Editor" -msgstr "" - -#: unknown -msgid "STelex" -msgstr "STelex" - -#: unknown -msgid "STelex2" -msgstr "STelex2" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:119 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:182 +#: src/unikey-ui.cpp:119 src/unikey-ui.cpp:182 msgid "Spell Check" msgstr "kiểm tra chính tả" -#: unknown -msgid "TCVN3" -msgstr "TCVN3" - -#: unknown -msgid "Telex" -msgstr "Telex" - -#: unknown -msgid "Unicode" -msgstr "Unicode" - -# unknown -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/fcitx-unikey.conf.in.h:1 -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/unikey.conf.in.h:1 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-im.cpp:150 +#: src/unikey-im.cpp:152 src/fcitx-unikey.conf.in:3 msgid "Unikey" msgstr "Unikey" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:142 +#: src/unikey-ui.cpp:142 msgid "Unikey Input Method" msgstr "Unikey Kiểu gõ" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:30 +#: macro-editor/editor.cpp:48 macro-editor/editor.cpp:71 msgid "Unikey Macro Editor" msgstr "" -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/fcitx-unikey.conf.in.h:2 +#: src/fcitx-unikey.conf.in:4 msgid "Unikey Wrapper For Fcitx" msgstr "" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:38 -msgid "Use oà, _uý (instead of òa, úy)" -msgstr "Dùng oà, _uý (thay vì òa, úy)" - -#: unknown -msgid "VIQR" -msgstr "VIQR" - -#: unknown -msgid "VNI Win" -msgstr "VNI Win" - -#: unknown -msgid "Vni" -msgstr "Vni" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/model.cpp:27 +#: macro-editor/model.cpp:46 msgid "Word" msgstr "Từ" - -#~ msgid "(replace text)" -#~ msgstr "(chuỗi thay thế)" - -#~ msgid "Input/Output" -#~ msgstr "Nhập/Xuất" - -#~ msgid "Options" -#~ msgstr "Tùy chọn" - -#~ msgid "Auto send PreEdit string to Application when mouse move or click" -#~ msgstr "" -#~ "Tự động gửi chuỗi PreEdit đến ứng dụng khi chuột di chuyển hoặc click" - -#~ msgid "Capture _mouse event" -#~ msgstr "Bắt sự _kiện chuột" - -#~ msgid "Capture mouse event" -#~ msgstr "Bắt sự kiện chuột" - -#~ msgid "Choose file to export" -#~ msgstr "Chọn tập tin để xuất" - -#~ msgid "Choose file to import" -#~ msgstr "Chọn tập tin để nhập" - -#~ msgid "Full setup utility for IBus-Unikey" -#~ msgstr "Tiện ích cài đặt đầy đủ cho IBus-Unikey" - -#~ msgid "Full setup..." -#~ msgstr "Cài đặt đầy đủ..." - -#~ msgid "IBus-Unikey Setup" -#~ msgstr "Cài đặt IBus-Unikey" - -#~ msgid "If enable, you can decrease mistake when typing" -#~ msgstr "Nếu bật, bạn có thể giảm lỗi chính tả khi gõ" - -#~ msgid "Macro table definition" -#~ msgstr "Định nghĩa bảng gõ tắt" - -#~ msgid "N" -#~ msgstr "N" - -#~ msgid "Options" -#~ msgstr "Tùy chọn" - -#~ msgid "Options for Unikey" -#~ msgstr "Tùy chọn cho Unikey" - -#~ msgid "Replace with" -#~ msgstr "Thay thế bởi" - -#~ msgid "Simple Telex" -#~ msgstr "Simple Telex" - -#~ msgid "Simple Telex 2" -#~ msgstr "Simple Telex 2" - -#, fuzzy -#~ msgid "Toggle Macro" -#~ msgstr "Bật gõ tắt" - -#, fuzzy -#~ msgid "Toggle Spell Check" -#~ msgstr "Bật kiểm tra chính tả" - -#~ msgid "" -#~ "Vietnamese Input Method Engine for IBus using Unikey Engine\n" -#~ "Usage:\n" -#~ " - Choose input method, output charset, options in language bar.\n" -#~ " - There are 4 input methods: Telex, Vni, STelex (simple telex) and " -#~ "STelex2 (which same as STelex, the difference is it use w as ư).\n" -#~ " - And 7 output charsets: Unicode (UTF-8), TCVN3, VNI Win, VIQR, " -#~ "CString, NCR Decimal and NCR Hex.\n" -#~ " - Use + or + to restore keystrokes.\n" -#~ " - Use to commit a word." -#~ msgstr "" -#~ "Bộ gõ tiếng Việt cho IBus dùng Unikey Engine\n" -#~ "Sử dụng:\n" -#~ " - Chọn kiểu gõ, bảng mã, tùy chọn trên thanh ngôn ngữ.\n" -#~ " - Có 4 kiểu gõ: Telex, Vni, STelex (telex đơn giản) và STelex2 (giống " -#~ "như STelex, chỉ khác là nó dùng w như ư).\n" -#~ " - Và 7 bảng mã: Unicode (UTF-8), TCVN3, VNI Win, VIQR, CString, NCR " -#~ "Decimal và NCR Hex.\n" -#~ " - Dùng + hoặc + để khôi phục phím.\n" -#~ " - Dùng để xác nhận từ (kết thúc từ)." - -#~ msgid "_Edit macro" -#~ msgstr "_Sửa bảng gõ tắt" diff --git a/po/zh_CN.po b/po/zh_CN.po index 2fe5735..69c9137 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1,205 +1,98 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Christopher Meng , 2012. +# marguerite su , 2012. # Weng Xuetian , 2012. msgid "" msgstr "" "Project-Id-Version: fcitx\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-20 22:29-0400\n" -"PO-Revision-Date: 2012-10-20 22:47-0400\n" -"Last-Translator: Weng Xuetian \n" -"Language-Team: Chinese Simplified \n" +"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" +"POT-Creation-Date: 2013-01-18 15:51-0500\n" +"PO-Revision-Date: 2013-01-18 20:49+0000\n" +"Last-Translator: Xuetian Weng \n" +"Language-Team: Chinese (China) \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0\n" -"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=1; plural=0;\n" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:21 +#: macro-editor/editor.cpp:41 msgid "&Add" msgstr "添加(&A)" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:22 +#: macro-editor/editor.cpp:42 msgid "&Delete" msgstr "删除(&D)" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:27 +#: macro-editor/editor.cpp:45 msgid "&Export" msgstr "导出(&E)" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:26 +#: macro-editor/editor.cpp:44 msgid "&Import" msgstr "导入(&I)" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:24 -msgid "&Quit" -msgstr "退出(&Q)" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:25 -msgid "&Save" -msgstr "保存(&S)" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:43 -msgid "Allow type with more freedom" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:48 -msgid "Auto restore keys with invalid words" -msgstr "" - -#: unknown -msgid "BK HCM 2" -msgstr "BK HCM 2" - -#: unknown -msgid "CString" -msgstr "CString" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:105 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:172 +#: src/unikey-ui.cpp:105 src/unikey-ui.cpp:172 msgid "Choose input method" msgstr "选择输入法" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:113 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:178 +#: src/unikey-ui.cpp:113 src/unikey-ui.cpp:178 msgid "Choose output charset" msgstr "选择输出字符集" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:23 +#: macro-editor/editor.cpp:43 msgid "De&lete All" msgstr "全部删除(&L)" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:128 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:188 +#: src/unikey-ui.cpp:128 src/unikey-ui.cpp:188 msgid "Enable Macro" msgstr "开启宏" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:120 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:183 +#: src/unikey-ui.cpp:120 src/unikey-ui.cpp:183 msgid "Enable Spell Check" msgstr "启用拼写检查" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:33 -msgid "Enable macro" -msgstr "开启宏" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:28 -msgid "Enable spell check" -msgstr "启用拼写检查" - -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:4 -msgid "Input Method" -msgstr "输入法" - -#: unknown -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:127 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:187 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/model.cpp:25 +#: macro-editor/model.cpp:44 src/unikey-ui.cpp:127 src/unikey-ui.cpp:187 +#: src/fcitx-unikey.conf.in:10 msgid "Macro" msgstr "宏" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:57 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:85 -msgid "Macro table still contains unsaved changes. Do you want to save?" -msgstr "宏表上有未保存的修改。您想要保存吗?" - -#: unknown -msgid "NCR Decimal" -msgstr "NCR Decimal" - -#: unknown -msgid "NCR Hex" -msgstr "NCR Hex" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:187 +#: src/unikey-ui.cpp:187 msgid "No Macro" msgstr "禁用宏" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:182 +#: src/unikey-ui.cpp:182 msgid "No Spell Check" msgstr "禁用拼写检查" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:14 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:156 +#: src/unikey-ui.cpp:156 msgid "Output Charset" msgstr "输出字符集" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:53 -msgid "Process W at word begin" -msgstr "" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:56 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:84 -msgid "Quit Macro Editor" -msgstr "" - -#: unknown -msgid "STelex" -msgstr "STelex" - -#: unknown -msgid "STelex2" -msgstr "STelex2" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:119 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:182 +#: src/unikey-ui.cpp:119 src/unikey-ui.cpp:182 msgid "Spell Check" msgstr "拼写检查" -#: unknown -msgid "TCVN3" -msgstr "TCVN3" - -#: unknown -msgid "Telex" -msgstr "Telex" - -#: unknown -msgid "Unicode" -msgstr "Unicode" - -# unknown -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/fcitx-unikey.conf.in.h:1 -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/unikey.conf.in.h:1 -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-im.cpp:150 +#: src/unikey-im.cpp:152 src/fcitx-unikey.conf.in:3 msgid "Unikey" msgstr "Unikey" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//src/unikey-ui.cpp:142 +#: src/unikey-ui.cpp:142 msgid "Unikey Input Method" msgstr "Unikey 输入法" -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/editor.cpp:30 +#: macro-editor/editor.cpp:48 macro-editor/editor.cpp:71 msgid "Unikey Macro Editor" msgstr "Unikey 宏编辑器" -#: /home/saber/Develop/fcitx-unikey/build/po/tmp/fcitx-unikey.conf.in.h:2 +#: src/fcitx-unikey.conf.in:4 msgid "Unikey Wrapper For Fcitx" msgstr "Fcitx 的 Unikey 封装" -#: /home/saber/Develop/fcitx-unikey/data/fcitx-unikey.desc:38 -msgid "Use oà, _uý (instead of òa, úy)" -msgstr "使用 oà, _uý (替换òa, úy)" - -#: unknown -msgid "VIQR" -msgstr "VIQR" - -#: unknown -msgid "VNI Win" -msgstr "VNI Win" - -#: unknown -msgid "Vni" -msgstr "Vni" - -#: /home/saber/Develop/fcitx-unikey/build/po/../..//macro-editor/model.cpp:27 +#: macro-editor/model.cpp:46 msgid "Word" msgstr "单词" - -#~ msgid "N" -#~ msgstr "N" diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100644 index 0000000..5b2d4e2 --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,96 @@ +# 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 , 2012. +msgid "" +msgstr "" +"Project-Id-Version: fcitx\n" +"Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" +"POT-Creation-Date: 2013-01-18 15:43-0500\n" +"PO-Revision-Date: 2013-01-18 20:49+0000\n" +"Last-Translator: Xuetian Weng \n" +"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/fcitx/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" + +#: macro-editor/editor.cpp:41 +msgid "&Add" +msgstr "新增 (&A)" + +#: macro-editor/editor.cpp:42 +msgid "&Delete" +msgstr "刪除 (&D)" + +#: macro-editor/editor.cpp:43 +msgid "De&lete All" +msgstr "全部刪除 (&L)" + +#: macro-editor/editor.cpp:44 +msgid "&Import" +msgstr "匯入 (&I)" + +#: macro-editor/editor.cpp:45 +msgid "&Export" +msgstr "匯出 (&E)" + +#: macro-editor/editor.cpp:48 macro-editor/editor.cpp:71 +msgid "Unikey Macro Editor" +msgstr "Unikey 巨集編輯器" + +#: macro-editor/model.cpp:44 src/unikey-ui.cpp:127 src/unikey-ui.cpp:187 +#: src/fcitx-unikey.conf.in:10 +msgid "Macro" +msgstr "巨集" + +#: macro-editor/model.cpp:46 +msgid "Word" +msgstr "單字" + +#: src/unikey-im.cpp:152 src/fcitx-unikey.conf.in:3 +msgid "Unikey" +msgstr "Unikey" + +#: src/unikey-ui.cpp:105 src/unikey-ui.cpp:172 +msgid "Choose input method" +msgstr "選擇輸入法" + +#: src/unikey-ui.cpp:113 src/unikey-ui.cpp:178 +msgid "Choose output charset" +msgstr "選擇輸出字元集" + +#: src/unikey-ui.cpp:119 src/unikey-ui.cpp:182 +msgid "Spell Check" +msgstr "拼字檢查" + +#: src/unikey-ui.cpp:120 src/unikey-ui.cpp:183 +msgid "Enable Spell Check" +msgstr "啟用拼字檢查" + +#: src/unikey-ui.cpp:128 src/unikey-ui.cpp:188 +msgid "Enable Macro" +msgstr "啟用巨集" + +#: src/unikey-ui.cpp:142 +msgid "Unikey Input Method" +msgstr "Unikey 輸入法" + +#: src/unikey-ui.cpp:156 +msgid "Output Charset" +msgstr "輸出字元集" + +#: src/unikey-ui.cpp:182 +msgid "No Spell Check" +msgstr "停用拼寫檢查" + +#: src/unikey-ui.cpp:187 +msgid "No Macro" +msgstr "停用巨集" + +#: src/fcitx-unikey.conf.in:4 +msgid "Unikey Wrapper For Fcitx" +msgstr "Fcitx 的 Unikey 封裝" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43e0b3b..8478d7f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,4 @@ + include_directories ( ${PROJECT_SOURCE_DIR}/unikey ${FCITX4_FCITX_INCLUDE_DIRS} @@ -15,5 +16,7 @@ add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/share/locale\" ) -fcitx_add_addon(fcitx-unikey ${fcitx_unikey_sources} ) -target_link_libraries(fcitx-unikey unikey) +fcitx_add_addon_full(unikey + SOURCES ${fcitx_unikey_sources} + LINK_LIBS unikey + ) diff --git a/src/fcitx-unikey.conf.in b/src/fcitx-unikey.conf.in new file mode 100644 index 0000000..82cb89c --- /dev/null +++ b/src/fcitx-unikey.conf.in @@ -0,0 +1,10 @@ +[Addon] +Name=fcitx-unikey +_GeneralName=Unikey +_Comment=Unikey Wrapper For Fcitx +Category=InputMethod +Enabled=True +Library=fcitx-unikey.so +Type=SharedLibrary +IMRegisterMethod=ConfigFile +SubConfig=Macro:native:unikey/macro,fcitx-unikey:domain diff --git a/src/fcitx-unikey.desc b/src/fcitx-unikey.desc new file mode 100644 index 0000000..723366a --- /dev/null +++ b/src/fcitx-unikey.desc @@ -0,0 +1,56 @@ +[Unikey/InputMethod] +Type=Enum +DefaultValue=Telex +Description=Input Method +EnumCount=4 +Enum0=Telex +Enum1=Vni +Enum2=STelex +Enum3=STelex2 + +[Unikey/OutputCharset] +Type=Enum +DefaultValue=Unicode +Description=Output Charset +EnumCount=8 +Enum0=Unicode +Enum1=TCVN3 +Enum2=VNI Win +Enum3=VIQR +Enum4=BK HCM 2 +Enum5=CString +Enum6=NCR Decimal +Enum7=NCR Hex + +[Unikey/SpellCheck] +Type=Boolean +DefaultValue=True +Description=Enable spell check + +[Unikey/Macro] +Type=Boolean +DefaultValue=False +Description=Enable macro + +[Unikey/ModernStyle] +Type=Boolean +DefaultValue=False +Description=Use oà, _uý (instead of òa, úy) + +[Unikey/FreeMarking] +Type=Boolean +DefaultValue=True +Description=Allow type with more freedom + +[Unikey/AutoNonVnRestore] +Type=Boolean +DefaultValue=True +Description=Auto restore keys with invalid words + +[Unikey/ProcessWAtBegin] +Type=Boolean +DefaultValue=True +Description=Process W at word begin + +[DescriptionFile] +LocaleDomain=fcitx-unikey diff --git a/src/unikey-im.cpp b/src/unikey-im.cpp index 1e25437..126e329 100644 --- a/src/unikey-im.cpp +++ b/src/unikey-im.cpp @@ -51,6 +51,7 @@ static boolean FcitxUnikeyInit(void* arg); static void FcitxUnikeyReset(void* arg); static void FcitxUnikeyResetUI(void* arg); +static void FcitxUnikeySave(void* arg); static INPUT_RETURN_VALUE FcitxUnikeyDoInputPreedit(FcitxUnikey* unikey, FcitxKeySym sym, unsigned int state); static void FcitxUnikeyEraseChars(FcitxUnikey *unikey, int num_chars); static void FcitxUnikeyUpdatePreedit(FcitxUnikey *unikey); @@ -142,6 +143,7 @@ iface.ResetIM = FcitxUnikeyReset; iface.DoInput = FcitxUnikeyDoInput; iface.ReloadConfig = ReloadConfigFcitxUnikey; + iface.Save = FcitxUnikeySave; FcitxInstanceRegisterIMv2( instance, @@ -573,6 +575,13 @@ FcitxUISetStatusVisable(instance, "unikey-macro", visible); } +void FcitxUnikeySave(void* arg) +{ + FcitxUnikey* unikey = (FcitxUnikey*) arg; + if (!unikey->preeditstr->empty()) + FcitxUnikeyCommit(unikey); +} + void UpdateUnikeyConfig(FcitxUnikey* unikey) { ConfigUnikey(unikey); diff --git a/unikey/COPYING b/unikey/COPYING index bf50f20..718c3f0 100644 --- a/unikey/COPYING +++ b/unikey/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -464,8 +464,8 @@ You should have received a copy of the GNU Library General Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307 USA. + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. diff --git a/unikey/charset.cpp b/unikey/charset.cpp index f4d759f..10cd402 100644 --- a/unikey/charset.cpp +++ b/unikey/charset.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #include diff --git a/unikey/charset.h b/unikey/charset.h index e02f76c..d8a5e54 100644 --- a/unikey/charset.h +++ b/unikey/charset.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #ifndef __CHARSET_CONVERT_H diff --git a/unikey/convert.cpp b/unikey/convert.cpp index f22f6b7..fa62e5a 100644 --- a/unikey/convert.cpp +++ b/unikey/convert.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #include "charset.h" diff --git a/unikey/data.cpp b/unikey/data.cpp index ce2e662..e7b4c86 100644 --- a/unikey/data.cpp +++ b/unikey/data.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #include "charset.h" diff --git a/unikey/error.cpp b/unikey/error.cpp index 4b73526..b9e882a 100644 --- a/unikey/error.cpp +++ b/unikey/error.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ // For some unknown reasons, the functions in this file cannot be exported // We had to move them to convert.cpp. diff --git a/unikey/inputproc.cpp b/unikey/inputproc.cpp index 117c179..fa31c8c 100644 --- a/unikey/inputproc.cpp +++ b/unikey/inputproc.cpp @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #include diff --git a/unikey/inputproc.h b/unikey/inputproc.h index 27babfe..801b241 100644 --- a/unikey/inputproc.h +++ b/unikey/inputproc.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #ifndef __UK_INPUT_PROCESSOR_H #define __UK_INPUT_PROCESSOR_H diff --git a/unikey/keycons.h b/unikey/keycons.h index 4f9c2f0..6174da9 100644 --- a/unikey/keycons.h +++ b/unikey/keycons.h @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #ifndef __KEY_CONS_H #define __KEY_CONS_H diff --git a/unikey/mactab.cpp b/unikey/mactab.cpp index 58d0cf4..5621285 100644 --- a/unikey/mactab.cpp +++ b/unikey/mactab.cpp @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #include diff --git a/unikey/mactab.h b/unikey/mactab.h index 64d4db2..49ad8f0 100644 --- a/unikey/mactab.h +++ b/unikey/mactab.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #ifndef __MACRO_TABLE_H diff --git a/unikey/pattern.cpp b/unikey/pattern.cpp index 7e1f43b..a47fa44 100644 --- a/unikey/pattern.cpp +++ b/unikey/pattern.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #include "pattern.h" diff --git a/unikey/pattern.h b/unikey/pattern.h index d26fe55..3eae19f 100644 --- a/unikey/pattern.h +++ b/unikey/pattern.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #ifndef __PATTERN_H diff --git a/unikey/ukengine.cpp b/unikey/ukengine.cpp index cf66dc6..b619a91 100644 --- a/unikey/ukengine.cpp +++ b/unikey/ukengine.cpp @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #include diff --git a/unikey/ukengine.h b/unikey/ukengine.h index 54de801..5ce9042 100644 --- a/unikey/ukengine.h +++ b/unikey/ukengine.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #ifndef __UKENGINE_H diff --git a/unikey/unikey.cpp b/unikey/unikey.cpp index be3a623..cdf3a4f 100644 --- a/unikey/unikey.cpp +++ b/unikey/unikey.cpp @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #include diff --git a/unikey/unikey.h b/unikey/unikey.h index d9bf39b..0aa8cc9 100644 --- a/unikey/unikey.h +++ b/unikey/unikey.h @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ #ifndef __UNIKEY_H diff --git a/unikey/usrkeymap.cpp b/unikey/usrkeymap.cpp index 46a2fee..7dab1dc 100644 --- a/unikey/usrkeymap.cpp +++ b/unikey/usrkeymap.cpp @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #include diff --git a/unikey/usrkeymap.h b/unikey/usrkeymap.h index 4dc8ec6..3c7142e 100644 --- a/unikey/usrkeymap.h +++ b/unikey/usrkeymap.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #ifndef __UNIKEY_USER_KEY_MAP_H diff --git a/unikey/vnconv.h b/unikey/vnconv.h index 0fcb112..72bed50 100644 --- a/unikey/vnconv.h +++ b/unikey/vnconv.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --------------------------------------------------------------------------------*/ // diff --git a/unikey/vnlexi.h b/unikey/vnlexi.h index 8724013..6e5a1c8 100644 --- a/unikey/vnlexi.h +++ b/unikey/vnlexi.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301, USA. */ #ifndef __VN_LEXI_H