i18n: 更新部分文案及翻译文件

修改详情页“下载”按钮为“下载并安装”;修正部分文案中错误使用全角标点符号导致翻译文件中无法正常显示;修正部分文案翻译错误;尝试补充 QWebEngineView 右键菜单项翻译

Log: 修改详情页“下载”按钮为“下载并安装”;修正部分文案及翻译;补充 QWebEngineView 部分右键菜单项翻译
This commit is contained in:
zty199
2023-10-10 16:10:38 +08:00
parent fb21620880
commit a7d86d9120
17 changed files with 412 additions and 84 deletions

View File

@@ -234,9 +234,9 @@ void DownloadItem::slotAsyncInstall(int t)
if (notRoot)
{
Utils::sendNotification("spark-store", tr("Spark Store"), tr("dpkg progress had been abortedplease check the install info or try to reinstall."));
ui->label_2->setText(tr("dpkg progress had been abortedplease check the install info or try to reinstall."));
ui->label_2->setToolTip(tr("dpkg progress had been abortedplease check the install info or try to reinstall."));
Utils::sendNotification("spark-store", tr("Spark Store"), tr("dpkg progress had been aborted, please check the install info or try to reinstall."));
ui->label_2->setText(tr("dpkg progress had been aborted, please check the install info or try to reinstall."));
ui->label_2->setToolTip(tr("dpkg progress had been aborted, please check the install info or try to reinstall."));
ui->pushButton_install->show();
ui->pushButton_3->hide();
}

View File

@@ -7,20 +7,7 @@
WebEnginePage::WebEnginePage(QObject *parent)
: QWebEnginePage(parent)
{
QLocale ql;
switch (ql.language())
{
case QLocale::Chinese:
{
// 系统语言是中文,获取网页为中文 @momen @uniartisan
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
qDebug() << profile->httpAcceptLanguage();
profile->setHttpAcceptLanguage("zh-CN,zh;q=0.8,en;q=0.6");
}
break;
default:
break;
}
initHttpAcceptLanguage();
}
WebEnginePage::~WebEnginePage()
@@ -47,6 +34,18 @@ QWebEnginePage *WebEnginePage::createWindow(QWebEnginePage::WebWindowType type)
return page;
}
void WebEnginePage::initHttpAcceptLanguage()
{
switch (QLocale::system().language()) {
case QLocale::Chinese: {
// 系统语言是中文,获取网页为中文 @momen @uniartisan
profile()->setHttpAcceptLanguage("zh-CN,zh;q=0.8,en;q=0.6");
} break;
default:
break;
}
}
void WebEnginePage::slotUrlChanged(const QUrl &url)
{
if (m_currentUrl == url)

View File

@@ -16,6 +16,9 @@ public:
protected:
QWebEnginePage *createWindow(WebWindowType type) override;
private:
void initHttpAcceptLanguage();
private slots:
void slotUrlChanged(const QUrl &url);

View File

@@ -1,8 +1,6 @@
#include "webengineview.h"
#include "webenginepage.h"
#include <QDesktopServices>
WebEngineView::WebEngineView(QWidget *parent)
: QWebEngineView(parent)
{