diff --git a/CMakeLists.txt b/CMakeLists.txt index 280330c..eb3e5ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,9 @@ find_package(LibIntl REQUIRED) if (ENABLE_QT) -find_package(Qt4 4.8) +find_package(Qt5 5.7 REQUIRED COMPONENTS Core Gui Widgets) +find_package(FcitxQt5WidgetsAddons 1.1 REQUIRED) -pkg_check_modules(FCITX_QT "fcitx-qt>=4.2.8") endif (ENABLE_QT) configure_file(config.h.in config.h) diff --git a/macro-editor/CMakeLists.txt b/macro-editor/CMakeLists.txt index cc57ea2..71aaabd 100644 --- a/macro-editor/CMakeLists.txt +++ b/macro-editor/CMakeLists.txt @@ -16,14 +16,11 @@ ${MACRO_EDITOR_SRCS} ${MACRO_EDITOR_HDRS}) -if (NOT QT_FOUND OR NOT FCITX_QT_FOUND OR NOT ENABLE_QT) +if (NOT ENABLE_QT) return() -endif (NOT QT_FOUND OR NOT FCITX_QT_FOUND OR NOT ENABLE_QT) +endif (NOT ENABLE_QT) include_directories( - ${FCITX_QT_INCLUDE_DIRS} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/unikey ) @@ -31,27 +28,22 @@ 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) +qt5_wrap_ui(MACRO_EDITOR_SRCS editor.ui dialog.ui) 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" + AUTOMOC TRUE ) target_link_libraries(fcitx-unikey-macro-editor - debug ${QT_QTCORE_LIBRARY_DEBUG} - debug ${QT_QTDBUS_LIBRARY_DEBUG} - debug ${QT_QTGUI_LIBRARY_DEBUG} - optimized ${QT_QTCORE_LIBRARY_RELEASE} - optimized ${QT_QTDBUS_LIBRARY_RELEASE} - optimized ${QT_QTGUI_LIBRARY_RELEASE} + Qt5::Core + Qt5::Widgets + FcitxQt5::WidgetsAddons + LibIntl::LibIntl unikey ${FCITX4_FCITX_UTILS_LIBRARIES} ${FCITX4_FCITX_CONFIG_LIBRARIES} - ${FCITX_QT_LIBRARIES} - LibIntl::LibIntl ) install(TARGETS fcitx-unikey-macro-editor DESTINATION ${FCITX4_ADDON_INSTALL_DIR}/qt) diff --git a/macro-editor/editor.h b/macro-editor/editor.h index 2426032..137e0b0 100644 --- a/macro-editor/editor.h +++ b/macro-editor/editor.h @@ -17,7 +17,7 @@ * * ***************************************************************************/ -#include +#include class CMacroTable; namespace Ui { diff --git a/macro-editor/macro-editor.json b/macro-editor/macro-editor.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/macro-editor/macro-editor.json @@ -0,0 +1,2 @@ +{ +} diff --git a/macro-editor/main.cpp b/macro-editor/main.cpp index 12b769a..890eade 100644 --- a/macro-editor/main.cpp +++ b/macro-editor/main.cpp @@ -50,6 +50,3 @@ { return "fcitx-unikey"; } - - -Q_EXPORT_PLUGIN2 (fcitx_macro_editor, MacroEditorPlugin) diff --git a/macro-editor/main.h b/macro-editor/main.h index dfd06fc..e6a62c6 100644 --- a/macro-editor/main.h +++ b/macro-editor/main.h @@ -20,11 +20,12 @@ #ifndef _MAIN_H_ #define _MAIN_H_ -#include +#include class MacroEditorPlugin : public FcitxQtConfigUIPlugin { Q_OBJECT public: + Q_PLUGIN_METADATA(IID FcitxQtConfigUIFactoryInterface_iid FILE "macro-editor.json") explicit MacroEditorPlugin(QObject* parent = 0); virtual QString name(); virtual QStringList files(); diff --git a/po/ru.po b/po/ru.po index be1b193..88e53bd 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1,22 +1,24 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: # TotalCaesar659 , 2016 msgid "" msgstr "" "Project-Id-Version: fcitx\n" "Report-Msgid-Bugs-To: fcitx-dev@googlegroups.com\n" -"POT-Creation-Date: 2016-09-17 12:02-0700\n" -"PO-Revision-Date: 2016-11-30 23:45+0000\n" +"POT-Creation-Date: 2017-09-14 16:03-0700\n" +"PO-Revision-Date: 2017-08-03 16:58+0000\n" "Last-Translator: TotalCaesar659 \n" "Language-Team: Russian (http://www.transifex.com/fcitx/fcitx/language/ru/)\n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" +"%100>=11 && n%100<=14)? 2 : 3);\n" #: macro-editor/editor.cpp:41 msgid "&Add" @@ -26,37 +28,29 @@ msgid "&Delete" msgstr "&Удалить" -#: macro-editor/editor.cpp:43 -msgid "De&lete All" -msgstr "Уд&алить все" +#: macro-editor/editor.cpp:45 +msgid "&Export" +msgstr "&Экспорт" #: macro-editor/editor.cpp:44 msgid "&Import" msgstr "&Импорт" -#: macro-editor/editor.cpp:45 -msgid "&Export" -msgstr "&Экспорт" +#: src/fcitx-unikey.desc:46 +msgid "Allow type with more freedom" +msgstr "Разрешать тип с большей свободой" -#: macro-editor/editor.cpp:48 macro-editor/editor.cpp:76 -msgid "Unikey Macro Editor" -msgstr "Редактор макросов Unikey" +#: src/fcitx-unikey.desc:51 +msgid "Auto restore keys with invalid words" +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 "Макрос" +#: src/fcitx-unikey.desc:23 +msgid "BK HCM 2" +msgstr "BK HCM 2" -#: macro-editor/model.cpp:46 -msgid "Word" -msgstr "Слово" - -#: src/unikey-im.cpp:116 src/fcitx-unikey.conf.in:3 src/unikey.conf.in:3 -#: src/fcitx-unikey.desc:1 src/fcitx-unikey.desc:14 src/fcitx-unikey.desc:28 -#: src/fcitx-unikey.desc:33 src/fcitx-unikey.desc:38 src/fcitx-unikey.desc:43 -#: src/fcitx-unikey.desc:48 src/fcitx-unikey.desc:53 -msgid "Unikey" -msgstr "Unikey" +#: src/fcitx-unikey.desc:24 +msgid "CString" +msgstr "CString" #: src/unikey-ui.cpp:105 src/unikey-ui.cpp:172 msgid "Choose input method" @@ -66,69 +60,62 @@ msgid "Choose output charset" msgstr "Выбрать кодировку на выходе" -#: src/unikey-ui.cpp:119 src/unikey-ui.cpp:182 -msgid "Spell Check" -msgstr "Проверка правописания" +#: macro-editor/editor.cpp:43 +msgid "De&lete All" +msgstr "Уд&алить все" + +#: src/unikey-ui.cpp:128 +msgid "Enable Macro" +msgstr "Включить макросы" #: src/unikey-ui.cpp:120 msgid "Enable Spell Check" msgstr "Включить проверку правописания" -#: src/unikey-ui.cpp:128 -msgid "Enable Macro" +#: src/fcitx-unikey.desc:36 +msgid "Enable macro" msgstr "Включить макросы" -#: src/unikey-ui.cpp:142 -msgid "Unikey Input Method" -msgstr "Метод ввода Unikey" +#: src/fcitx-unikey.desc:31 +msgid "Enable spell check" +msgstr "Включить проверку правописания" + +#: src/fcitx-unikey.desc:4 +msgid "Input Method" +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 "Макрос" + +#: src/fcitx-unikey.desc:9 +msgid "Microsoft Vietnamese" +msgstr "Вьетнамский Microsoft" + +#: src/fcitx-unikey.desc:25 +msgid "NCR Decimal" +msgstr "Десятичный NCR" + +#: src/fcitx-unikey.desc:26 +msgid "NCR Hex" +msgstr "Шестнадцатиричный NCR" + +#: src/unikey-ui.cpp:187 +msgid "No Macro" +msgstr "Нет макросов" + +#: src/unikey-ui.cpp:182 +msgid "No Spell Check" +msgstr "Нет проверки правописания" #: src/unikey-ui.cpp:156 src/fcitx-unikey.desc:17 msgid "Output Charset" msgstr "Кодировка на выходе" -#: src/unikey-ui.cpp:182 -msgid "No Spell Check" -msgstr "Нет проверки правописания" - -#: src/unikey-ui.cpp:183 -msgid "Toggle Spell Check" -msgstr "Пререключить проверку правописания" - -#: src/unikey-ui.cpp:187 -msgid "No Macro" -msgstr "Нет макросов" - -#: src/unikey-ui.cpp:188 -msgid "Toggle Macro" -msgstr "Переключить макросы" - -#: src/fcitx-unikey.conf.in:4 -msgid "Unikey Wrapper For Fcitx" -msgstr "Обертка Wrapper для Fcitx" - -#: src/fcitx-unikey.desc:4 -msgid "Input Method" -msgstr "Метод ввода" - -#: src/fcitx-unikey.desc:6 -msgid "Telex" -msgstr "Telex" - -#: src/fcitx-unikey.desc:7 -msgid "VNI" -msgstr "VNI" - -#: src/fcitx-unikey.desc:8 src/fcitx-unikey.desc:22 -msgid "VIQR" -msgstr "VIQR" - -#: src/fcitx-unikey.desc:9 -msgid "Microsoft Vietnamese" -msgstr "Вьетнамский Microsoft" - -#: src/fcitx-unikey.desc:10 -msgid "UserIM" -msgstr "UserIM" +#: src/fcitx-unikey.desc:56 +msgid "Process W at word begin" +msgstr "Наберите W в начале слова" #: src/fcitx-unikey.desc:11 msgid "Simple Telex" @@ -138,54 +125,69 @@ msgid "Simple Telex2" msgstr "Простой Telex2" -#: src/fcitx-unikey.desc:19 -msgid "Unicode" -msgstr "Unicode" +#: src/unikey-ui.cpp:119 src/unikey-ui.cpp:182 +msgid "Spell Check" +msgstr "Проверка правописания" #: src/fcitx-unikey.desc:20 msgid "TCVN3" msgstr "TCVN3" -#: src/fcitx-unikey.desc:21 -msgid "VNI Win" -msgstr "VNI Win" +#: src/fcitx-unikey.desc:6 +msgid "Telex" +msgstr "Telex" -#: src/fcitx-unikey.desc:23 -msgid "BK HCM 2" -msgstr "BK HCM 2" +#: src/unikey-ui.cpp:188 +msgid "Toggle Macro" +msgstr "Переключить макросы" -#: src/fcitx-unikey.desc:24 -msgid "CString" -msgstr "CString" +#: src/unikey-ui.cpp:183 +msgid "Toggle Spell Check" +msgstr "Пререключить проверку правописания" -#: src/fcitx-unikey.desc:25 -msgid "NCR Decimal" -msgstr "Десятичный NCR" +#: src/fcitx-unikey.desc:19 +msgid "Unicode" +msgstr "Unicode" -#: src/fcitx-unikey.desc:26 -msgid "NCR Hex" -msgstr "Шестнадцатиричный NCR" +#: src/unikey-im.cpp:116 src/fcitx-unikey.conf.in:3 src/unikey.conf.in:3 +#: src/fcitx-unikey.desc:1 src/fcitx-unikey.desc:14 src/fcitx-unikey.desc:28 +#: src/fcitx-unikey.desc:33 src/fcitx-unikey.desc:38 src/fcitx-unikey.desc:43 +#: src/fcitx-unikey.desc:48 src/fcitx-unikey.desc:53 +msgid "Unikey" +msgstr "Unikey" -#: src/fcitx-unikey.desc:31 -msgid "Enable spell check" -msgstr "Включить проверку правописания" +#: src/unikey-ui.cpp:142 +msgid "Unikey Input Method" +msgstr "Метод ввода Unikey" -#: src/fcitx-unikey.desc:36 -msgid "Enable macro" -msgstr "Включить макросы" +#: macro-editor/editor.cpp:48 macro-editor/editor.cpp:76 +msgid "Unikey Macro Editor" +msgstr "Редактор макросов Unikey" + +#: src/fcitx-unikey.conf.in:4 +msgid "Unikey Wrapper For Fcitx" +msgstr "Обертка Wrapper для Fcitx" #: src/fcitx-unikey.desc:41 msgid "Use oà, _uý (instead of òa, úy)" msgstr "Использовать oà, _uý (вместо òa, úy)" -#: src/fcitx-unikey.desc:46 -msgid "Allow type with more freedom" -msgstr "Разрешать тип с большей свободой" +#: src/fcitx-unikey.desc:10 +msgid "UserIM" +msgstr "UserIM" -#: src/fcitx-unikey.desc:51 -msgid "Auto restore keys with invalid words" -msgstr "Автоматически восстанавливать клавиши при некорректных словах" +#: src/fcitx-unikey.desc:8 src/fcitx-unikey.desc:22 +msgid "VIQR" +msgstr "VIQR" -#: src/fcitx-unikey.desc:56 -msgid "Process W at word begin" -msgstr "Наберите W в начале слова" +#: src/fcitx-unikey.desc:7 +msgid "VNI" +msgstr "VNI" + +#: src/fcitx-unikey.desc:21 +msgid "VNI Win" +msgstr "VNI Win" + +#: macro-editor/model.cpp:46 +msgid "Word" +msgstr "Слово"