Commit 96fd05e7 authored by Luca Giambonini's avatar Luca Giambonini

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:
/opt/foolib/foo.fr_ca.qm
/opt/foolib/foo.fr_ca
/opt/foolib/foo.fr.qm
/opt/foolib/foo.fr
/opt/foolib/foo.qm
/opt/foolib/foo
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"), "almack@chakraos.org");
aboutData.addAuthor("Lisa Vitolo", QObject::tr("Contributor"), "shainer@chakraos.org");
// 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
app.instance()->installTranslator(translator);
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