Now that the string freeze is over, adding some more work for translators.

This commit is contained in:
Philippe Plantier 2005-04-11 18:57:26 +00:00
parent 60d30e7cd9
commit 997d9f17dd
3 changed files with 14 additions and 17 deletions

View file

@ -748,10 +748,8 @@ bool game_controller::load_game()
std::string error_log;
read_save_file(game,cfg,&error_log);
if(!error_log.empty()) {
// FIXME: fix this string after the string-freeze is
// over, to clearly state this is a warning.
gui::show_error_message(disp(),
_("The file you have tried to load is corrupt: '") +
_("Warning: The file you have tried to load is corrupt. Loading anyway.\n") +
error_log);
}
@ -1392,10 +1390,8 @@ void game_controller::read_game_cfg(preproc_map& defines, config& cfg, bool use_
std::string error_log;
read(cfg, *stream, &error_log);
if(!error_log.empty()) {
// FIXME: fix this string after the string-freeze is
// over, to clearly state this is a warning.
gui::show_error_message(disp(),
_("Error loading game configuration files: '") +
_("Warning: Errors occured while loading game configuration files: '") +
error_log);
}

View file

@ -134,10 +134,11 @@ server_type open_connection(display& disp, const std::string& original_host)
// Backwards-compatibility "version" attribute
const std::string& version = data["version"];
if(version.empty() == false && version != game_config::version) {
// FIXME: make this string translatable
throw network::error("The server requires version '" + version
+ "' while you are using version '" +
game_config::version + "'");
utils::string_map i18n_symbols;
i18n_symbols["version1"] = version;
i18n_symbols["version2"] = game_config::version;
const std::string errorstring = vgettext("The server requires version '$version1' while you are using version '$version2'", i18n_symbols);
throw network::error(errorstring);
}
// Check for "redirect" messages
@ -148,8 +149,7 @@ server_type open_connection(display& disp, const std::string& original_host)
port = lexical_cast_default<unsigned int>((*redirect)["port"], 15000);
if(shown_hosts.find(hostpair(host,port)) != shown_hosts.end()) {
// FIXME: make this string translatable
throw network::error("Server-side redirect loop");
throw network::error(_("Server-side redirect loop"));
}
shown_hosts.insert(hostpair(host, port));

View file

@ -1139,22 +1139,23 @@ void unit::add_modification(const std::string& type,
t_string& description = modificationDescriptions_[type];
// FIXME: the colon must be translatable.
description += mod["name"] + ": ";
// Punctuation should be translatable: not all languages use latin punctuation.
// (however, there maybe is a better way to do it)
description += mod["name"] + t_string(N_(": "), "wesnoth");
if(!mod["description"].empty()) {
description += mod["description"];
description += " ";
}
if(effects_description.empty() == false) {
description += "(";
description += t_string(N_("("), "wesnoth");
for(std::vector<t_string>::const_iterator i = effects_description.begin();
i != effects_description.end(); ++i) {
description += *i;
if(i+1 != effects_description.end())
description += "; ";
description += t_string(N_("; "), "wesnoth");
}
description += ")";
description += t_string(N_(")"), "wesnoth");
}
description += "\n";