[Super-tux-commit] supertux/lib/lisp .cvsignore,NONE,1.1 writer.cpp,1.1,1.2 writer.h,1.1,1.2
Brought to you by:
wkendrick
From: Matze B. <mat...@us...> - 2004-12-05 17:20:18
|
Update of /cvsroot/super-tux/supertux/lib/lisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22444/lib/lisp Modified Files: writer.cpp writer.h Added Files: .cvsignore Log Message: added/updated some .cvsignores --- NEW FILE: .cvsignore --- .sconsign Index: writer.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/lisp/writer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- writer.cpp 28 Nov 2004 14:57:45 -0000 1.1 +++ writer.cpp 5 Dec 2004 17:19:35 -0000 1.2 @@ -89,10 +89,16 @@ } void -Writer::write_string(const std::string& name, const std::string& value) +Writer::write_string(const std::string& name, const std::string& value, + bool translatable) { indent(); - out << '(' << name << " \"" << value << "\")\n"; + out << '(' << name; + if(translatable) { + out << " (_ \"" << value << "\"))\n"; + } else { + out << " \"" << value << "\")\n"; + } } void Index: writer.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/lisp/writer.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- writer.h 28 Nov 2004 14:57:45 -0000 1.1 +++ writer.h 5 Dec 2004 17:19:35 -0000 1.2 @@ -39,7 +39,8 @@ void write_int(const std::string& name, int value); void write_float(const std::string& name, float value); - void write_string(const std::string& name, const std::string& value); + void write_string(const std::string& name, const std::string& value, + bool translatable = false); void write_bool(const std::string& name, bool value); void write_int_vector(const std::string& name, const std::vector<int>& value); void write_int_vector(const std::string& name, const std::vector<unsigned int>& value); |