Skip to content

Commit b26fb5c

Browse files
authored
Merge pull request #31 from hjaltisan/EO11386
EO-11386
2 parents f5e5187 + ea7bf47 commit b26fb5c

16 files changed

+468
-127
lines changed

src/libs/installer/eventlogger.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -333,20 +333,6 @@ void EventLogger::uninstallerShutDown(eve_launcher::uninstaller::Page page, eve_
333333
m_httpThreadController->lastChanceToFinish();
334334
}
335335

336-
void EventLogger::uninstallerDetailsDisplayed()
337-
{
338-
auto evt = new eve_launcher::uninstaller::DetailsDisplayed;
339-
evt->set_allocated_event_metadata(getEventMetadata());
340-
sendAllocatedEvent(evt);
341-
}
342-
343-
void EventLogger::uninstallerDetailsHidden()
344-
{
345-
auto evt = new eve_launcher::uninstaller::DetailsHidden;
346-
evt->set_allocated_event_metadata(getEventMetadata());
347-
sendAllocatedEvent(evt);
348-
}
349-
350336
void EventLogger::uninstallerUninstallationStarted()
351337
{
352338
auto evt = new eve_launcher::uninstaller::UninstallationStarted;
@@ -473,20 +459,6 @@ void EventLogger::installerPreparationFinished(int duration)
473459
sendAllocatedEvent(evt);
474460
}
475461

