Changeset 237
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r236 r237 1 1 1.0: 2 2 * Added RPM packages 3 * Added interface translations. 3 * Added interface translations #4 4 * Simplified and improved Makefile 4 5 * Switch to GPLv3. 5 6 -
trunk/Makefile
r235 r237 8 8 9 9 PREFIX = /usr 10 # When debian builds it, it passes its own DESTDIR 10 11 DESTDIR = $(PREFIX) 11 12 … … 19 20 MANDIR = $(DESTDIR)/share/man/man1 20 21 22 # For debian compatibility, these are hardcoded 23 REPLACEIMAGESDIR = $(PREFIX)/share/itaka/images/ 24 REPLACELOCALEDIR = $(PREFIX)/locale/ 25 21 26 PYFILES := $(shell $(FIND) . -name "*.py" -print) 22 27 23 28 install: 24 29 mv config.py config.py.old 25 sed -e "s|/usr/share/itaka/images/|$(IMAGESDIR)|g" config.py.old > config.py 30 mv itaka.py itaka.py.old 31 sed -e "s|/usr/share/itaka/images/|$(REPLACEIMAGESDIR)|g" config.py.old > config.py 32 sed -e "s|/usr/share/locale/|$(REPLACELOCALEDIR)|g" itaka.py.old > itaka.py 26 33 $(INSTALL) -m 755 -d $(BINDIR) $(DATADIR) $(LIBDIR) $(IMAGESDIR) $(APPLICATIONSDIR) $(ICONDIR) $(MANDIR) 27 34 $(INSTALL) -m 755 *.py $(LIBDIR) … … 36 43 chmod +x $(BINDIR)/itaka 37 44 mv config.py.old config.py 45 mv itaka.py.old itaka.py 38 46 39 47 for lang in locale/*; do -
trunk/itaka.py
r236 r237 23 23 """ Itaka core """ 24 24 25 import sys, traceback, gettext, locale, __builtin__25 import sys, os, traceback, gettext, locale, __builtin__ 26 26 locale.setlocale(locale.LC_ALL, '') 27 gettext.bindtextdomain('itaka', 'i18n/') 28 gettext.textdomain('itaka') 27 __builtin__._ = gettext.gettext 29 28 30 __builtin__._ = gettext.gettext 29 # Itaka core modules 30 try: 31 import console 32 import config as itakaglobals 33 import uigtk as igui 34 except ImportError: 35 print '[*] ERROR: Failed to import Itaka modules' 36 traceback.print_exc() 37 sys.exit(1) 38 39 40 #: Locales directory 41 locale_dir = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'locale/') 42 43 #: To be changed on install to specify where the installed files actually are 44 locale_prefix = "/usr/share/locale/" 45 46 if os.path.exists(locale_prefix): 47 locale_dir = locale_prefix 48 49 # See if our locales are there before starting 50 if not os.path.exists(locale_dir): 51 print_warning(_('Could not find locale directory %s, not using locales.' % (locale_dir))) 52 else: 53 gettext.bindtextdomain('itaka', locale_dir) 54 gettext.textdomain('itaka') 31 55 32 56 validarguments = ('-help', '-debug') … … 40 64 arguments = None 41 65 42 # Itaka core modules43 66 try: 44 67 # Initiate our Console and Configuration engines 45 import console46 import config as itakaglobals47 68 configinstance = itakaglobals.ConfigParser(arguments) 48 69 configinstance.load() … … 55 76 traceback.print_exc() 56 77 sys.exit(1) 57 58 import uigtk as igui 59 except ImportError: 60 print_error(_('Failed to import Itaka modules')) 78 except: 79 print_error(_('Could not initiate Configuration engine')) 61 80 traceback.print_exc() 62 81 sys.exit(1)
Note: See TracChangeset
for help on using the changeset viewer.

