epwing:translation does not work

This commit is contained in:
Xiao YiFang 2023-03-21 00:48:06 +08:00
parent 8cc5c54b78
commit fe6808d07a
2 changed files with 17 additions and 2 deletions

View file

@ -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 = "<p><a class=\"epwing_previous_page\" href=\"gdlookup://localhost/"
+ previousButton.toStdString() + "\">" + QObject::tr( "Previous Page" ).toStdString() + "</a></p>";
+ previousButton.toStdString() + "\">" + tr( "Previous Page" ).toStdString() + "</a></p>";
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 = "<p><a class=\"epwing_next_page\" href=\"gdlookup://localhost/" + refLink.toStdString() + "\">"
+ QObject::tr( "Next Page" ).toStdString() + "</a></p>";
+ tr( "Next Page" ).toStdString() + "</a></p>";
return nextLink;
}

View file

@ -970,6 +970,19 @@ between classic and school orthography in cyrillic)</source>
<translation></translation>
</message>
</context>
<context>
<name>Epwing::EpwingDictionary</name>
<message>
<location filename="../epwing.cc" line="339"/>
<source>Previous Page</source>
<translation></translation>
</message>
<message>
<location filename="../epwing.cc" line="375"/>
<source>Next Page</source>
<translation></translation>
</message>
</context>
<context>
<name>ExternalViewer</name>
<message>