~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to UpdateManager/Core/utils.py

  • Committer: Michael Vogt
  • Date: 2010-04-07 14:26:00 UTC
  • Revision ID: michael.vogt@ubuntu.com-20100407142600-h0656qhdor4hq23o
when requesting the release announcement, append ?lang=current_lang
to the request URI

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
def utf8(str):
314
314
  return unicode(str, 'latin1').encode('utf-8')
315
315
 
 
316
def get_lang():
 
317
    import logging
 
318
    try:
 
319
        (locale_s, encoding) = locale.getdefaultlocale()
 
320
        return locale_s
 
321
    except Exception, e: 
 
322
        logging.exception("gedefaultlocale() failed")
 
323
        return None
 
324
 
316
325
def error(parent, summary, message):
317
326
  import gtk
318
327
  d = gtk.MessageDialog(parent=parent,