frontends: define the constants with classes and inheritance instance of using __builtin__
This commit is contained in:
parent
b824f9c2ce
commit
f5dd3f2265
1 changed files with 169 additions and 95 deletions
34
frontends/src/constants.py
Normal file
34
frontends/src/constants.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Primitivus: a SAT frontend
|
||||
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Jérôme Poisson (goffi@goffi.org)
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
try:
|
||||
_("dummy")
|
||||
except: # libervia doesn't allow to explicit the exception here
|
||||
_ = lambda text: text
|
||||
|
||||
class Const(object):
|
||||
|
||||
# TODO: find a way to merge it with the ones of primitivus and wix
|
||||
PRESENCE = {"": _("Online"),
|
||||
"chat": _("Free for chat"),
|
||||
"away": _("Away from keyboard"),
|
||||
"dnd": _("Do not disturb"),
|
||||
"xa": _("Away")
|
||||
}
|
||||
Loading…
Reference in a new issue