diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2008-01-18 19:26:52 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2008-01-18 19:26:52 (GMT) |
commit | ce6f25538b8f04a60aaf6e3e9f0b2fa37f4be925 (patch) | |
tree | 22be4f3c8cacb3c8e3a73a058efeb4ab0eb61114 /constants.py | |
parent | 703d7a577f37968812b4fac6d608010d9cd13446 (diff) |
done for the day
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/51@1017 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'constants.py')
-rw-r--r-- | constants.py | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/constants.py b/constants.py index e30c03f..1c797eb 100644 --- a/constants.py +++ b/constants.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- import os import gtk -from gettext import gettext as _ +from gettext import gettext as gt import sugar.graphics.style from sugar.activity import activity @@ -17,7 +17,7 @@ import pangocairo class Constants: - VERSION = 50 + VERSION = 51 SERVICE = "org.laptop.Record" IFACE = SERVICE @@ -88,6 +88,9 @@ class Constants: gfxPath = os.path.join(activity.get_bundle_path(), "gfx") soundClick = os.path.join(gfxPath, 'photoShutter.wav') + istrsTest = {} + for i in range (0,10): + istrsTest[str(i)] = str(i) istrActivityName = _('Record') istrPhoto = _('Photo') istrVideo = _('Video') @@ -275,8 +278,10 @@ class Constants: for i in range (0, longestTime): self.createCountdownPng( i ) + checkInternationalStrings() - def createCountdownPng( self, num ): + + def createCountdownPng(self, num): todisk = True rendered = False @@ -330,4 +335,16 @@ class Constants: else: img.set_from_pixmap(pixmap, None) - self.__class__.countdownImgs[int(num)] = img
\ No newline at end of file + self.__class__.countdownImgs[int(num)] = img + + + def _(self, s): + i = s + try: + #test translating the string with many replacements + i = gt(s) % self.__class__.istrTests + except: + #if it doesn't work, revert + i = s + + return i |