[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src dialogs.cpp map_label.cpp multiplay...
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src dialogs.cpp map_label.cpp multiplay... |
Date: |
Tue, 24 Aug 2004 15:54:16 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 04/08/24 19:49:35
Modified files:
src : dialogs.cpp map_label.cpp
multiplayer_connect.cpp reports.cpp unit.cpp
Log message:
get rid of most remaining translate_string() calls
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/map_label.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.60&tr2=1.61&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/reports.cpp.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.90&tr2=1.91&r1=text&r2=text
Patches:
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.47 wesnoth/src/dialogs.cpp:1.48
--- wesnoth/src/dialogs.cpp:1.47 Sat Aug 21 23:37:29 2004
+++ wesnoth/src/dialogs.cpp Tue Aug 24 19:49:35 2004
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.47 2004/08/21 23:37:29 ydirson Exp $ */
+/* $Id: dialogs.cpp,v 1.48 2004/08/24 19:49:35 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -65,8 +65,8 @@
sample_units.push_back(::get_advanced_unit(info,units,loc,u->second.type().name()));
sample_units.back().add_modification("advance",**mod);
const unit_type& type = sample_units.back().type();
- std::cerr << "YANN DEBUG" << "advance_" + (**mod)["id"] <<
(**mod)["description"];
- lang_options.push_back("&" + type.image() + "," +
translate_string_default("advance_" + (**mod)["id"],(**mod)["description"]));
+ // lang_options.push_back("&" + type.image() + "," +
translate_string_default("advance_" + (**mod)["id"],(**mod)["description"]));
+ lang_options.push_back("&" + type.image() + "," +
(**mod)["description"]);
}
std::cerr << "options: " << options.size() << "\n";
Index: wesnoth/src/map_label.cpp
diff -u wesnoth/src/map_label.cpp:1.9 wesnoth/src/map_label.cpp:1.10
--- wesnoth/src/map_label.cpp:1.9 Mon Jul 26 00:19:02 2004
+++ wesnoth/src/map_label.cpp Tue Aug 24 19:49:35 2004
@@ -35,7 +35,7 @@
const gamemap::location loc(**i);
const std::string& id = (**i)["id"];
const std::string& text = (**i)["text"];
- set_label(loc,translate_string_default(id,text));
+ set_label(loc,text);
}
}
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.60
wesnoth/src/multiplayer_connect.cpp:1.61
--- wesnoth/src/multiplayer_connect.cpp:1.60 Sun Aug 15 20:25:11 2004
+++ wesnoth/src/multiplayer_connect.cpp Tue Aug 24 19:49:35 2004
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.60 2004/08/15 20:25:11 ydirson Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.61 2004/08/24 19:49:35 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -273,7 +273,7 @@
for(std::vector<config*>::const_iterator race = possible_sides.begin();
race != possible_sides.end(); ++race) {
- player_races_.push_back(translate_string((**race)["name"]));
+ player_races_.push_back((**race)["name"]);
}
//Teams
@@ -501,7 +501,7 @@
//Player Race
for (size_t m = 0; m != player_races_.size(); ++m) {
- if (translate_string(side["name"]) == player_races_[m])
{
+ if (side["name"] == player_races_[m]) {
combos_race_[n].set_selected(m);
}
}
Index: wesnoth/src/reports.cpp
diff -u wesnoth/src/reports.cpp:1.42 wesnoth/src/reports.cpp:1.43
--- wesnoth/src/reports.cpp:1.42 Sun Aug 15 20:25:11 2004
+++ wesnoth/src/reports.cpp Tue Aug 24 19:49:35 2004
@@ -127,14 +127,14 @@
}
case UNIT_ALIGNMENT: {
const std::string& align =
unit_type::alignment_description(u->second.type().alignment());
- return report(translate_string(align),"",string_table[align +
"_description"]);
+ return report(string_table[align],"",string_table[align +
"_description"]);
}
case UNIT_ABILITIES: {
report res;
std::stringstream tooltip;
const std::vector<std::string>& abilities =
u->second.type().abilities();
for(std::vector<std::string>::const_iterator i =
abilities.begin(); i != abilities.end(); ++i) {
- str << translate_string(*i);
+ str << string_table[*i];
if(i+1 != abilities.end())
str << ",";
@@ -200,7 +200,7 @@
seen_units.count(&u_it->second.type()) == 0)
{
seen_units.insert(&u_it->second.type());
const int resistance =
u_it->second.type().movement_type().resistance_against(*at_it) - 100;
-
resistances[resistance].push_back(translate_string(u_it->second.type().name()));
+
resistances[resistance].push_back(string_table[u_it->second.type().name()]);
}
}
@@ -300,7 +300,7 @@
break;
const gamemap::TERRAIN terrain = map.get_terrain(mouseover);
- const std::string& name = map.terrain_name(terrain);
+ const std::string& name =
string_table[map.terrain_name(terrain)];
const std::vector<std::string>& underlying_names =
map.underlying_terrain_name(terrain);
if(map.is_village(mouseover)) {
@@ -317,15 +317,13 @@
str << " ";
}
- const std::string& translated_name = translate_string(name);
+ str << name;
- str << translated_name;
-
- if(underlying_names.size() != 1 ||
translate_string(underlying_names.front()) != translated_name) {
+ if(underlying_names.size() != 1 ||
string_table[underlying_names.front()] != name) {
str << " (";
for(std::vector<std::string>::const_iterator i =
underlying_names.begin(); i != underlying_names.end(); ++i) {
- str << translate_string(*i);
+ str << string_table[*i];
if(i+1 != underlying_names.end()) {
str << ",";
}
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.90 wesnoth/src/unit.cpp:1.91
--- wesnoth/src/unit.cpp:1.90 Sun Aug 15 20:25:11 2004
+++ wesnoth/src/unit.cpp Tue Aug 24 19:49:35 2004
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.90 2004/08/15 20:25:11 ydirson Exp $ */
+/* $Id: unit.cpp,v 1.91 2004/08/24 19:49:35 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1012,7 +1012,7 @@
description << "; ";
}
- description <<
translate_string(a->name()) << " " << desc;
+ description << string_table[a->name()]
<< " " << desc;
}
}
} else if(apply_to == "hitpoints") {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src dialogs.cpp map_label.cpp multiplay...,
Yann Dirson <=