pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r3213 - in trunk/pingus/src: . editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3213 - in trunk/pingus/src: . editor
Date: Sat, 22 Sep 2007 03:09:12 +0200

Author: grumbel
Date: 2007-09-22 03:09:12 +0200 (Sat, 22 Sep 2007)
New Revision: 3213

Modified:
   trunk/pingus/src/editor/file_dialog.cpp
   trunk/pingus/src/editor/object_properties.cpp
   trunk/pingus/src/editor/object_selector.cpp
   trunk/pingus/src/editor/panel.cpp
   trunk/pingus/src/pingus_menu.cpp
Log:
- gettext'ed some strings in the editor
- removed the sub-text switching in the main menu

Modified: trunk/pingus/src/editor/file_dialog.cpp
===================================================================
--- trunk/pingus/src/editor/file_dialog.cpp     2007-09-22 01:07:41 UTC (rev 
3212)
+++ trunk/pingus/src/editor/file_dialog.cpp     2007-09-22 01:09:12 UTC (rev 
3213)
@@ -53,15 +53,15 @@
                            "|\n\\/");
 
   datadir_button = new Button(Rect(Vector2i(4, rect.get_height() - 4 - 30),
-                                   Size(100, 30)), "Datadir");
+                                   Size(100, 30)), _("Datadir"));
   userdir_button = new Button(Rect(Vector2i(4 + 110, rect.get_height() - 4 - 
30),
-                                   Size(100, 30)), "Userdir");
+                                   Size(100, 30)), _("Userdir"));
   
   open_button = new Button(Rect(Vector2i(rect.get_width() - 104, 
rect.get_height() - 4 - 30),
-                                Size(100, 30)), mode == LOAD ? "Open" : 
"Save");
+                                Size(100, 30)), mode == LOAD ? _("Open") : 
_("Save"));
   
   cancel_button = new Button(Rect(Vector2i(rect.get_width() - 104 - 104, 
rect.get_height() - 4 - 30),
-                                  Size(100, 30)), "Cancel");
+                                  Size(100, 30)), _("Cancel"));
   
   up_button->on_click.connect(boost::bind(&FileDialog::on_up, this));
   down_button->on_click.connect(boost::bind(&FileDialog::on_down, this));
@@ -72,8 +72,8 @@
   open_button->on_click.connect(boost::bind(&FileDialog::on_open, this));
   cancel_button->on_click.connect(boost::bind(&FileDialog::on_cancel, this));
 
-  add(filename_label = new Label(Rect(6, 4+30, 4 + 60, 26+30), "Filename:"), 
true);
-  add(pathname_label = new Label(Rect(6, 4+60, 4 + 60, 26+60), "Pathname:"), 
true);
+  add(filename_label = new Label(Rect(6, 4+30, 4 + 60, 26+30), 
_("Filename:")), true);
+  add(pathname_label = new Label(Rect(6, 4+60, 4 + 60, 26+60), 
_("Pathname:")), true);
   
   add(filename_inputbox = new Inputbox(Rect(4 + 60, 4+30, rect.get_width()-4, 
26+30)), true);
   add(pathname_inputbox = new Inputbox(Rect(4 + 60, 4+60, rect.get_width()-4, 
26+60)), true);

