Mercurial > boomslang
diff gamelib/scenes/game_widgets.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 | 386475464202 2f1952748cdb |
children | bdebe693453f |
line wrap: on
line diff
--- a/gamelib/scenes/game_widgets.py Sat Jan 26 13:24:01 2013 +0200 +++ b/gamelib/scenes/game_widgets.py Sat Jan 26 16:57:33 2013 +0200 @@ -1,6 +1,7 @@ """Generic, game specific widgets""" +from pyntnclick.i18n import _ from pyntnclick.state import Thing, Result from gamelib.custom_widgets import JimLabel @@ -24,7 +25,7 @@ self.game.change_scene("map") def get_description(self): - return 'An open doorway leads to the rest of the ship.' + return _('An open doorway leads to the rest of the ship.') def interact_default(self, item): return self.interact_without() @@ -49,12 +50,12 @@ def get_description(self): status = self.state.get_jim_state() if status == 'online': - return "A security camera watches over the room" + return _("A security camera watches over the room") elif status == 'looping': - return "The security camera is currently offline but should be" \ - " working soon" + return _("The security camera is currently offline but should be" + " working soon") else: - return "The security camera is powered down" + return _("The security camera is powered down") def is_interactive(self, tool=None): return self.state.get_jim_state() == 'online' @@ -62,9 +63,10 @@ def interact_with_escher_poster(self, item): # Order matters here, because of helper function if self.state.get_jim_state() == 'online': - ai_response = make_jim_dialog("3D scene reconstruction failed." - " Critical error. Entering emergency shutdown.", - self.game) + ai_response = make_jim_dialog(_("3D scene reconstruction failed." + " Critical error." + " Entering emergency shutdown."), + self.game) self.game.data.loop_ai() return ai_response