diff --git a/launcher/modManager/chroniclesextractor.cpp b/launcher/modManager/chroniclesextractor.cpp
index 3c3f0ff65..c15e621c7 100644
--- a/launcher/modManager/chroniclesextractor.cpp
+++ b/launcher/modManager/chroniclesextractor.cpp
@@ -43,19 +43,21 @@ void ChroniclesExtractor::removeTempDir()
int ChroniclesExtractor::getChronicleNo()
{
- for (size_t i = 1; i < chronicles.size(); ++i)
- {
- QString chronicleName = chronicles.at(i);
+ QStringList appDirCandidates = tempDir.entryList({"app"}, QDir::Filter::Dirs);
- QStringList appDirCandidates = tempDir.entryList({"app"}, QDir::Filter::Dirs);
+ if (!appDirCandidates.empty())
+ {
QDir appDir = tempDir.filePath(appDirCandidates.front());
- QStringList chroniclesDirCandidates = appDir.entryList({chronicleName}, QDir::Filter::Dirs);
+ for (size_t i = 1; i < chronicles.size(); ++i)
+ {
+ QString chronicleName = chronicles.at(i);
+ QStringList chroniclesDirCandidates = appDir.entryList({chronicleName}, QDir::Filter::Dirs);
- if (!chroniclesDirCandidates.empty())
- return i;
+ if (!chroniclesDirCandidates.empty())
+ return i;
+ }
}
-
QMessageBox::critical(parent, tr("Invalid file selected"), tr("You have to select a Heroes Chronicles installer file!"));
return 0;
}
@@ -138,8 +140,8 @@ void ChroniclesExtractor::createChronicleMod(int no)
QJsonObject mod
{
{ "modType", "Expansion" },
- { "name", QString::number(no) + " - " + tmpChronicles },
- { "description", tr("Heroes Chronicles") + " - " + QString::number(no) + " - " + tmpChronicles },
+ { "name", QString("%1 - %2").arg(no).arg(tmpChronicles) },
+ { "description", tr("Heroes Chronicles %1 - %2").arg(no).arg(tmpChronicles) },
{ "author", "3DO" },
{ "version", "1.0" },
{ "contact", "vcmi.eu" },
diff --git a/launcher/modManager/chroniclesextractor.h b/launcher/modManager/chroniclesextractor.h
index 460fd51b2..2e55a7677 100644
--- a/launcher/modManager/chroniclesextractor.h
+++ b/launcher/modManager/chroniclesextractor.h
@@ -31,7 +31,7 @@ class ChroniclesExtractor : public QObject
void extractFiles(int no) const;
const QStringList chronicles = {
- "", // fake 0th "chronicle", to create 1-based list
+ {}, // fake 0th "chronicle", to create 1-based list
"Warlords of the Wasteland",
"Conquest of the Underworld",
"Masters of the Elements",
diff --git a/launcher/translation/chinese.ts b/launcher/translation/chinese.ts
index 2258fc1e4..473c6929a 100644
--- a/launcher/translation/chinese.ts
+++ b/launcher/translation/chinese.ts
@@ -1086,6 +1086,11 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
英雄无敌历代记
+
+
+
+ 英雄无敌历代记 %1 - %2
+
File size
diff --git a/launcher/translation/czech.ts b/launcher/translation/czech.ts
index e5b7ceb73..0e7c7003e 100644
--- a/launcher/translation/czech.ts
+++ b/launcher/translation/czech.ts
@@ -832,6 +832,11 @@ Režim celé obrazovky - hra pokryje celou vaši obrazovku a použije vybrané r
Heroes Chronicles
+
+
+
+ Heroes Chronicles %1 - %2
+
File size
diff --git a/launcher/translation/french.ts b/launcher/translation/french.ts
index e2d17a8f0..a2f0fb890 100644
--- a/launcher/translation/french.ts
+++ b/launcher/translation/french.ts
@@ -1055,6 +1055,11 @@ Mode exclusif plein écran - le jeu couvrira l"intégralité de votre écra
+
+
+
+
+
File size
diff --git a/launcher/translation/german.ts b/launcher/translation/german.ts
index ce45eb0ea..89bcf032a 100644
--- a/launcher/translation/german.ts
+++ b/launcher/translation/german.ts
@@ -1080,6 +1080,11 @@ Exklusiver Vollbildmodus - das Spiel bedeckt den gesamten Bildschirm und verwend
Heroes Chronicles
+
+
+
+ Heroes Chronicles %1 - %2
+
File size
diff --git a/launcher/translation/polish.ts b/launcher/translation/polish.ts
index 04fecd027..83112dcce 100644
--- a/launcher/translation/polish.ts
+++ b/launcher/translation/polish.ts
@@ -1080,6 +1080,11 @@ Pełny ekran klasyczny - gra przysłoni cały ekran uruchamiając się w wybrane
Heroes Kroniki
+
+
+
+ Heroes Kroniki %1 - %2
+
File size
diff --git a/launcher/translation/portuguese.ts b/launcher/translation/portuguese.ts
index ecda0a2df..e0935ff74 100644
--- a/launcher/translation/portuguese.ts
+++ b/launcher/translation/portuguese.ts
@@ -898,6 +898,11 @@ Modo de tela cheia exclusivo - o jogo cobrirá toda a sua tela e usará a resolu
Heroes Chronicles
+
+
+
+
+
File size
diff --git a/launcher/translation/russian.ts b/launcher/translation/russian.ts
index 57469830c..7b835d383 100644
--- a/launcher/translation/russian.ts
+++ b/launcher/translation/russian.ts
@@ -918,6 +918,11 @@ Fullscreen Exclusive Mode - the game will cover the entirety of your screen and
+
+
+
+
+
File size
diff --git a/launcher/translation/spanish.ts b/launcher/translation/spanish.ts
index 6512c65f0..8d39c658b 100644
--- a/launcher/translation/spanish.ts
+++ b/launcher/translation/spanish.ts
@@ -949,6 +949,11 @@ Pantalla completa - el juego cubrirá la totalidad de la pantalla y utilizará l
+
+
+
+
+
File size
diff --git a/launcher/translation/swedish.ts b/launcher/translation/swedish.ts
index 9d013274d..5c0bb329a 100644
--- a/launcher/translation/swedish.ts
+++ b/launcher/translation/swedish.ts
@@ -1074,6 +1074,11 @@ Exklusivt helskärmsläge - spelet kommer att täcka hela skärmen och använda
Heroes Chronicles
+
+
+
+ Heroes Chronicles %1 - %2
+
File size
diff --git a/launcher/translation/ukrainian.ts b/launcher/translation/ukrainian.ts
index cf5349dcb..3a9bcfec0 100644
--- a/launcher/translation/ukrainian.ts
+++ b/launcher/translation/ukrainian.ts
@@ -1056,6 +1056,11 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
Хроніки Героїв
+
+
+
+ Хроніки Героїв %1 - %2
+
File size
diff --git a/launcher/translation/vietnamese.ts b/launcher/translation/vietnamese.ts
index adac3a14b..de08a8eee 100644
--- a/launcher/translation/vietnamese.ts
+++ b/launcher/translation/vietnamese.ts
@@ -934,6 +934,11 @@ Toàn màn hình riêng biệt - Trò chơi chạy toàn màn hình và dùng đ
+
+
+
+
+
File size