wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src reports.cpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src reports.cpp
Date: Tue, 19 Oct 2004 17:37:07 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    04/10/19 21:29:42

Modified files:
        src            : reports.cpp 

Log message:
        Almost completely translate the right in-game panel.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/reports.cpp.diff?tr1=1.48&tr2=1.49&r1=text&r2=text

Patches:
Index: wesnoth/src/reports.cpp
diff -u wesnoth/src/reports.cpp:1.48 wesnoth/src/reports.cpp:1.49
--- wesnoth/src/reports.cpp:1.48        Tue Oct 19 20:49:09 2004
+++ wesnoth/src/reports.cpp     Tue Oct 19 21:29:42 2004
@@ -184,14 +184,12 @@
                const std::vector<attack_type>& attacks = u->second.attacks();
                for(std::vector<attack_type>::const_iterator at_it = 
attacks.begin();
                    at_it != attacks.end(); ++at_it) {
-                       const std::string& lang_weapon = 
string_table["weapon_name_" + at_it->name()];
-                       const std::string& lang_type = 
string_table["weapon_type_" + at_it->type()];
-                       const std::string& lang_special = 
string_table["weapon_special_" + at_it->special()];
+                       const std::string& lang_weapon = 
gettext(at_it->name().c_str());
+                       const std::string& lang_type = 
gettext(at_it->type().c_str());
                        
-                       str << (lang_weapon.empty() ? 
at_it->name():lang_weapon) << " ("
-                               << (lang_type.empty() ? 
at_it->type():lang_type) << ")\n";
+                       str << lang_weapon << " (" << lang_type << ")\n";
 
-                       tooltip << (lang_weapon.empty() ? 
at_it->name():lang_weapon) << "\n";
+                       tooltip << lang_weapon << "\n";
 
                        //find all the unit types on the map, and show this 
weapon's bonus against all the different units
                        std::set<const unit_type*> seen_units;
@@ -221,9 +219,11 @@
 
                        res.add_text(str,tooltip);
                        
-                       str << (lang_special.empty() ? 
at_it->special():lang_special) << "\n";
-                       tooltip << string_table["weapon_special_" + 
at_it->special() + "_description"];
-                       res.add_text(str,tooltip);
+                       if (!at_it->special().empty()) {
+                               str << gettext(at_it->special().c_str()) << 
"\n";
+                               tooltip << string_table["weapon_special_" + 
at_it->special() + "_description"];
+                               res.add_text(str,tooltip);
+                       }
                        
                        str << at_it->damage() << "-" << at_it->num_attacks() 
<< " -- "
                        << (at_it->range() == attack_type::SHORT_RANGE ?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]