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:
thunder2 2011-11-17 21:17:24 +00:00
parent 4d9727f47a
commit 8fc1a46ee7
19 changed files with 411 additions and 346 deletions

View file

@ -1,4 +1,5 @@
#include <retroshare/rsplugin.h>
#include <QTranslator>
#include "LinksCloudPlugin.h"
#include "LinksDialog.h"
@ -77,7 +78,25 @@ QIcon *LinksCloudPlugin::qt_icon() 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;
}