Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/physics.py
diff options
context:
space:
mode:
authornrp <olpc@spongezone.net>2008-09-14 05:18:02 (GMT)
committer nrp <olpc@spongezone.net>2008-09-14 05:18:02 (GMT)
commita11d75ef85ca7edf14fdb28e65e47c8c9f7aa79b (patch)
treeae87fca35389d1903cdc5245424e0160d0b6a9ff /physics.py
parent0ff169da67e21004735d902f48e077489d576c09 (diff)
adding i18n, specifically es
Diffstat (limited to 'physics.py')
-rw-r--r--physics.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/physics.py b/physics.py
index 267979f..57c9d46 100644
--- a/physics.py
+++ b/physics.py
@@ -25,6 +25,7 @@ from elements import Elements
import tools
from bridge import Bridge
from helpers import *
+from gettext import gettext as _
class PhysicsGame:
def __init__(self,screen):
@@ -79,20 +80,20 @@ class PhysicsGame:
self.currentTool.draw()
#Print all the text on the screen
- text = self.font.render("Total Cost: %d" % self.bridge.cost, True, (0,0,0))
+ text = self.font.render(_("Total Cost: %d") % self.bridge.cost, True, (0,0,0))
textpos = text.get_rect(left=100,top=7)
self.screen.blit(text,textpos)
ratio = self.bridge.stress*100/self.bridge.capacity
- text = self.font.render("Stress: %d%%" % ratio, True, (0,0,0))
+ text = self.font.render(_("Stress: %d%%") % ratio, True, (0,0,0))
textpos = text.get_rect(left=100,top=25)
self.screen.blit(text,textpos)
if self.bridge.train_off_screen:
- text = self.font.render("Train fell off the screen, press R to try again!", True, (0,0,0))
+ text = self.font.render(_("Train fell off the screen, press R to try again!"), True, (0,0,0))
elif self.bridge.level_completed:
- text = self.font.render("Level completed, well done!! Press T to send another train.", True, (0,0,0))
+ text = self.font.render(_("Level completed, well done!! Press T to send another train."), True, (0,0,0))
else:
- text = self.font.render("Press the Spacebar to start/pause.", True, (0,0,0))
+ text = self.font.render(_("Press the Spacebar to start/pause."), True, (0,0,0))
textpos = text.get_rect(left=100,top=43)
self.screen.blit(text,textpos)