From 6009d862caafa0a511633ebe36f46c5874cda3b7 Mon Sep 17 00:00:00 2001 From: iaom Date: Mon, 23 May 2022 15:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BF=BB=E8=AF=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/ukui-search-gui.cpp | 18 +++---- libsearch/index/file-search-plugin.cpp | 2 +- search-ukcc-plugin/translations/zh_CN.ts | 52 +++++++++---------- .../libukui-search/libukui-search_zh_CN.ts | 12 +++-- translations/ukui-search/bo.ts | 2 +- translations/ukui-search/tr.ts | 2 +- translations/ukui-search/zh_CN.ts | 2 +- 7 files changed, 47 insertions(+), 43 deletions(-) diff --git a/frontend/ukui-search-gui.cpp b/frontend/ukui-search-gui.cpp index a1ef181..8cd6410 100644 --- a/frontend/ukui-search-gui.cpp +++ b/frontend/ukui-search-gui.cpp @@ -25,26 +25,26 @@ UkuiSearchGui::UkuiSearchGui(int &argc, char *argv[], const QString &application //load translations. - QTranslator translator; + QTranslator *translator = new QTranslator(this); try { - if(! translator.load("/usr/share/ukui-search/translations/" + QLocale::system().name())) throw - 1; - this->installTranslator(&translator); + if(! translator->load("/usr/share/ukui-search/translations/" + QLocale::system().name())) throw - 1; + this->installTranslator(translator); } catch(...) { qDebug() << "Load translations file" << QLocale() << "failed!"; } - QTranslator qt_translator; + QTranslator *qt_translator = new QTranslator(this); try { - if(! qt_translator.load(":/res/qt-translations/qt_zh_CN.qm")) throw - 1; - this->installTranslator(&qt_translator); + if(! qt_translator->load(":/res/qt-translations/qt_zh_CN.qm")) throw - 1; + this->installTranslator(qt_translator); } catch(...) { qDebug() << "Load translations file" << QLocale() << "failed!"; } - QTranslator lib_translator; + QTranslator *lib_translator = new QTranslator(this); try { - if(! lib_translator.load("/usr/share/ukui-search/translations/libukui-search_" + QLocale::system().name())) throw - 1; - this->installTranslator(&lib_translator); + if(! lib_translator->load("/usr/share/ukui-search/translations/libukui-search_" + QLocale::system().name())) throw - 1; + this->installTranslator(lib_translator); } catch(...) { qDebug() << "Load translations file" << QLocale() << "failed!"; } diff --git a/libsearch/index/file-search-plugin.cpp b/libsearch/index/file-search-plugin.cpp index 7ab0784..945ec17 100644 --- a/libsearch/index/file-search-plugin.cpp +++ b/libsearch/index/file-search-plugin.cpp @@ -302,7 +302,7 @@ QWidget *DirSearchPlugin::detailPage(const ResultInfo &ri) } else { m_nameLabel->setToolTip(""); } - m_pluginLabel->setText(tr("directory")); + m_pluginLabel->setText(tr("Directory")); m_pathLabel2->setText(m_pathLabel2->fontMetrics().elidedText(m_currentActionKey, Qt::ElideRight, m_pathLabel2->width())); m_pathLabel2->setToolTip(m_currentActionKey); diff --git a/search-ukcc-plugin/translations/zh_CN.ts b/search-ukcc-plugin/translations/zh_CN.ts index be2c47c..0d2e28d 100644 --- a/search-ukcc-plugin/translations/zh_CN.ts +++ b/search-ukcc-plugin/translations/zh_CN.ts @@ -5,123 +5,123 @@ Search - + Search 搜索 - + Create index 创建索引 /Search/Create index - + Creating index can help you getting results quickly. 开启之后可以快速获取搜索结果 - + Default web searching engine 默认互联网搜索引擎 /Search/Default web searching engine - + baidu 百度 - + sougou 搜狗 - + 360 360 - + Block Folders 排除的文件夹 /Search/Block Folders - + Following folders will not be searched. You can set it by adding and removing folders. 搜索将不查看以下文件夹,通过添加和删除可以设置排除的文件夹位置 - + Choose folder 添加 - + delete 删除 - + Directories 文件夹 - + select blocked folder 选择排除的文件夹 - + Select 选择 - + Position: 位置 - + FileName: 文件名 - + FileType: 类型 - + Cancel 取消 - - - - + + + + Warning 警告 - + Add blocked folder failed, choosen path is empty! 添加失败,选择的路径为空! - + Add blocked folder failed, it is not in home path! 添加失败,添加的路径不在家目录下! - + Add blocked folder failed, its parent dir is exist! 添加失败,父目录已被添加! - + Add blocked folder failed, it has been already blocked! 添加失败,这个文件夹已经被添加过了! diff --git a/translations/libukui-search/libukui-search_zh_CN.ts b/translations/libukui-search/libukui-search_zh_CN.ts index 9652531..e22ad30 100644 --- a/translations/libukui-search/libukui-search_zh_CN.ts +++ b/translations/libukui-search/libukui-search_zh_CN.ts @@ -82,15 +82,19 @@ Dir Search 目录搜索 + + + Directory + 目录 + Dir search. 目录搜索。 - directory - 目录 + 目录 @@ -313,12 +317,12 @@ UkuiSearch::SearchManager - + Path: 路径: - + Modified time: 修改时间: diff --git a/translations/ukui-search/bo.ts b/translations/ukui-search/bo.ts index 7be2c22..7714130 100644 --- a/translations/ukui-search/bo.ts +++ b/translations/ukui-search/bo.ts @@ -58,7 +58,7 @@ - + Global Search diff --git a/translations/ukui-search/tr.ts b/translations/ukui-search/tr.ts index aae28b9..795a520 100644 --- a/translations/ukui-search/tr.ts +++ b/translations/ukui-search/tr.ts @@ -358,7 +358,7 @@ - + Global Search Genel Arama diff --git a/translations/ukui-search/zh_CN.ts b/translations/ukui-search/zh_CN.ts index 6181478..b6d558d 100644 --- a/translations/ukui-search/zh_CN.ts +++ b/translations/ukui-search/zh_CN.ts @@ -120,7 +120,7 @@ 搜索 - + Global Search 搜索