diff gamelib/scenes/map.py @ 769:43b49f1de828 pyntnclick-i18n

Merge i18n for before the pyntnclick split
author Stefano Rivera <stefano@rivera.za.net>
date Sat, 26 Jan 2013 16:57:33 +0200
parents d6ded808cc33 2f1952748cdb
children eed75a1d50c4
line wrap: on
line diff
--- a/gamelib/scenes/map.py	Sat Jan 26 13:24:01 2013 +0200
+++ b/gamelib/scenes/map.py	Sat Jan 26 16:57:33 2013 +0200
@@ -7,6 +7,7 @@
    Many parts of the ship are derelict and inaccessible.
    """
 
+from pyntnclick.i18n import _
 from pyntnclick.state import Scene, Thing, Result
 from pyntnclick.scenewidgets import InteractRectUnion
 
@@ -37,15 +38,15 @@
         if self.get_data('implant'):
             self.set_data('implant', False)
             ai1 = make_jim_dialog(
-                "Under the terms of the emergency conscription "
-                "act, I have downloaded the ship's schematics to your "
-                "neural implant to help you navigate around the ship.",
+                _("Under the terms of the emergency conscription "
+                  "act, I have downloaded the ship's schematics to your "
+                  "neural implant to help you navigate around the ship."),
                 self.game)
             if ai1:
-                return ai1, make_jim_dialog("Prisoner %s, you are a "
+                return ai1, make_jim_dialog(_("Prisoner %s, you are a "
                 "class 1 felon. Obtaining access to the ship's schematics "
                 "constitutes a level 2 offence and carries a minimal penalty "
-                "of an additional 3 years on your sentence." % PLAYER_ID,
+                "of an additional 3 years on your sentence.") % PLAYER_ID,
                 self.game)
 
 
@@ -125,9 +126,9 @@
 
     def interact(self, item):
         if not self.game.is_in_inventory('helmet'):
-            return Result('The airlock refuses to open. The automated'
+            return Result(_('The airlock refuses to open. The automated'
                     ' voice says: "Hull breach beyond this door. Personnel'
-                    ' must be equipped for vacuum before entry."')
+                    ' must be equipped for vacuum before entry."'))
         else:
             return super(ToEngine, self).interact(item)
 
@@ -180,8 +181,9 @@
     INITIAL = 'areas'
 
     def interact(self, _item):
-        return Result("You look in the door, but just see empty space: "
-                      "that room appears to have been obliterated by meteors.")
+        return Result(_("You look in the door, but just see empty space: "
+                        "that room appears to have been obliterated by "
+                        "meteors."))
 
 
 class HydroponicsArea(Thing):
@@ -197,9 +199,9 @@
     INITIAL = 'areas'
 
     def interact(self, _item):
-        return Result("Peering in through the window, you see that the entire "
-                      "chamber is overgrown with giant broccoli. It would "
-                      "take you years to cut a path through that.")
+        return Result(_("Peering in through the window, you see that the "
+                        "entire chamber is overgrown with giant broccoli. "
+                        "It would take you years to cut a path through that."))
 
 
 SCENES = [Map]