| 83 | } |
| 84 | |
| 85 | QString 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 | |
| 106 | QString GameType::toLogString() const |
| 107 | { |