Modified: trunk/pingus/src/editor/object_properties.cpp
===================================================================
--- trunk/pingus/src/editor/object_properties.cpp       2007-09-22 01:07:41 UTC 
(rev 3212)
+++ trunk/pingus/src/editor/object_properties.cpp       2007-09-22 01:09:12 UTC 
(rev 3213)
@@ -37,8 +37,8 @@
   : GUI::GroupComponent(rect, false),
     editor(editor_)
 {
-  add(type_label = new Label(Rect(Vector2i(4, 4), Size(120, 20)), "Object:"), 
true);
-  add(mesg_label = new Label(Rect(Vector2i(10, 0), Size(180, 20)), "Nothing 
selected"), true);
+  add(type_label = new Label(Rect(Vector2i(4, 4), Size(120, 20)), 
_("Object:")), true);
+  add(mesg_label = new Label(Rect(Vector2i(10, 0), Size(180, 20)), _("Nothing 
selected")), true);
     
   Rect label_rect(10,0, 80, 20);
   Rect box_rect(80,0, 190, 20);
@@ -47,27 +47,27 @@
   add(gptype_label = new Label(label_rect, "GPType:"), true);
   add(gptype_type  = new Combobox(box_rect), true);
 
-  gptype_type->add(Groundtype::GP_TRANSPARENT, "Transparent");
-  gptype_type->add(Groundtype::GP_SOLID,       "Solid");
-  gptype_type->add(Groundtype::GP_GROUND,      "Ground");
-  gptype_type->add(Groundtype::GP_BRIDGE,      "Bridge");
-  gptype_type->add(Groundtype::GP_WATER,       "Water");
-  gptype_type->add(Groundtype::GP_LAVA,        "Lava");
-  gptype_type->add(Groundtype::GP_REMOVE,      "Remove");
+  gptype_type->add(Groundtype::GP_TRANSPARENT, _("Transparent"));
+  gptype_type->add(Groundtype::GP_SOLID,       _("Solid"));
+  gptype_type->add(Groundtype::GP_GROUND,      _("Ground"));
+  gptype_type->add(Groundtype::GP_BRIDGE,      _("Bridge"));
+  gptype_type->add(Groundtype::GP_WATER,       _("Water"));
+  gptype_type->add(Groundtype::GP_LAVA,        _("Lava"));
+  gptype_type->add(Groundtype::GP_REMOVE,      _("Remove"));
   gptype_type->set_selected_item(Groundtype::GP_GROUND);
 
   
gptype_type->on_select.connect(boost::bind(&ObjectProperties::on_gptype_change, 
this, _1));
   
-  add(entrance_direction_label = new Label(label_rect, "Direction:"), true);
+  add(entrance_direction_label = new Label(label_rect, _("Direction:")), true);
   add(entrance_direction = new Combobox(box_rect), true);
-  entrance_direction->add(0, "Left");
-  entrance_direction->add(1, "Misc");
-  entrance_direction->add(2, "Right");
+  entrance_direction->add(0, _("Left"));
+  entrance_direction->add(1, _("Misc"));
+  entrance_direction->add(2, _("Right"));
   entrance_direction->set_selected_item(0);
 
   
entrance_direction->on_select.connect(boost::bind(&ObjectProperties::on_entrance_direction_change,
 this, _1));
   
-  add(release_rate_label = new Label(label_rect, "ReleaseRate:"), true);
+  add(release_rate_label = new Label(label_rect, _("ReleaseRate:")), true);
   add(release_rate_inputbox = new Inputbox(box_rect), true);
 
   
release_rate_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_release_rate_change,
 this, _1));
@@ -84,8 +84,8 @@
   
stretch_x_checkbox->on_change.connect(boost::bind(&ObjectProperties::on_stretch_x_change,
 this, _1));
   
stretch_y_checkbox->on_change.connect(boost::bind(&ObjectProperties::on_stretch_y_change,
 this, _1));
   
-  add(para_x_label = new Label(label_rect, "Para-X:"), true);
-  add(para_y_label = new Label(label_rect, "Para-Y:"), true);
+  add(para_x_label = new Label(label_rect, _("Para-X:")), true);
+  add(para_y_label = new Label(label_rect, _("Para-Y:")), true);
 
   add(para_x_inputbox = new Inputbox(box_rect), true);
   add(para_y_inputbox = new Inputbox(box_rect), true);
@@ -93,8 +93,8 @@
   
para_x_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_para_x_change,
 this, _1));
   
para_y_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_para_y_change,
 this, _1));
   
-  add(scroll_x_label = new Label(label_rect, "Scroll-X:"), true);
-  add(scroll_y_label = new Label(label_rect, "Scroll-Y:"), true);
+  add(scroll_x_label = new Label(label_rect, _("Scroll-X:")), true);
+  add(scroll_y_label = new Label(label_rect, _("Scroll-Y:")), true);
 
   add(scroll_x_inputbox = new Inputbox(box_rect), true);
   add(scroll_y_inputbox = new Inputbox(box_rect), true);
@@ -102,18 +102,18 @@
   
scroll_x_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_scroll_x_change,
 this, _1));
   
scroll_y_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_scroll_y_change,
 this, _1));
   
-  add(owner_label    = new Label(label_rect, "Owner Id:"), true);
+  add(owner_label    = new Label(label_rect, _("Owner Id:")), true);
   add(owner_inputbox = new Inputbox(box_rect), true);
   
owner_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_owner_change,
 this, _1));
   
-  add(pos_z_label    = new Label(label_rect, "Z-Pos:"), true);
+  add(pos_z_label    = new Label(label_rect, _("Z-Pos:")), true);
   add(pos_z_inputbox = new Inputbox(box_rect), true);
   
pos_z_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_pos_z_change,
 this, _1));
   // ___________________________________________________________________
   //  
   Size color_s(box_rect.get_width()/4, box_rect.get_height());
 
-  add(color_label = new Label(label_rect, "Color:"), true);
+  add(color_label = new Label(label_rect, _("Color:")), true);
   add(color_r_inputbox = new Inputbox(Rect(Vector2i(box_rect.left + 
0*color_s.width, box_rect.top), color_s)), true);
   add(color_g_inputbox = new Inputbox(Rect(Vector2i(box_rect.left + 
1*color_s.width, box_rect.top), color_s)), true);
   add(color_b_inputbox = new Inputbox(Rect(Vector2i(box_rect.left + 
2*color_s.width, box_rect.top), color_s)), true);
@@ -125,13 +125,13 @@
   
color_a_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_color_a_change,
 this, _1));
   // ___________________________________________________________________
   //
-  add(small_stars_label    = new Label(label_rect, "Small Stars:"), true);
+  add(small_stars_label    = new Label(label_rect, _("Small Stars:")), true);
   add(small_stars_inputbox = new Inputbox(box_rect), true);
 
-  add(middle_stars_label    = new Label(label_rect, "Middle Stars:"), true);
+  add(middle_stars_label    = new Label(label_rect, _("Middle Stars:")), true);
   add(middle_stars_inputbox = new Inputbox(box_rect), true);
 
-  add(large_stars_label    = new Label(label_rect, "Large Stars:"), true);
+      add(large_stars_label    = new Label(label_rect, _("Large Stars:")), 
true);
   add(large_stars_inputbox = new Inputbox(box_rect), true);
 
   
small_stars_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_small_stars_change,
 this, _1));
@@ -139,7 +139,7 @@
   
large_stars_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_large_stars_change,
 this, _1));
   // ___________________________________________________________________
   //
-  add(repeat_label    = new Label(label_rect, "Repeat:"), true);
+  add(repeat_label    = new Label(label_rect, _("Repeat:")), true);
   add(repeat_inputbox = new Inputbox(box_rect), true);
   
repeat_inputbox->on_change.connect(boost::bind(&ObjectProperties::on_repeat_change,
 this, _1));
 

Modified: trunk/pingus/src/editor/object_selector.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector.cpp 2007-09-22 01:07:41 UTC (rev 
3212)
+++ trunk/pingus/src/editor/object_selector.cpp 2007-09-22 01:09:12 UTC (rev 
3213)
@@ -21,6 +21,7 @@
 #include "gui/display.hpp"
 #include "gui_style.hpp"
 #include "sprite.hpp"
+#include "gettext.h"
 #include "math/vector2i.hpp"
 #include "editor_screen.hpp"
 #include "display/drawing_context.hpp"
@@ -303,20 +304,20 @@
   weather_set    = create_weather();
   worldobj_set   = create_worldobj();
 
-  add_button("core/editor/obj_entrance",   "Entrance", entrance_set);
-  add_button("core/editor/obj_gp_ground",  "Groundpiece (ground)", 
gp_ground_set);
-  add_button("core/editor/obj_gp_solid",   "Groundpiece (solid)", 
gp_solid_set);
-  add_button("core/editor/obj_gp_bridge",  "Groundpiece (bridge)", 
gp_bridge_set);
-  add_button("core/editor/obj_gp_transparent", "Groundpiece (transparent)", 
gp_transparent_set);
-  add_button("core/editor/obj_gp_remove",  "Groundpiece (remove)", 
gp_remove_set);
-  add_button("core/editor/obj_hotspot",    "Hotspot", hotspot_set);
-  add_button("core/editor/obj_background", "Background", background_set);
+  add_button("core/editor/obj_entrance",   _("Entrance"), entrance_set);
+  add_button("core/editor/obj_gp_ground",  _("Groundpiece (ground)"), 
gp_ground_set);
+  add_button("core/editor/obj_gp_solid",   _("Groundpiece (solid)"), 
gp_solid_set);
+  add_button("core/editor/obj_gp_bridge",  _("Groundpiece (bridge)"), 
gp_bridge_set);
+  add_button("core/editor/obj_gp_transparent", _("Groundpiece (transparent)"), 
gp_transparent_set);
+  add_button("core/editor/obj_gp_remove",  _("Groundpiece (remove)"), 
gp_remove_set);
+  add_button("core/editor/obj_hotspot",    _("Hotspot"), hotspot_set);
+  add_button("core/editor/obj_background", _("Background"), background_set);
   // -------------------------------
-  add_button("core/editor/obj_exit",     "Exit", exit_set);
-  add_button("core/editor/obj_liquid",   "Liquid", liquid_set);
-  add_button("core/editor/obj_trap",     "Trap", trap_set);
-  add_button("core/editor/obj_weather",  "Weather", weather_set);
-  add_button("core/editor/obj_worldobj", "Special Object", worldobj_set);
+  add_button("core/editor/obj_exit",     _("Exit"), exit_set);
+  add_button("core/editor/obj_liquid",   _("Liquid"), liquid_set);
+  add_button("core/editor/obj_trap",     _("Trap"), trap_set);
+  add_button("core/editor/obj_weather",  _("Weather"), weather_set);
+  add_button("core/editor/obj_worldobj", _("Special Object"), worldobj_set);
 }
 
 ObjectSelector::~ObjectSelector()

Modified: trunk/pingus/src/editor/panel.cpp
===================================================================
--- trunk/pingus/src/editor/panel.cpp   2007-09-22 01:07:41 UTC (rev 3212)
+++ trunk/pingus/src/editor/panel.cpp   2007-09-22 01:09:12 UTC (rev 3213)
@@ -22,6 +22,7 @@
 #include "display/drawing_context.hpp"
 #include "resource.hpp"
 #include "sprite.hpp"
+#include "gettext.h"
 #include "math/vector2i.hpp"
 #include "editor_screen.hpp"
 #include "gui/gui_manager.hpp"
@@ -149,49 +150,49 @@
 {  
   editor->get_gui_manager()->add(this, true);
 
-  add_button("core/editor/document-new",  "    New level",
+  add_button("core/editor/document-new",  _("    New level"),
              &EditorScreen::level_new);
-  add_button("core/editor/document-open", "Open level...",
+  add_button("core/editor/document-open", _("Open level..."),
              &EditorScreen::level_load);
-  add_button("core/editor/document-save", "Save level...", 
+  add_button("core/editor/document-save", _("Save level..."), 
              &EditorScreen::level_save);
-  add_button("core/editor/document-save-as", "Save level as...", 
+  add_button("core/editor/document-save-as", _("Save level as..."), 
              &EditorScreen::level_save_as);
   add_separator();
-  add_button("core/editor/play", "Play level...", 
+  add_button("core/editor/play", _("Play level..."), 
              &EditorScreen::level_play);
   add_separator();
-  add_button("core/editor/actions", "Configure actions", 
+  add_button("core/editor/actions", _("Configure actions"), 
              &EditorScreen::toggle_action_properties);
-  add_button("core/editor/document-properties", "Configure level", 
+  add_button("core/editor/document-properties", _("Configure level"), 
              &EditorScreen::toggle_level_properties);
-  add_button("core/editor/object-properties", "Display object properties", 
+  add_button("core/editor/object-properties", _("Display object properties"), 
              &EditorScreen::toggle_object_properties);
-  add_button("core/editor/objects", "Show object insertion window", 
+  add_button("core/editor/objects", _("Show object insertion window"), 
              &EditorScreen::toggle_object_selector);
   add_separator();
-  add_button("core/editor/copy", "Duplicate the selected objects", 
+  add_button("core/editor/copy", _("Duplicate the selected objects"), 
              &EditorScreen::objects_duplicate);
-  add_button("core/editor/delete", "Delete the selected objects", 
+  add_button("core/editor/delete", _("Delete the selected objects"), 
              &EditorScreen::objects_delete);
   add_separator();
-  add_button("core/editor/object-top",    "Raise object to top", 
+  add_button("core/editor/object-top",    _("Raise object to top"), 
              &EditorScreen::objects_raise_to_top);
-  add_button("core/editor/object-up",     "Raise object", 
+  add_button("core/editor/object-up",     _("Raise object"), 
              &EditorScreen::objects_raise);
-  add_button("core/editor/object-down",   "Lower object", 
+  add_button("core/editor/object-down",   _("Lower object"), 
              &EditorScreen::objects_lower);
-  add_button("core/editor/object-bottom", "Lower object to bottom", 
+  add_button("core/editor/object-bottom", _("Lower object to bottom"), 
              &EditorScreen::objects_lower_to_bottom);
   add_separator();
-  add_button("core/editor/object-flip-horizontal", "Flip object horizontally", 
+  add_button("core/editor/object-flip-horizontal", _("Flip object 
horizontally"), 
              &EditorScreen::objects_flip_horizontal);
-  add_button("core/editor/object-flip-vertical", "Flip object vertically", 
+  add_button("core/editor/object-flip-vertical", _("Flip object vertically"), 
              &EditorScreen::objects_flip_vertical);
   add_separator();
-  add_button("core/editor/object-rotate-left", "Rotate object 90 degree", 
+  add_button("core/editor/object-rotate-left", _("Rotate object 90 degree"), 
              &EditorScreen::objects_rotate_left);
-  add_button("core/editor/object-rotate-right", "Rotate object -90 degree", 
+  add_button("core/editor/object-rotate-right", _("Rotate object -90 degree"), 
              &EditorScreen::objects_rotate_right);
   // add_separator();
   //add_button("core/editor/snap-grid", "Snap objects to grid", 
@@ -200,7 +201,7 @@
   // add_button("core/editor/help", "Display help", 
   //             &EditorScreen::toggle_help);
   add_separator();
-  add_button("core/editor/exit", "Exit", 
+  add_button("core/editor/exit", _("Exit"), 
              &EditorScreen::exit);
 }
 

Modified: trunk/pingus/src/pingus_menu.cpp
===================================================================
--- trunk/pingus/src/pingus_menu.cpp    2007-09-22 01:07:41 UTC (rev 3212)
+++ trunk/pingus/src/pingus_menu.cpp    2007-09-22 01:09:12 UTC (rev 3213)
@@ -243,16 +243,14 @@
                 "Pingus comes with ABSOLUTELY NO WARRANTY. This is free 
software, and you are\n"
                 "welcome to redistribute it under certain conditions; see the 
file COPYING for details.\n");
 
-  if (hint.empty())
+  gc.print_center(Fonts::pingus_small, Display::get_width() / 2,
+                  Display::get_height() - Fonts::pingus_small.get_height(),
+                  help);
+
+  if (0)
     {
       gc.print_center(Fonts::pingus_small, Display::get_width() / 2,
                       Display::get_height() - Fonts::pingus_small.get_height(),
-                      help);
-    }
-  else
-    {
-      gc.print_center(Fonts::pingus_small, Display::get_width() / 2,
-                      Display::get_height() - Fonts::pingus_small.get_height(),
                       hint);
     }
 }





reply via email to

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