Commit 96fd05e7 authored by AlmAck's avatar AlmAck

akabei enable translations

akabeicore and akabeiclient provides already the translated strings, with this patch akabei is also translated.

akabei help shows the translated strings
LANG="de_DE.UTF-8" akabei help

does not work:
translator->load("akabei_" + QLocale::system().name() + ".qm", "/usr/share/akabei/translations/");

it works:
translator->load("akabei_de.qm", "/usr/share/akabei/translations/");
translator->load("akabei_de_DE.qm", "/usr/share/akabei/translations/");

QLocale::system().name()  returns it_CH here, and the italian translation is not available currently.
So I expect that with a german locale must return de_DE.

QTranslator must search for:
parent 680a57ad
......@@ -25,6 +25,8 @@
#include <QTextStream>
#include <QHash>
#include <QDebug>
#include <QTranslator>
* Adds the options
......@@ -386,6 +388,11 @@ int main(int argc, char **argv)
aboutData.addAuthor("Luca Giambonini", QObject::tr("Maintainer"), "");
aboutData.addAuthor("Lisa Vitolo", QObject::tr("Contributor"), "");
// set locale of akabei
QTranslator * translator = new QTranslator();
translator->load("akabei_" + QLocale::system().name() + ".qm", "/usr/share/akabei/translations/");//FIXME: Use translations from install dir
CommandLineParser *parser = NULL;
QTextStream err(stderr);
QStringList args = QCoreApplication::arguments();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment