forked from openkylin/ukui-search
Add return message when block an directory which is not in user directory;
Update translations.
This commit is contained in:
parent
53882a08ee
commit
deb148f297
|
@ -1,3 +1,9 @@
|
|||
ukui-search (0.0.1+0126) v101; urgency=medium
|
||||
|
||||
* Bugs Fixed.
|
||||
|
||||
-- zhangpengfei <zhangpengfei@kylinos.cn> Tue, 26 Jan 2021 19:07:13 +0800
|
||||
|
||||
ukui-search (0.0.1+0123) v101; urgency=medium
|
||||
|
||||
* Bugs Fixed.
|
||||
|
|
|
@ -84,9 +84,20 @@ bool GlobalSettings::setBlockDirs(const QString &path, QString &returnMessage, b
|
|||
{
|
||||
if(remove)
|
||||
{
|
||||
if(path.isEmpty())
|
||||
{
|
||||
returnMessage = QString(tr("I can't remove an empty path string!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
m_block_dirs_settings->remove(path);
|
||||
return true;
|
||||
}
|
||||
if(!path.startsWith("/home"))
|
||||
{
|
||||
returnMessage = QString(tr("I can only search your user directory, it doesn't make any sense if you block an directory which is not in user directory!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
//why QSetting's key can't start with "/"??
|
||||
QString pathKey = path.right(path.length()-1);
|
||||
|
@ -96,7 +107,7 @@ bool GlobalSettings::setBlockDirs(const QString &path, QString &returnMessage, b
|
|||
{
|
||||
if(pathKey.startsWith(i))
|
||||
{
|
||||
returnMessage = QString(tr("Parent folder has been blocked!"));
|
||||
returnMessage = QString(tr("My parent folder has been blocked!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,18 @@
|
|||
<context>
|
||||
<name>GlobalSettings</name>
|
||||
<message>
|
||||
<location filename="../../libsearch/global-settings.cpp" line="99"/>
|
||||
<source>Parent folder has been blocked!</source>
|
||||
<location filename="../../libsearch/global-settings.cpp" line="89"/>
|
||||
<source>I can't remove an empty path string!</source>
|
||||
<translation>传入参数不能为空!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libsearch/global-settings.cpp" line="98"/>
|
||||
<source>I can only search your user directory, it doesn't make any sense if you block an directory which is not in user directory!</source>
|
||||
<translation>搜索只会搜索用户目录下的文件,屏蔽不在用户目录下的路径是没有意义的!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../libsearch/global-settings.cpp" line="110"/>
|
||||
<source>My parent folder has been blocked!</source>
|
||||
<translation>我的父文件夹已经被屏蔽了!</translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="325"/>
|
||||
<location filename="../../src/content-widget.cpp" line="307"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="351"/>
|
||||
<location filename="../../src/content-widget.cpp" line="333"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="352"/>
|
||||
<location filename="../../src/content-widget.cpp" line="334"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="588"/>
|
||||
<location filename="../../src/content-widget.cpp" line="576"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="590"/>
|
||||
<location filename="../../src/content-widget.cpp" line="578"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="592"/>
|
||||
<location filename="../../src/content-widget.cpp" line="580"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="594"/>
|
||||
<location filename="../../src/content-widget.cpp" line="582"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="596"/>
|
||||
<location filename="../../src/content-widget.cpp" line="584"/>
|
||||
<source>File Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="598"/>
|
||||
<location filename="../../src/content-widget.cpp" line="586"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="600"/>
|
||||
<location filename="../../src/content-widget.cpp" line="588"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="163"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="164"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -210,11 +210,6 @@
|
|||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="340"/>
|
||||
<source>Parent folder has been blocked!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="265"/>
|
||||
<source>Creating ...</source>
|
||||
|
@ -264,33 +259,34 @@
|
|||
<context>
|
||||
<name>ShowMoreLabel</name>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="22"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="51"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="20"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="28"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="58"/>
|
||||
<source>Show More...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="49"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="56"/>
|
||||
<source>Retract</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="60"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="67"/>
|
||||
<source>Loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="65"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="72"/>
|
||||
<source>Loading.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="70"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="77"/>
|
||||
<source>Loading..</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="75"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="82"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="325"/>
|
||||
<location filename="../../src/content-widget.cpp" line="307"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="351"/>
|
||||
<location filename="../../src/content-widget.cpp" line="333"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="352"/>
|
||||
<location filename="../../src/content-widget.cpp" line="334"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="588"/>
|
||||
<location filename="../../src/content-widget.cpp" line="576"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="590"/>
|
||||
<location filename="../../src/content-widget.cpp" line="578"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="592"/>
|
||||
<location filename="../../src/content-widget.cpp" line="580"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="594"/>
|
||||
<location filename="../../src/content-widget.cpp" line="582"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="596"/>
|
||||
<location filename="../../src/content-widget.cpp" line="584"/>
|
||||
<source>File Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="598"/>
|
||||
<location filename="../../src/content-widget.cpp" line="586"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="600"/>
|
||||
<location filename="../../src/content-widget.cpp" line="588"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="163"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="164"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -210,11 +210,6 @@
|
|||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="340"/>
|
||||
<source>Parent folder has been blocked!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="265"/>
|
||||
<source>Creating ...</source>
|
||||
|
@ -264,33 +259,34 @@
|
|||
<context>
|
||||
<name>ShowMoreLabel</name>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="22"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="51"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="20"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="28"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="58"/>
|
||||
<source>Show More...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="49"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="56"/>
|
||||
<source>Retract</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="60"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="67"/>
|
||||
<source>Loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="65"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="72"/>
|
||||
<source>Loading.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="70"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="77"/>
|
||||
<source>Loading..</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="75"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="82"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="325"/>
|
||||
<location filename="../../src/content-widget.cpp" line="307"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation>最近</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="351"/>
|
||||
<location filename="../../src/content-widget.cpp" line="333"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation>快速</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="352"/>
|
||||
<location filename="../../src/content-widget.cpp" line="334"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation>常用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="588"/>
|
||||
<location filename="../../src/content-widget.cpp" line="576"/>
|
||||
<source>Apps</source>
|
||||
<translation>应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="590"/>
|
||||
<location filename="../../src/content-widget.cpp" line="578"/>
|
||||
<source>Settings</source>
|
||||
<translation>配置项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="592"/>
|
||||
<location filename="../../src/content-widget.cpp" line="580"/>
|
||||
<source>Files</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="594"/>
|
||||
<location filename="../../src/content-widget.cpp" line="582"/>
|
||||
<source>Dirs</source>
|
||||
<translation>文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="596"/>
|
||||
<location filename="../../src/content-widget.cpp" line="584"/>
|
||||
<source>File Contents</source>
|
||||
<translation>文件内容</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="598"/>
|
||||
<location filename="../../src/content-widget.cpp" line="586"/>
|
||||
<source>Best Matches</source>
|
||||
<translation>最佳匹配</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="600"/>
|
||||
<location filename="../../src/content-widget.cpp" line="588"/>
|
||||
<source>Unknown</source>
|
||||
<translation>未知</translation>
|
||||
</message>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="163"/>
|
||||
<location filename="../../src/mainwindow.cpp" line="164"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
|
@ -211,9 +211,8 @@
|
|||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="340"/>
|
||||
<source>Parent folder has been blocked!</source>
|
||||
<translation>12345</translation>
|
||||
<translation type="vanished">12345</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm</source>
|
||||
|
@ -268,33 +267,34 @@
|
|||
<context>
|
||||
<name>ShowMoreLabel</name>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="22"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="51"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="20"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="28"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="58"/>
|
||||
<source>Show More...</source>
|
||||
<translation>显示更多...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="49"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="56"/>
|
||||
<source>Retract</source>
|
||||
<translation><u>收起<</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="60"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="67"/>
|
||||
<source>Loading</source>
|
||||
<translation>加载中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="65"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="72"/>
|
||||
<source>Loading.</source>
|
||||
<translation>加载中.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="70"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="77"/>
|
||||
<source>Loading..</source>
|
||||
<translation>加载中..</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="75"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="82"/>
|
||||
<source>Loading...</source>
|
||||
<translation>加载中...</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue