gajim-plural/src/common/helpers.py

45 lines
1.3 KiB
Python
Raw Normal View History

## common/helpers.py
##
## Gajim Team:
## - Yann Le Boulanger <asterix@lagaule.org>
## - Vincent Hanquez <tab@snarc.org>
## - Nikos Kouremenos <kourem@gmail.com>
##
## Copyright (C) 2003-2005 Gajim Team
##
## 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; version 2 only.
##
## 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.
##
2005-05-21 15:19:42 +02:00
from common import i18n
_ = i18n._
def get_uf_show(show):
'''returns a userfriendly string for dnd/xa/chat
2005-05-21 15:44:50 +02:00
and capitalize()s the rest and make translatable'''
if show == 'dnd':
2005-05-21 15:19:42 +02:00
uf_show = _('Busy')
elif show == 'xa':
2005-05-21 15:19:42 +02:00
uf_show = _('Not Available')
elif show == 'chat':
2005-05-21 15:19:42 +02:00
uf_show = _('Free for Chat')
elif show == 'online':
uf_show = _('Online')
elif show == 'connecting':
uf_show = _('Connecting')
elif show == 'away':
uf_show = _('Away')
2005-05-21 15:44:50 +02:00
elif show == 'offline':
uf_show = _('Offline')
elif show == 'invisible':
uf_show = _('Invisible')
2005-05-22 01:34:51 +02:00
elif show == 'not in the roster'
uf_show = _('Not in the roster')
return uf_show