From 308176dc5384edb917eea5d293184ae709db27af Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Sun, 29 Jun 2014 19:24:42 -0400 Subject: [PATCH] Make ai::description's text field a t_string, and initialize it from one Fixes bug #22092, which was caused by taking the translated form of a WML attribute as a STL string only once. --- changelog | 3 +++ src/ai/configuration.cpp | 4 ++-- src/ai/configuration.hpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changelog b/changelog index adaa4ce793a6..e45d48cb1b31 100644 --- a/changelog +++ b/changelog @@ -40,6 +40,9 @@ Version 1.11.15+dev: * Added a button to copy the in-game Chat Log dialog contents to clipboard. * Fixed dependency check on MP mod locked to scenario on create game load checking against the first scenario instead of the last played scenario. + * Fixed AI engine names in the MP game setup screen being translated to the + language selected when Wesnoth was started rather than the current + language (bug #22092). * WML engine: * Fixed a regression in 1.11.14 causing WML parser/preprocessor errors to not interrupt the game load sequence or display an error message in-game, diff --git a/src/ai/configuration.cpp b/src/ai/configuration.cpp index 07789918937d..ab57775f9022 100644 --- a/src/ai/configuration.cpp +++ b/src/ai/configuration.cpp @@ -112,7 +112,7 @@ void configuration::init(const config &game_config) description desc; desc.id=id; - desc.text = ai_configuration["description"].str(); + desc.text = ai_configuration["description"].t_str(); desc.cfg=ai_configuration; ai_configurations_.insert(std::make_pair(id,desc)); @@ -137,7 +137,7 @@ void extract_ai_configurations(std::map &storage, cons description desc; desc.id=id; - desc.text = ai_configuration["description"].str(); + desc.text = ai_configuration["description"].t_str(); desc.cfg=ai_configuration; storage.insert(std::make_pair(id,desc)); diff --git a/src/ai/configuration.hpp b/src/ai/configuration.hpp index 36a3ca815027..88837607df1e 100644 --- a/src/ai/configuration.hpp +++ b/src/ai/configuration.hpp @@ -51,7 +51,7 @@ struct description { { } - std::string text; + t_string text; std::string id; config cfg; };