2 * This file is part of Secret Notes.
3 * Copyright (C) 2010 Janusz Sobczak
5 * Secret Notes is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * Secret Notes is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Secret Notes. If not, see <http://www.gnu.org/licenses/>.
18 #include <QtGui/QApplication>
19 #include "mainwindow.h"
20 #include <QTranslator>
23 /* convert preprocesor variable to string */
24 #define TOSTRING_(x) #x
25 #define TOSTRING(x) TOSTRING_(x)
27 int main(int argc, char *argv[])
29 QApplication a(argc, argv);
30 QString translationDir;
32 translationDir = QString(TOSTRING(PREFIX))+QString("/share/secretnotes");
34 QTranslator translator;
35 translator.load(QString("secretnotes_")+QLocale::system().name(),
38 a.installTranslator(&translator);