mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 18:06:26 -07:00
Compare commits
2 commits
42a3930faa
...
cfc6d5dfed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfc6d5dfed | ||
|
|
26167fe3e9 |
2 changed files with 33 additions and 28 deletions
|
|
@ -217,27 +217,32 @@ void CockatriceXml3Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
|||
// NOTE: attributes must be read before readElementText()
|
||||
QXmlStreamAttributes attrs = xml.attributes();
|
||||
QString setName = xml.readElementText(QXmlStreamReader::IncludeChildElements);
|
||||
PrintingInfo setInfo(internalAddSet(setName));
|
||||
if (attrs.hasAttribute("muId")) {
|
||||
setInfo.setProperty("muid", attrs.value("muId").toString());
|
||||
}
|
||||
auto set = internalAddSet(setName);
|
||||
// Only load printings from sets the user has enabled, matching the v4 loader's
|
||||
// behaviour. Without this check, disabling a set has no effect on v3 databases.
|
||||
if (set->getEnabled()) {
|
||||
PrintingInfo setInfo(set);
|
||||
if (attrs.hasAttribute("muId")) {
|
||||
setInfo.setProperty("muid", attrs.value("muId").toString());
|
||||
}
|
||||
|
||||
if (attrs.hasAttribute("muId")) {
|
||||
setInfo.setProperty("uuid", attrs.value("uuId").toString());
|
||||
}
|
||||
if (attrs.hasAttribute("uuId")) {
|
||||
setInfo.setProperty("uuid", attrs.value("uuId").toString());
|
||||
}
|
||||
|
||||
if (attrs.hasAttribute("picURL")) {
|
||||
setInfo.setProperty("picurl", attrs.value("picURL").toString());
|
||||
}
|
||||
if (attrs.hasAttribute("picURL")) {
|
||||
setInfo.setProperty("picurl", attrs.value("picURL").toString());
|
||||
}
|
||||
|
||||
if (attrs.hasAttribute("num")) {
|
||||
setInfo.setProperty("num", attrs.value("num").toString());
|
||||
}
|
||||
if (attrs.hasAttribute("num")) {
|
||||
setInfo.setProperty("num", attrs.value("num").toString());
|
||||
}
|
||||
|
||||
if (attrs.hasAttribute("rarity")) {
|
||||
setInfo.setProperty("rarity", attrs.value("rarity").toString());
|
||||
if (attrs.hasAttribute("rarity")) {
|
||||
setInfo.setProperty("rarity", attrs.value("rarity").toString());
|
||||
}
|
||||
_sets[setName].append(setInfo);
|
||||
}
|
||||
_sets[setName].append(setInfo);
|
||||
// related cards
|
||||
} else if (xmlName == "related" || xmlName == "reverse-related") {
|
||||
CardRelationType attach = CardRelationType::DoesNotAttach;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
<location filename="src/pages.cpp" line="228"/>
|
||||
<source>Sets file (%1)</source>
|
||||
<oldsource>Sets JSON file (%1)</oldsource>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Archivo de ediciones (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="258"/>
|
||||
|
|
@ -172,7 +172,7 @@
|
|||
<message>
|
||||
<location filename="src/pages.cpp" line="726"/>
|
||||
<source>spoiler</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>spoiler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="731"/>
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
<message>
|
||||
<location filename="src/pages.cpp" line="735"/>
|
||||
<source>Local file:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Archivo local:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="736"/>
|
||||
|
|
@ -202,7 +202,7 @@
|
|||
<message>
|
||||
<location filename="src/pages.cpp" line="737"/>
|
||||
<source>Choose file...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Elegir archivo...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="739"/>
|
||||
|
|
@ -230,7 +230,7 @@
|
|||
<message>
|
||||
<location filename="src/pages.cpp" line="681"/>
|
||||
<source>tokens</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>fichas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="686"/>
|
||||
|
|
@ -250,7 +250,7 @@
|
|||
<message>
|
||||
<location filename="src/pages.cpp" line="690"/>
|
||||
<source>Local file:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Archivo local:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="691"/>
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
<message>
|
||||
<location filename="src/pages.cpp" line="692"/>
|
||||
<source>Choose file...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Elegir archivo...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pages.cpp" line="694"/>
|
||||
|
|
@ -391,12 +391,12 @@
|
|||
<message>
|
||||
<location filename="src/pagetemplates.cpp" line="72"/>
|
||||
<source>Load %1 file</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Cargar archivo de %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pagetemplates.cpp" line="82"/>
|
||||
<source>%1 file (%1)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>archivo de %1 (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pagetemplates.cpp" line="111"/>
|
||||
|
|
@ -420,12 +420,12 @@
|
|||
<message>
|
||||
<location filename="src/pagetemplates.cpp" line="129"/>
|
||||
<source>Please choose a file.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Por favor elija un archivo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pagetemplates.cpp" line="134"/>
|
||||
<source>Cannot open file '%1'.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>No se puede abrir el archivo '%1'.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/pagetemplates.cpp" line="159"/>
|
||||
|
|
@ -602,7 +602,7 @@
|
|||
<message>
|
||||
<location filename="src/main.cpp" line="63"/>
|
||||
<source>Run in no-confirm background mode</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ejecutar en modo del segundo plano sin confirmación</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Loading…
Add table
Add a link
Reference in a new issue