mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
Changed the path for the external translations to "data dir/translations".
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5670 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
85070b1b66
commit
a0162ced8f
7 changed files with 17 additions and 11 deletions
|
@ -98,7 +98,7 @@ std::string LinksCloudPlugin::getPluginName() const
|
|||
return QApplication::translate("LinksCloudPlugin", "LinksCloud").toUtf8().constData();
|
||||
}
|
||||
|
||||
QTranslator* LinksCloudPlugin::qt_translator(QApplication */*app*/, const QString& languageCode) const
|
||||
QTranslator* LinksCloudPlugin::qt_translator(QApplication */*app*/, const QString& languageCode, const QString& externalDir) const
|
||||
{
|
||||
if (languageCode == "en") {
|
||||
return NULL;
|
||||
|
@ -106,7 +106,7 @@ QTranslator* LinksCloudPlugin::qt_translator(QApplication */*app*/, const QStrin
|
|||
|
||||
QTranslator* translator = new QTranslator();
|
||||
|
||||
if (translator->load(QCoreApplication::applicationDirPath() + "/translations/LinksCloud_" + languageCode + ".qm")) {
|
||||
if (translator->load(externalDir + "/LinksCloud_" + languageCode + ".qm")) {
|
||||
return translator;
|
||||
} else if (translator->load(":/lang/LinksCloud_" + languageCode + ".qm")) {
|
||||
return translator;
|
||||
|
|
|
@ -14,7 +14,7 @@ class LinksCloudPlugin: public RsPlugin
|
|||
virtual MainPage *qt_page() const ;
|
||||
virtual QIcon *qt_icon() const ;
|
||||
virtual uint16_t rs_service_id() const { return RS_SERVICE_TYPE_RANK ; }
|
||||
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode) const;
|
||||
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const;
|
||||
|
||||
virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const ;
|
||||
virtual void setPlugInHandler(RsPluginHandler *pgHandler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue