Merge pull request #709 from ctrlaltca/oracle_translations
Oracle translations; fix #293
This commit is contained in:
commit
f199115b54
7 changed files with 870 additions and 35 deletions
|
@ -18,13 +18,22 @@ SET(oracle_SOURCES
|
|||
../cockatrice/src/qt-json/json.cpp
|
||||
)
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
set_source_files_properties(src/main.cpp PROPERTIES COMPILE_FLAGS -DTRANSLATION_PATH=\\"${CMAKE_INSTALL_PREFIX}/share/oracle/translations\\")
|
||||
endif (UNIX AND NOT APPLE)
|
||||
|
||||
set(oracle_RESOURCES oracle.qrc)
|
||||
FILE(GLOB oracle_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
|
||||
|
||||
IF(UPDATE_TRANSLATIONS)
|
||||
FILE(GLOB_RECURSE translate_oracle_SRCS ${CMAKE_SOURCE_DIR}/oracle/src/*.cpp ${CMAKE_SOURCE_DIR}/oracle/src/*.h)
|
||||
SET(translate_SRCS ${translate_oracle_SRCS})
|
||||
ENDIF(UPDATE_TRANSLATIONS)
|
||||
|
||||
if(WIN32)
|
||||
set(oracle_SOURCES ${oracle_SOURCES} oracle.rc)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
if(APPLE)
|
||||
set(MACOSX_BUNDLE_ICON_FILE appicon.icns)
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
|
@ -47,6 +56,12 @@ if(Qt4_FOUND)
|
|||
|
||||
# Let cmake chew Qt4's translations and resource files
|
||||
# Note: header files are MOC-ed automatically by cmake
|
||||
IF(UPDATE_TRANSLATIONS)
|
||||
QT4_CREATE_TRANSLATION(oracle_QM ${translate_SRCS} ${oracle_TS})
|
||||
ELSE(UPDATE_TRANSLATIONS)
|
||||
QT4_ADD_TRANSLATION(oracle_QM ${oracle_TS})
|
||||
ENDIF(UPDATE_TRANSLATIONS)
|
||||
|
||||
QT4_ADD_RESOURCES(oracle_RESOURCES_RCC ${oracle_RESOURCES})
|
||||
endif()
|
||||
|
||||
|
@ -85,6 +100,12 @@ if(Qt5Widgets_FOUND)
|
|||
|
||||
# Let cmake chew Qt5's translations and resource files
|
||||
# Note: header files are MOC-ed automatically by cmake
|
||||
IF(UPDATE_TRANSLATIONS)
|
||||
QT5_CREATE_TRANSLATION(oracle_QM ${translate_SRCS} ${oracle_TS})
|
||||
ELSE()
|
||||
QT5_ADD_TRANSLATION(oracle_QM ${oracle_TS})
|
||||
ENDIF()
|
||||
|
||||
QT5_ADD_RESOURCES(oracle_RESOURCES_RCC ${oracle_RESOURCES})
|
||||
|
||||
# guess plugins and libraries directory
|
||||
|
@ -105,7 +126,7 @@ ELSE()
|
|||
ENDIF()
|
||||
|
||||
# Build oracle binary and link it
|
||||
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
|
||||
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_QM} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
|
||||
|
||||
if(Qt4_FOUND)
|
||||
if(MSVC)
|
||||
|
@ -134,14 +155,17 @@ if(UNIX)
|
|||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
|
||||
|
||||
INSTALL(TARGETS oracle BUNDLE DESTINATION ./)
|
||||
INSTALL(FILES ${oracle_QM} DESTINATION ./oracle.app/Contents/Resources/translations)
|
||||
else()
|
||||
# Assume linux
|
||||
INSTALL(TARGETS oracle RUNTIME DESTINATION bin/)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.png DESTINATION ${ICONDIR}/hicolor/48x48/apps)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
|
||||
INSTALL(FILES ${oracle_QM} DESTINATION share/oracle/translations)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
INSTALL(TARGETS oracle RUNTIME DESTINATION ./)
|
||||
INSTALL(FILES ${oracle_QM} DESTINATION ./translations)
|
||||
endif()
|
||||
|
||||
IF (NOT WIN32 AND NOT APPLE)
|
||||
|
|
|
@ -1,11 +1,33 @@
|
|||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
#include <QIcon>
|
||||
#include <QTranslator>
|
||||
#include <QLibraryInfo>
|
||||
|
||||
#include "main.h"
|
||||
#include "oraclewizard.h"
|
||||
#include "settingscache.h"
|
||||
|
||||
QTranslator *translator, *qtTranslator;
|
||||
SettingsCache *settingsCache;
|
||||
|
||||
const QString translationPrefix = "oracle";
|
||||
#ifdef TRANSLATION_PATH
|
||||
QString translationPath = TRANSLATION_PATH;
|
||||
#else
|
||||
QString translationPath = QString();
|
||||
#endif
|
||||
|
||||
void installNewTranslator()
|
||||
{
|
||||
QString lang = settingsCache->getLang();
|
||||
|
||||
qtTranslator->load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
qApp->installTranslator(qtTranslator);
|
||||
translator->load(translationPrefix + "_" + lang, translationPath);
|
||||
qApp->installTranslator(translator);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
@ -20,8 +42,20 @@ int main(int argc, char *argv[])
|
|||
// this can't be changed, as it influences the default savepath for cards.xml
|
||||
QCoreApplication::setApplicationName("Cockatrice");
|
||||
|
||||
if (translationPath.isEmpty()) {
|
||||
#ifdef Q_OS_MAC
|
||||
translationPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
#elif defined(Q_OS_WIN)
|
||||
translationPath = app.applicationDirPath() + "/translations";
|
||||
#endif
|
||||
}
|
||||
|
||||
settingsCache = new SettingsCache;
|
||||
|
||||
qtTranslator = new QTranslator;
|
||||
translator = new QTranslator;
|
||||
installNewTranslator();
|
||||
|
||||
OracleWizard wizard;
|
||||
|
||||
QIcon icon(":/resources/appicon.svg");
|
||||
|
|
12
oracle/src/main.h
Normal file
12
oracle/src/main.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
class QTranslator;
|
||||
|
||||
extern QTranslator *translator;
|
||||
extern const QString translationPrefix;
|
||||
extern QString translationPath;
|
||||
|
||||
void installNewTranslator();
|
||||
|
||||
#endif
|
|
@ -12,6 +12,7 @@
|
|||
#include <QFileDialog>
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkAccessManager>
|
||||
|
@ -25,6 +26,8 @@
|
|||
|
||||
#include "oraclewizard.h"
|
||||
#include "oracleimporter.h"
|
||||
#include "main.h"
|
||||
#include "settingscache.h"
|
||||
|
||||
#ifdef HAS_ZLIB
|
||||
#include "zip/unzip.h"
|
||||
|
@ -40,6 +43,7 @@ OracleWizard::OracleWizard(QWidget *parent)
|
|||
: QWizard(parent)
|
||||
{
|
||||
settings = new QSettings(this);
|
||||
connect(settingsCache, SIGNAL(langChanged()), this, SLOT(updateLanguage()));
|
||||
|
||||
importer = new OracleImporter(
|
||||
#if QT_VERSION < 0x050000
|
||||
|
@ -54,8 +58,29 @@ OracleWizard::OracleWizard(QWidget *parent)
|
|||
addPage(new ChooseSetsPage);
|
||||
addPage(new SaveSetsPage);
|
||||
|
||||
retranslateUi();
|
||||
}
|
||||
|
||||
void OracleWizard::updateLanguage()
|
||||
{
|
||||
qApp->removeTranslator(translator);
|
||||
installNewTranslator();
|
||||
}
|
||||
|
||||
void OracleWizard::changeEvent(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::LanguageChange)
|
||||
retranslateUi();
|
||||
QDialog::changeEvent(event);
|
||||
}
|
||||
|
||||
void OracleWizard::retranslateUi()
|
||||
{
|
||||
setWindowTitle(tr("Oracle Importer"));
|
||||
QWizard::setButtonText(QWizard::FinishButton, tr("Save"));
|
||||
|
||||
for (int i = 0; i < pageIds().count(); i++)
|
||||
dynamic_cast<OracleWizardPage *>(page(i))->retranslateUi();
|
||||
}
|
||||
|
||||
void OracleWizard::accept()
|
||||
|
@ -78,31 +103,66 @@ void OracleWizard::disableButtons()
|
|||
IntroPage::IntroPage(QWidget *parent)
|
||||
: OracleWizardPage(parent)
|
||||
{
|
||||
setTitle(tr("Introduction"));
|
||||
|
||||
label = new QLabel(tr("This wizard will import the list of sets and cards "
|
||||
"that will be used by Cockatrice. You will need to "
|
||||
"specify an url or a filename that will be used as a "
|
||||
"source, and then choose the wanted sets from the list "
|
||||
"of the available ones."),
|
||||
this);
|
||||
label = new QLabel(this);
|
||||
label->setWordWrap(true);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(label);
|
||||
languageLabel = new QLabel(this);
|
||||
languageBox = new QComboBox(this);
|
||||
QString setLanguage = settingsCache->getLang();
|
||||
QStringList qmFiles = findQmFiles();
|
||||
for (int i = 0; i < qmFiles.size(); i++) {
|
||||
QString langName = languageName(qmFiles[i]);
|
||||
languageBox->addItem(langName, qmFiles[i]);
|
||||
if ((qmFiles[i] == setLanguage) || (setLanguage.isEmpty() && langName == tr("English")))
|
||||
languageBox->setCurrentIndex(i);
|
||||
}
|
||||
connect(languageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(languageBoxChanged(int)));
|
||||
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
layout->addWidget(label, 0, 0, 1, 2);
|
||||
layout->addWidget(languageLabel, 1, 0);
|
||||
layout->addWidget(languageBox, 1, 1);
|
||||
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
QStringList IntroPage::findQmFiles()
|
||||
{
|
||||
QDir dir(translationPath);
|
||||
QStringList fileNames = dir.entryList(QStringList(translationPrefix + "_*.qm"), QDir::Files, QDir::Name);
|
||||
fileNames.replaceInStrings(QRegExp(translationPrefix + "_(.*)\\.qm"), "\\1");
|
||||
return fileNames;
|
||||
}
|
||||
|
||||
QString IntroPage::languageName(const QString &qmFile)
|
||||
{
|
||||
QTranslator translator;
|
||||
translator.load(translationPrefix + "_" + qmFile + ".qm", translationPath);
|
||||
|
||||
return translator.translate("IntroPage", "English");
|
||||
}
|
||||
|
||||
void IntroPage::languageBoxChanged(int index)
|
||||
{
|
||||
settingsCache->setLang(languageBox->itemData(index).toString());
|
||||
}
|
||||
|
||||
void IntroPage::retranslateUi()
|
||||
{
|
||||
setTitle(tr("Introduction"));
|
||||
label->setText(tr("This wizard will import the list of sets and cards "
|
||||
"that will be used by Cockatrice.<br/>You will need to "
|
||||
"specify an url or a filename that will be used as a "
|
||||
"source, and then choose the wanted sets from the list "
|
||||
"of the available ones."));
|
||||
languageLabel->setText(tr("Language:"));
|
||||
}
|
||||
|
||||
LoadSetsPage::LoadSetsPage(QWidget *parent)
|
||||
: OracleWizardPage(parent), nam(0)
|
||||
{
|
||||
setTitle(tr("Source selection"));
|
||||
setSubTitle(tr("Please specify a source for the list of sets and cards. "
|
||||
"You can specify an url address that will be download or "
|
||||
"use an existing file from your computer."));
|
||||
|
||||
urlRadioButton = new QRadioButton(tr("Download url:"), this);
|
||||
fileRadioButton = new QRadioButton(tr("Local file:"), this);
|
||||
urlRadioButton = new QRadioButton(this);
|
||||
fileRadioButton = new QRadioButton(this);
|
||||
|
||||
urlLineEdit = new QLineEdit(this);
|
||||
fileLineEdit = new QLineEdit(this);
|
||||
|
@ -112,10 +172,10 @@ LoadSetsPage::LoadSetsPage(QWidget *parent)
|
|||
|
||||
urlRadioButton->setChecked(true);
|
||||
|
||||
urlButton = new QPushButton(tr("Restore default url"), this);
|
||||
urlButton = new QPushButton(this);
|
||||
connect(urlButton, SIGNAL(clicked()), this, SLOT(actRestoreDefaultUrl()));
|
||||
|
||||
fileButton = new QPushButton(tr("Choose file..."), this);
|
||||
fileButton = new QPushButton(this);
|
||||
connect(fileButton, SIGNAL(clicked()), this, SLOT(actLoadSetsFile()));
|
||||
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
|
@ -141,6 +201,19 @@ void LoadSetsPage::initializePage()
|
|||
progressBar->hide();
|
||||
}
|
||||
|
||||
void LoadSetsPage::retranslateUi()
|
||||
{
|
||||
setTitle(tr("Source selection"));
|
||||
setSubTitle(tr("Please specify a source for the list of sets and cards. "
|
||||
"You can specify an url address that will be download or "
|
||||
"use an existing file from your computer."));
|
||||
|
||||
urlRadioButton->setText(tr("Download url:"));
|
||||
fileRadioButton->setText(tr("Local file:"));
|
||||
urlButton->setText(tr("Restore default url"));
|
||||
fileButton->setText(tr("Choose file..."));
|
||||
}
|
||||
|
||||
void LoadSetsPage::actRestoreDefaultUrl()
|
||||
{
|
||||
urlLineEdit->setText(ALLSETS_URL);
|
||||
|
@ -356,11 +429,6 @@ void LoadSetsPage::importFinished()
|
|||
ChooseSetsPage::ChooseSetsPage(QWidget *parent)
|
||||
: OracleWizardPage(parent)
|
||||
{
|
||||
setTitle(tr("Sets selection"));
|
||||
setSubTitle(tr("The following sets has been found in the source file. "
|
||||
"Please mark the sets that will be imported.\n"
|
||||
"All core and expansion sets are selected by default."));
|
||||
|
||||
checkBoxLayout = new QVBoxLayout;
|
||||
|
||||
QWidget *checkboxFrame = new QWidget(this);
|
||||
|
@ -370,9 +438,9 @@ ChooseSetsPage::ChooseSetsPage(QWidget *parent)
|
|||
checkboxArea->setWidget(checkboxFrame);
|
||||
checkboxArea->setWidgetResizable(true);
|
||||
|
||||
checkAllButton = new QPushButton(tr("&Check all"));
|
||||
checkAllButton = new QPushButton(this);
|
||||
connect(checkAllButton, SIGNAL(clicked()), this, SLOT(actCheckAll()));
|
||||
uncheckAllButton = new QPushButton(tr("&Uncheck all"));
|
||||
uncheckAllButton = new QPushButton(this);
|
||||
connect(uncheckAllButton, SIGNAL(clicked()), this, SLOT(actUncheckAll()));
|
||||
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
|
@ -400,6 +468,17 @@ void ChooseSetsPage::initializePage()
|
|||
}
|
||||
}
|
||||
|
||||
void ChooseSetsPage::retranslateUi()
|
||||
{
|
||||
setTitle(tr("Sets selection"));
|
||||
setSubTitle(tr("The following sets has been found in the source file. "
|
||||
"Please mark the sets that will be imported.\n"
|
||||
"All core and expansion sets are selected by default."));
|
||||
|
||||
checkAllButton->setText(tr("&Check all"));
|
||||
uncheckAllButton->setText(tr("&Uncheck all"));
|
||||
}
|
||||
|
||||
void ChooseSetsPage::checkBoxChanged(int state)
|
||||
{
|
||||
QCheckBox *checkBox = qobject_cast<QCheckBox *>(sender());
|
||||
|
@ -438,12 +517,7 @@ bool ChooseSetsPage::validatePage()
|
|||
SaveSetsPage::SaveSetsPage(QWidget *parent)
|
||||
: OracleWizardPage(parent)
|
||||
{
|
||||
setTitle(tr("Sets imported"));
|
||||
setSubTitle(tr("The following sets has been imported. "
|
||||
"Press \"Save\" to save the imported cards to the Cockatrice database."));
|
||||
|
||||
defaultPathCheckBox = new QCheckBox(this);
|
||||
defaultPathCheckBox->setText(tr("Save to the default path (recommended)"));
|
||||
defaultPathCheckBox->setChecked(true);
|
||||
|
||||
messageLog = new QTextEdit(this);
|
||||
|
@ -471,6 +545,15 @@ void SaveSetsPage::initializePage()
|
|||
QMessageBox::critical(this, tr("Error"), tr("No set has been imported."));
|
||||
}
|
||||
|
||||
void SaveSetsPage::retranslateUi()
|
||||
{
|
||||
setTitle(tr("Sets imported"));
|
||||
setSubTitle(tr("The following sets has been imported. "
|
||||
"Press \"Save\" to save the imported cards to the Cockatrice database."));
|
||||
|
||||
defaultPathCheckBox->setText(tr("Save to the default path (recommended)"));
|
||||
}
|
||||
|
||||
void SaveSetsPage::updateTotalProgress(int cardsImported, int /* setIndex */, const QString &setName)
|
||||
{
|
||||
if (setName.isEmpty()) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
class QCheckBox;
|
||||
class QGroupBox;
|
||||
class QComboBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QRadioButton;
|
||||
|
@ -25,9 +26,17 @@ public:
|
|||
void accept();
|
||||
void enableButtons();
|
||||
void disableButtons();
|
||||
void retranslateUi();
|
||||
public:
|
||||
OracleImporter *importer;
|
||||
QSettings * settings;
|
||||
private slots:
|
||||
void updateLanguage();
|
||||
private:
|
||||
QStringList findQmFiles();
|
||||
QString languageName(const QString &qmFile);
|
||||
protected:
|
||||
void changeEvent(QEvent *event);
|
||||
};
|
||||
|
||||
|
||||
|
@ -36,6 +45,7 @@ class OracleWizardPage : public QWizardPage
|
|||
Q_OBJECT
|
||||
public:
|
||||
OracleWizardPage(QWidget *parent = 0): QWizardPage(parent) {};
|
||||
virtual void retranslateUi() = 0;
|
||||
protected:
|
||||
inline OracleWizard *wizard() { return (OracleWizard*) QWizardPage::wizard(); };
|
||||
};
|
||||
|
@ -44,9 +54,16 @@ class IntroPage : public OracleWizardPage
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
IntroPage(QWidget *parent = 0);
|
||||
IntroPage(QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
private:
|
||||
QLabel *label;
|
||||
QStringList findQmFiles();
|
||||
QString languageName(const QString &qmFile);
|
||||
private:
|
||||
QLabel *label, *languageLabel;
|
||||
QComboBox *languageBox;
|
||||
private slots:
|
||||
void languageBoxChanged(int index);
|
||||
};
|
||||
|
||||
class LoadSetsPage : public OracleWizardPage
|
||||
|
@ -54,6 +71,7 @@ class LoadSetsPage : public OracleWizardPage
|
|||
Q_OBJECT
|
||||
public:
|
||||
LoadSetsPage(QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
protected:
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
|
@ -85,6 +103,7 @@ class ChooseSetsPage : public OracleWizardPage
|
|||
Q_OBJECT
|
||||
public:
|
||||
ChooseSetsPage(QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
protected:
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
|
@ -103,6 +122,7 @@ class SaveSetsPage : public OracleWizardPage
|
|||
Q_OBJECT
|
||||
public:
|
||||
SaveSetsPage(QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
private:
|
||||
QTextEdit *messageLog;
|
||||
QCheckBox * defaultPathCheckBox;
|
||||
|
|
330
oracle/translations/oracle_en.ts
Normal file
330
oracle/translations/oracle_en.ts
Normal file
|
@ -0,0 +1,330 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>ChooseSetsPage</name>
|
||||
<message>
|
||||
<source>Sets selection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The following sets has been found in the source file. Please mark the sets that will be imported.
|
||||
All core and expansion sets are selected by default.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Check all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Uncheck all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please mark at least one set.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IntroPage</name>
|
||||
<message>
|
||||
<source>Introduction</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>English</source>
|
||||
<translation>English</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Language:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This wizard will import the list of sets and cards that will be used by Cockatrice.<br/>You will need to specify an url or a filename that will be used as a source, and then choose the wanted sets from the list of the available ones.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LoadSetsPage</name>
|
||||
<message>
|
||||
<source>Source selection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please specify a source for the list of sets and cards. You can specify an url address that will be download or use an existing file from your computer.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Download url:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Local file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restore default url</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose file...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load sets file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets JSON file (*.json *.zip)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets JSON file (*.json)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The provided url is not valid.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Downloading (0MB)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please choose a file.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot open file '%1'.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Downloading (%1MB)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Network error: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parsing file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to open Zip archive: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Zip extraction failed: the Zip archive doesn't contain exactly one file.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Zip extraction failed: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, this version of Oracle does not support zipped files.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do you want to try to download a fresh copy of the uncompressed file instead?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file was retrieved successfully, but it does not contain any sets data.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OracleImporter</name>
|
||||
<message>
|
||||
<source>Dummy set containing tokens</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OracleWizard</name>
|
||||
<message>
|
||||
<source>Oracle Importer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SaveSetsPage</name>
|
||||
<message>
|
||||
<source>Sets imported</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The following sets has been imported. Press "Save" to save the imported cards to the Cockatrice database.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save to the default path (recommended)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No set has been imported.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import finished: %1 cards.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1: %2 cards imported</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save card database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>XML; card database (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Success</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The card database has been saved successfully to
|
||||
%1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file could not be saved to %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnZip</name>
|
||||
<message>
|
||||
<source>ZIP operation completed successfully.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to initialize or load zlib library.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>zlib library error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to create or open file.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Partially corrupted archive. Some files might be extracted.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Corrupted archive.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wrong password.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No archive has been created yet.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File or directory does not exist.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File read error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File write error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File seek error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to create a directory.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid device.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid or incompatible zip archive.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Inconsistent headers. Archive might be corrupted.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Zip</name>
|
||||
<message>
|
||||
<source>ZIP operation completed successfully.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to initialize or load zlib library.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>zlib library error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to create or open file.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No archive has been created yet.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File or directory does not exist.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File read error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File write error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File seek error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown error.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
332
oracle/translations/oracle_it.ts
Normal file
332
oracle/translations/oracle_it.ts
Normal file
|
@ -0,0 +1,332 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>ChooseSetsPage</name>
|
||||
<message>
|
||||
<source>Sets selection</source>
|
||||
<translation>Selezione dei set</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The following sets has been found in the source file. Please mark the sets that will be imported.
|
||||
All core and expansion sets are selected by default.</source>
|
||||
<translation>I seguenti set sono stati trovati nel file. Seleziona i set che verranno importati.
|
||||
Tutti i set base e le espansioni sono selezionate di default.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Check all</source>
|
||||
<translation>Seleziona tutti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Uncheck all</source>
|
||||
<translation>Deseleziona tutti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation>Errore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please mark at least one set.</source>
|
||||
<translation>Seleziona perlomeno un set.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IntroPage</name>
|
||||
<message>
|
||||
<source>Introduction</source>
|
||||
<translation>Introduzione</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>English</source>
|
||||
<translation>Italiano</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Language:</source>
|
||||
<translation>Lingua:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This wizard will import the list of sets and cards that will be used by Cockatrice.<br/>You will need to specify an url or a filename that will be used as a source, and then choose the wanted sets from the list of the available ones.</source>
|
||||
<translation>Questo wizard importerà la lista dei set e delle carte che verranno usate da Cockatrice.<br/>Dovrai specificare un indirizzo url o il nome di un file che verrà utilizzato come sorgente, e poi selezionare i set dalla lista di quelli disponibili.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LoadSetsPage</name>
|
||||
<message>
|
||||
<source>Source selection</source>
|
||||
<translation>Selezione sorgente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please specify a source for the list of sets and cards. You can specify an url address that will be download or use an existing file from your computer.</source>
|
||||
<translation>Specifica una sorgente per la lista dei set e delle carte. Puoi specificare un indirizzo url da cui scaricare il file o alternativamente usare un file già presente nel tuo computer.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Download url:</source>
|
||||
<translation>Indirizzo download:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Local file:</source>
|
||||
<translation>File nel pc:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restore default url</source>
|
||||
<translation>Usa l'indirizzo predefinito</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose file...</source>
|
||||
<translation>Scegli file...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load sets file</source>
|
||||
<translation>Carica file dei set</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets JSON file (*.json *.zip)</source>
|
||||
<translation>File dei set JSON (*.json *.zip)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets JSON file (*.json)</source>
|
||||
<translation>File set set JSON (*.json)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation>Errore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The provided url is not valid.</source>
|
||||
<translation>L'indirizzo specificato non è valido.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Downloading (0MB)</source>
|
||||
<translation>Scaricamento (0MB)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please choose a file.</source>
|
||||
<translation>Selezina un file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot open file '%1'.</source>
|
||||
<translation>Impossibile aprire il file '%1'.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Downloading (%1MB)</source>
|
||||
<translation>Scaricamento (%1MB)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Network error: %1.</source>
|
||||
<translation>Errore di rete: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parsing file</source>
|
||||
<translation>Analisi dei file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to open Zip archive: %1.</source>
|
||||
<translation>Impossibile aprire il file Zip: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Zip extraction failed: the Zip archive doesn't contain exactly one file.</source>
|
||||
<translation>Estrazione file Zip fallita: lo Zip non contiene un solo file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Zip extraction failed: %1.</source>
|
||||
<translation>Estrazione file Zip fallita: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, this version of Oracle does not support zipped files.</source>
|
||||
<translation>Spiacente, ma questa versione di Oracle non supporta in file zippati.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do you want to try to download a fresh copy of the uncompressed file instead?</source>
|
||||
<translation>Vuoi provare a riscaricare un copia pulita del file non zippato?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file was retrieved successfully, but it does not contain any sets data.</source>
|
||||
<translation>Il file è stato analizzato correttamente, ma non contiene i dati di nessun set.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OracleImporter</name>
|
||||
<message>
|
||||
<source>Dummy set containing tokens</source>
|
||||
<translation>Set finto contenente i token</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OracleWizard</name>
|
||||
<message>
|
||||
<source>Oracle Importer</source>
|
||||
<translation>Oracle Importer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save</source>
|
||||
<translation>Salva</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SaveSetsPage</name>
|
||||
<message>
|
||||
<source>Sets imported</source>
|
||||
<translation>Set importati</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The following sets has been imported. Press "Save" to save the imported cards to the Cockatrice database.</source>
|
||||
<translation>I seguenti set sono stati importati. Premi "Salva" per salvare le carte importate nell'archivio di Cockatrice.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save to the default path (recommended)</source>
|
||||
<translation>Salva nel percorso predefinito (raccomandato)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation>Errore</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No set has been imported.</source>
|
||||
<translation>Nessun set importato.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import finished: %1 cards.</source>
|
||||
<translation>Importazione conclusa: %1 carte.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1: %2 cards imported</source>
|
||||
<translation>%1: %2 carte importate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save card database</source>
|
||||
<translation>Salva archivio carte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>XML; card database (*.xml)</source>
|
||||
<translation>XML; archivio carte (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Success</source>
|
||||
<translation>Successo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The card database has been saved successfully to
|
||||
%1</source>
|
||||
<translation>L'archivio delle carte è stato salvato correttamente su
|
||||
%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file could not be saved to %1</source>
|
||||
<translation>Impossibile salvare il file su %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UnZip</name>
|
||||
<message>
|
||||
<source>ZIP operation completed successfully.</source>
|
||||
<translation>Operazione ZIP completata con successo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to initialize or load zlib library.</source>
|
||||
<translation>Impossibile caricare le libreria zlib.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>zlib library error.</source>
|
||||
<translation>errore libreria zlib.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to create or open file.</source>
|
||||
<translation>Impossibile creare o aprire il file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Partially corrupted archive. Some files might be extracted.</source>
|
||||
<translation>Archivio parzialmente danneggiato. Alcuni file potrebbero essere stati estratti.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Corrupted archive.</source>
|
||||
<translation>Archivio danneggiato.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wrong password.</source>
|
||||
<translation>Password sbagliata.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No archive has been created yet.</source>
|
||||
<translation>L'archivio non è ancora stato creato.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File or directory does not exist.</source>
|
||||
<translation>Il file o la cartella non esiste.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File read error.</source>
|
||||
<translation>Errore di lettura del file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File write error.</source>
|
||||
<translation>Errore di scrittura del file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File seek error.</source>
|
||||
<translation>Errore di ricerca nel file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to create a directory.</source>
|
||||
<translation>Impossibile creare una cartella.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid device.</source>
|
||||
<translation>Dispositivo non valido.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid or incompatible zip archive.</source>
|
||||
<translation>Archivio zip non valido o incompatibile.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Inconsistent headers. Archive might be corrupted.</source>
|
||||
<translation>Intestazioni inconsistenti. L'archivio potrebbe essere danneggiato.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown error.</source>
|
||||
<translation>Errore sconosciuto.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Zip</name>
|
||||
<message>
|
||||
<source>ZIP operation completed successfully.</source>
|
||||
<translation>Operazione ZIP completata con successo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to initialize or load zlib library.</source>
|
||||
<translation>Impossibile caricare le libreria zlib.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>zlib library error.</source>
|
||||
<translation>errore libreria zlib.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to create or open file.</source>
|
||||
<translation>Impossibile creare o aprire il file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No archive has been created yet.</source>
|
||||
<translation>L'archivio non è ancora stato creato.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File or directory does not exist.</source>
|
||||
<translation>Il file o la cartella non esiste.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File read error.</source>
|
||||
<translation>Errore di lettura del file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File write error.</source>
|
||||
<translation>Errore di scrittura del file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File seek error.</source>
|
||||
<translation>Errore di ricerca nel file.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown error.</source>
|
||||
<translation>Errore sconosciuto.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Loading…
Reference in a new issue