From 01bd00c8af640420bcde19fd2ff119d82a5a1aa9 Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Wed, 7 Jun 2023 11:29:23 +0800 Subject: [PATCH] Add translations files of app widget. --- frontend/frontend.pro | 34 ++- .../provider/data/search.conf | 3 + .../provider/data/search.png | Bin .../provider/data/search.qml | 2 +- .../provider/data/search.svg | 0 .../provider/data/ukui-search.svg | 0 ...org.ukui.appwidget.provider.search.service | 0 .../search-app-widget-plugin/provider/src.qrc | 0 .../search-app-widget-plugin.pri | 0 .../search-app-widget-plugin.pro | 0 .../search-app-widget-plugin_global.h | 0 .../search-app-widget-plugin/search.cpp | 0 .../search-app-widget-plugin/search.h | 0 libsearch/libsearch.pro | 22 +- .../libukui-search/libukui-search_bo_CN.ts | 243 ++++++++++-------- .../libukui-search/libukui-search_zh_CN.ts | 230 +++++++++-------- .../ukui-search/appwidget/search_bo_CN.ts | 12 + .../ukui-search/appwidget/search_zh_CN.ts | 11 + 18 files changed, 329 insertions(+), 228 deletions(-) rename {libsearch => frontend}/search-app-widget-plugin/provider/data/search.conf (71%) rename {libsearch => frontend}/search-app-widget-plugin/provider/data/search.png (100%) rename {libsearch => frontend}/search-app-widget-plugin/provider/data/search.qml (97%) rename {libsearch => frontend}/search-app-widget-plugin/provider/data/search.svg (100%) rename {libsearch => frontend}/search-app-widget-plugin/provider/data/ukui-search.svg (100%) rename {libsearch => frontend}/search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service (100%) rename {libsearch => frontend}/search-app-widget-plugin/provider/src.qrc (100%) rename {libsearch => frontend}/search-app-widget-plugin/search-app-widget-plugin.pri (100%) rename {libsearch => frontend}/search-app-widget-plugin/search-app-widget-plugin.pro (100%) rename {libsearch => frontend}/search-app-widget-plugin/search-app-widget-plugin_global.h (100%) rename {libsearch => frontend}/search-app-widget-plugin/search.cpp (100%) rename {libsearch => frontend}/search-app-widget-plugin/search.h (100%) create mode 100644 translations/ukui-search/appwidget/search_bo_CN.ts create mode 100644 translations/ukui-search/appwidget/search_zh_CN.ts diff --git a/frontend/frontend.pro b/frontend/frontend.pro index ece5567..8a097e8 100644 --- a/frontend/frontend.pro +++ b/frontend/frontend.pro @@ -10,6 +10,7 @@ TEMPLATE = app PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 kysdk-waylandhelper CONFIG += c++11 link_pkgconfig no_keywords lrelease LIBS += -lxapian -lgsettings-qt -lquazip5 -lX11 +LIBS += -lukui-appwidget-manager -lukui-appwidget-provider #LIBS += -lukui-log4qt # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings @@ -27,6 +28,7 @@ include(model/model.pri) include(xatom/xatom.pri) include(../3rd-parties/qtsingleapplication/qtsingleapplication.pri) include(view/view.pri) +include(search-app-widget-plugin/search-app-widget-plugin.pri) SOURCES += \ @@ -54,20 +56,44 @@ data.files += ../data/ukui-search.desktop INSTALLS += data data-menu RESOURCES += \ - resource.qrc + resource.qrc \ + search-app-widget-plugin/provider/src.qrc TRANSLATIONS += \ ../translations/ukui-search/zh_CN.ts \ ../translations/ukui-search/tr.ts \ - ../translations/ukui-search/bo_CN.ts + ../translations/ukui-search/bo_CN.ts \ + ../translations/ukui-search/appwidget/search_zh_CN.ts \ + ../translations/ukui-search/appwidget/search_bo_CN.ts qm_files.path = /usr/share/ukui-search/translations/ -qm_files.files = $$OUT_PWD/.qm/*.qm +qm_files.files = $$OUT_PWD/.qm/zh_CN.qm \ + $$OUT_PWD/.qm/bo_CN.qm \ + $$OUT_PWD/.qm/tr.qm \ schemes.path = /usr/share/glib-2.0/schemas/ schemes.files += ../data/org.ukui.log4qt.ukui-search.gschema.xml -INSTALLS += qm_files schemes +appwidget_qm_files.files = $$OUT_PWD/.qm/search_bo_CN.qm \ + $$OUT_PWD/.qm/search_zh_CN.qm +appwidget_qm_files.path = /usr/share/appwidget/translations/ + +qml.files += search-app-widget-plugin/provider/data/search.qml +qml.path = /usr/share/appwidget/qml/ + +appwidgetconf.files += search-app-widget-plugin/provider/data/search.conf +appwidgetconf.path = /usr/share/appwidget/config/ + +service.files += search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service +service.path += /usr/share/dbus-1/services/ + +preview.files += search-app-widget-plugin/provider/data/search.png +preview.path = /usr/share/appwidget/search/ + +svg.files += search-app-widget-plugin/provider/data/ukui-search.svg +svg.path = /usr/share/appwidget/search/ + +INSTALLS += qm_files schemes qml appwidget_qm_files appwidgetconf service preview svg LIBS += -L$$OUT_PWD/../libchinese-segmentation -lchinese-segmentation \ -L$$OUT_PWD/../libsearch -lukui-search diff --git a/libsearch/search-app-widget-plugin/provider/data/search.conf b/frontend/search-app-widget-plugin/provider/data/search.conf similarity index 71% rename from libsearch/search-app-widget-plugin/provider/data/search.conf rename to frontend/search-app-widget-plugin/provider/data/search.conf index 60e5d47..7dfe2c7 100644 --- a/libsearch/search-app-widget-plugin/provider/data/search.conf +++ b/frontend/search-app-widget-plugin/provider/data/search.conf @@ -12,3 +12,6 @@ targetCellWidth = 2 targetCellHeight = 1 updatePeriodMillis = 0 describe = ukui-search app widget +[LanguageFiles] +zh_CN = /usr/share/appwidget/translations/search_zh_CN.qm +bo_CN = /usr/share/appwidget/translations/search_bo_CN.qm diff --git a/libsearch/search-app-widget-plugin/provider/data/search.png b/frontend/search-app-widget-plugin/provider/data/search.png similarity index 100% rename from libsearch/search-app-widget-plugin/provider/data/search.png rename to frontend/search-app-widget-plugin/provider/data/search.png diff --git a/libsearch/search-app-widget-plugin/provider/data/search.qml b/frontend/search-app-widget-plugin/provider/data/search.qml similarity index 97% rename from libsearch/search-app-widget-plugin/provider/data/search.qml rename to frontend/search-app-widget-plugin/provider/data/search.qml index 53acfe0..6d14b5b 100755 --- a/libsearch/search-app-widget-plugin/provider/data/search.qml +++ b/frontend/search-app-widget-plugin/provider/data/search.qml @@ -112,7 +112,7 @@ AppWidget { // verticalAlignment: Qt.AlignVCenter; // font.pixelSize: 21 * scaling; - property string placeholderText: /*qsTr("search")*/"全局搜索" + property string placeholderText: qsTr("search")/*"全局搜索"*/ Text { id: placeholderText diff --git a/libsearch/search-app-widget-plugin/provider/data/search.svg b/frontend/search-app-widget-plugin/provider/data/search.svg similarity index 100% rename from libsearch/search-app-widget-plugin/provider/data/search.svg rename to frontend/search-app-widget-plugin/provider/data/search.svg diff --git a/libsearch/search-app-widget-plugin/provider/data/ukui-search.svg b/frontend/search-app-widget-plugin/provider/data/ukui-search.svg similarity index 100% rename from libsearch/search-app-widget-plugin/provider/data/ukui-search.svg rename to frontend/search-app-widget-plugin/provider/data/ukui-search.svg diff --git a/libsearch/search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service b/frontend/search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service similarity index 100% rename from libsearch/search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service rename to frontend/search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service diff --git a/libsearch/search-app-widget-plugin/provider/src.qrc b/frontend/search-app-widget-plugin/provider/src.qrc similarity index 100% rename from libsearch/search-app-widget-plugin/provider/src.qrc rename to frontend/search-app-widget-plugin/provider/src.qrc diff --git a/libsearch/search-app-widget-plugin/search-app-widget-plugin.pri b/frontend/search-app-widget-plugin/search-app-widget-plugin.pri similarity index 100% rename from libsearch/search-app-widget-plugin/search-app-widget-plugin.pri rename to frontend/search-app-widget-plugin/search-app-widget-plugin.pri diff --git a/libsearch/search-app-widget-plugin/search-app-widget-plugin.pro b/frontend/search-app-widget-plugin/search-app-widget-plugin.pro similarity index 100% rename from libsearch/search-app-widget-plugin/search-app-widget-plugin.pro rename to frontend/search-app-widget-plugin/search-app-widget-plugin.pro diff --git a/libsearch/search-app-widget-plugin/search-app-widget-plugin_global.h b/frontend/search-app-widget-plugin/search-app-widget-plugin_global.h similarity index 100% rename from libsearch/search-app-widget-plugin/search-app-widget-plugin_global.h rename to frontend/search-app-widget-plugin/search-app-widget-plugin_global.h diff --git a/libsearch/search-app-widget-plugin/search.cpp b/frontend/search-app-widget-plugin/search.cpp similarity index 100% rename from libsearch/search-app-widget-plugin/search.cpp rename to frontend/search-app-widget-plugin/search.cpp diff --git a/libsearch/search-app-widget-plugin/search.h b/frontend/search-app-widget-plugin/search.h similarity index 100% rename from libsearch/search-app-widget-plugin/search.h rename to frontend/search-app-widget-plugin/search.h diff --git a/libsearch/libsearch.pro b/libsearch/libsearch.pro index 50827ad..c935b5e 100644 --- a/libsearch/libsearch.pro +++ b/libsearch/libsearch.pro @@ -40,11 +40,9 @@ include(websearch/websearch.pri) include(searchinterface/search-interface.pri) include(dirwatcher/dirwatcher.pri) #include(mailsearch/mailsearch.pri) -include(search-app-widget-plugin/search-app-widget-plugin.pri) LIBS += -L$$OUT_PWD/../libchinese-segmentation/ -lchinese-segmentation LIBS += -lxapian -luchardet -lQt5Xdg -lquazip5 -ltesseract #-L/usr/local/lib/libjemalloc -ljemalloc -LIBS += -lukui-appwidget-manager -lukui-appwidget-provider SOURCES += \ file-utils.cpp \ @@ -64,8 +62,7 @@ HEADERS += \ log-utils.h RESOURCES += \ - resource1.qrc \ - search-app-widget-plugin/provider/src.qrc + resource1.qrc TRANSLATIONS += \ ../translations/libukui-search/libukui-search_zh_CN.ts \ @@ -74,22 +71,7 @@ TRANSLATIONS += \ qm_files.path = /usr/share/ukui-search/translations/ qm_files.files = $$OUT_PWD/.qm/*.qm -qml.files += search-app-widget-plugin/provider/data/search.qml -qml.path = /usr/share/appwidget/qml/ - -appwidgetconf.files += search-app-widget-plugin/provider/data/search.conf -appwidgetconf.path = /usr/share/appwidget/config/ - -service.files += search-app-widget-plugin/provider/org.ukui.appwidget.provider.search.service -service.path += /usr/share/dbus-1/services/ - -preview.files += search-app-widget-plugin/provider/data/search.png -preview.path = /usr/share/appwidget/search/ - -svg.files += search-app-widget-plugin/provider/data/ukui-search.svg -svg.path = /usr/share/appwidget/search/ - -INSTALLS += qml qm_files appwidgetconf service preview svg +INSTALLS += qm_files # Default rules for deployment. diff --git a/translations/libukui-search/libukui-search_bo_CN.ts b/translations/libukui-search/libukui-search_bo_CN.ts index c7664d0..5edc64f 100644 --- a/translations/libukui-search/libukui-search_bo_CN.ts +++ b/translations/libukui-search/libukui-search_bo_CN.ts @@ -4,12 +4,12 @@ QObject - + Content index incomplete. ནང་དོན་གྱི་སྟོན་གྲངས་ཆ་མི་ཚང་བ། - + Warning, Can not find home path. ཁྱིམ་གྱི་དཀར་ཆག་རྙེད་ཐབས་མེད། @@ -24,42 +24,42 @@ UkuiSearch::AppSearchPlugin - - + + Open སྒོ་ཕྱེ་བ། - - + + Add Shortcut to Desktop ཅོག་ངོས་སུ་མྱུར་འཐེབ་སྣོན་པ། - - + + Add Shortcut to Panel ལས་འགན་གྱི་སྒྲོམ་ཐོག་མགྱོགས་མྱུར་གྱི་བྱེད་ཐབས་གསར་སྣོན་བྱ་དགོས - - + + Install སྒྲིག་སྦྱོར་བྱེད་པ - + Application Description: ཉེར་སྤྱོད་གོ་རིམ་གྱི་གསལ་བཤད། - - + + Applications Search ཉེར་སྤྱོད་གོ་རིམ་འཚོལ་བཤེར། - + Application ཉེར་སྤྱོད་བྱ་རིམ། @@ -67,12 +67,12 @@ UkuiSearch::AppSearchTask - + Application ཉེར་སྤྱོད་བྱ་རིམ། - + Application search. @@ -80,49 +80,49 @@ UkuiSearch::DirSearchPlugin - - + + Open སྒོ་ཕྱེ་བ། - - + + Open path ཡིག་ཆའི་ཐབས་ལམ་འབྱེད་དགོས། - + Copy Path ཡིག་ཆའི་ལམ་ཐིག་དཔར་བ། - + Dir search. ཡིག་ཆའི་དཀར་ཆག་ལ་ཞིབ་བཤེར་དང་འཚོལ་ཞིབ་ - + Dir Search ཡིག་ཆའི་དཀར་ཆག་ལ་ཞིབ་བཤེར་དང་འཚོལ་ཞིབ་ - + Directory དཀར་ཆག - + Path ལམ་ཐིག - + Last time modified ཐེངས་སྔ་མའི་བཟོ་བཅོས་དུས་ཚོད། - + Copy path ཡིག་ཆའི་ལམ་ཐིག་དཔར་བ། @@ -130,54 +130,54 @@ UkuiSearch::FileContengSearchPlugin - - + + Open སྒོ་ཕྱེ་བ། - - + + Open path ཡིག་ཆའི་ཐབས་ལམ་འབྱེད་དགོས། - + Copy Path ཡིག་ཆའི་ལམ་ཐིག་དཔར་བ། - + File content search. ཡིག་ཆའི་ནང་དོན་འཚོལ་ཞིབ་ - + File content search ཡིག་ཆའི་ནང་དོན་འཚོལ་ཞིབ་ - + OCR OCR - + File ཡིག་ཆ། - + Path ལམ་ཐིག - + Last time modified ཐེངས་སྔ་མའི་བཟོ་བཅོས་དུས་ཚོད། - + Copy path ཡིག་ཆའི་ལམ་ཐིག་དཔར་བ། @@ -185,13 +185,13 @@ UkuiSearch::FileContentSearchTask - - + + File Content ཡིག་ཆའི་ནང་དོན། - + File Content Search ཡིག་ཆའི་ནང་དོན་འཚོལ་ཞིབ་ @@ -199,61 +199,61 @@ UkuiSearch::FileSearchPlugin - - + + Open སྒོ་ཕྱེ་བ། - - + + Open path ཡིག་ཆའི་ཐབས་ལམ་འབྱེད་དགོས། - + Copy Path ཡིག་ཆའི་ལམ་ཐིག་དཔར་བ། - + File search. ཡིག་ཆ་འཚོལ་བཤེར། - + File Search ཡིག་ཆ་འཚོལ་བཤེར། - - + + Yes རེད། - - + + Can not get a default application for opening %1. བཀོལ་སྤྱོད་ཀྱི་གོ་རིམ་མེད་ན་ཁ་ཕྱེ་ཆོག། - + File ཡིག་ཆ། - + Path ལམ་ཐིག - + Last time modified ཐེངས་སྔ་མའི་བཟོ་བཅོས་དུས་ཚོད། - + Copy path ཡིག་ཆའི་ལམ་ཐིག་དཔར་བ། @@ -261,55 +261,45 @@ UkuiSearch::MailSearch - From - དེ་ནས་ཡོང་བ་ཡིན། + དེ་ནས་ཡོང་བ་ཡིན། - Time - དུས་ཚོད། + དུས་ཚོད། - To - དམིགས་ཡུལ་ས་གནས། + དམིགས་ཡུལ་ས་གནས། - Cc - Cc + Cc UkuiSearch::MailSearchPlugin - open - སྒོ་ཕྱེ་བ། + སྒོ་ཕྱེ་བ། - - - Mail Search - སྦྲག་རྫས་འཚོལ་བཤེར། + སྦྲག་རྫས་འཚོལ་བཤེར། - Mail - སྦྲག་རྫས། + སྦྲག་རྫས། - Open - སྒོ་ཕྱེ་བ། + སྒོ་ཕྱེ་བ། UkuiSearch::NoteSearch - + Note Description: སྟབས་བདེ་བྱང་བུ།ནང་དོན། @@ -317,24 +307,24 @@ UkuiSearch::NoteSearchPlugin - - + + Open སྒོ་ཕྱེ་བ། - + Note Search. སྟབས་བདེ་བྱང་བུ།འཚོལ་ཞིབ་བྱེད་པ། - - + + Note Search སྟབས་བདེ་བྱང་བུ།འཚོལ་ཞིབ་བྱེད་པ། - + Application ཉེར་སྤྱོད་བྱ་རིམ། @@ -353,48 +343,97 @@ - UkuiSearch::SearchTaskPluginManager + UkuiSearch::SearchResultPropertyInfo - - - plugin type: %1, is disabled! - ནུས་པ་སྒོ་བརྒྱབ་ཡོད། + + file path + + + + + file name + + + + + file icon name + + + + + modified time + + + + + application desktop file path + + + + + application local name + + + + + application icon name + + + + + application description + + + + + is online application + + + + + application package name + + + + + UkuiSearch::SearchTaskPluginManager + + plugin type: %1, is disabled! + ནུས་པ་སྒོ་བརྒྱབ་ཡོད། - - plugin type: %1, is not registered! - ནུས་པ་ཐོ་འགོད་བྱས་མེད་པ། + ནུས་པ་ཐོ་འགོད་བྱས་མེད་པ། UkuiSearch::SettingsSearchPlugin - - + + Open སྒོ་ཕྱེ་བ། - + Settings search. སྒྲིག་བཀོད་འཚོལ་བཤེར་བྱ་དགོས། - + Settings Search སྒྲིག་བཀོད་འཚོལ་བཤེར་བྱ་དགོས། - + Settings སྒྲིག་བཀོད། - UkuiSearch::UkuiSearchTaskPrivate + UkuiSearch::UkuiSearchTask - + Current task uuid error or an unregistered plugin is used! @@ -402,14 +441,14 @@ UkuiSearch::WebSearchPlugin - - + + Start browser search དྲ་ངོས་ནས་འཚོལ་ཞིབ་བྱེད་འགོ་འཛུགས་དགོས། - - + + Web Page དྲ་ངོས། @@ -417,7 +456,7 @@ search - + search diff --git a/translations/libukui-search/libukui-search_zh_CN.ts b/translations/libukui-search/libukui-search_zh_CN.ts index c7ca100..9db9566 100644 --- a/translations/libukui-search/libukui-search_zh_CN.ts +++ b/translations/libukui-search/libukui-search_zh_CN.ts @@ -4,12 +4,12 @@ QObject - + Content index incomplete. - + Warning, Can not find home path. @@ -31,42 +31,42 @@ UkuiSearch::AppSearchPlugin - - + + Open 打开 - - + + Add Shortcut to Desktop 添加到桌面快捷方式 - - + + Add Shortcut to Panel 添加到任务栏快捷方式 - - + + Install 安装 - - + + Applications Search 应用 - + Application 应用 - + Application Description: 应用描述: @@ -74,12 +74,12 @@ UkuiSearch::AppSearchTask - + Application 应用 - + Application search. 应用搜索 @@ -87,34 +87,34 @@ UkuiSearch::DirSearchPlugin - - + + Open 打开 - - + + Open path 打开文件所在路径 - + Copy Path 复制文件路径 - + Dir Search 目录 - + Directory 目录 - + Dir search. 目录搜索。 @@ -123,17 +123,17 @@ 目录 - + Path 路径 - + Last time modified 上次修改时间 - + Copy path 复制路径 @@ -141,19 +141,19 @@ UkuiSearch::FileContengSearchPlugin - - + + Open 打开 - - + + Open path 打开文件所在路径 - + Copy Path 复制文件路径 @@ -162,37 +162,37 @@ 文本内容搜索 - + File content search. 文本内容搜索。 - + File content search 文本内容 - + OCR OCR - + File 文件 - + Path 路径 - + Last time modified 上次修改时间 - + Copy path 复制路径 @@ -200,13 +200,13 @@ UkuiSearch::FileContentSearchTask - - + + File Content 文本内容 - + File Content Search 文本内容搜索 @@ -214,61 +214,61 @@ UkuiSearch::FileSearchPlugin - - + + Open 打开 - - + + Open path 打开文件所在路径 - + Copy Path 复制文件路径 - + File Search 文件 - + File search. 文件搜索。 - - + + Yes 确定 - - + + Can not get a default application for opening %1. 没有找到默认打开%1的应用。 - + File 文件 - + Path 路径 - + Last time modified 上次修改时间 - + Copy path 复制路径 @@ -276,55 +276,45 @@ UkuiSearch::MailSearch - From - 发件人 + 发件人 - Time - 时间 + 时间 - To - 收件人 + 收件人 - Cc - 抄送人 + 抄送人 UkuiSearch::MailSearchPlugin - open - 打开 + 打开 - - - Mail Search - 邮件搜索 + 邮件搜索 - Mail - 邮件 + 邮件 - Open - 打开 + 打开 UkuiSearch::NoteSearch - + Note Description: 便签内容: 便签内容: @@ -333,27 +323,27 @@ UkuiSearch::NoteSearchPlugin - - + + Open 打开 打开 - - + + Note Search 便签 便签 - + Note Search. 便签. 便签. - + Application 应用 应用 @@ -373,48 +363,86 @@ - UkuiSearch::SearchTaskPluginManager + UkuiSearch::SearchResultPropertyInfo - - - plugin type: %1, is disabled! + + file path - - - plugin type: %1, is not registered! + + file name + + + + + file icon name + + + + + modified time + + + + + application desktop file path + + + + + application local name + + + + + application icon name + + + + + application description + + + + + is online application + + + + + application package name UkuiSearch::SettingsSearchPlugin - - + + Open 打开 - + Settings Search 配置项 - + Settings search. 配置项搜索。 - + Settings 设置项 - UkuiSearch::UkuiSearchTaskPrivate + UkuiSearch::UkuiSearchTask - + Current task uuid error or an unregistered plugin is used! @@ -422,14 +450,14 @@ UkuiSearch::WebSearchPlugin - - + + Start browser search 启动浏览器搜索 - - + + Web Page 网页 @@ -437,7 +465,7 @@ search - + search 全局搜索 全局搜索 diff --git a/translations/ukui-search/appwidget/search_bo_CN.ts b/translations/ukui-search/appwidget/search_bo_CN.ts new file mode 100644 index 0000000..17a5e59 --- /dev/null +++ b/translations/ukui-search/appwidget/search_bo_CN.ts @@ -0,0 +1,12 @@ + + + + + search + + + search + འཚོལ་བཤེར། + + + diff --git a/translations/ukui-search/appwidget/search_zh_CN.ts b/translations/ukui-search/appwidget/search_zh_CN.ts new file mode 100644 index 0000000..ec71e9e --- /dev/null +++ b/translations/ukui-search/appwidget/search_zh_CN.ts @@ -0,0 +1,11 @@ + + + + + search + + search + 全局搜索 + + +