Browse Source

credits translation

Laserlicht 4 months ago
parent
commit
2730e461a9

+ 7 - 0
Mods/vcmi/Content/config/english.json

@@ -410,6 +410,13 @@
 	"vcmi.battleResultsWindow.spellDurationRemaining.1" : "Remaining duration : %d combat round",
 	"vcmi.battleResultsWindow.spellDurationRemaining.2" : "Remaining duration : %d combat rounds",
 
+	"vcmi.credits.website" : "Website",
+	"vcmi.credits.vcmi" : "VCMI",
+	"vcmi.credits.heroes" : "Heroes of Might and Magic III",
+	"vcmi.credits.idea" : "Idea",
+	"vcmi.credits.developing" : "Developing",
+	"vcmi.credits.testing" : "Testing",
+
 	"vcmi.tutorialWindow.title" : "Touchscreen Introduction",
 	"vcmi.tutorialWindow.decription.RightClick" : "Touch and hold the element on which you want to right-click. Touch the free area to close.",
 	"vcmi.tutorialWindow.decription.MapPanning" : "Touch and drag with one finger to move the map.",

+ 7 - 0
Mods/vcmi/Content/config/german.json

@@ -400,6 +400,13 @@
 
 	"vcmi.battleResultsWindow.applyResultsLabel" : "Kampfergebnis übernehmen",
 
+	"vcmi.credits.website" : "Webseite",
+	"vcmi.credits.vcmi" : "VCMI",
+	"vcmi.credits.heroes" : "Heroes of Might and Magic III",
+	"vcmi.credits.idea" : "Idee",
+	"vcmi.credits.developing" : "Entwicklung",
+	"vcmi.credits.testing" : "Tester",
+
 	"vcmi.tutorialWindow.title" : "Touchscreen Einführung",
 	"vcmi.tutorialWindow.decription.RightClick" : "Berührt und haltet das Element, auf das mit der rechten Maustaste geklickt werden soll. Berührt den freien Bereich, um zu schließen.",
 	"vcmi.tutorialWindow.decription.MapPanning" : "Berührt und zieht mit einem Finger, um die Karte zu verschieben.",

+ 4 - 2
client/mainmenu/CreditsScreen.cpp

@@ -17,7 +17,9 @@
 #include "../widgets/TextControls.h"
 #include "../widgets/ObjectLists.h"
 
+#include "../../lib/GameLibrary.h"
 #include "../../lib/filesystem/Filesystem.h"
+#include "../../lib/texts/CGeneralTextHandler.h"
 
 #include "../../AUTHORS.h"
 
@@ -36,7 +38,7 @@ CreditsScreen::CreditsScreen(Rect rect)
 	for (auto & element : contributors) 
 	{
 		if(element[0] != contributorsTask)
-			contributorsText += "\r\n{" + element[0] + ":}\r\n";
+			contributorsText += "\r\n\r\n{" + LIBRARY->generaltexth->translate("vcmi.credits." + boost::to_lower_copy(element[0])) + ":}\r\n";
 		contributorsText += (element[2] != "" ? element[2] : element[1]) + "\r\n";
 		contributorsTask = element[0];
 	}
@@ -45,7 +47,7 @@ CreditsScreen::CreditsScreen(Rect rect)
 	std::string text((char *)textFile.first.get(), textFile.second);
 	size_t firstQuote = text.find('\"') + 1;
 	text = text.substr(firstQuote, text.find('\"', firstQuote) - firstQuote);
-	text = "{- VCMI -}\r\n\r\n" + contributorsText + "\r\n\r\n{Website:}\r\nhttps://vcmi.eu\r\n\r\n\r\n\r\n\r\n{- Heroes of Might and Magic III -}\r\n\r\n" + text;
+	text = "{- " + LIBRARY->generaltexth->translate("vcmi.credits.vcmi") + " -}\r\n" + contributorsText + "\r\n\r\n{" + LIBRARY->generaltexth->translate("vcmi.credits.website") + ":}\r\nhttps://vcmi.eu\r\n\r\n\r\n\r\n\r\n{- " + LIBRARY->generaltexth->translate("vcmi.credits.heroes") + " -}\r\n\r\n\r\n" + text;
 	credits = std::make_shared<CMultiLineLabel>(Rect(pos.w - 350, 0, 350, 600), FONT_CREDITS, ETextAlignment::CENTER, Colors::WHITE, text);
 	credits->scrollTextTo(-600); // move all text below the screen
 }