# Path: floyd/util/unicode.py
# def force_unicode(text, encoding='utf-8'):
#   """
#   
#   @TODO encoding support
#   """
#   if text == None:
#     return u''
# 
#   try:
#     text = unicode(text, 'utf-8')
#   except UnicodeDecodeError:
#     text = unicode(text, 'latin1')
#   except TypeError:
#     text = unicode(text)
#   return text


from .unicode import force_unicode
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:expandtab
#
# Copyright (c) 2011, Nik Cubrilovic. All rights reserved.
#
# <nikcub@gmail.com> <http://nikcub.appspot.com>  
#
# Licensed under a BSD license. You may obtain a copy of the License at
#
#     http://nikcub.appspot.com/bsd-license
#
"""
  floyd - util - translation.py

  desc

  @TODO support translations with Babel module
  see: http://stackoverflow.com/questions/3821312/gae-webapp-application-internationalization-with-babel
  see: http://babel.edgewall.org/
"""

def ugettext(str, format=unicode):

# Path: floyd/util/unicode.py
# def force_unicode(text, encoding='utf-8'):
#   """
#   
#   @TODO encoding support
#   """
#   if text == None:
#     return u''
# 
#   try:
#     text = unicode(text, 'utf-8')
#   except UnicodeDecodeError:
#     text = unicode(text, 'latin1')
#   except TypeError:
#     text = unicode(text)
#   return text


# Path: floyd/util/translation.py
from .unicode import force_unicode

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:expandtab
#
# Copyright (c) 2011, Nik Cubrilovic. All rights reserved.
#
# <nikcub@gmail.com> <http://nikcub.appspot.com>  
#
# Licensed under a BSD license. You may obtain a copy of the License at
#
#     http://nikcub.appspot.com/bsd-license
#
"""
  floyd - util - translation.py

  desc

  @TODO support translations with Babel module
  see: http://stackoverflow.com/questions/3821312/gae-webapp-application-internationalization-with-babel
  see: http://babel.edgewall.org/
"""

def ugettext(str, format=unicode):

  return force_unicode(str)