mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 06:32:55 -04:00
Added translation for plugins and added german language to LinksCloud. Recompile needed.
Changed the name and the description of the plugin to utf8. Fixed german language. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4672 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4d9727f47a
commit
8fc1a46ee7
19 changed files with 411 additions and 346 deletions
|
@ -3,4 +3,5 @@ TEMPLATE = subdirs
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
libbitdht/src/libbitdht.pro \
|
libbitdht/src/libbitdht.pro \
|
||||||
libretroshare/src/libretroshare.pro \
|
libretroshare/src/libretroshare.pro \
|
||||||
retroshare-gui/src/RetroShare.pro
|
retroshare-gui/src/RetroShare.pro \
|
||||||
|
plugins/plugins.pro
|
||||||
|
|
|
@ -41,6 +41,8 @@ class MainPage ;
|
||||||
class QIcon ;
|
class QIcon ;
|
||||||
class QString ;
|
class QString ;
|
||||||
class QWidget ;
|
class QWidget ;
|
||||||
|
class QTranslator;
|
||||||
|
class QApplication;
|
||||||
class RsCacheService ;
|
class RsCacheService ;
|
||||||
class ftServer ;
|
class ftServer ;
|
||||||
class pqiService ;
|
class pqiService ;
|
||||||
|
@ -81,6 +83,7 @@ class RsPlugin
|
||||||
virtual MainPage *qt_page() const { return NULL ; }
|
virtual MainPage *qt_page() const { return NULL ; }
|
||||||
virtual QWidget *qt_config_panel() const { return NULL ; }
|
virtual QWidget *qt_config_panel() const { return NULL ; }
|
||||||
virtual QIcon *qt_icon() const { return NULL ; }
|
virtual QIcon *qt_icon() const { return NULL ; }
|
||||||
|
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode) const { return NULL ; }
|
||||||
|
|
||||||
virtual std::string configurationFileName() const { return std::string() ; }
|
virtual std::string configurationFileName() const { return std::string() ; }
|
||||||
virtual std::string getShortPluginDescription() const = 0 ;
|
virtual std::string getShortPluginDescription() const = 0 ;
|
||||||
|
|
|
@ -18,7 +18,7 @@ win32 {
|
||||||
|
|
||||||
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||||
DEFINES *= MINIUPNPC_VERSION=13
|
DEFINES *= MINIUPNPC_VERSION=13
|
||||||
DESTDIR = lib
|
# DESTDIR = lib
|
||||||
|
|
||||||
# Switch off optimization for release version
|
# Switch off optimization for release version
|
||||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||||
|
|
|
@ -55,7 +55,7 @@ AddLinksDialog::AddLinksDialog(QString url, QWidget *parent)
|
||||||
// if(link.valid() && link.type() == RetroShareLink::TYPE_FILE)
|
// if(link.valid() && link.type() == RetroShareLink::TYPE_FILE)
|
||||||
// ui.titleLineEdit->setText(link.name());
|
// ui.titleLineEdit->setText(link.name());
|
||||||
// else
|
// else
|
||||||
ui.titleLineEdit->setText("New File");
|
ui.titleLineEdit->setText(tr("New Link"));
|
||||||
|
|
||||||
load();
|
load();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
!include("../Common/retroshare_plugin.pri"): error("Could not include file ../Common/retroshare_plugin.pri")
|
!include("../Common/retroshare_plugin.pri"): error("Could not include file ../Common/retroshare_plugin.pri")
|
||||||
|
|
||||||
CONFIG += qt uic qrc release resources
|
CONFIG += qt uic qrc resources
|
||||||
|
|
||||||
SOURCES = p3ranking.cc LinksDialog.cpp rsrankitems.cc AddLinksDialog.cpp LinksCloudPlugin.cpp
|
SOURCES = p3ranking.cc LinksDialog.cpp rsrankitems.cc AddLinksDialog.cpp LinksCloudPlugin.cpp
|
||||||
HEADERS = rsrank.h p3ranking.h LinksDialog.h rsrankitems.h AddLinksDialog.h LinksCloudPlugin.h
|
HEADERS = rsrank.h p3ranking.h LinksDialog.h rsrankitems.h AddLinksDialog.h LinksCloudPlugin.h
|
||||||
|
@ -8,4 +8,4 @@ FORMS = LinksDialog.ui AddLinksDialog.ui
|
||||||
|
|
||||||
TARGET = LinksCloud
|
TARGET = LinksCloud
|
||||||
|
|
||||||
RESOURCES = linksCloud_images.qrc
|
RESOURCES = linksCloud_images.qrc lang/lang.qrc
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <retroshare/rsplugin.h>
|
#include <retroshare/rsplugin.h>
|
||||||
|
#include <QTranslator>
|
||||||
|
|
||||||
#include "LinksCloudPlugin.h"
|
#include "LinksCloudPlugin.h"
|
||||||
#include "LinksDialog.h"
|
#include "LinksDialog.h"
|
||||||
|
@ -77,7 +78,25 @@ QIcon *LinksCloudPlugin::qt_icon() const
|
||||||
|
|
||||||
std::string LinksCloudPlugin::getShortPluginDescription() const
|
std::string LinksCloudPlugin::getShortPluginDescription() const
|
||||||
{
|
{
|
||||||
return "This plugin provides a set of cached links, and a voting system to promote them." ;
|
return QApplication::translate("LinksCloudPlugin", "This plugin provides a set of cached links, and a voting system to promote them.").toUtf8().constData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string LinksCloudPlugin::getPluginName() const
|
||||||
|
{
|
||||||
|
return QApplication::translate("LinksCloudPlugin", "LinksCloud").toUtf8().constData();
|
||||||
|
}
|
||||||
|
|
||||||
|
QTranslator* LinksCloudPlugin::qt_translator(QApplication *app, const QString& languageCode) const
|
||||||
|
{
|
||||||
|
if (languageCode == "en") {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTranslator* translator = new QTranslator(app);
|
||||||
|
if (translator->load(":/lang/LinksCloud_" + languageCode + ".qm")) {
|
||||||
|
return translator;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete(translator);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ class LinksCloudPlugin: public RsPlugin
|
||||||
virtual MainPage *qt_page() const ;
|
virtual MainPage *qt_page() const ;
|
||||||
virtual QIcon *qt_icon() const ;
|
virtual QIcon *qt_icon() const ;
|
||||||
virtual uint16_t rs_service_id() const { return RS_SERVICE_TYPE_RANK ; }
|
virtual uint16_t rs_service_id() const { return RS_SERVICE_TYPE_RANK ; }
|
||||||
|
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode) const;
|
||||||
|
|
||||||
virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const ;
|
virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const ;
|
||||||
virtual void setPlugInHandler(RsPluginHandler *pgHandler);
|
virtual void setPlugInHandler(RsPluginHandler *pgHandler);
|
||||||
|
@ -21,14 +22,14 @@ class LinksCloudPlugin: public RsPlugin
|
||||||
virtual std::string configurationFileName() const { return std::string() ; }
|
virtual std::string configurationFileName() const { return std::string() ; }
|
||||||
|
|
||||||
virtual std::string getShortPluginDescription() const ;
|
virtual std::string getShortPluginDescription() const ;
|
||||||
virtual std::string getPluginName() const { return "LinksCloud" ; }
|
virtual std::string getPluginName() const;
|
||||||
virtual void setInterfaces(RsPlugInInterfaces& interfaces);
|
virtual void setInterfaces(RsPlugInInterfaces& interfaces);
|
||||||
private:
|
private:
|
||||||
mutable p3Ranking *mRanking ;
|
mutable p3Ranking *mRanking ;
|
||||||
mutable RsPluginHandler *mPlugInHandler;
|
mutable RsPluginHandler *mPlugInHandler;
|
||||||
mutable RsFiles* mFiles;
|
mutable RsFiles* mFiles;
|
||||||
mutable RsPeers* mPeers;
|
mutable RsPeers* mPeers;
|
||||||
mutable MainPage *mainpage ;
|
mutable MainPage* mainpage ;
|
||||||
mutable QIcon *mIcon ;
|
mutable QIcon* mIcon ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
calendar_plugin puzzle_plugin qcheckers_plugin qdiagram_plugin
|
calendar_plugin puzzle_plugin qcheckers_plugin qdiagram_plugin LinksCloud
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||||
icon = QIcon(":images/extension_48.png") ;
|
icon = QIcon(":images/extension_48.png") ;
|
||||||
|
|
||||||
std::cerr << " Addign widget page for plugin " << rsPlugins->plugin(i)->getPluginName() << std::endl;
|
std::cerr << " Addign widget page for plugin " << rsPlugins->plugin(i)->getPluginName() << std::endl;
|
||||||
ui.stackPages->add(rsPlugins->plugin(i)->qt_page(), createPageAction(icon, QString::fromStdString(rsPlugins->plugin(i)->getPluginName()), grp));
|
ui.stackPages->add(rsPlugins->plugin(i)->qt_page(), createPageAction(icon, QString::fromUtf8(rsPlugins->plugin(i)->getPluginName().c_str()), grp));
|
||||||
}
|
}
|
||||||
else if(rsPlugins->plugin(i) == NULL)
|
else if(rsPlugins->plugin(i) == NULL)
|
||||||
std::cerr << " No plugin object !" << std::endl;
|
std::cerr << " No plugin object !" << std::endl;
|
||||||
|
|
|
@ -10,9 +10,6 @@
|
||||||
<height>185</height>
|
<height>185</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
|
@ -157,7 +154,7 @@ border-radius: 0px}</string>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -170,7 +167,7 @@ border-radius: 0px}</string>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -183,7 +180,7 @@ border-radius: 0px}</string>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -273,8 +270,6 @@ border-radius: 0px}</string>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../images.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -78,8 +78,8 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
|
||||||
if(plugin->qt_icon() != NULL)
|
if(plugin->qt_icon() != NULL)
|
||||||
plugin_icon = *plugin->qt_icon() ;
|
plugin_icon = *plugin->qt_icon() ;
|
||||||
|
|
||||||
pluginTitle = QString::fromStdString(plugin->getPluginName()) ;
|
pluginTitle = QString::fromUtf8(plugin->getPluginName().c_str()) ;
|
||||||
pluginDescription = QString::fromStdString(plugin->getShortPluginDescription()) ;
|
pluginDescription = QString::fromUtf8(plugin->getShortPluginDescription().c_str()) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginItem *item = new PluginItem(i,pluginTitle,pluginDescription,status_string,
|
PluginItem *item = new PluginItem(i,pluginTitle,pluginDescription,status_string,
|
||||||
|
@ -107,6 +107,9 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
|
||||||
text += "<b>"+QString::fromStdString(dirs[i]) + "</b><br>" ;
|
text += "<b>"+QString::fromStdString(dirs[i]) + "</b><br>" ;
|
||||||
|
|
||||||
ui._lookupDirectories_TB->setHtml(text) ;
|
ui._lookupDirectories_TB->setHtml(text) ;
|
||||||
|
|
||||||
|
// todo
|
||||||
|
ui.enableAll->setEnabled(false);
|
||||||
}
|
}
|
||||||
void PluginsPage::configurePlugin(int i)
|
void PluginsPage::configurePlugin(int i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -540,7 +540,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="enableAll">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Authorize all plugins</string>
|
<string>Authorize all plugins</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -24,9 +24,11 @@
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
#include <rshare.h>
|
#include <rshare.h>
|
||||||
|
#include <retroshare/rsplugin.h>
|
||||||
|
|
||||||
#include "languagesupport.h"
|
#include "languagesupport.h"
|
||||||
|
|
||||||
|
static QMap<RsPlugin*, QTranslator*> translatorPlugins;
|
||||||
|
|
||||||
/** Initializes the list of available languages. */
|
/** Initializes the list of available languages. */
|
||||||
QMap<QString, QString>
|
QMap<QString, QString>
|
||||||
|
@ -117,6 +119,19 @@ LanguageSupport::isRightToLeft(const QString &languageCode)
|
||||||
|| !languageCode.compare("fa", Qt::CaseInsensitive)
|
|| !languageCode.compare("fa", Qt::CaseInsensitive)
|
||||||
|| !languageCode.compare("he", Qt::CaseInsensitive));
|
|| !languageCode.compare("he", Qt::CaseInsensitive));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void removePluginTranslation()
|
||||||
|
{
|
||||||
|
QMap<RsPlugin*, QTranslator*>::iterator it;
|
||||||
|
for (it = translatorPlugins.begin(); it != translatorPlugins.end(); ++it) {
|
||||||
|
if (it.value()) {
|
||||||
|
QApplication::removeTranslator(it.value());
|
||||||
|
delete(it.value());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translatorPlugins.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/** Sets the application's translator to the specified language. */
|
/** Sets the application's translator to the specified language. */
|
||||||
bool
|
bool
|
||||||
LanguageSupport::translate(const QString &languageCode)
|
LanguageSupport::translate(const QString &languageCode)
|
||||||
|
@ -130,6 +145,8 @@ LanguageSupport::translate(const QString &languageCode)
|
||||||
QApplication::removeTranslator(retroshareTranslator);
|
QApplication::removeTranslator(retroshareTranslator);
|
||||||
delete(retroshareTranslator);
|
delete(retroshareTranslator);
|
||||||
retroshareTranslator = NULL;
|
retroshareTranslator = NULL;
|
||||||
|
|
||||||
|
removePluginTranslation();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (languageCode == "en")
|
if (languageCode == "en")
|
||||||
|
@ -156,11 +173,40 @@ LanguageSupport::translate(const QString &languageCode)
|
||||||
retroshareTranslator = new QTranslator(rApp);
|
retroshareTranslator = new QTranslator(rApp);
|
||||||
Q_CHECK_PTR(retroshareTranslator);
|
Q_CHECK_PTR(retroshareTranslator);
|
||||||
|
|
||||||
|
bool result = true;
|
||||||
|
|
||||||
if (retroshareTranslator->load(":/lang/retroshare_" + languageCode + ".qm")) {
|
if (retroshareTranslator->load(":/lang/retroshare_" + languageCode + ".qm")) {
|
||||||
QApplication::installTranslator(retroshareTranslator);
|
QApplication::installTranslator(retroshareTranslator);
|
||||||
return true;
|
} else {
|
||||||
}
|
|
||||||
delete retroshareTranslator;
|
delete retroshareTranslator;
|
||||||
retroshareTranslator = NULL;
|
retroshareTranslator = NULL;
|
||||||
return false;
|
result = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = translatePlugins(languageCode) && result;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets the application's translator to the specified language for the plugins. */
|
||||||
|
bool LanguageSupport::translatePlugins(const QString &languageCode)
|
||||||
|
{
|
||||||
|
removePluginTranslation();
|
||||||
|
|
||||||
|
if (rsPlugins == NULL) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = rsPlugins->nbPlugins();
|
||||||
|
for (int i = 0; i < count; ++i) {
|
||||||
|
RsPlugin* plugin = rsPlugins->plugin(i);
|
||||||
|
if (plugin) {
|
||||||
|
QTranslator* translator = plugin->qt_translator(rApp, languageCode);
|
||||||
|
if (translator) {
|
||||||
|
QApplication::installTranslator(translator);
|
||||||
|
translatorPlugins[plugin] = translator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _LANGUAGESUPPORT_H
|
#ifndef _LANGUAGESUPPORT_H
|
||||||
#define _LANGUAGESUPPORT_H
|
#define _LANGUAGESUPPORT_H
|
||||||
|
|
||||||
|
@ -29,8 +27,6 @@
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LanguageSupport
|
class LanguageSupport
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -52,7 +48,8 @@ public:
|
||||||
static bool isRightToLeft(const QString &languageCode);
|
static bool isRightToLeft(const QString &languageCode);
|
||||||
/** Sets the application's translator to the specified language. */
|
/** Sets the application's translator to the specified language. */
|
||||||
static bool translate(const QString &languageCode);
|
static bool translate(const QString &languageCode);
|
||||||
|
/** Sets the application's translator to the specified language for the plugins. */
|
||||||
|
static bool translatePlugins(const QString &languageCode);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -8849,51 +8849,43 @@ p, li { white-space: pre-wrap; }
|
||||||
<context>
|
<context>
|
||||||
<name>PluginItem</name>
|
<name>PluginItem</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/settings/PluginItem.ui" line="+14"/>
|
|
||||||
<source>Form</source>
|
<source>Form</source>
|
||||||
<translation type="unfinished">Formular</translation>
|
<translation type="obsolete">Formular</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+115"/>
|
<location filename="../gui/settings/PluginItem.ui" line="+126"/>
|
||||||
<source>Status: </source>
|
<source>Status: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Status:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+7"/>
|
<location line="+7"/>
|
||||||
<source>File hash:</source>
|
<source>File hash:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Datei Prüfsumme:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+7"/>
|
<location line="+7"/>
|
||||||
<source>File name: </source>
|
<source>File name: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Dateiname:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+17"/>
|
<location line="+107"/>
|
||||||
<location line="+13"/>
|
|
||||||
<location line="+13"/>
|
|
||||||
<source>TextLabel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location line="+64"/>
|
|
||||||
<source>Launch configuration panel, if provided by the plugin</source>
|
<source>Launch configuration panel, if provided by the plugin</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Starte Einstellungen, wenn vom Plugin unterstützt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+3"/>
|
<location line="+3"/>
|
||||||
<source>Configure</source>
|
<source>Configure</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Einstellung</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+7"/>
|
<location line="+7"/>
|
||||||
<source>Add the plugin into the white list of accepted plugins. This will be effective after you restart RetroShare, since plugins need to be loaded at startup.</source>
|
<source>Add the plugin into the white list of accepted plugins. This will be effective after you restart RetroShare, since plugins need to be loaded at startup.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Fügt das Plugin als vertrauenswürdig hinzu. Das wirkt sich nach dem Neustart von RetroShare aus, da die Plugins beim Start geladen werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+3"/>
|
<location line="+3"/>
|
||||||
<source>Enabled</source>
|
<source>Enabled</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Aktivieren</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -8919,57 +8911,57 @@ p, li { white-space: pre-wrap; }
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/settings/PluginsPage.ui" line="+519"/>
|
<location filename="../gui/settings/PluginsPage.ui" line="+519"/>
|
||||||
<source>Loaded plugins</source>
|
<source>Loaded plugins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Geladene Plugins</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+26"/>
|
<location line="+26"/>
|
||||||
<source>Authorize all plugins</source>
|
<source>Authorize all plugins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Erlaube alle Plugins</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+7"/>
|
<location line="+7"/>
|
||||||
<source>Plugin look-up directories</source>
|
<source>Plugin look-up directories</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Plugin Verzeichnis</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/settings/PluginsPage.cpp" line="+57"/>
|
<location filename="../gui/settings/PluginsPage.cpp" line="+57"/>
|
||||||
<source>Hash rejected. Add to white list.</source>
|
<source>Hash rejected. Add to white list.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Hash abgelehnt. Füge das Plugin als vertrauenswürdig hinzu.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<source>Loading error.</source>
|
<source>Loading error.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Fehler beim Laden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<source>Missing symbol. Wrong version?</source>
|
<source>Missing symbol. Wrong version?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Fehlendes Symbol. Falsche Version?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<source>No plugin object</source>
|
<source>No plugin object</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kein Plugin Objekt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<source>Plugins is loaded.</source>
|
<source>Plugins is loaded.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Plugin ist geladen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+3"/>
|
<location line="+3"/>
|
||||||
<source>Unknown status.</source>
|
<source>Unknown status.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Unbekannter Status.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+5"/>
|
<location line="+5"/>
|
||||||
<source>Title unavailable</source>
|
<source>Title unavailable</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Titel nicht verfügbar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+1"/>
|
<location line="+1"/>
|
||||||
<source>Description unavailable</source>
|
<source>Description unavailable</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Beschreibung nicht verfügbar</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -10050,7 +10042,7 @@ Lockdatei:
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/common/RsCollectionDialog.cpp" line="+136"/>
|
<location filename="../gui/common/RsCollectionDialog.cpp" line="+179"/>
|
||||||
<source>Unable to make path</source>
|
<source>Unable to make path</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10484,7 +10476,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<context>
|
<context>
|
||||||
<name>RsCollectionDialog</name>
|
<name>RsCollectionDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/common/RsCollectionDialog.cpp" line="-95"/>
|
<location filename="../gui/common/RsCollectionDialog.cpp" line="-135"/>
|
||||||
<source>File</source>
|
<source>File</source>
|
||||||
<translation>Datei</translation>
|
<translation>Datei</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10504,7 +10496,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>Kollektion</translation>
|
<translation>Kollektion</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+14"/>
|
<location line="+17"/>
|
||||||
<source>File name :</source>
|
<source>File name :</source>
|
||||||
<translation>Dateiname:</translation>
|
<translation>Dateiname:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10519,7 +10511,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>Ausgewählt:</translation>
|
<translation>Ausgewählt:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+86"/>
|
<location line="+92"/>
|
||||||
<source>Select all</source>
|
<source>Select all</source>
|
||||||
<translation>Alle auswählen</translation>
|
<translation>Alle auswählen</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -219,6 +219,7 @@ int main(int argc, char *argv[])
|
||||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load configuration"), Qt::AlignHCenter | Qt::AlignBottom);
|
splashScreen.showMessage(rshare.translate("SplashScreen", "Load configuration"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||||
|
|
||||||
rsicontrol->StartupRetroShare();
|
rsicontrol->StartupRetroShare();
|
||||||
|
Rshare::initPlugins();
|
||||||
|
|
||||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Create interface"), Qt::AlignHCenter | Qt::AlignBottom);
|
splashScreen.showMessage(rshare.translate("SplashScreen", "Create interface"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ Rshare::setLanguage(QString languageCode)
|
||||||
if (languageCode.isEmpty()) {
|
if (languageCode.isEmpty()) {
|
||||||
languageCode = Settings->getLanguageCode();
|
languageCode = Settings->getLanguageCode();
|
||||||
}
|
}
|
||||||
/* Translate into the desired langauge */
|
/* Translate into the desired language */
|
||||||
if (LanguageSupport::translate(languageCode)) {
|
if (LanguageSupport::translate(languageCode)) {
|
||||||
_language = languageCode;
|
_language = languageCode;
|
||||||
return true;
|
return true;
|
||||||
|
@ -345,7 +345,6 @@ Rshare::setSheet(QString sheet)
|
||||||
/* Apply the specified GUI stylesheet */
|
/* Apply the specified GUI stylesheet */
|
||||||
_stylesheet = sheet;
|
_stylesheet = sheet;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rshare::resetLanguageAndStyle()
|
void Rshare::resetLanguageAndStyle()
|
||||||
|
@ -360,6 +359,12 @@ void Rshare::resetLanguageAndStyle()
|
||||||
setSheet(_args.value(ARG_GUISTYLESHEET));
|
setSheet(_args.value(ARG_GUISTYLESHEET));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Initialize plugins. */
|
||||||
|
void Rshare::initPlugins()
|
||||||
|
{
|
||||||
|
LanguageSupport::translatePlugins(_language);
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns the directory RetroShare uses for its data files. */
|
/** Returns the directory RetroShare uses for its data files. */
|
||||||
QString
|
QString
|
||||||
Rshare::dataDirectory()
|
Rshare::dataDirectory()
|
||||||
|
|
|
@ -84,6 +84,8 @@ public:
|
||||||
*/
|
*/
|
||||||
static void resetLanguageAndStyle();
|
static void resetLanguageAndStyle();
|
||||||
|
|
||||||
|
/** Initialize plugins. */
|
||||||
|
static void initPlugins();
|
||||||
|
|
||||||
/** Returns the current language. */
|
/** Returns the current language. */
|
||||||
static QString language() { return _language; }
|
static QString language() { return _language; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue