Make serialization error message translatable
authorKahrl <kahrl@gmx.net>
Tue, 14 Jul 2015 16:20:50 +0000 (18:20 +0200)
committerKahrl <kahrl@gmx.net>
Tue, 14 Jul 2015 17:01:33 +0000 (19:01 +0200)
Also don't show "probably running a different version" message in simple singleplayer mode

src/game.cpp

index 41bfa5e60b8817b267bdfee14e652432137d33b4..d5819f78aa46a2b0f54707917cf9d3a6eb54271d 100644 (file)
@@ -4352,9 +4352,13 @@ void the_game(bool *kill,
                }
 
        } catch (SerializationError &e) {
-               error_message = std::string("A serialization error occurred:\n")
-                               + e.what() + "\n\nThe server is probably "
-                               " running a different version of " PROJECT_NAME_C ".";
+               error_message = strgettext("A serialization error occurred:")
+                               + "\n" + e.what();
+               if (!simple_singleplayer_mode) {
+                       error_message += "\n\n"
+                                       + strgettext("The server is probably running a different version of")
+                                       + " " PROJECT_NAME_C ".";
+               }
                errorstream << error_message << std::endl;
        } catch (ServerError &e) {
                error_message = e.what();