diff --git a/downloadlist.cpp b/downloadlist.cpp
index e575999..560bb28 100644
--- a/downloadlist.cpp
+++ b/downloadlist.cpp
@@ -20,9 +20,9 @@ downloadlist::downloadlist(QWidget *parent) :
ui->pushButton_3->hide();
ui->widget_spinner->start();
ui->widget_spinner->hide();
- action_dpkg->setText("dpkg");
- action_gdebi->setText("gdebi");
- action_deepin->setText("deepin deb installer");
+ action_dpkg->setText(QObject::tr("dpkg"));
+ action_gdebi->setText(QObject::tr("gdebi"));
+ action_deepin->setText(QObject::tr("deepin deb installer"));
connect(action_dpkg,&QAction::triggered,[=](){downloadlist::install(1);});
connect(action_gdebi,&QAction::triggered,[=](){downloadlist::install(0);});
connect(action_deepin,&QAction::triggered,[=](){downloadlist::install(2);});
@@ -51,7 +51,7 @@ void downloadlist::setValue(long long value)
ui->progressBar->setValue(int(value));
ui->label_2->setText(QString::number(double(value)/100)+"% ("+speed+")");
if(ui->label_2->text().left(4)=="100%"){
- ui->label_2->setText("Downloaded,waiting to Install");
+ ui->label_2->setText(QObject::tr("Downloaded,waiting to Install"));
}
}
@@ -77,7 +77,7 @@ void downloadlist::readyInstall()
ui->pushButton_install->show();
ui->pushButton_2->hide();
system("notify-send \""+ui->label->text().toUtf8()+"Download Failed\"" +" --icon=/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
- ui->label_2->setText("Download Failed,Check Your Connection");
+ ui->label_2->setText(QObject::tr("Download Failed,Check Your Connection"));
ui->pushButton_install->setEnabled(false);
return;
@@ -119,7 +119,7 @@ void downloadlist::install(int t)
ui->pushButton_install->hide();
ui->widget_spinner->show();
qDebug()<<"/tmp/spark-store/"+ui->label_filename->text().toUtf8();
- ui->label_2->setText("Installing...");
+ ui->label_2->setText(QObject::tr("Installing..."));
QtConcurrent::run([=](){
QProcess installer;
if(!reinstall){
@@ -166,16 +166,16 @@ void downloadlist::install(int t)
int error=QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if(error==0){
ui->pushButton_install->hide();
- ui->label_2->setText("Finish");
+ ui->label_2->setText(QObject::tr("Finish"));
ui->pushButton_3->show();
}else {
ui->pushButton_install->show();
- ui->pushButton_install->setText("Retry");
- ui->label_2->setText("Error happened in dpkg progress , you can try it again");
+ ui->pushButton_install->setText(QObject::tr("Retry"));
+ ui->label_2->setText(QObject::tr("Error happened in dpkg progress , you can try it again"));
ui->pushButton_3->show();
}
if(notRoot){
- ui->label_2->setText("dpkg progress had been aborted,you can retry installation");
+ ui->label_2->setText(QObject::tr("dpkg progress had been aborted,you can retry installation"));
ui->pushButton_install->show();
ui->pushButton_3->hide();
}
@@ -197,7 +197,7 @@ void downloadlist::on_pushButton_install_clicked()
void downloadlist::on_pushButton_2_clicked()
{
- ui->label_2->setText("Download Canceled");
+ ui->label_2->setText(QObject::tr("Download Canceled"));
ui->pushButton_2->setEnabled(false);
ui->progressBar->hide();
close=true;
diff --git a/icons.qrc b/icons.qrc
index 41e8875..61b9149 100644
--- a/icons.qrc
+++ b/icons.qrc
@@ -55,5 +55,9 @@
tags/community-small.pngtags/deepin-small.pngtags/dtk-small.png
+ tags/uos-small.png
+ tags/community.png
+ tags/ubuntu-small.png
+ tags/ubuntu.png
diff --git a/main.cpp b/main.cpp
index 00785ef..48a0080 100644
--- a/main.cpp
+++ b/main.cpp
@@ -11,23 +11,25 @@ int main(int argc, char *argv[])
DApplication a(argc, argv);
DAboutDialog dialog;
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
- a.loadTranslator();
+ a.loadTranslator();//载入翻译
a.setAboutDialog(&dialog);
- dialog.setLicense("We publish this program under GPL V3");
- dialog.setVersion(DApplication::buildVersion(" Version 2.0+1"));
+ dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
+ dialog.setVersion(DApplication::buildVersion(QObject::tr("Version 2.0+2")));
dialog.setAcknowledgementVisible(true);
- dialog.setAcknowledgementLink("https://gitee.com/deepin-community-store/spark-store");
- a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
+ dialog.setAcknowledgementLink(QObject::tr("https://gitee.com/deepin-community-store/spark-store"));
+ a.setApplicationAcknowledgementPage(QObject::tr("https://gitee.com/deepin-community-store/spark-store"));
dialog.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo
dialog.setProductName(QLabel::tr("Spark Store"));
//dialog.setDescription(QLabel::tr("An appstore powered by deepin community\n We born for change"));
- dialog.setDescription(
+ dialog.setDescription(QObject::tr(
"An appstore powered by deepin community "
"https://www.spark-app.store "
- "Spark developers");
+ "Spark developers"
+ )
+ );
dialog.setProductName(QLabel::tr("Spark Store"));
dialog.setCompanyLogo(QPixmap(":/Logo-Spark.png"));
- dialog.setWebsiteName("The Spark Project");
+ dialog.setWebsiteName(QObject::tr("The Spark Project"));
dialog.setWebsiteLink("https://gitee.com/deepin-community-store");
Widget w;
QDesktopWidget *s=DApplication::desktop();
diff --git a/spark-store.pro b/spark-store.pro
index ef04802..750489b 100644
--- a/spark-store.pro
+++ b/spark-store.pro
@@ -52,3 +52,18 @@ FORMS += \
RESOURCES += \
icons.qrc
+
+DISTFILES += \
+ tags/a2d-small.png \
+ tags/a2d.png \
+ tags/community-small.png \
+ tags/community.png \
+ tags/deepin-small.png \
+ tags/dtk-small.png \
+ tags/ubuntu-small.png \
+ tags/ubuntu.png \
+ tags/uos-small.png \
+ tags/community.svg \
+ tags/deepin.svg \
+ tags/logo_icon.svg \
+ tags/uos.svg
diff --git a/tags/a2d-small.png b/tags/a2d-small.png
index 4bff3a7..e1c9f90 100644
Binary files a/tags/a2d-small.png and b/tags/a2d-small.png differ
diff --git a/tags/community-small.png b/tags/community-small.png
index be4e69e..0791b04 100644
Binary files a/tags/community-small.png and b/tags/community-small.png differ
diff --git a/tags/community.png b/tags/community.png
new file mode 100644
index 0000000..4ff91a7
Binary files /dev/null and b/tags/community.png differ
diff --git a/tags/deepin-small.png b/tags/deepin-small.png
index 710b29e..e4e2c05 100644
Binary files a/tags/deepin-small.png and b/tags/deepin-small.png differ
diff --git a/tags/dtk-small.png b/tags/dtk-small.png
index 5fdd2d6..58fb5d1 100644
Binary files a/tags/dtk-small.png and b/tags/dtk-small.png differ
diff --git a/tags/ubuntu-small.png b/tags/ubuntu-small.png
new file mode 100644
index 0000000..adfb55f
Binary files /dev/null and b/tags/ubuntu-small.png differ
diff --git a/tags/ubuntu.png b/tags/ubuntu.png
new file mode 100644
index 0000000..f05765e
Binary files /dev/null and b/tags/ubuntu.png differ
diff --git a/tags/uos-small.png b/tags/uos-small.png
new file mode 100644
index 0000000..3410bae
Binary files /dev/null and b/tags/uos-small.png differ
diff --git a/trans/lang_Chinses.ts b/trans/lang_Chinses.ts
index ac12508..ccbac24 100644
--- a/trans/lang_Chinses.ts
+++ b/trans/lang_Chinses.ts
@@ -4,15 +4,9 @@
QLabel
-
-
- Spark应用商店
-
-
-
-
- 社区驱动的一款为第三方应用商店,为改变而生
-本程序按GPL第三版开源
+
+
+ Spark Store
@@ -30,27 +24,279 @@
- 视频播放
+ Videos
- 下载列表
+ Download List
- 系统工具
+ Tools
- 主题美化
+ Beautify
- 音乐欣赏
+ Music
+
+
+
+
+ Coding
+
+
+
+
+ Office
+
+
+
+
+ 回到分类
+
+
+
+
+ Translate
+
+
+
+
+ Others
+
+
+
+
+ FrontPage
+
+
+
+
+ Images
+
+
+
+
+ Games
+
+
+
+
+ Chatting
+
+
+
+
+ Network
+
+
+
+
+ 重新加载
+
+
+
+
+ The List is empty now.Go and Download some software!
+
+
+
+
+ Name
+
+
+
+
+ ICON
+
+
+
+
+ Install
+
+
+
+
+ Uninstall
+
+
+
+
+ Site
+
+
+
+
+
+ <html><head/><body><p>This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/community-small.png"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>Capable to Ubuntu 20.04</p></body></html>
+
+
+
+
+ UB
+
+
+
+
+
+ <html><head/><body><p>Capable to deepin 20</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/deepin-small.png"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>Capable to UOS home 20</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/uos.svg"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/dtk-small.png"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.</p></body></html>
+
+
+
+
+ wine
+
+
+
+
+
+ <html><head/><body><p>An Appimage to deb app.</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/a2d-small.png"/></p></body></html>
+
+
+
+
+ Share
+
+
+
+
+ Info
+
+
+
+
+ ScreenShots
+
+
+
+
+ Line Settings
+
+
+
+
+ Choose Line:
+
+
+
+
+ Refresh
+
+
+
+
+ Take effect when restart
+
+
+
+
+ <html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html>
+
+
+
+
+ Update
+
+
+
+
+ Source Server
+
+
+
+
+ Server
+
+
+
+
+ Temp
+
+
+
+
+ Clean
+
+
+
+
+ Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.
+
+
+
+
+ Size:
+
+
+
+
+ Location:/tmp/spark-store
+
+
+
+
+ About us
+
+
+
+
+ <html><head/><body><p>We are <span style=" font-weight:600;">NOT</span> the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the "Spark Store"! ", is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p>We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us <jifengshenmo@outlook.com> we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>QQ group:872690351<br/></p></body></html>
@@ -59,207 +305,35 @@
-
- 编程开发
-
-
-
-
- 办公学习
-
-
-
-
- 阅读翻译
-
-
-
-
- 其他应用
-
-
-
-
- 商店首页
-
-
-
-
- 图形图像
-
-
-
-
- 游戏娱乐
-
-
-
-
- 社交沟通
-
-
-
-
- 网络应用
-
-
-
-
+ about:blank
-
- 当前下载列表为空
-
-
-
-
+ 打开文件夹
-
- 安装
-
-
-
-
- 卸载
-
-
-
-
- 官网
-
-
-
-
- 软件名
-
-
-
-
+ <html><head/><body><p><br/></p></body></html>
-
- 图标
-
-
-
-
- 分享
-
-
-
-
-
-
-
-
-
-
-
+ TextLabel
-
- 详细介绍
-
-
-
-
+ <html><head/><body><p>由社区爱好者开发的软件商店</p></body></html>
-
- 软件截图
-
-
-
-
- 线路设置
-
-
-
-
- 线路选择:
-
-
-
-
- 刷新
-
-
-
-
- 重启商店后生效
-
-
-
-
- <html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html>
-
-
-
-
- 更新源
-
-
-
-
- 更新源服务器:
-
-
-
-
- 服务器
-
-
-
-
- 缓存目录
-
-
-
-
- 清空
-
-
-
-
- 因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。
-
-
-
-
- 目录大小:
-
-
-
-
+ 0B
-
-
- 目录位置:/tmp/spark-store
-
-
-
-
- 关于我们
-
-
-
-
- <html><head/><body><p>我们并不是官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们<jifengshenmo@outlook.com>,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。</p><p>QQ群:872690351<br/></p></body></html>
-
- downloadlist
@@ -280,27 +354,27 @@
- 名称
+ Name
- 等待开始下载
+ Waiting to download
- 安装
+ Install
- 取消
+ Cancel
- 详情
+ Info
diff --git a/trans/lang_English.ts b/trans/lang_English.ts
index 61f749c..039b988 100644
--- a/trans/lang_English.ts
+++ b/trans/lang_English.ts
@@ -4,19 +4,22 @@
QLabel
-
- Spark应用商店
- Spark Store
+ Spark Store
- 社区驱动的一款为第三方应用商店,为改变而生
本程序按GPL第三版开源
- A 3-rd party app store powered by deepin community
+ A 3-rd party app store powered by deepin community
Spark Store is published under GPL V3
We born for change.
+
+
+
+ Spark Store
+
+ Widget
@@ -32,30 +35,302 @@ We born for change.
- 视频播放
- Video Players and Video Makers
- Video
+ Videos
+
- 下载列表
- Download list
+ Download List
+
- 系统工具
- Tools
+ Tools
+
- 主题美化
- Icon theme and other
- Themes
+ Beautify
+
+ Music
+
+
+
+
+ Coding
+
+
+
+
+ Office
+
+
+
+
+ 回到分类
+
+
+
+
+ Translate
+
+
+
+
+ Others
+
+
+
+
+ FrontPage
+
+
+
+
+ Images
+
+
+
+
+ Games
+
+
+
+
+ Chatting
+
+
+
+
+ Network
+
+
+
+
+ 重新加载
+
+
+
+
+ The List is empty now.Go and Download some software!
+
+
+
+
+ Name
+
+
+
+
+ ICON
+
+
+
+
+ Install
+
+
+
+
+ Uninstall
+
+
+
+
+ Site
+
+
+
+
+
+ <html><head/><body><p>This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/community-small.png"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>Capable to Ubuntu 20.04</p></body></html>
+
+
+
+
+ UB
+
+
+
+
+
+ <html><head/><body><p>Capable to deepin 20</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/deepin-small.png"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>Capable to UOS home 20</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/uos.svg"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/dtk-small.png"/></p></body></html>
+
+
+
+
+
+ <html><head/><body><p>A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.</p></body></html>
+
+
+
+
+ wine
+
+
+
+
+
+ <html><head/><body><p>An Appimage to deb app.</p></body></html>
+
+
+
+
+ <html><head/><body><p><img src=":/tags/a2d-small.png"/></p></body></html>
+
+
+
+
+ Share
+
+
+
+
+ Info
+
+
+
+
+ ScreenShots
+
+
+
+
+ Line Settings
+
+
+
+
+ Choose Line:
+
+
+
+
+ Refresh
+
+
+
+
+ Take effect when restart
+
+
+
+
+ <html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html>
+
+
+
+
+ Update
+
+
+
+
+ Source Server
+
+
+
+
+ Server
+
+
+
+
+ Temp
+
+
+
+
+ Clean
+
+
+
+
+ Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.
+
+
+
+
+ Size:
+
+
+
+
+ Location:/tmp/spark-store
+
+
+
+
+ About us
+
+
+
+
+ <html><head/><body><p>We are <span style=" font-weight:600;">NOT</span> the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the "Spark Store"! ", is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p>We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us <jifengshenmo@outlook.com> we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>QQ group:872690351<br/></p></body></html>
+
+
+
+ 视频播放
+ Video Players and Video Makers
+ Video
+
+
+ 下载列表
+ Download list
+
+
+ 系统工具
+ Tools
+
+
+ 主题美化
+ Icon theme and other
+ Themes
+
+ 音乐欣赏
- Music
+ Music
@@ -63,206 +338,166 @@ We born for change.
- 编程开发
- Development
+ Development
- 办公学习
- Office
+ Office
- 阅读翻译
- Translate
+ Translate
- 其他应用
- Others
+ Others
- 商店首页
- Home
+ Home
- 图形图像
- Images
+ Images
- 游戏娱乐
- Games
+ Games
- 社交沟通
- Chat
+ Chat
- 网络应用
- Network
+ Network
-
+ about:blank
- 当前下载列表为空
- The Download list is empty
+ The Download list is empty
-
+ 打开文件夹Open in File Manager
- 安装
- Install
+ Install
- 卸载
- Remove
+ Remove
- 官网
- Site
+ Site
- 软件名
- Name
+ Name
-
+ <html><head/><body><p><br/></p></body></html>
- 图标
- Icon
+ Icon
- 分享
- Share
+ Share
-
-
-
-
-
-
-
-
+ TextLabel
- 详细介绍
- Details
+ Details
-
+ <html><head/><body><p>由社区爱好者开发的软件商店</p></body></html><html><head/><body><p>software store developed by community enthusiasts</p></body></html>
- 软件截图
- Screen Shots
+ Screen Shots
- 线路设置
- Line Settings
+ Line Settings
- 线路选择:
- Choose
+ Choose
- 刷新
- Update
+ Update
- 重启商店后生效
- Restart to take effect
+ Restart to take effect
- <html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html>
- <html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html>
+ <html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html>
- 更新源
- Update APT Source
+ Update APT Source
- 更新源服务器:
- APT Source
+ APT Source
- 服务器
- server
+ server
- 缓存目录
- Temp
+ Temp
- 清空
- Clean
+ Clean
- 因为这个目录位于/tmp下,所以即使你不手动清空的话,其也将在系统重启时自动清空。
- Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.
+ Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.
- 目录大小:
- Size:
+ Size:
-
+ 0B0B
- 目录位置:/tmp/spark-store
- Location:/tmp/spark-store
+ Location:/tmp/spark-store
- 关于我们
- About us
+ About us
- <html><head/><body><p>我们并不是官方团队,和你一样,我们也只是众多Linux/deepin系统爱好者和用户之中的一员,我们开发并且运营这个“Spark应用商店”,是为了让社区的朋友们一起分享好用的软件,或者一起参与开发,让大家都用到最新的,最优秀的软件。</p><p>我们并没有因此盈利,所有开发和维护人员都不会获得报酬,我们的主要支出大部分依赖于社区对我们的捐助,很感谢大家,这部分捐助让我们并不需要耗费太多精力去担心资金问题。</p><p>我们的服务和开发的软件都是免费供给大家使用,交流,学习的,但是在您的使用过程中一定要遵守当地的法律法规,否则出现任何问题和我们无关。</p><p>如果商店中任何一部分有侵犯您权益的行为,请告知我们<jifengshenmo@outlook.com>,我们会第一时间删除侵权内容。</p><p>如果你也想参与我们,不管是参与开发,设计,投递还是投稿作品,我们都欢迎你的加入。</p><p>QQ群:872690351<br/></p></body></html>
- <html><head/><body><p>We are not the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the "Spark Store"! ", is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p> We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us <jifengshenmo@outlook.com> we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>QQ group:872690351<br/></p></body></html>
+ <html><head/><body><p>We are not the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the "Spark Store"! ", is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p> We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us <jifengshenmo@outlook.com> we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p><p>QQ group:872690351<br/></p></body></html>
@@ -284,29 +519,49 @@ We born for change.
- 名称
- Name
+ Name
+
- 等待开始下载
- Wait to download
- Wait to download
+ Waiting to download
+
- 安装
- Install
+ Install
+
- 取消
- Cancel
+ Cancel
+
+ Info
+
+
+
+ 名称
+ Name
+
+
+ 等待开始下载
+ Wait to download
+ Wait to download
+
+
+ 安装
+ Install
+
+
+ 取消
+ Cancel
+
+ 详情
- Detail
+ Detail
-
\ No newline at end of file
+
diff --git a/widget.cpp b/widget.cpp
index 1f50da4..eb579cd 100644
--- a/widget.cpp
+++ b/widget.cpp
@@ -74,7 +74,7 @@ Widget::Widget(DBlurEffectWidget *parent) :
qDebug()<<"Dark";
setTheme(true,main_color);
}else {
- qDebug()<<"White";
+ qDebug()<<"Light";
setTheme(false,main_color);
}
});
@@ -142,15 +142,15 @@ void Widget::initUI()
titlebar=ui->titlebar;
titlebar->setCustomWidget(w_titlebar);
// titlebar->setIcon(QIcon::fromTheme("spark-store"));
- titlebar->setTitle("Spark Store");
- searchEdit->setPlaceholderText("Search or enter spk://");
+ titlebar->setTitle(QObject::tr("Spark Store"));
+ searchEdit->setPlaceholderText(QObject::tr("Search or enter spk://"));
searchEdit->setFixedWidth(300);
titlebar->setSeparatorVisible(false);
// titlebar->setAutoHideOnFullscreen(true);
// 添加菜单项
- QAction *actionSubmission = new QAction("Submit App", this);
- QAction *setting=new QAction("Settings");
+ QAction *actionSubmission = new QAction(QObject::tr("Submit App"), this);
+ QAction *setting=new QAction(QObject::tr("Settings"));
QMenu *menu=new QMenu;
@@ -242,7 +242,7 @@ void Widget::initConfig()
if(aptserver.isOpen()){
ui->label_aptserver->setText(aptserver.readAll());
}else {
- ui->label_aptserver->setText("不存在");
+ ui->label_aptserver->setText(QObject::tr("Not Exist"));
}
aptserver.close();
@@ -487,20 +487,20 @@ int Widget::loadappinfo(QUrl arg1)
ui->label_show->show();
// 软件信息加载
QString info;
- info= "PkgName: "+json["Pkgname"].toString()+"\n";
- info+="Version: "+json["Version"].toString()+"\n";
+ info= QObject::tr("PkgName: ")+json["Pkgname"].toString()+"\n";
+ info+=QObject::tr("Version: ")+json["Version"].toString()+"\n";
if(json["Author"].toString()!="" && json["Author"].toString()!=" "){
- info+="Author: "+json["Author"].toString()+"\n";
+ info+=QObject::tr("Author: ")+json["Author"].toString()+"\n";
}
if(json["Website"].toString()!="" && json["Website"].toString()!=" "){
- info+="Official Site: "+json["Website"].toString()+"\n";
+ info+=QObject::tr("Official Site: ")+json["Website"].toString()+"\n";
ui->pushButton_website->show();
appweb=json["Website"].toString();
}
- info+="Contributor: "+json["Contributor"].toString()+"\n";
- info+="Update Time: "+json["Update"].toString()+"\n";
- info+="Installed Size: "+json["Size"].toString()+"\n";
+ info+=QObject::tr("Contributor: ")+json["Contributor"].toString()+"\n";
+ info+=QObject::tr("Update Time: ")+json["Update"].toString()+"\n";
+ info+=QObject::tr("Installed Size: ")+json["Size"].toString()+"\n";
ui->label_info->setText(info);
ui->label_more->setText(json["More"].toString());
QProcess isInstall;
@@ -509,11 +509,11 @@ int Widget::loadappinfo(QUrl arg1)
isInstall.waitForFinished();
int error=QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if(error==0){
- ui->pushButton_download->setText("Reinstall");
+ ui->pushButton_download->setText(QObject::tr("Reinstall"));
ui->pushButton_uninstall->show();
}else {
- ui->pushButton_download->setText("Install");
+ ui->pushButton_download->setText(QObject::tr("Install"));
}
//tag加载
QString tags=json["Tags"].toString();
@@ -545,7 +545,7 @@ int Widget::loadappinfo(QUrl arg1)
ui->pushButton_download->setEnabled(true);
}
else
- system("notify-send Failed to load App icon --icon=spark-store");
+ system("notify-send Failed to load App icon --icon=spark-store");//这一句怎么翻译?
// 截图展示加载
@@ -591,7 +591,7 @@ void Widget::on_pushButton_download_clicked()
download_list[allDownload-1].pkgName=pkgName;
if(fileName.isEmpty())
{
- system("notify-send Failed to get file name --icon=spark-store");
+ system("notify-send Failed to get file name --icon=spark-store");//??这玩意怎么翻译
return;
}
download_list[allDownload-1].setParent(ui->listWidget);
@@ -616,7 +616,7 @@ void Widget::on_pushButton_download_clicked()
nowDownload+=1;
startRequest(urList.at(nowDownload-1)); // 进行链接请求
}
- if(ui->pushButton_download->text()=="Reinstall"){
+ if(ui->pushButton_download->text()==QObject::tr("Reinstall")){
download_list[allDownload-1].reinstall=true;
}
}
@@ -640,7 +640,7 @@ void Widget::searchApp(QString text)
openUrl(text);
}else {
system("notify-send The store can only process spk:// url now.Please look forward to later version! --icon=spark-store");
- // ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text));
+ // ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text));//这东西对接百度
// ui->stackedWidget->setCurrentIndex(0);
}
}
@@ -759,7 +759,7 @@ void Widget::on_pushButton_updateApt_clicked()
{
QtConcurrent::run([=](){
ui->pushButton_updateApt->setEnabled(false);
- ui->label_aptserver->setText("Updating,PLease wait");
+ ui->label_aptserver->setText(QObject::tr("Updating,PLease wait"));
std::fstream sourcesList;
QDir tmpdir("/tmp");
tmpdir.mkpath("spark-store");
@@ -788,10 +788,10 @@ void Widget::on_pushButton_updateApt_clicked()
if(!haveError){
ui->label_aptserver->setText("deb [by-hash=force] "+ui->comboBox_server->currentText().toUtf8()+" /");
}else {
- ui->label_aptserver->setText("更新中发生错误,请在终端使用apt update来查看错误原因");
+ ui->label_aptserver->setText(QObject::tr("An error occured during the apt process.Please use apt update in terminal to locate problem"));
}
}else {
- ui->label_aptserver->setText("服务器错误");
+ ui->label_aptserver->setText(QObject::tr("Unknwon server error!"));
}
ui->pushButton_updateApt->setEnabled(true);
@@ -807,11 +807,11 @@ void Widget::on_pushButton_uninstall_clicked()
uninstall.start("pkexec apt purge -y "+pkgName);
uninstall.waitForFinished();
ui->pushButton_download->setEnabled(true);
- ui->pushButton_download->setText("安装");
+ ui->pushButton_download->setText("Install");
ui->pushButton_uninstall->hide();
ui->pushButton_uninstall->setEnabled(true);
updatesEnabled();
- system("notify-send 卸载完成 --icon=spark-store");
+ system("notify-send Uninstall Successed --icon=spark-store");
});
}
@@ -825,7 +825,7 @@ void Widget::on_pushButton_clear_clicked() // 清空临时缓存目录
for (int i=0;ipushButton_clear->setEnabled(true);
Widget::opensetting();
});
@@ -891,7 +891,7 @@ void Widget::on_pushButton_clicked()
share_url="spk://store/"+type_name+"/"+pkgName;
qDebug()<<"Share"<setText(share_url);
}
@@ -942,7 +942,7 @@ void Widget::on_webEngineView_urlChanged(const QUrl &arg1)
//此处不应通知用户
break;
case 2: // curl下载app.json失败
- system("notify-send 应用程序详细信息下载失败,请检查网络连接 --icon=spark-store");
+ system("notify-send Failed to get app info,Please Check your connection to Internet --icon=spark-store");
break;
}
}
diff --git a/widget.ui b/widget.ui
index 0be839e..f5341b2 100644
--- a/widget.ui
+++ b/widget.ui
@@ -724,7 +724,7 @@
<html><head/><body><p>Capable to Ubuntu 20.04</p></body></html>
- UB
+ <html><head/><body><p><img src=":/tags/ubuntu-small.png"/></p></body></html>
@@ -762,7 +762,7 @@
<html><head/><body><p>Capable to UOS home 20</p></body></html>
- <html><head/><body><p><img src=":/tags/uos.svg"/></p></body></html>
+ <html><head/><body><p><img src=":/tags/uos-small.png"/></p></body></html>
@@ -1066,8 +1066,8 @@
00
- 903
- 852
+ 738
+ 896