476-
void EventLogger::installerDetailsDisplayed()
477-
{
478-
auto evt = new eve_launcher::installer::DetailsDisplayed;
479-
evt->set_allocated_event_metadata(getEventMetadata());
480-
sendAllocatedEvent(evt);
481-
}
482-
483-
void EventLogger::installerDetailsHidden()
484-
{
485-
auto evt = new eve_launcher::installer::DetailsHidden;
486-
evt->set_allocated_event_metadata(getEventMetadata());
487-
sendAllocatedEvent(evt);
488-
}
489-
490462
void EventLogger::installerAutoRunEnabled()
491463
{
492464
auto evt = new eve_launcher::installer::AutoRunEnabled;

src/libs/installer/eventlogger.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class EventLogger : QObject
2525
void uninstallerFinishedPageDisplayed();
2626
void uninstallerFailedPageDisplayed();
2727
void uninstallerShutDown(eve_launcher::uninstaller::Page page, eve_launcher::uninstaller::ShutDown_State state, bool finishButton);
28-
void uninstallerDetailsDisplayed();
29-
void uninstallerDetailsHidden();
3028
void uninstallerUninstallationStarted();
3129
void uninstallerUninstallationInterrupted(int duration);
3230
void uninstallerUninstallationFinished(int duration);
@@ -44,8 +42,6 @@ class EventLogger : QObject
4442
void installerShutDown(eve_launcher::installer::Page page, eve_launcher::installer::ShutDown_State state, bool finishButton);
4543
void installerPreparationStarted();
4644
void installerPreparationFinished(int duration);
47-
void installerDetailsDisplayed();
48-
void installerDetailsHidden();
4945
void installerAutoRunEnabled();
5046
void installerAutoRunDisabled();
5147
void installerEulaAccepted();

src/libs/installer/installereventoperation.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,6 @@ bool InstallerEventOperation::sendUninstallerEvent(QStringList args)
167167

168168
EventLogger::instance()->uninstallerShutDown(page, state, finishButton);
169169
}
170-
else if (event == QString::fromLatin1("DetailsDisplayed"))
171-
{
172-
EventLogger::instance()->uninstallerDetailsDisplayed();
173-
}
174-
else if (event == QString::fromLatin1("DetailsHidden"))
175-
{
176-
EventLogger::instance()->uninstallerDetailsHidden();
177-
}
178170
else if (event == QString::fromLatin1("UninstallationStarted"))
179171
{
180172
EventLogger::instance()->uninstallerUninstallationStarted();
@@ -292,14 +284,6 @@ bool InstallerEventOperation::sendInstallerEvent(QStringList args)
292284

293285
EventLogger::instance()->installerPreparationFinished(duration);
294286
}
295-
else if (event == QString::fromLatin1("DetailsDisplayed"))
296-
{
297-
EventLogger::instance()->installerDetailsDisplayed();
298-
}
299-
else if (event == QString::fromLatin1("DetailsHidden"))
300-
{
301-
EventLogger::instance()->installerDetailsHidden();
302-
}
303287
else if (event == QString::fromLatin1("AutoRunEnabled"))
304288
{
305289
EventLogger::instance()->installerAutoRunEnabled();

src/libs/installer/packagemanagergui.cpp

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,27 @@ PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent)
301301
, m_core(core)
302302
{
303303
if (m_core->isInstaller())
304-
setWindowTitle(tr("%1 Setup").arg(m_core->value(scTitle)));
304+
{
305+
if (m_core->isCustomInstaller())
306+
{
307+
setWindowTitle(tr("EVE Online Launcher Setup"));
308+
}
309+
else
310+
{
311+
setWindowTitle(tr("%1 Setup").arg(m_core->value(scTitle)));
312+
}
313+
}
305314
else
306-
setWindowTitle(tr("Maintain %1").arg(m_core->value(scTitle)));
315+
{
316+
if (m_core->isCustomInstaller())
317+
{
318+
setWindowTitle(tr("EVE Online Uninstaller"));
319+
}
320+
else
321+
{
322+
setWindowTitle(tr("Maintain %1").arg(m_core->value(scTitle)));
323+
}
324+
}
307325
setWindowFlags(windowFlags() &~ Qt::WindowContextHelpButtonHint);
308326

309327
#ifndef Q_OS_MACOS
@@ -1778,8 +1796,7 @@ CustomIntroductionPage::CustomIntroductionPage(PackageManagerCore *core)
17781796
m_msgLabel = new QLabel(this);
17791797
m_msgLabel->setWordWrap(true);
17801798
m_msgLabel->setObjectName(QLatin1String("MessageLabel"));
1781-
// m_msgLabel->setText(tr("Welcome to the %1 Setup Wizard.").arg(productName()));
1782-
m_msgLabel->setText(tr("Please specify the directory where %1 will be installed.").arg(productName()));
1799+
m_msgLabel->setText(tr("Install location:"));
17831800
layout->addWidget(m_msgLabel);
17841801

17851802
QHBoxLayout *hlayout = new QHBoxLayout;
@@ -1796,7 +1813,7 @@ CustomIntroductionPage::CustomIntroductionPage(PackageManagerCore *core)
17961813
m_browseButton->setObjectName(QLatin1String("BrowseDirectoryButton"));
17971814
connect(m_browseButton, &QAbstractButton::clicked, this, &CustomIntroductionPage::dirRequested);
17981815
m_browseButton->setShortcut(QKeySequence(tr("Alt+R", "browse file system to choose a file")));
1799-
m_browseButton->setText(tr("B&rowse..."));
1816+
m_browseButton->setText(tr("Change..."));
18001817
hlayout->addWidget(m_browseButton);
18011818

18021819
layout->addLayout(hlayout);
@@ -2309,9 +2326,9 @@ void CustomIntroductionPage::entering()
23092326
if (core->isUninstaller()) {
23102327
// m_taskDetailsBrowser->setVisible(false);
23112328
setButtonText(QWizard::CommitButton, tr("U&ninstall"));
2312-
setColoredTitle(tr("Ready to Uninstall %1").arg(productName()));
2329+
setColoredTitle(tr("Ready to Uninstall"));
23132330
m_spaceLabel->setText(tr("Setup is now ready to begin removing %1 from your computer.<br>"
2314-
"<font color=\"red\">The program directory %2 will be deleted completely</font>, "
2331+
"<font color=\"red\">%2 will be deleted completely</font>, "
23152332
"including all content in that directory!")
23162333
.arg(productName(),
23172334
QDir::toNativeSeparators(QDir(core->value(scTargetDir))
@@ -2343,8 +2360,7 @@ void CustomIntroductionPage::entering()
23432360

23442361
QString installRedistText = core->value(QLatin1String("InstallRedists"), QLatin1String("false"));
23452362
if (installRedistText == QLatin1String("true")) {
2346-
m_redistLabel->setText(tr("Your system is missing C++ runtime that is needed to run the EVE Launcher, "
2347-
"so the missing runtime will be installed on your computer as part of the installation."));
2363+
m_redistLabel->setText(tr("Update for Universal C Runtime in Windows will be installed."));
23482364
} else {
23492365
m_redistLabel->setVisible(false);
23502366
}

src/sdk/installerbase.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,16 @@ int InstallerBase::run()
280280
const QString newDirectory = QLatin1String(":/translations_new");
281281
const QStringList translations = m_core->settings().translations();
282282
const bool isChinaInstaller = m_core->settings().isChinaInstaller();
283+
const bool isCustomInstaller = m_core->isCustomInstaller();
284+
QStringList uiLanguages = QLocale().uiLanguages();
285+
int allowedLanguages [6] = { QLocale::English, QLocale::German, QLocale::French, QLocale::Russian, QLocale::Japanese, QLocale::Chinese };
283286

284287
if (isChinaInstaller) {
285288
QLocale locale = QLocale::Chinese;
286289
QScopedPointer<QTranslator> qtTranslator(new QTranslator(QCoreApplication::instance()));
287-
bool qtLoaded = qtTranslator->load(locale, QLatin1String("qt"),
288-
QLatin1String("_"), newDirectory);
290+
bool qtLoaded = qtTranslator->load(locale, QLatin1String("qt"), QLatin1String("_"), newDirectory);
289291
if (!qtLoaded)
290-
qtLoaded = qtTranslator->load(locale, QLatin1String("qt"),
291-
QLatin1String("_"), directory);
292+
qtLoaded = qtTranslator->load(locale, QLatin1String("qt"), QLatin1String("_"), directory);
292293

293294
if (qtLoaded) {
294295
QCoreApplication::instance()->installTranslator(qtTranslator.take());
@@ -303,6 +304,15 @@ int InstallerBase::run()
303304
} else {
304305
if (translations.isEmpty()) {
305306
foreach (const QLocale locale, QLocale().uiLanguages()) {
307+
// Is this language listed in our allowed languages?
308+
int *languageIndex = std::find(std::begin(allowedLanguages), std::end(allowedLanguages), locale.language());
309+
310+
// If we are using the custom installer and the language is not allowed, skip it
311+
if (isCustomInstaller && languageIndex == std::end(allowedLanguages))
312+
{
313+
continue;
314+
}
315+
306316
QScopedPointer<QTranslator> qtTranslator(new QTranslator(QCoreApplication::instance()));
307317
bool qtLoaded = qtTranslator->load(locale, QLatin1String("qt"),
308318
QLatin1String("_"), newDirectory);

src/sdk/translations/ifw_ca.ts

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,31 @@ S&apos;instal·la el component %1...</translation>
25672567
-->
25682568

25692569

2570+
<!--
2571+
==============================================================================================
2572+
=== | START | QInstaller::PackageManagerGui | ================================================
2573+
==============================================================================================
2574+
Here we are providing translations for the new installer/uninstaller names.
2575+
==============================================================================================
2576+
-->
2577+
<context>
2578+
<name>QInstaller::PackageManagerGui</name>
2579+
<message>
2580+
<source>EVE Online Launcher Setup</source>
2581+
<translation type="unfinished"></translation>
2582+
</message>
2583+
<message>
2584+
<source>EVE Online Uninstaller</source>
2585+
<translation type="unfinished"></translation>
2586+
</message>
2587+
</context>
2588+
<!--
2589+
==============================================================================================
2590+
=== | END | QInstaller::PackageManagerGui | ==================================================
2591+
==============================================================================================
2592+
-->
2593+
2594+
25702595
<!--
25712596
==============================================================================================
25722597
=== | START | CustomIntroductionPage | =======================================================
@@ -2630,8 +2655,8 @@ S&apos;instal·la el component %1...</translation>
26302655
<translation>Llest per a desinstal·lar</translation>
26312656
</message>
26322657
<message>
2633-
<source>Setup is now ready to begin removing %1 from your computer.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;The program directory %2 will be deleted completely&lt;/font&gt;, including all content in that directory!</source>
2634-
<translation>El programa d&apos;instal·lació està preparat per a començar a eliminar %1 de l&apos;ordinador.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;El directori del programa %2 se suprimirà completament&lt;/font&gt;, incloent tot el contingut d&apos;aquest directori.</translation>
2658+
<source>Setup is now ready to begin removing %1 from your computer.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;%2 will be deleted completely&lt;/font&gt;, including all content in that directory!</source>
2659+
<translation type="unfinished">El programa d&apos;instal·lació està preparat per a començar a eliminar %1 de l&apos;ordinador.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;El directori del programa %2 se suprimirà completament&lt;/font&gt;, incloent tot el contingut d&apos;aquest directori.</translation>
26352660
</message>
26362661
<message>
26372662
<source>U&amp;pdate</source>
@@ -2662,17 +2687,17 @@ S&apos;instal·la el component %1...</translation>
26622687
<translation>Carpeta d&apos;instal·lació</translation>
26632688
</message>
26642689
<message>
2665-
<source>Please specify the directory where %1 will be installed.</source>
2666-
<translation>Especifiqueu el directori en el que s&apos;instal·larà %1.</translation>
2690+
<source>Install location:</source>
2691+
<translation type="unfinished"></translation>
26672692
</message>
26682693
<message>
26692694
<source>Alt+R</source>
26702695
<comment>browse file system to choose a file</comment>
26712696
<translation>Alt+X</translation>
26722697
</message>
26732698
<message>
2674-
<source>B&amp;rowse...</source>
2675-
<translation>E&amp;xplora...</translation>
2699+
<source>Change...</source>
2700+
<translation type="unfinished"></translation>
26762701
</message>
26772702
<message>
26782703
<source>The directory you selected already exists and contains an installation. Choose a different target for installation.</source>
@@ -2740,6 +2765,14 @@ Voleu continuar?</translation>
27402765
<source>Error</source>
27412766
<translation>Error</translation>
27422767
</message>
2768+
<message>
2769+
<source>Update for Universal C Runtime in Windows will be installed.</source>
2770+
<translation type="unfinished"></translation>
2771+
</message>
2772+
<message>
2773+
<source>%1 Required, %2 Available.</source>
2774+
<translation type="unfinished"></translation>
2775+
</message>
27432776
</context>
27442777
<!--
27452778
==============================================================================================

src/sdk/translations/ifw_da.ts

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,6 +2539,31 @@ Installerer komponenten %1...</translation>
25392539
-->
25402540

25412541

2542+
<!--
2543+
==============================================================================================
2544+
=== | START | QInstaller::PackageManagerGui | ================================================
2545+
==============================================================================================
2546+
Here we are providing translations for the new installer/uninstaller names.
2547+
==============================================================================================
2548+
-->
2549+
<context>
2550+
<name>QInstaller::PackageManagerGui</name>
2551+
<message>
2552+
<source>EVE Online Launcher Setup</source>
2553+
<translation type="unfinished"></translation>
2554+
</message>
2555+
<message>
2556+
<source>EVE Online Uninstaller</source>
2557+
<translation type="unfinished"></translation>
2558+
</message>
2559+
</context>
2560+
<!--
2561+
==============================================================================================
2562+
=== | END | QInstaller::PackageManagerGui | ==================================================
2563+
==============================================================================================
2564+
-->
2565+
2566+
25422567
<!--
25432568
==============================================================================================
25442569
=== | START | CustomIntroductionPage | =======================================================
@@ -2602,8 +2627,8 @@ Installerer komponenten %1...</translation>
26022627
<translation>Klar til afinstallation</translation>
26032628
</message>
26042629
<message>
2605-
<source>Setup is now ready to begin removing %1 from your computer.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;The program directory %2 will be deleted completely&lt;/font&gt;, including all content in that directory!</source>
2606-
<translation>Opsætningen er nu klar til at begynde fjernelsen af %1 fra din computer.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;Programmappen %2 slettes fuldstændigt&lt;/font&gt;, inklusiv alt indhold i mappen!</translation>
2630+
<source>Setup is now ready to begin removing %1 from your computer.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;%2 will be deleted completely&lt;/font&gt;, including all content in that directory!</source>
2631+
<translation type="unfinished">Opsætningen er nu klar til at begynde fjernelsen af %1 fra din computer.&lt;br&gt;&lt;font color=&quot;red&quot;&gt;Programmappen %2 slettes fuldstændigt&lt;/font&gt;, inklusiv alt indhold i mappen!</translation>
26072632
</message>
26082633
<message>
26092634
<source>U&amp;pdate</source>
@@ -2658,17 +2683,17 @@ Installerer komponenten %1...</translation>
26582683
<translation>Installationsmappe</translation>
26592684
</message>
26602685
<message>
2661-
<source>Please specify the directory where %1 will be installed.</source>
2662-
<translation>Angiv venligst mappen hvor %1 skal installeres.</translation>
2686+
<source>Install location:</source>
2687+
<translation type="unfinished"></translation>
26632688
</message>
26642689
<message>
26652690
<source>Alt+R</source>
26662691
<comment>browse file system to choose a file</comment>
26672692
<translation>Alt+G</translation>
26682693
</message>
26692694
<message>
2670-
<source>B&amp;rowse...</source>
2671-
<translation>&amp;Gennemse...</translation>
2695+
<source>Change...</source>
2696+
<translation type="unfinished"></translation>
26722697
</message>
26732698
<message>
26742699
<source>The directory you selected already exists and contains an installation. Choose a different target for installation.</source>
@@ -2736,6 +2761,14 @@ Vil du fortsætte?</translation>
27362761
<source>Error</source>
27372762
<translation>Fejl</translation>
27382763
</message>
2764+
<message>
2765+
<source>Update for Universal C Runtime in Windows will be installed.</source>
2766+
<translation type="unfinished"></translation>
2767+
</message>
2768+
<message>
2769+
<source>%1 Required, %2 Available.</source>
2770+
<translation type="unfinished"></translation>
2771+
</message>
27392772
</context>
27402773
<!--
27412774
==============================================================================================

0 commit comments

Comments
 (0)