mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
Fixes according to review
This commit is contained in:
parent
80f5aa8336
commit
5d65816c25
@ -43,19 +43,21 @@ void ChroniclesExtractor::removeTempDir()
|
|||||||
|
|
||||||
int ChroniclesExtractor::getChronicleNo()
|
int ChroniclesExtractor::getChronicleNo()
|
||||||
{
|
{
|
||||||
for (size_t i = 1; i < chronicles.size(); ++i)
|
QStringList appDirCandidates = tempDir.entryList({"app"}, QDir::Filter::Dirs);
|
||||||
{
|
|
||||||
QString chronicleName = chronicles.at(i);
|
|
||||||
|
|
||||||
QStringList appDirCandidates = tempDir.entryList({"app"}, QDir::Filter::Dirs);
|
if (!appDirCandidates.empty())
|
||||||
|
{
|
||||||
QDir appDir = tempDir.filePath(appDirCandidates.front());
|
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())
|
if (!chroniclesDirCandidates.empty())
|
||||||
return i;
|
return i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox::critical(parent, tr("Invalid file selected"), tr("You have to select a Heroes Chronicles installer file!"));
|
QMessageBox::critical(parent, tr("Invalid file selected"), tr("You have to select a Heroes Chronicles installer file!"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -138,8 +140,8 @@ void ChroniclesExtractor::createChronicleMod(int no)
|
|||||||
QJsonObject mod
|
QJsonObject mod
|
||||||
{
|
{
|
||||||
{ "modType", "Expansion" },
|
{ "modType", "Expansion" },
|
||||||
{ "name", QString::number(no) + " - " + tmpChronicles },
|
{ "name", QString("%1 - %2").arg(no).arg(tmpChronicles) },
|
||||||
{ "description", tr("Heroes Chronicles") + " - " + QString::number(no) + " - " + tmpChronicles },
|
{ "description", tr("Heroes Chronicles %1 - %2").arg(no).arg(tmpChronicles) },
|
||||||
{ "author", "3DO" },
|
{ "author", "3DO" },
|
||||||
{ "version", "1.0" },
|
{ "version", "1.0" },
|
||||||
{ "contact", "vcmi.eu" },
|
{ "contact", "vcmi.eu" },
|
||||||
|
@ -31,7 +31,7 @@ class ChroniclesExtractor : public QObject
|
|||||||
void extractFiles(int no) const;
|
void extractFiles(int no) const;
|
||||||
|
|
||||||
const QStringList chronicles = {
|
const QStringList chronicles = {
|
||||||
"", // fake 0th "chronicle", to create 1-based list
|
{}, // fake 0th "chronicle", to create 1-based list
|
||||||
"Warlords of the Wasteland",
|
"Warlords of the Wasteland",
|
||||||
"Conquest of the Underworld",
|
"Conquest of the Underworld",
|
||||||
"Masters of the Elements",
|
"Masters of the Elements",
|
||||||
|
@ -1086,6 +1086,11 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>英雄无敌历代记</translation>
|
<translation>英雄无敌历代记</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished">英雄无敌历代记 %1 - %2</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -832,6 +832,11 @@ Režim celé obrazovky - hra pokryje celou vaši obrazovku a použije vybrané r
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>Heroes Chronicles</translation>
|
<translation>Heroes Chronicles</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished">Heroes Chronicles %1 - %2</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -1055,6 +1055,11 @@ Mode exclusif plein écran - le jeu couvrira l"intégralité de votre écra
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -1080,6 +1080,11 @@ Exklusiver Vollbildmodus - das Spiel bedeckt den gesamten Bildschirm und verwend
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>Heroes Chronicles</translation>
|
<translation>Heroes Chronicles</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished">Heroes Chronicles %1 - %2</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -1080,6 +1080,11 @@ Pełny ekran klasyczny - gra przysłoni cały ekran uruchamiając się w wybrane
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>Heroes Kroniki</translation>
|
<translation>Heroes Kroniki</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished">Heroes Kroniki %1 - %2</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -898,6 +898,11 @@ Modo de tela cheia exclusivo - o jogo cobrirá toda a sua tela e usará a resolu
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>Heroes Chronicles</translation>
|
<translation>Heroes Chronicles</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -918,6 +918,11 @@ Fullscreen Exclusive Mode - the game will cover the entirety of your screen and
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -949,6 +949,11 @@ Pantalla completa - el juego cubrirá la totalidad de la pantalla y utilizará l
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -1074,6 +1074,11 @@ Exklusivt helskärmsläge - spelet kommer att täcka hela skärmen och använda
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>Heroes Chronicles</translation>
|
<translation>Heroes Chronicles</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished">Heroes Chronicles %1 - %2</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -1056,6 +1056,11 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation>Хроніки Героїв</translation>
|
<translation>Хроніки Героїв</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished">Хроніки Героїв %1 - %2</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
@ -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 đ
|
|||||||
<source>Heroes Chronicles</source>
|
<source>Heroes Chronicles</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../modManager/chroniclesextractor.cpp" line="144"/>
|
||||||
|
<source>Heroes Chronicles %1 - %2</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>File size</name>
|
<name>File size</name>
|
||||||
|
Loading…
Reference in New Issue
Block a user