comparison pyntnclick/main.py @ 802:5ec7905b2365 pyntnclick

Don't use resource module to find module locale data
author Neil Muller <neil@dip.sun.ac.za>
date Sun, 27 Jan 2013 14:50:33 +0200
parents 42cfafa20437
children beac13c4e982
comparison
equal deleted inserted replaced
801:cc284445181b 802:5ec7905b2365
10 from optparse import OptionParser 10 from optparse import OptionParser
11 11
12 import pygame 12 import pygame
13 from pygame.locals import SWSURFACE 13 from pygame.locals import SWSURFACE
14 14
15 from pyntnclick.i18n import _ 15 from pyntnclick.i18n import _, get_module_locale
16 from pyntnclick.engine import Engine 16 from pyntnclick.engine import Engine
17 from pyntnclick.gamescreen import DefMenuScreen, DefEndScreen, GameScreen 17 from pyntnclick.gamescreen import DefMenuScreen, DefEndScreen, GameScreen
18 from pyntnclick.constants import GameConstants, DEBUG_ENVVAR 18 from pyntnclick.constants import GameConstants, DEBUG_ENVVAR
19 from pyntnclick.resources import Resources 19 from pyntnclick.resources import Resources
20 from pyntnclick.sound import Sound 20 from pyntnclick.sound import Sound
167 sys.exit(0) 167 sys.exit(0)
168 if self.constants.debug and opts.rect_drawer: 168 if self.constants.debug and opts.rect_drawer:
169 if opts.scene is None: 169 if opts.scene is None:
170 print 'Need to supply a scene to use the rect drawer' 170 print 'Need to supply a scene to use the rect drawer'
171 sys.exit(1) 171 sys.exit(1)
172 gettext.bindtextdomain('pyntnclick_tools', 172 gettext.bindtextdomain('pyntnclick-tools',
173 self.resource.get_resource_path('locale')) 173 get_module_locale(self.resource.DEFAULT_RESOURCE_MODULE))
174 gettext.textdomain('pyntnclick-tools')
174 make_rect_display() 175 make_rect_display()
175 try: 176 try:
176 self.engine = RectEngine(self, opts.detail) 177 self.engine = RectEngine(self, opts.detail)
177 except RectDrawerError, e: 178 except RectDrawerError, e:
178 print 'RectDrawer failed with: %s' % e 179 print 'RectDrawer failed with: %s' % e