From 565f49003538510c9870987f36022138d5c3fe8a Mon Sep 17 00:00:00 2001 From: iaom Date: Tue, 8 Mar 2022 14:50:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=90=88=E5=B9=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=90=8E=E7=9A=84=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E7=BF=BB=E8=AF=91=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/mainwindow.cpp | 2 +- frontend/ukui-search-gui.cpp | 5 - libsearch/libsearch.pro | 4 +- search-ukcc-plugin/translations/zh_CN.ts | 2 +- .../libukui-search/libukui-search_zh_CN.ts | 120 +++++++++--------- translations/ukui-search/bo.ts | 43 ++++--- translations/ukui-search/tr.ts | 38 ++++-- translations/ukui-search/zh_CN.ts | 45 ++++--- ukui-search-service/ukui-search-service.cpp | 1 - ukui-search-service/ukui-search-service.h | 1 - ukui-search-service/ukui-search-service.pro | 3 +- 11 files changed, 140 insertions(+), 124 deletions(-) diff --git a/frontend/mainwindow.cpp b/frontend/mainwindow.cpp index 874a816..cd3419b 100644 --- a/frontend/mainwindow.cpp +++ b/frontend/mainwindow.cpp @@ -171,7 +171,7 @@ void MainWindow::initConnections() connect(m_askDialog, &CreateIndexAskDialog::btnClicked, this, [ = ](const bool &is_create_index, const bool &is_ask_again) { setSearchMethodConfig(is_create_index, is_ask_again); }); - connect(m_settingsBtn, &QPushButton::clicked, this, &MainWindow::settingsBtnClickedSlot); +// connect(m_settingsBtn, &QPushButton::clicked, this, &MainWindow::settingsBtnClickedSlot); //主题改变时,更新自定义标题栏的图标 // connect(qApp, &QApplication::paletteChanged, this, [ = ]() { // m_iconLabel->setPixmap(QIcon::fromTheme("kylin-search").pixmap(QSize(WINDOW_ICON_SIZE, WINDOW_ICON_SIZE))); diff --git a/frontend/ukui-search-gui.cpp b/frontend/ukui-search-gui.cpp index cb55f78..a1ef181 100644 --- a/frontend/ukui-search-gui.cpp +++ b/frontend/ukui-search-gui.cpp @@ -8,7 +8,6 @@ #include "search-plugin-manager.h" #include "document.h" -#include "file-utils.h" using namespace UkuiSearch; UkuiSearchGui::UkuiSearchGui(int &argc, char *argv[], const QString &applicationName): QtSingleApplication (applicationName, argc, argv) { @@ -54,10 +53,6 @@ UkuiSearchGui::UkuiSearchGui(int &argc, char *argv[], const QString &application SearchPluginManager::getInstance(); PluginManager::getInstance(); - // load chinese character and pinyin file to a Map - FileUtils::loadHanziTable("://index/pinyinWithoutTone.txt"); - qDebug() << "Finish loading plugins and resources"; - m_mainWindow = new UkuiSearch::MainWindow(); m_dbusService = new UkuiSearch::UkuiSearchDbusServices(m_mainWindow); qApp->setWindowIcon(QIcon::fromTheme("kylin-search")); diff --git a/libsearch/libsearch.pro b/libsearch/libsearch.pro index 96acc51..f5aefef 100644 --- a/libsearch/libsearch.pro +++ b/libsearch/libsearch.pro @@ -7,7 +7,7 @@ TEMPLATE = lib DEFINES += LIBSEARCH_LIBRARY CONFIG += create_pc create_prl no_install_prl -PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 gsettings-qt poppler-qt5 quazip +PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 gsettings-qt poppler-qt5 CONFIG += c++11 link_pkgconfig no_keywords lrelease QMAKE_CXXFLAGS += -Werror=return-type -Werror=return-local-addr -Werror=uninitialized @@ -41,7 +41,7 @@ include(dirwatcher/dirwatcher.pri) include(mailsearch/mailsearch.pri) LIBS += -L$$OUT_PWD/../libchinese-segmentation/ -lchinese-segmentation -LIBS += -lxapian -luchardet -lQt5Xdg -ltesseract #-L/usr/local/lib/libjemalloc -ljemalloc +LIBS += -lxapian -luchardet -lQt5Xdg -lquazip5 -ltesseract #-L/usr/local/lib/libjemalloc -ljemalloc SOURCES += \ file-utils.cpp \ diff --git a/search-ukcc-plugin/translations/zh_CN.ts b/search-ukcc-plugin/translations/zh_CN.ts index 92259ec..be2c47c 100644 --- a/search-ukcc-plugin/translations/zh_CN.ts +++ b/search-ukcc-plugin/translations/zh_CN.ts @@ -48,7 +48,7 @@ /Search/Block Folders - + Following folders will not be searched. You can set it by adding and removing folders. 搜索将不查看以下文件夹,通过添加和删除可以设置排除的文件夹位置 diff --git a/translations/libukui-search/libukui-search_zh_CN.ts b/translations/libukui-search/libukui-search_zh_CN.ts index be022c5..9652531 100644 --- a/translations/libukui-search/libukui-search_zh_CN.ts +++ b/translations/libukui-search/libukui-search_zh_CN.ts @@ -20,25 +20,25 @@ UkuiSearch::AppSearchPlugin - + Open 打开 - + Add Shortcut to Desktop 添加到桌面快捷方式 - + Add Shortcut to Panel 添加到任务栏快捷方式 - + Install 安装 @@ -49,7 +49,7 @@ 应用搜索 - + Application 应用 @@ -61,49 +61,49 @@ UkuiSearch::DirSearchPlugin - - + + Open 打开 - - + + Open path 打开文件所在路径 - + Copy Path 复制文件路径 - + Dir Search 目录搜索 - + Dir search. 目录搜索。 - + directory 目录 - + Path 路径 - + Last time modified 上次修改时间 - + Copy path 复制路径 @@ -111,19 +111,19 @@ UkuiSearch::FileContengSearchPlugin - - + + Open 打开 - - + + Open path 打开文件所在路径 - + Copy Path 复制文件路径 @@ -132,32 +132,32 @@ 文本内容搜索 - + File content search. 文本内容搜索。 - + File content search 文本内容搜索 - + File 文件 - + Path 路径 - + Last time modified 上次修改时间 - + Copy path 复制路径 @@ -166,13 +166,13 @@ UkuiSearch::FileSearchPlugin - + Open 打开 - + Open path 打开文件所在路径 @@ -192,34 +192,34 @@ 文件搜索。 - - + + Yes 确定 - - + + Can not get a default application for opening %1. 没有找到默认打开%1的应用。 - + File 文件 - + Path 路径 - + Last time modified 上次修改时间 - + Copy path 复制路径 @@ -227,22 +227,22 @@ UkuiSearch::MailSearch - + From 发件人 - + Time 时间 - + To 收件人 - + Cc 抄送人 @@ -250,24 +250,24 @@ UkuiSearch::MailSearchPlugin - + open 打开 - - - + + + Mail Search 邮件搜索 - + Mail 邮件 - + Open 打开 @@ -292,7 +292,7 @@ - + Note Search 便签 便签 @@ -304,7 +304,7 @@ 便签. - + Application 应用 应用 @@ -313,12 +313,12 @@ UkuiSearch::SearchManager - + Path: 路径: - + Modified time: 修改时间: @@ -326,23 +326,23 @@ UkuiSearch::SettingsSearchPlugin - - + + Open 打开 - + Settings Search 设置 - + Settings search. 设置。 - + Settings 设置项 @@ -350,14 +350,14 @@ UkuiSearch::WebSearchPlugin - - + + Start browser search 启动浏览器搜索 - - + + Web Page 网页 diff --git a/translations/ukui-search/bo.ts b/translations/ukui-search/bo.ts index d43d482..7be2c22 100644 --- a/translations/ukui-search/bo.ts +++ b/translations/ukui-search/bo.ts @@ -1,18 +1,10 @@ - - QObject - - - ukui-search is already running! - - - UkuiSearch::BestListWidget - + Best Matches @@ -20,32 +12,32 @@ UkuiSearch::CreateIndexAskDialog - + ukui-search - + Search - + Creating index can help you getting results quickly, whether to create or not? - + Don't remind - + No - + Yes @@ -61,12 +53,12 @@ UkuiSearch::MainWindow - + ukui-search - + Global Search @@ -74,7 +66,7 @@ UkuiSearch::SearchLineEdit - + Search @@ -240,10 +232,23 @@ + + UkuiSearch::UkuiSearchGui + + + Quit ukui-search application + + + + + Show main window + + + UkuiSearch::WebSearchWidget - + Web Page diff --git a/translations/ukui-search/tr.ts b/translations/ukui-search/tr.ts index 965a126..aae28b9 100644 --- a/translations/ukui-search/tr.ts +++ b/translations/ukui-search/tr.ts @@ -99,9 +99,8 @@ QObject - ukui-search is already running! - ukui-bul zaten çalışıyor! + ukui-bul zaten çalışıyor! @@ -247,7 +246,7 @@ UkuiSearch::BestListWidget - + Best Matches En İyi Eşleşen @@ -298,32 +297,32 @@ UkuiSearch::CreateIndexAskDialog - + ukui-search - + Search Ara - + Creating index can help you getting results quickly, whether to create or not? - + Don't remind - + No - + Yes @@ -354,12 +353,12 @@ UkuiSearch::MainWindow - + ukui-search - + Global Search Genel Arama @@ -420,7 +419,7 @@ UkuiSearch::SearchLineEdit - + Search Ara @@ -613,10 +612,23 @@ Yükleniyor... + + UkuiSearch::UkuiSearchGui + + + Quit ukui-search application + + + + + Show main window + + + UkuiSearch::WebSearchWidget - + Web Page diff --git a/translations/ukui-search/zh_CN.ts b/translations/ukui-search/zh_CN.ts index 4a0cd4b..6181478 100644 --- a/translations/ukui-search/zh_CN.ts +++ b/translations/ukui-search/zh_CN.ts @@ -1,18 +1,10 @@ - - QObject - - - ukui-search is already running! - - - UkuiSearch::BestListWidget - + Best Matches 最佳匹配 @@ -67,32 +59,32 @@ UkuiSearch::CreateIndexAskDialog - + ukui-search 搜索 - + Search 搜索 - + Creating index can help you getting results quickly, whether to create or not? 创建索引可以快速获取搜索结果,是否创建? - + Don't remind 不再提醒 - + No 否(N) - + Yes 是(Y) @@ -123,12 +115,12 @@ UkuiSearch::MainWindow - + ukui-search 搜索 - + Global Search 搜索 @@ -201,7 +193,7 @@ UkuiSearch::SearchLineEdit - + Search 搜索 @@ -394,12 +386,25 @@ 加载中... + + UkuiSearch::UkuiSearchGui + + + Quit ukui-search application + 退出搜索应用 + + + + Show main window + 显示主页面 + + UkuiSearch::WebSearchWidget - + Web Page - + 网页搜索 diff --git a/ukui-search-service/ukui-search-service.cpp b/ukui-search-service/ukui-search-service.cpp index 5944891..189be33 100644 --- a/ukui-search-service/ukui-search-service.cpp +++ b/ukui-search-service/ukui-search-service.cpp @@ -16,7 +16,6 @@ UkuiSearchService::UkuiSearchService(int &argc, char *argv[], const QString &app }); DirWatcher::getDirWatcher(); - FileUtils::loadHanziTable("://index/pinyinWithoutTone.txt"); initGsettings(); } diff --git a/ukui-search-service/ukui-search-service.h b/ukui-search-service/ukui-search-service.h index 0de8db6..562756d 100644 --- a/ukui-search-service/ukui-search-service.h +++ b/ukui-search-service/ukui-search-service.h @@ -7,7 +7,6 @@ #include "qtsingleapplication.h" #include "search-method-manager.h" #include "common.h" -#include "file-utils.h" namespace UkuiSearch { class UkuiSearchService : public QtSingleApplication diff --git a/ukui-search-service/ukui-search-service.pro b/ukui-search-service/ukui-search-service.pro index b09fa82..ecf65b0 100644 --- a/ukui-search-service/ukui-search-service.pro +++ b/ukui-search-service/ukui-search-service.pro @@ -23,7 +23,8 @@ DEFINES += QT_DEPRECATED_WARNINGS include(../libsearch/libukui-search-headers.pri) include(../3rd-parties/qtsingleapplication/qtsingleapplication.pri) -LIBS += -L$$OUT_PWD/../libsearch -lukui-search +LIBS += -L$$OUT_PWD/../libchinese-segmentation -lchinese-segmentation \ + -L$$OUT_PWD/../libsearch -lukui-search SOURCES += \ main.cpp \