From fe6808d07af5f2a06a538d9900ab6969329f5b1b Mon Sep 17 00:00:00 2001
From: Xiao YiFang
Date: Tue, 21 Mar 2023 00:48:06 +0800
Subject: [PATCH] epwing:translation does not work
---
epwing.cc | 6 ++++--
locale/zh_CN.ts | 13 +++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/epwing.cc b/epwing.cc
index bcb3f448..61ad3b4c 100644
--- a/epwing.cc
+++ b/epwing.cc
@@ -83,6 +83,8 @@ bool indexIsOldOrBad( string const & indexFile )
class EpwingDictionary: public BtreeIndexing::BtreeDictionary
{
+ Q_DECLARE_TR_FUNCTIONS(Epwing::EpwingDictionary)
+
Mutex idxMutex;
File::Class idx;
IdxHeader idxHeader;
@@ -334,7 +336,7 @@ string Epwing::EpwingDictionary::epwing_previous_button(int& articlePage, int& a
{
QString previousButton = QString( "p%1At%2" ).arg( articlePage ).arg( articleOffset );
string previousLink = "" + QObject::tr( "Previous Page" ).toStdString() + "
";
+ + previousButton.toStdString() + "\">" + tr( "Previous Page" ).toStdString() + "
";
return previousLink;
}
@@ -370,7 +372,7 @@ string Epwing::EpwingDictionary::epwing_next_button(int& articlePage, int& artic
{
QString refLink = QString( "r%1At%2" ).arg( articlePage ).arg( articleOffset );
string nextLink = ""
- + QObject::tr( "Next Page" ).toStdString() + "
";
+ + tr( "Next Page" ).toStdString() + "";
return nextLink;
}
diff --git a/locale/zh_CN.ts b/locale/zh_CN.ts
index 663709a1..9a1474a1 100644
--- a/locale/zh_CN.ts
+++ b/locale/zh_CN.ts
@@ -970,6 +970,19 @@ between classic and school orthography in cyrillic)
某些词典文件的所在目录已变更,是否接受变更?
+
+ Epwing::EpwingDictionary
+
+
+
+ 上一页
+
+
+
+
+ 下一页
+
+
ExternalViewer