Beispiel #1
0
 def cleanup(self):
     di_locale = self.db.get('debian-installer/locale')
     if di_locale not in i18n.get_supported_locales():
         di_locale = self.db.get('debian-installer/fallbacklocale')
     if di_locale != self.frontend.locale:
         self.frontend.locale = di_locale
         os.environ['LANG'] = di_locale
         os.environ['LANGUAGE'] = di_locale
         try:
             locale.setlocale(locale.LC_ALL, '')
         except locale.Error, e:
             self.debug('locale.setlocale failed: %s (LANG=%s)',
                        e, di_locale)
         im_switch.start_im()
Beispiel #2
0
 def cleanup(self):
     di_locale = self.db.get('debian-installer/locale')
     if di_locale not in i18n.get_supported_locales():
         di_locale = self.db.get('debian-installer/fallbacklocale')
     if di_locale == '':
         # TODO cjwatson 2006-07-17: maybe fetch
         # languagechooser/language-name and set a language based on
         # that?
         di_locale = 'en_US.UTF-8'
     if di_locale != self.frontend.locale:
         self.frontend.locale = di_locale
         os.environ['LANG'] = di_locale
         os.environ['LANGUAGE'] = di_locale
         try:
             locale.setlocale(locale.LC_ALL, '')
         except locale.Error, e:
             self.debug('locale.setlocale failed: %s (LANG=%s)',
                        e, di_locale)
         if osextras.find_on_path('fontconfig-voodoo'):
             subprocess.call(['fontconfig-voodoo',
                              '--auto', '--force', '--quiet'])
         im_switch.start_im()
Beispiel #3
0
 def cleanup(self):
     di_locale = self.db.get('debian-installer/locale')
     if di_locale not in i18n.get_supported_locales():
         di_locale = self.db.get('debian-installer/fallbacklocale')
     if di_locale == '':
         # TODO cjwatson 2006-07-17: maybe fetch
         # languagechooser/language-name and set a language based on
         # that?
         di_locale = 'en_US.UTF-8'
     if di_locale != self.frontend.locale:
         self.frontend.locale = di_locale
         os.environ['LANG'] = di_locale
         os.environ['LANGUAGE'] = di_locale
         try:
             locale.setlocale(locale.LC_ALL, '')
         except locale.Error, e:
             self.debug('locale.setlocale failed: %s (LANG=%s)', e,
                        di_locale)
         if osextras.find_on_path('fontconfig-voodoo'):
             subprocess.call(
                 ['fontconfig-voodoo', '--auto', '--force', '--quiet'])
         im_switch.start_im()