# Path: djangojames/string.py
# class unaccented_map(dict):
#     """
#     Translation dictionary. Translation entries are added to this dictionary as needed
#     """
#     
#     def mapchar(self, key):
#         """
#         Maps a unicode character code (the key) to a replacement code (either a character code or a unicode string).
#         """
#         ch = self.get(key)
#         if ch is not None:
#             return ch
#         de = unicodedata.decomposition(unichr(key))
#         if de:
#             try:
#                 ch = int(de.split(None, 1)[0], 16)
#             except (IndexError, ValueError):
#                 ch = key
#         else:
#             ch = CHAR_REPLACEMENT.get(key, key)
#         self[key] = ch
#         return ch
# 
#     if sys.version >= "2.5":
#         # use __missing__ where available
#         __missing__ = mapchar
#     else:
#         # otherwise, use standard __getitem__ hook (this is slower,
#         # since it's called for each character)
#         __getitem__ = mapchar


from djangojames.string import unaccented_map
from copy import copy
from django.utils.translation import ugettext_lazy as _
# -*- coding: utf-8 -*-
#
# Atizo - The Open Innovation Platform
# http://www.atizo.com/
#
# Copyright (c) 2008-2010 Atizo AG. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#


SELECTION_NAME = _(u'- Bitte wählen -')
NO_SELECTION = _(u'- Keine Auswahl -')

def sort_choice(choice, head_tuple=None):
    c = list(copy(choice))

# Path: djangojames/string.py
# class unaccented_map(dict):
#     """
#     Translation dictionary. Translation entries are added to this dictionary as needed
#     """
#     
#     def mapchar(self, key):
#         """
#         Maps a unicode character code (the key) to a replacement code (either a character code or a unicode string).
#         """
#         ch = self.get(key)
#         if ch is not None:
#             return ch
#         de = unicodedata.decomposition(unichr(key))
#         if de:
#             try:
#                 ch = int(de.split(None, 1)[0], 16)
#             except (IndexError, ValueError):
#                 ch = key
#         else:
#             ch = CHAR_REPLACEMENT.get(key, key)
#         self[key] = ch
#         return ch
# 
#     if sys.version >= "2.5":
#         # use __missing__ where available
#         __missing__ = mapchar
#     else:
#         # otherwise, use standard __getitem__ hook (this is slower,
#         # since it's called for each character)
#         __getitem__ = mapchar


# Path: djangojames/choices.py
from djangojames.string import unaccented_map
from copy import copy
from django.utils.translation import ugettext_lazy as _

# -*- coding: utf-8 -*-
#
# Atizo - The Open Innovation Platform
# http://www.atizo.com/
#
# Copyright (c) 2008-2010 Atizo AG. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#


SELECTION_NAME = _(u'- Bitte wählen -')
NO_SELECTION = _(u'- Keine Auswahl -')

def sort_choice(choice, head_tuple=None):
    c = list(copy(choice))

    m = unaccented_map()