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

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

[Wesnoth-cvs-commits] wesnoth/src unit.cpp unit_types.cpp unit_types.hpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src unit.cpp unit_types.cpp unit_types.hpp
Date: Sat, 23 Apr 2005 17:55:39 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/04/23 21:55:38

Modified files:
        src            : unit.cpp unit_types.cpp unit_types.hpp 

Log message:
        Fix weapon names not being translated in the tooltip for the 'strong' 
trait. Indeed, weapon names have never been translated in data files (a 
short-sighting?), hence they should not be available as t_string, especially 
since a lot of places in the code already call gettext on them (otherwise this 
bug would have been noticed a lot sooner).

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.143&tr2=1.144&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_types.cpp.diff?tr1=1.98&tr2=1.99&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_types.hpp.diff?tr1=1.67&tr2=1.68&r1=text&r2=text

Patches:
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.143 wesnoth/src/unit.cpp:1.144
--- wesnoth/src/unit.cpp:1.143  Sat Apr 23 20:22:58 2005
+++ wesnoth/src/unit.cpp        Sat Apr 23 21:55:38 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.143 2005/04/23 20:22:58 silene Exp $ */
+/* $Id: unit.cpp,v 1.144 2005/04/23 21:55:38 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1030,7 +1030,7 @@
                                                description += "; ";
                                        }
                                        
-                                       description += a->name() + " " + desc;
+                                       description += t_string(a->name(), 
"wesnoth") + " " + desc;
                                }
                        }
                } else if(apply_to == "hitpoints") {
Index: wesnoth/src/unit_types.cpp
diff -u wesnoth/src/unit_types.cpp:1.98 wesnoth/src/unit_types.cpp:1.99
--- wesnoth/src/unit_types.cpp:1.98     Sat Apr 23 20:22:59 2005
+++ wesnoth/src/unit_types.cpp  Sat Apr 23 21:55:38 2005
@@ -1,4 +1,4 @@
-/* $Id: unit_types.cpp,v 1.98 2005/04/23 20:22:59 silene Exp $ */
+/* $Id: unit_types.cpp,v 1.99 2005/04/23 21:55:38 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -174,7 +174,7 @@
          defense_weight_ = 1.0;
 }
 
-const t_string& attack_type::name() const
+const std::string& attack_type::name() const
 {
        return name_;
 }
Index: wesnoth/src/unit_types.hpp
diff -u wesnoth/src/unit_types.hpp:1.67 wesnoth/src/unit_types.hpp:1.68
--- wesnoth/src/unit_types.hpp:1.67     Tue Mar 29 17:41:09 2005
+++ wesnoth/src/unit_types.hpp  Sat Apr 23 21:55:38 2005
@@ -1,4 +1,4 @@
-/* $Id: unit_types.hpp,v 1.67 2005/03/29 17:41:09 darthfool Exp $ */
+/* $Id: unit_types.hpp,v 1.68 2005/04/23 21:55:38 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -79,7 +79,7 @@
        enum RANGE { SHORT_RANGE, LONG_RANGE };
 
        attack_type(const config& cfg);
-       const t_string& name() const;
+       const std::string& name() const;
        const std::string& type() const;
        const std::string& special() const;
        const std::string& icon() const;
@@ -102,7 +102,7 @@
 private:
        std::vector<unit_animation> animation_;
        std::vector<unit_animation> direction_animation_[6];
-       t_string name_;
+       std::string name_;
        std::string type_;
        std::string special_;
        std::string icon_;




reply via email to

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