MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / toTranslatedString

Method toTranslatedString

launcher/minecraft/World.cpp:85–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85QString GameType::toTranslatedString() const
86{
87 switch (type)
88 {
89 case GameType::Survival:
90 return QCoreApplication::translate("GameType", "Survival");
91 case GameType::Creative:
92 return QCoreApplication::translate("GameType", "Creative");
93 case GameType::Adventure:
94 return QCoreApplication::translate("GameType", "Adventure");
95 case GameType::Spectator:
96 return QCoreApplication::translate("GameType", "Spectator");
97 default:
98 break;
99 }
100 if(original) {
101 return QCoreApplication::translate("GameType", "Unknown (%1)").arg(*original);
102 }
103 return QCoreApplication::translate("GameType", "Undefined");
104}
105
106QString GameType::toLogString() const
107{

Callers 1

dataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected