From: Matthias Braun Date: Sun, 5 Dec 2004 17:19:35 +0000 (+0000) Subject: added/updated some .cvsignores X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2fd963388c2dae6a30f82c99b679a73e8bc5917d;p=supertux.git added/updated some .cvsignores SVN-Revision: 2243 --- diff --git a/data/levels/bonus1/.cvsignore b/data/levels/bonus1/.cvsignore new file mode 100644 index 000000000..76b6af9af --- /dev/null +++ b/data/levels/bonus1/.cvsignore @@ -0,0 +1,2 @@ +messages.pot + diff --git a/data/levels/contribs/.cvsignore b/data/levels/contribs/.cvsignore new file mode 100644 index 000000000..76b6af9af --- /dev/null +++ b/data/levels/contribs/.cvsignore @@ -0,0 +1,2 @@ +messages.pot + diff --git a/data/levels/misc/.cvsignore b/data/levels/misc/.cvsignore new file mode 100644 index 000000000..76b6af9af --- /dev/null +++ b/data/levels/misc/.cvsignore @@ -0,0 +1,2 @@ +messages.pot + diff --git a/data/levels/test/.cvsignore b/data/levels/test/.cvsignore new file mode 100644 index 000000000..76b6af9af --- /dev/null +++ b/data/levels/test/.cvsignore @@ -0,0 +1,2 @@ +messages.pot + diff --git a/data/levels/world1/.cvsignore b/data/levels/world1/.cvsignore new file mode 100644 index 000000000..76b6af9af --- /dev/null +++ b/data/levels/world1/.cvsignore @@ -0,0 +1,2 @@ +messages.pot + diff --git a/data/levels/world2/.cvsignore b/data/levels/world2/.cvsignore new file mode 100644 index 000000000..76b6af9af --- /dev/null +++ b/data/levels/world2/.cvsignore @@ -0,0 +1,2 @@ +messages.pot + diff --git a/data/locale/.cvsignore b/data/locale/.cvsignore new file mode 100644 index 000000000..6394bdd8e --- /dev/null +++ b/data/locale/.cvsignore @@ -0,0 +1,2 @@ +supertux.pot + diff --git a/lib/lisp/.cvsignore b/lib/lisp/.cvsignore new file mode 100644 index 000000000..f8d9fd474 --- /dev/null +++ b/lib/lisp/.cvsignore @@ -0,0 +1 @@ +.sconsign diff --git a/lib/lisp/writer.cpp b/lib/lisp/writer.cpp index a8c5c2443..e4a810af3 100644 --- a/lib/lisp/writer.cpp +++ b/lib/lisp/writer.cpp @@ -89,10 +89,16 @@ Writer::write_float(const std::string& name, float value) } 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 diff --git a/lib/lisp/writer.h b/lib/lisp/writer.h index 842efc352..ad2ffea04 100644 --- a/lib/lisp/writer.h +++ b/lib/lisp/writer.h @@ -39,7 +39,8 @@ namespace lisp 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& value); void write_int_vector(const std::string& name, const std::vector& value); diff --git a/src/level.cpp b/src/level.cpp index c159d220c..8e572a05e 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -141,7 +141,7 @@ Level::save(const std::string& filename) int version = 2; writer->write_int("version", version); - writer->write_string("name", name); + writer->write_string("name", name, true); writer->write_string("author", author); writer->write_int("time", timelimit); writer->write_string("end-sequence-animation",