Rework Translator
parent
693301a978
commit
ca271e2a38
|
@ -32,6 +32,7 @@ set(SOURCES
|
||||||
figuredelegate.cpp
|
figuredelegate.cpp
|
||||||
minetestmapperexe.cpp
|
minetestmapperexe.cpp
|
||||||
colorstxtwizard.cpp
|
colorstxtwizard.cpp
|
||||||
|
translator.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
|
@ -46,6 +47,7 @@ set(HEADERS
|
||||||
figuredelegate.h
|
figuredelegate.h
|
||||||
minetestmapperexe.h
|
minetestmapperexe.h
|
||||||
colorstxtwizard.h
|
colorstxtwizard.h
|
||||||
|
translator.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FORMS
|
set(FORMS
|
||||||
|
|
21
main.cpp
21
main.cpp
|
@ -1,4 +1,5 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "translator.h"
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -15,23 +16,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
// Setup the translators
|
// Setup the translators
|
||||||
|
Translator t(QLocale::system());
|
||||||
const QString translationsPath = "./translations/";
|
|
||||||
QTranslator qtTranslator;
|
|
||||||
if(qtTranslator.load("qt_" + QLocale::system().name(),
|
|
||||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
|
|
||||||
a.installTranslator(&qtTranslator);
|
|
||||||
qDebug()<< QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
qtTranslator.load("qt_" + QLocale::system().name(),
|
|
||||||
translationsPath);
|
|
||||||
a.installTranslator(&qtTranslator);
|
|
||||||
}
|
|
||||||
|
|
||||||
QTranslator translator;
|
|
||||||
if (translator.load("gui_" + QLocale::system().name(), translationsPath))
|
|
||||||
a.installTranslator(&translator);
|
|
||||||
|
|
||||||
|
|
||||||
// Init commandline parser
|
// Init commandline parser
|
||||||
|
@ -48,7 +33,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
bool portable = parser.isSet(startPortableOption);
|
bool portable = parser.isSet(startPortableOption);
|
||||||
|
|
||||||
MainWindow w(portable, translationsPath, &translator, &qtTranslator);
|
MainWindow w(portable, &t);
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
|
|
105
mainwindow.cpp
105
mainwindow.cpp
|
@ -2,19 +2,16 @@
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
#include <QDebug>
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QDirModel>
|
#include <QDirModel>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(bool portable, const QString &translationsPath, QTranslator *translator, QTranslator *qtTranslator, QWidget *parent) :
|
MainWindow::MainWindow(bool portable, Translator *translator, QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::MainWindow),
|
ui(new Ui::MainWindow),
|
||||||
translator(translator),
|
translator(translator)
|
||||||
qtTranslator(qtTranslator),
|
|
||||||
translationsPath(translationsPath)
|
|
||||||
{
|
{
|
||||||
if(portable){
|
if(portable){
|
||||||
//Attention: This paths could be non writable locations!
|
//Attention: This paths could be non writable locations!
|
||||||
|
@ -158,41 +155,30 @@ void MainWindow::finishUiInitialisation()
|
||||||
void MainWindow::createLanguageMenu()
|
void MainWindow::createLanguageMenu()
|
||||||
{
|
{
|
||||||
QActionGroup* langGroup = new QActionGroup(ui->menuLanguage);
|
QActionGroup* langGroup = new QActionGroup(ui->menuLanguage);
|
||||||
langGroup->setExclusive(true);
|
//langGroup->setExclusive(true);
|
||||||
|
|
||||||
connect(langGroup, &QActionGroup::triggered, this, &MainWindow::slotLanguageChanged);
|
connect(langGroup, &QActionGroup::triggered, this, &MainWindow::slotLanguageChanged);
|
||||||
|
QStringList translations = translator->getTranslations();
|
||||||
|
QLocale::Language defaultLanguage = translator->getCurrentLocale().language();
|
||||||
|
for (const QString &locale : translations) {
|
||||||
|
QLocale l = QLocale(locale);
|
||||||
|
|
||||||
// format systems language
|
QLocale::Language language = l.language();
|
||||||
QString defaultLocale = QLocale::system().name(); // e.g. "de_DE"
|
|
||||||
qDebug()<<"Default locale:"<<defaultLocale;
|
|
||||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
|
|
||||||
|
|
||||||
qDebug()<<"Lang path "<< translationsPath;
|
QString lang = QLocale::languageToString(language);
|
||||||
QDir dir(translationsPath);
|
QIcon ico(QString("%1/%2.png").arg(translator->translationsPath).arg(locale));
|
||||||
QStringList fileNames = dir.entryList(QStringList("qt_*.qm"));
|
|
||||||
|
|
||||||
for (int i = 0; i < fileNames.size(); ++i) {
|
|
||||||
// get locale extracted by filename
|
|
||||||
QString locale;
|
|
||||||
locale = fileNames[i]; // "qt_de.qm"
|
|
||||||
locale.truncate(locale.lastIndexOf('.')); // "qt_de"
|
|
||||||
locale.remove(0, locale.indexOf('_') + 1); // "de"
|
|
||||||
|
|
||||||
QString lang = QLocale::languageToString(QLocale(locale).language());
|
|
||||||
QIcon ico(QString("%1/%2.png").arg(translationsPath).arg(locale));
|
|
||||||
|
|
||||||
QAction *action = new QAction(ico, lang, this);
|
QAction *action = new QAction(ico, lang, this);
|
||||||
action->setCheckable(true);
|
action->setCheckable(true);
|
||||||
action->setData(locale);
|
action->setData(l);
|
||||||
|
|
||||||
ui->menuLanguage->addAction(action);
|
ui->menuLanguage->addAction(action);
|
||||||
langGroup->addAction(action);
|
langGroup->addAction(action);
|
||||||
|
|
||||||
// set default translators and language checked
|
// set default translators and language checked
|
||||||
if (defaultLocale == locale)
|
if (defaultLanguage == language)
|
||||||
{
|
{
|
||||||
action->setChecked(true);
|
action->setChecked(true);
|
||||||
//loadLanguage(locale);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,61 +186,34 @@ void MainWindow::createLanguageMenu()
|
||||||
// Called every time, when a menu entry of the language menu is called
|
// Called every time, when a menu entry of the language menu is called
|
||||||
void MainWindow::slotLanguageChanged(QAction* action)
|
void MainWindow::slotLanguageChanged(QAction* action)
|
||||||
{
|
{
|
||||||
if(0 != action) {
|
if(action) {
|
||||||
// load the language dependant on the action content
|
// load the language dependant on the action content
|
||||||
loadLanguage(action->data().toString());
|
qDebug() << action->data();
|
||||||
|
QLocale locale = QLocale(action->data().toLocale());
|
||||||
|
translator->setLocale(locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::switchTranslator(QTranslator *translator, const QString &prefix, const QLocale &locale)
|
|
||||||
{
|
|
||||||
// remove the old translator
|
|
||||||
qApp->removeTranslator(translator);
|
|
||||||
qDebug() << "Trying to load language "<< translationsPath << prefix<<locale;
|
|
||||||
// load the new translator
|
|
||||||
if(translator->load(locale , "", prefix, translationsPath)){
|
|
||||||
qDebug() << "Loaded translator" << locale;
|
|
||||||
qApp->installTranslator(translator);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::loadLanguage(const QString& rLanguage)
|
|
||||||
{
|
|
||||||
if(m_currLang != rLanguage) {
|
|
||||||
m_currLang = rLanguage;
|
|
||||||
QLocale locale = QLocale(m_currLang);
|
|
||||||
QLocale::setDefault(locale);
|
|
||||||
QString languageName = QLocale::languageToString(locale.language());
|
|
||||||
switchTranslator(translator, "gui_", locale);
|
|
||||||
switchTranslator(qtTranslator, "qt_", locale);
|
|
||||||
ui->statusBar->showMessage(tr("Current Language changed to %1").arg(languageName),3000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void MainWindow::changeEvent(QEvent* event)
|
void MainWindow::changeEvent(QEvent* event)
|
||||||
{
|
{
|
||||||
if(0 != event) {
|
if (event) {
|
||||||
switch(event->type()) {
|
switch (event->type()) {
|
||||||
// this event is send if a translator is loaded
|
case QEvent::LanguageChange:
|
||||||
case QEvent::LanguageChange:
|
// this event is send if a translator is loaded and installed to the Application
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// this event is send, if the system, language changes
|
case QEvent::LocaleChange:
|
||||||
case QEvent::LocaleChange:
|
// this event is send by QWidget::setLocale
|
||||||
{
|
translator->setLocale(QLocale::system());
|
||||||
QString locale = QLocale::system().name();
|
break;
|
||||||
locale.truncate(locale.lastIndexOf('_'));
|
|
||||||
loadLanguage(locale);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Ignore other events
|
default:
|
||||||
default:
|
// Ignore other events
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QMainWindow::changeEvent(event);
|
QMainWindow::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|
16
mainwindow.h
16
mainwindow.h
|
@ -13,20 +13,19 @@
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStringListModel>
|
#include <QStringListModel>
|
||||||
#include <QTranslator>
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <QWinTaskbarButton>
|
#include <QWinTaskbarButton>
|
||||||
#include <QWinTaskbarProgress>
|
#include <QWinTaskbarProgress>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#include "colorstxtassistant.h"
|
|
||||||
#include "colorstxtwizard.h"
|
#include "colorstxtwizard.h"
|
||||||
#include "configdialog.h"
|
#include "configdialog.h"
|
||||||
#include "drawmapfigure.h"
|
#include "drawmapfigure.h"
|
||||||
#include "drawmapfiguretablemodel.h"
|
#include "drawmapfiguretablemodel.h"
|
||||||
#include "figuredelegate.h"
|
#include "figuredelegate.h"
|
||||||
#include "minetestmapperexe.h"
|
#include "minetestmapperexe.h"
|
||||||
|
#include "translator.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
|
@ -37,7 +36,7 @@ class MainWindow : public QMainWindow
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(bool portable, const QString &translationsPath, QTranslator *translator, QTranslator *qtTranslator, QWidget *parent = 0);
|
explicit MainWindow(bool portable, Translator *translator, QWidget *parent = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
enum class GeometryGranularity {
|
enum class GeometryGranularity {
|
||||||
|
@ -128,8 +127,6 @@ private slots:
|
||||||
|
|
||||||
void on_figureSelect_currentIndexChanged(int index);
|
void on_figureSelect_currentIndexChanged(int index);
|
||||||
|
|
||||||
void switchTranslator(QTranslator *translator, const QString &prefix, const QLocale &locale);
|
|
||||||
|
|
||||||
void on_actionOpen_Terminal_triggered();
|
void on_actionOpen_Terminal_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -146,20 +143,13 @@ private:
|
||||||
|
|
||||||
void finishUiInitialisation(void);
|
void finishUiInitialisation(void);
|
||||||
|
|
||||||
// loads a language by the given language shortcur (e.g. de, en)
|
|
||||||
void loadLanguage(const QString &rLanguage);
|
|
||||||
|
|
||||||
// creates the language menu dynamically from the content of m_langPath
|
// creates the language menu dynamically from the content of m_langPath
|
||||||
void createLanguageMenu(void);
|
void createLanguageMenu(void);
|
||||||
|
|
||||||
QTranslator *translator; // contains the translations for this application
|
Translator *translator; // contains the translations for this application
|
||||||
QTranslator *qtTranslator; // contains the translations for qt
|
|
||||||
QString m_currLang; // contains the currently loaded language
|
|
||||||
QString translationsPath; // Path of language files. This is always fixed to /languages.
|
|
||||||
QString currentProfile; //contains the name of current loaded profile
|
QString currentProfile; //contains the name of current loaded profile
|
||||||
QString pathAppData; // Path where the settings should be stored.
|
QString pathAppData; // Path where the settings should be stored.
|
||||||
QString pathProfiles; // path where the profiles should be stored.
|
QString pathProfiles; // path where the profiles should be stored.
|
||||||
//QSettings profile;
|
|
||||||
QSettings *settings;
|
QSettings *settings;
|
||||||
QSettings *profile;
|
QSettings *profile;
|
||||||
QString getColorsTxtFilePath(QDir *appDir, QDir *worldDir);
|
QString getColorsTxtFilePath(QDir *appDir, QDir *worldDir);
|
||||||
|
|
|
@ -1290,7 +1290,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2373"/>
|
<location filename="../mainwindow.ui" line="2373"/>
|
||||||
<location filename="../mainwindow.cpp" line="1040"/>
|
<location filename="../mainwindow.cpp" line="999"/>
|
||||||
<source>Cancel</source>
|
<source>Cancel</source>
|
||||||
<translation>Abbrechen</translation>
|
<translation>Abbrechen</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1323,7 +1323,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2649"/>
|
<location filename="../mainwindow.ui" line="2649"/>
|
||||||
<location filename="../mainwindow.cpp" line="882"/>
|
<location filename="../mainwindow.cpp" line="841"/>
|
||||||
<source>About MinetestMapper</source>
|
<source>About MinetestMapper</source>
|
||||||
<translation>Über MinetestMapper</translation>
|
<translation>Über MinetestMapper</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1367,7 +1367,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2786"/>
|
<location filename="../mainwindow.ui" line="2786"/>
|
||||||
<location filename="../mainwindow.cpp" line="904"/>
|
<location filename="../mainwindow.cpp" line="863"/>
|
||||||
<source>New Profile</source>
|
<source>New Profile</source>
|
||||||
<translation>Neues Profil</translation>
|
<translation>Neues Profil</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1377,7 +1377,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2794"/>
|
<location filename="../mainwindow.ui" line="2794"/>
|
||||||
<location filename="../mainwindow.cpp" line="462"/>
|
<location filename="../mainwindow.cpp" line="421"/>
|
||||||
<source>Expert Mode</source>
|
<source>Expert Mode</source>
|
||||||
<translation>Expertenmodus</translation>
|
<translation>Expertenmodus</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1392,18 +1392,17 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
<translation>Im Expertenmodus werden die Parameter angezeigt, die du verändern kannst.</translation>
|
<translation>Im Expertenmodus werden die Parameter angezeigt, die du verändern kannst.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="231"/>
|
|
||||||
<source>Current Language changed to %1</source>
|
<source>Current Language changed to %1</source>
|
||||||
<translation>Sprache wurde auf %1 geändert</translation>
|
<translation type="vanished">Sprache wurde auf %1 geändert</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2745"/>
|
<location filename="../mainwindow.ui" line="2745"/>
|
||||||
<location filename="../mainwindow.cpp" line="868"/>
|
<location filename="../mainwindow.cpp" line="827"/>
|
||||||
<source>About MinetestMapper GUI</source>
|
<source>About MinetestMapper GUI</source>
|
||||||
<translation>Über MinetestMapperGUI</translation>
|
<translation>Über MinetestMapperGUI</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="279"/>
|
<location filename="../mainwindow.cpp" line="238"/>
|
||||||
<source>Minetestmapper not found</source>
|
<source>Minetestmapper not found</source>
|
||||||
<translation>Minetestmapper nicht gefunden</translation>
|
<translation>Minetestmapper nicht gefunden</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1428,7 +1427,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
<translation type="vanished">Das Bild existiert bereits</translation>
|
<translation type="vanished">Das Bild existiert bereits</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="309"/>
|
<location filename="../mainwindow.cpp" line="268"/>
|
||||||
<source>The File <i>%1</i> does already exist. <br><br>Do you want to overwrite?</source>
|
<source>The File <i>%1</i> does already exist. <br><br>Do you want to overwrite?</source>
|
||||||
<translation>Die Datei <i>%1</i> existiert bereits. <br><br>Soll die Datei Überschrieben werden?</translation>
|
<translation>Die Datei <i>%1</i> existiert bereits. <br><br>Soll die Datei Überschrieben werden?</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1437,58 +1436,58 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
<translation type="vanished">Der Ordner existiert nicht</translation>
|
<translation type="vanished">Der Ordner existiert nicht</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="318"/>
|
<location filename="../mainwindow.cpp" line="277"/>
|
||||||
<source>The directory <i>%1</i> does not exist. <br><br>Should it be created?</source>
|
<source>The directory <i>%1</i> does not exist. <br><br>Should it be created?</source>
|
||||||
<translation>Der Ordner <i>%1</i> existiert nicht. <br><br>Möchten sie den Ordner erstellen?</translation>
|
<translation>Der Ordner <i>%1</i> existiert nicht. <br><br>Möchten sie den Ordner erstellen?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="463"/>
|
<location filename="../mainwindow.cpp" line="422"/>
|
||||||
<source>MinetestMapper will be executed using this arguments.
|
<source>MinetestMapper will be executed using this arguments.
|
||||||
The arguments can be removed, modified, or new arguments can be added.</source>
|
The arguments can be removed, modified, or new arguments can be added.</source>
|
||||||
<translation>MinetestMapper wird mit den folgenden Parametern ausgeführt.
|
<translation>MinetestMapper wird mit den folgenden Parametern ausgeführt.
|
||||||
Die einzelnen Parameter können entfernt, verändert, oder neue hinzugefügt werden.</translation>
|
Die einzelnen Parameter können entfernt, verändert, oder neue hinzugefügt werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="522"/>
|
<location filename="../mainwindow.cpp" line="481"/>
|
||||||
<source>Finisched :)</source>
|
<source>Finisched :)</source>
|
||||||
<translation>Fertig :-)</translation>
|
<translation>Fertig :-)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="530"/>
|
<location filename="../mainwindow.cpp" line="489"/>
|
||||||
<source>minetestmapper terminated</source>
|
<source>minetestmapper terminated</source>
|
||||||
<translation>minetestmapper abgebrochen</translation>
|
<translation>minetestmapper abgebrochen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="273"/>
|
<location filename="../mainwindow.cpp" line="232"/>
|
||||||
<source>ERROR: No minetestmapper executable could not be found.
|
<source>ERROR: No minetestmapper executable could not be found.
|
||||||
Please configure one. </source>
|
Please configure one. </source>
|
||||||
<translation>FEHLER: Kein Minetestmapper programm gefunden.
|
<translation>FEHLER: Kein Minetestmapper programm gefunden.
|
||||||
Bitte Konfiguriere eins.</translation>
|
Bitte Konfiguriere eins.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="276"/>
|
<location filename="../mainwindow.cpp" line="235"/>
|
||||||
<source>ERROR: The Minetetmapper Application (%1) does not look like a Minetetestmapper
|
<source>ERROR: The Minetetmapper Application (%1) does not look like a Minetetestmapper
|
||||||
Please configure a correct MinetestMapper Application. </source>
|
Please configure a correct MinetestMapper Application. </source>
|
||||||
<translation>FEHLER: Das Minetestmapper Programm (%1) ist möglicherweise kein Minetestmapper Programm.
|
<translation>FEHLER: Das Minetestmapper Programm (%1) ist möglicherweise kein Minetestmapper Programm.
|
||||||
Bitte Wählen sie eine Korrekte Minetestmapper Anwendung aus.</translation>
|
Bitte Wählen sie eine Korrekte Minetestmapper Anwendung aus.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="281"/>
|
<location filename="../mainwindow.cpp" line="240"/>
|
||||||
<source>(Edit->Preferences)</source>
|
<source>(Edit->Preferences)</source>
|
||||||
<translation>(Bearbeiten->Einstellungen)</translation>
|
<translation>(Bearbeiten->Einstellungen)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="283"/>
|
<location filename="../mainwindow.cpp" line="242"/>
|
||||||
<source>Do you want to open Preferences now?</source>
|
<source>Do you want to open Preferences now?</source>
|
||||||
<translation>Sollen die Einstellungen jetzt geöffnet werden?</translation>
|
<translation>Sollen die Einstellungen jetzt geöffnet werden?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="295"/>
|
<location filename="../mainwindow.cpp" line="254"/>
|
||||||
<source>No input world selected</source>
|
<source>No input world selected</source>
|
||||||
<translation>Keine Welt ausgewählt</translation>
|
<translation>Keine Welt ausgewählt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="296"/>
|
<location filename="../mainwindow.cpp" line="255"/>
|
||||||
<source>ERROR: No MinetestWorld selected.
|
<source>ERROR: No MinetestWorld selected.
|
||||||
|
|
||||||
please select a world</source>
|
please select a world</source>
|
||||||
|
@ -1497,12 +1496,12 @@ please select a world</source>
|
||||||
Bitte wähle eine aus</translation>
|
Bitte wähle eine aus</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="302"/>
|
<location filename="../mainwindow.cpp" line="261"/>
|
||||||
<source>No output image selected</source>
|
<source>No output image selected</source>
|
||||||
<translation>Kein Ausgansbild ausgewählt</translation>
|
<translation>Kein Ausgansbild ausgewählt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="303"/>
|
<location filename="../mainwindow.cpp" line="262"/>
|
||||||
<source>ERROR: No output image selected.
|
<source>ERROR: No output image selected.
|
||||||
|
|
||||||
Please select a output image</source>
|
Please select a output image</source>
|
||||||
|
@ -1511,28 +1510,28 @@ Please select a output image</source>
|
||||||
Bitte ein Ausgabebild wählen</translation>
|
Bitte ein Ausgabebild wählen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="308"/>
|
<location filename="../mainwindow.cpp" line="267"/>
|
||||||
<source>The image file does already exist</source>
|
<source>The image file does already exist</source>
|
||||||
<translation>Die Datei existiert bereits</translation>
|
<translation>Die Datei existiert bereits</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="317"/>
|
<location filename="../mainwindow.cpp" line="276"/>
|
||||||
<source>The directory does not exist</source>
|
<source>The directory does not exist</source>
|
||||||
<translation>Der Ordner existiert nicht</translation>
|
<translation>Der Ordner existiert nicht</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="533"/>
|
<location filename="../mainwindow.cpp" line="492"/>
|
||||||
<location filename="../mainwindow.cpp" line="550"/>
|
<location filename="../mainwindow.cpp" line="509"/>
|
||||||
<source>Minetest Mapper failed</source>
|
<source>Minetest Mapper failed</source>
|
||||||
<translation>Minetestmapper hat ein Fehler festgestellt</translation>
|
<translation>Minetestmapper hat ein Fehler festgestellt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="534"/>
|
<location filename="../mainwindow.cpp" line="493"/>
|
||||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again </source>
|
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again </source>
|
||||||
<translation><h1>Fehler</h1> <h2>kartenerstellung fehlgeschlagen</h2>Exit code: <i>%1</i> <br>Ausgabe des Minetstmapper: <pre>%2</pre><br><br>Bitte den Fehler beheben und erneut versuchen </translation>
|
<translation><h1>Fehler</h1> <h2>kartenerstellung fehlgeschlagen</h2>Exit code: <i>%1</i> <br>Ausgabe des Minetstmapper: <pre>%2</pre><br><br>Bitte den Fehler beheben und erneut versuchen </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="551"/>
|
<location filename="../mainwindow.cpp" line="510"/>
|
||||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br></source>
|
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br></source>
|
||||||
<translation><h1>FEHLER</h1> <h2>minetestmapper ist abgestürzt</h2>Fehlercode: <i>%1</i> <br>Fehlernachricht: <pre>%2</pre><br></translation>
|
<translation><h1>FEHLER</h1> <h2>minetestmapper ist abgestürzt</h2>Fehlercode: <i>%1</i> <br>Fehlernachricht: <pre>%2</pre><br></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1545,92 +1544,92 @@ Bitte ein Ausgabebild wählen</translation>
|
||||||
<translation type="vanished">Konnte die Einstellungen nicht migrieren</translation>
|
<translation type="vanished">Konnte die Einstellungen nicht migrieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="605"/>
|
<location filename="../mainwindow.cpp" line="564"/>
|
||||||
<source>Can not save settings</source>
|
<source>Can not save settings</source>
|
||||||
<translation>Kann die Einstellungen nicht speichern</translation>
|
<translation>Kann die Einstellungen nicht speichern</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="606"/>
|
<location filename="../mainwindow.cpp" line="565"/>
|
||||||
<source>Minetest Mapper GUI could not save the settings to %1.
|
<source>Minetest Mapper GUI could not save the settings to %1.
|
||||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||||
<translation>Minetest Mapper GUI konnte die Einstellungen nicht nach %1 speichern.
|
<translation>Minetest Mapper GUI konnte die Einstellungen nicht nach %1 speichern.
|
||||||
Bitte stelle sicher, dass Minetest Mapper GUI auf die Datei/ den Ordner zugreifen darf.</translation>
|
Bitte stelle sicher, dass Minetest Mapper GUI auf die Datei/ den Ordner zugreifen darf.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="630"/>
|
<location filename="../mainwindow.cpp" line="589"/>
|
||||||
<source>Can not save profile</source>
|
<source>Can not save profile</source>
|
||||||
<translation>Konnte das Profil nicht speichern</translation>
|
<translation>Konnte das Profil nicht speichern</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="631"/>
|
<location filename="../mainwindow.cpp" line="590"/>
|
||||||
<source>Minetest Mapper GUI could not save the current Profile '%1' to %2.
|
<source>Minetest Mapper GUI could not save the current Profile '%1' to %2.
|
||||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="826"/>
|
<location filename="../mainwindow.cpp" line="785"/>
|
||||||
<source>Open Minetest World</source>
|
<source>Open Minetest World</source>
|
||||||
<translation>Minetest Welt-Ordner öffnen</translation>
|
<translation>Minetest Welt-Ordner öffnen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="836"/>
|
<location filename="../mainwindow.cpp" line="795"/>
|
||||||
<source>Save generated map to...</source>
|
<source>Save generated map to...</source>
|
||||||
<translation>Karte speichern nach...</translation>
|
<translation>Karte speichern nach...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="836"/>
|
<location filename="../mainwindow.cpp" line="795"/>
|
||||||
<source>png image (*.png)</source>
|
<source>png image (*.png)</source>
|
||||||
<translation>png Grafik (*.png)</translation>
|
<translation>png Grafik (*.png)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="843"/>
|
<location filename="../mainwindow.cpp" line="802"/>
|
||||||
<source>Open HeightmapNodes File</source>
|
<source>Open HeightmapNodes File</source>
|
||||||
<translation>Öffne HeightmapNodes Datei</translation>
|
<translation>Öffne HeightmapNodes Datei</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="845"/>
|
<location filename="../mainwindow.cpp" line="804"/>
|
||||||
<location filename="../mainwindow.cpp" line="853"/>
|
<location filename="../mainwindow.cpp" line="812"/>
|
||||||
<location filename="../mainwindow.cpp" line="861"/>
|
<location filename="../mainwindow.cpp" line="820"/>
|
||||||
<source>TXT File (*.txt)</source>
|
<source>TXT File (*.txt)</source>
|
||||||
<translation>TXT Datei (*.txt)</translation>
|
<translation>TXT Datei (*.txt)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="851"/>
|
<location filename="../mainwindow.cpp" line="810"/>
|
||||||
<source>Open HeightmapColors File</source>
|
<source>Open HeightmapColors File</source>
|
||||||
<translation>Öffne Höhenkarte Farbdefinitionsdatei</translation>
|
<translation>Öffne Höhenkarte Farbdefinitionsdatei</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="859"/>
|
<location filename="../mainwindow.cpp" line="818"/>
|
||||||
<source>Open colors.txt File</source>
|
<source>Open colors.txt File</source>
|
||||||
<translation>Öffne colors.txt Datei</translation>
|
<translation>Öffne colors.txt Datei</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="869"/>
|
<location filename="../mainwindow.cpp" line="828"/>
|
||||||
<source><h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon</source>
|
<source><h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="883"/>
|
<location filename="../mainwindow.cpp" line="842"/>
|
||||||
<source><h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>Version:</u> %1 (%2)<br><u>License:</u> LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br></source>
|
<source><h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>Version:</u> %1 (%2)<br><u>License:</u> LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="964"/>
|
<location filename="../mainwindow.cpp" line="923"/>
|
||||||
<source>map center</source>
|
<source>map center</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="969"/>
|
<location filename="../mainwindow.cpp" line="928"/>
|
||||||
<source>map origin (top left)</source>
|
<source>map origin (top left)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1019"/>
|
<location filename="../mainwindow.cpp" line="978"/>
|
||||||
<source>Create a colors.txt</source>
|
<source>Create a colors.txt</source>
|
||||||
<translation>Erstelle eine colors.txt Datei</translation>
|
<translation>Erstelle eine colors.txt Datei</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1020"/>
|
<location filename="../mainwindow.cpp" line="979"/>
|
||||||
<source>There is a nodes.txt but no colors.txt in the world directory
|
<source>There is a nodes.txt but no colors.txt in the world directory
|
||||||
Do you want to generate one?
|
Do you want to generate one?
|
||||||
If you select 'No' the default colors.txt will be used.</source>
|
If you select 'No' the default colors.txt will be used.</source>
|
||||||
|
@ -1639,29 +1638,29 @@ Möchtest du eine erstellen?
|
||||||
Wenn du auf 'Nein' clickst, wird eine standard colors.txt Datei verwendet.</translation>
|
Wenn du auf 'Nein' clickst, wird eine standard colors.txt Datei verwendet.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1037"/>
|
<location filename="../mainwindow.cpp" line="996"/>
|
||||||
<source>No colors.txt file</source>
|
<source>No colors.txt file</source>
|
||||||
<translation>Keine colors.txt Datei</translation>
|
<translation>Keine colors.txt Datei</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1038"/>
|
<location filename="../mainwindow.cpp" line="997"/>
|
||||||
<source>ERROR: Still no colors.txt file found inside world directory.
|
<source>ERROR: Still no colors.txt file found inside world directory.
|
||||||
|
|
||||||
Do you want to cancel or proceed with default colors.txt file?</source>
|
Do you want to cancel or proceed with default colors.txt file?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1041"/>
|
<location filename="../mainwindow.cpp" line="1000"/>
|
||||||
<source>Proceed with default</source>
|
<source>Proceed with default</source>
|
||||||
<translation>Mit standard Datei fortfahren</translation>
|
<translation>Mit standard Datei fortfahren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1113"/>
|
<location filename="../mainwindow.cpp" line="1072"/>
|
||||||
<source>Could not open Terminal</source>
|
<source>Could not open Terminal</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1114"/>
|
<location filename="../mainwindow.cpp" line="1073"/>
|
||||||
<source>Error: Could not open scriptfile (%1) for Terminal</source>
|
<source>Error: Could not open scriptfile (%1) for Terminal</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1696,12 +1695,12 @@ Bitte erneut eine gültige minetestmapper Anwendung auswählen. (Bearbeiten->
|
||||||
Möchten Sie die Einstellungen jetzt öffnen? </translation>
|
Möchten Sie die Einstellungen jetzt öffnen? </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="897"/>
|
<location filename="../mainwindow.cpp" line="856"/>
|
||||||
<source>preview: %1</source>
|
<source>preview: %1</source>
|
||||||
<translation>Vorschau: %1</translation>
|
<translation>Vorschau: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="905"/>
|
<location filename="../mainwindow.cpp" line="864"/>
|
||||||
<source>Name of the new Profile:</source>
|
<source>Name of the new Profile:</source>
|
||||||
<translation>Name des Neuen Profils:</translation>
|
<translation>Name des Neuen Profils:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -978,7 +978,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2373"/>
|
<location filename="../mainwindow.ui" line="2373"/>
|
||||||
<location filename="../mainwindow.cpp" line="1040"/>
|
<location filename="../mainwindow.cpp" line="999"/>
|
||||||
<source>Cancel</source>
|
<source>Cancel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1036,7 +1036,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2649"/>
|
<location filename="../mainwindow.ui" line="2649"/>
|
||||||
<location filename="../mainwindow.cpp" line="882"/>
|
<location filename="../mainwindow.cpp" line="841"/>
|
||||||
<source>About MinetestMapper</source>
|
<source>About MinetestMapper</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1072,7 +1072,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2745"/>
|
<location filename="../mainwindow.ui" line="2745"/>
|
||||||
<location filename="../mainwindow.cpp" line="868"/>
|
<location filename="../mainwindow.cpp" line="827"/>
|
||||||
<source>About MinetestMapper GUI</source>
|
<source>About MinetestMapper GUI</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1123,13 +1123,13 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2786"/>
|
<location filename="../mainwindow.ui" line="2786"/>
|
||||||
<location filename="../mainwindow.cpp" line="904"/>
|
<location filename="../mainwindow.cpp" line="863"/>
|
||||||
<source>New Profile</source>
|
<source>New Profile</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="2794"/>
|
<location filename="../mainwindow.ui" line="2794"/>
|
||||||
<location filename="../mainwindow.cpp" line="462"/>
|
<location filename="../mainwindow.cpp" line="421"/>
|
||||||
<source>Expert Mode</source>
|
<source>Expert Mode</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1174,238 +1174,233 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="231"/>
|
<location filename="../mainwindow.cpp" line="232"/>
|
||||||
<source>Current Language changed to %1</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="273"/>
|
|
||||||
<source>ERROR: No minetestmapper executable could not be found.
|
<source>ERROR: No minetestmapper executable could not be found.
|
||||||
Please configure one. </source>
|
Please configure one. </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="276"/>
|
<location filename="../mainwindow.cpp" line="235"/>
|
||||||
<source>ERROR: The Minetetmapper Application (%1) does not look like a Minetetestmapper
|
<source>ERROR: The Minetetmapper Application (%1) does not look like a Minetetestmapper
|
||||||
Please configure a correct MinetestMapper Application. </source>
|
Please configure a correct MinetestMapper Application. </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="279"/>
|
<location filename="../mainwindow.cpp" line="238"/>
|
||||||
<source>Minetestmapper not found</source>
|
<source>Minetestmapper not found</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="309"/>
|
<location filename="../mainwindow.cpp" line="268"/>
|
||||||
<source>The File <i>%1</i> does already exist. <br><br>Do you want to overwrite?</source>
|
<source>The File <i>%1</i> does already exist. <br><br>Do you want to overwrite?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="318"/>
|
<location filename="../mainwindow.cpp" line="277"/>
|
||||||
<source>The directory <i>%1</i> does not exist. <br><br>Should it be created?</source>
|
<source>The directory <i>%1</i> does not exist. <br><br>Should it be created?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="463"/>
|
<location filename="../mainwindow.cpp" line="422"/>
|
||||||
<source>MinetestMapper will be executed using this arguments.
|
<source>MinetestMapper will be executed using this arguments.
|
||||||
The arguments can be removed, modified, or new arguments can be added.</source>
|
The arguments can be removed, modified, or new arguments can be added.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="522"/>
|
<location filename="../mainwindow.cpp" line="481"/>
|
||||||
<source>Finisched :)</source>
|
<source>Finisched :)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="530"/>
|
<location filename="../mainwindow.cpp" line="489"/>
|
||||||
<source>minetestmapper terminated</source>
|
<source>minetestmapper terminated</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="281"/>
|
<location filename="../mainwindow.cpp" line="240"/>
|
||||||
<source>(Edit->Preferences)</source>
|
<source>(Edit->Preferences)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="283"/>
|
<location filename="../mainwindow.cpp" line="242"/>
|
||||||
<source>Do you want to open Preferences now?</source>
|
<source>Do you want to open Preferences now?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="295"/>
|
<location filename="../mainwindow.cpp" line="254"/>
|
||||||
<source>No input world selected</source>
|
<source>No input world selected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="296"/>
|
<location filename="../mainwindow.cpp" line="255"/>
|
||||||
<source>ERROR: No MinetestWorld selected.
|
<source>ERROR: No MinetestWorld selected.
|
||||||
|
|
||||||
please select a world</source>
|
please select a world</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="302"/>
|
<location filename="../mainwindow.cpp" line="261"/>
|
||||||
<source>No output image selected</source>
|
<source>No output image selected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="303"/>
|
<location filename="../mainwindow.cpp" line="262"/>
|
||||||
<source>ERROR: No output image selected.
|
<source>ERROR: No output image selected.
|
||||||
|
|
||||||
Please select a output image</source>
|
Please select a output image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="308"/>
|
<location filename="../mainwindow.cpp" line="267"/>
|
||||||
<source>The image file does already exist</source>
|
<source>The image file does already exist</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="317"/>
|
<location filename="../mainwindow.cpp" line="276"/>
|
||||||
<source>The directory does not exist</source>
|
<source>The directory does not exist</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="533"/>
|
<location filename="../mainwindow.cpp" line="492"/>
|
||||||
<location filename="../mainwindow.cpp" line="550"/>
|
<location filename="../mainwindow.cpp" line="509"/>
|
||||||
<source>Minetest Mapper failed</source>
|
<source>Minetest Mapper failed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="534"/>
|
<location filename="../mainwindow.cpp" line="493"/>
|
||||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again </source>
|
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="551"/>
|
<location filename="../mainwindow.cpp" line="510"/>
|
||||||
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br></source>
|
<source><h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="605"/>
|
<location filename="../mainwindow.cpp" line="564"/>
|
||||||
<source>Can not save settings</source>
|
<source>Can not save settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="606"/>
|
<location filename="../mainwindow.cpp" line="565"/>
|
||||||
<source>Minetest Mapper GUI could not save the settings to %1.
|
<source>Minetest Mapper GUI could not save the settings to %1.
|
||||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="630"/>
|
<location filename="../mainwindow.cpp" line="589"/>
|
||||||
<source>Can not save profile</source>
|
<source>Can not save profile</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="631"/>
|
<location filename="../mainwindow.cpp" line="590"/>
|
||||||
<source>Minetest Mapper GUI could not save the current Profile '%1' to %2.
|
<source>Minetest Mapper GUI could not save the current Profile '%1' to %2.
|
||||||
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
Please make shure Minetest Mapper Gui can access to the file/directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="826"/>
|
<location filename="../mainwindow.cpp" line="785"/>
|
||||||
<source>Open Minetest World</source>
|
<source>Open Minetest World</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="836"/>
|
<location filename="../mainwindow.cpp" line="795"/>
|
||||||
<source>Save generated map to...</source>
|
<source>Save generated map to...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="836"/>
|
<location filename="../mainwindow.cpp" line="795"/>
|
||||||
<source>png image (*.png)</source>
|
<source>png image (*.png)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="843"/>
|
<location filename="../mainwindow.cpp" line="802"/>
|
||||||
<source>Open HeightmapNodes File</source>
|
<source>Open HeightmapNodes File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="845"/>
|
<location filename="../mainwindow.cpp" line="804"/>
|
||||||
<location filename="../mainwindow.cpp" line="853"/>
|
<location filename="../mainwindow.cpp" line="812"/>
|
||||||
<location filename="../mainwindow.cpp" line="861"/>
|
<location filename="../mainwindow.cpp" line="820"/>
|
||||||
<source>TXT File (*.txt)</source>
|
<source>TXT File (*.txt)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="851"/>
|
<location filename="../mainwindow.cpp" line="810"/>
|
||||||
<source>Open HeightmapColors File</source>
|
<source>Open HeightmapColors File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="859"/>
|
<location filename="../mainwindow.cpp" line="818"/>
|
||||||
<source>Open colors.txt File</source>
|
<source>Open colors.txt File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="869"/>
|
<location filename="../mainwindow.cpp" line="828"/>
|
||||||
<source><h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon</source>
|
<source><h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="883"/>
|
<location filename="../mainwindow.cpp" line="842"/>
|
||||||
<source><h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>Version:</u> %1 (%2)<br><u>License:</u> LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br></source>
|
<source><h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>Version:</u> %1 (%2)<br><u>License:</u> LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="964"/>
|
<location filename="../mainwindow.cpp" line="923"/>
|
||||||
<source>map center</source>
|
<source>map center</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="969"/>
|
<location filename="../mainwindow.cpp" line="928"/>
|
||||||
<source>map origin (top left)</source>
|
<source>map origin (top left)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1019"/>
|
<location filename="../mainwindow.cpp" line="978"/>
|
||||||
<source>Create a colors.txt</source>
|
<source>Create a colors.txt</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1020"/>
|
<location filename="../mainwindow.cpp" line="979"/>
|
||||||
<source>There is a nodes.txt but no colors.txt in the world directory
|
<source>There is a nodes.txt but no colors.txt in the world directory
|
||||||
Do you want to generate one?
|
Do you want to generate one?
|
||||||
If you select 'No' the default colors.txt will be used.</source>
|
If you select 'No' the default colors.txt will be used.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1037"/>
|
<location filename="../mainwindow.cpp" line="996"/>
|
||||||
<source>No colors.txt file</source>
|
<source>No colors.txt file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1038"/>
|
<location filename="../mainwindow.cpp" line="997"/>
|
||||||
<source>ERROR: Still no colors.txt file found inside world directory.
|
<source>ERROR: Still no colors.txt file found inside world directory.
|
||||||
|
|
||||||
Do you want to cancel or proceed with default colors.txt file?</source>
|
Do you want to cancel or proceed with default colors.txt file?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1041"/>
|
<location filename="../mainwindow.cpp" line="1000"/>
|
||||||
<source>Proceed with default</source>
|
<source>Proceed with default</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1113"/>
|
<location filename="../mainwindow.cpp" line="1072"/>
|
||||||
<source>Could not open Terminal</source>
|
<source>Could not open Terminal</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="1114"/>
|
<location filename="../mainwindow.cpp" line="1073"/>
|
||||||
<source>Error: Could not open scriptfile (%1) for Terminal</source>
|
<source>Error: Could not open scriptfile (%1) for Terminal</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="897"/>
|
<location filename="../mainwindow.cpp" line="856"/>
|
||||||
<source>preview: %1</source>
|
<source>preview: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="905"/>
|
<location filename="../mainwindow.cpp" line="864"/>
|
||||||
<source>Name of the new Profile:</source>
|
<source>Name of the new Profile:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
#include "translator.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QLibraryInfo>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
|
Translator::Translator(const QLocale &locale)
|
||||||
|
{
|
||||||
|
load(locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Translator::load(const QLocale &locale)
|
||||||
|
{
|
||||||
|
qDebug() << "Loading Locale:" << locale;
|
||||||
|
if (qtTranslator.load(locale, "qt", "_", systemTranslationPath)) {
|
||||||
|
qApp->installTranslator(&qtTranslator);
|
||||||
|
qDebug() << "Qt Translator installed from system path" << systemTranslationPath;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qtTranslator.load(locale, "qt", "_", translationsPath);
|
||||||
|
qApp->installTranslator(&qtTranslator);
|
||||||
|
qDebug() << "Qt Translator installed from standard path" << translationsPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (appTranslator.load(locale, "gui", "_", translationsPath))
|
||||||
|
qApp->installTranslator(&appTranslator);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList Translator::getTranslations() const
|
||||||
|
{
|
||||||
|
QDir dir(translationsPath);
|
||||||
|
QStringList fileNames = dir.entryList(QStringList("qt_*.qm"));
|
||||||
|
for (QString &s : fileNames) {
|
||||||
|
s.truncate(s.lastIndexOf('.')); // "qt_de"
|
||||||
|
s.remove(0, s.indexOf('_') + 1); // "de"
|
||||||
|
}
|
||||||
|
return fileNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Translator::setLocale(const QLocale & newLocale)
|
||||||
|
{
|
||||||
|
if (currentLocale == newLocale)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
QLocale::setDefault(newLocale);
|
||||||
|
currentLocale = newLocale;
|
||||||
|
load(newLocale);
|
||||||
|
return true;
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef TRANSLATOR_H
|
||||||
|
#define TRANSLATOR_H
|
||||||
|
|
||||||
|
#include <QLibraryInfo>
|
||||||
|
#include <QLocale>
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
#include <QTranslator>
|
||||||
|
|
||||||
|
class Translator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit Translator(const QLocale &locale = QLocale::system());
|
||||||
|
|
||||||
|
const QString translationsPath = "./translations/";
|
||||||
|
const QString systemTranslationPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||||
|
|
||||||
|
QStringList getTranslations() const;
|
||||||
|
QLocale getCurrentLocale() const { return currentLocale; }
|
||||||
|
bool setLocale(const QLocale &newLocale);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void load(const QLocale &locale);
|
||||||
|
|
||||||
|
QLocale currentLocale;
|
||||||
|
QTranslator qtTranslator;
|
||||||
|
QTranslator appTranslator;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TRANSLATOR_H
|
Loading…
Reference in New Issue