Mercurial > boomslang
comparison gamelib/scenes/scene_widgets.py @ 478:a9925aaf5f61 1.0.1
i18n and Russian translation
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Tue, 08 Mar 2011 12:29:14 +0200 |
parents | 54853e61b149 |
children |
comparison
equal
deleted
inserted
replaced
477:51055400a9a8 | 478:a9925aaf5f61 |
---|---|
10 | 10 |
11 from gamelib.state import Thing, Result | 11 from gamelib.state import Thing, Result |
12 from gamelib.constants import DEBUG | 12 from gamelib.constants import DEBUG |
13 from gamelib.widgets import BoomLabel | 13 from gamelib.widgets import BoomLabel |
14 | 14 |
15 from gamelib.i18n import _ | |
15 | 16 |
16 class Interact(object): | 17 class Interact(object): |
17 | 18 |
18 def __init__(self, image, rect, interact_rect): | 19 def __init__(self, image, rect, interact_rect): |
19 self.image = image | 20 self.image = image |
166 def interact_without(self): | 167 def interact_without(self): |
167 """Go to map.""" | 168 """Go to map.""" |
168 self.state.set_current_scene("map") | 169 self.state.set_current_scene("map") |
169 | 170 |
170 def get_description(self): | 171 def get_description(self): |
171 return 'An open doorway leads to the rest of the ship.' | 172 return _('An open doorway leads to the rest of the ship.') |
172 | 173 |
173 def interact_default(self, item): | 174 def interact_default(self, item): |
174 return self.interact_without() | 175 return self.interact_without() |
175 | 176 |
176 | 177 |
189 INITIAL_DATA = { | 190 INITIAL_DATA = { |
190 'state': 'online', | 191 'state': 'online', |
191 } | 192 } |
192 | 193 |
193 def get_description(self): | 194 def get_description(self): |
194 return "A security camera watches over the room" | 195 return _("A security camera watches over the room") |
195 | 196 |
196 def interact_with_escher_poster(self, item): | 197 def interact_with_escher_poster(self, item): |
197 # Order matters here, because of helper function | 198 # Order matters here, because of helper function |
198 ai_response = make_jim_dialog("3D scene reconstruction failed. Critical error. Entering emergency shutdown.", self.state) | 199 ai_response = make_jim_dialog(_("3D scene reconstruction failed. Critical error. Entering emergency shutdown."), self.state) |
199 self.state.scenes['bridge'].set_data('ai status', 'looping') | 200 self.state.scenes['bridge'].set_data('ai status', 'looping') |
200 return ai_response | 201 return ai_response |
201 | 202 |
202 def animate(self): | 203 def animate(self): |
203 ai_status = self.state.scenes['bridge'].get_data('ai status') | 204 ai_status = self.state.scenes['bridge'].get_data('ai status') |