fix translation of state information
This commit is contained in:
parent
a2cc1ee9a3
commit
a429f9ca76
5 changed files with 55 additions and 35 deletions
Binary file not shown.
|
@ -3,7 +3,7 @@ msgstr ""
|
||||||
|
|
||||||
"Project-Id-Version: $Id$\n"
|
"Project-Id-Version: $Id$\n"
|
||||||
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
||||||
"PO-Revision-Date: 2012-09-17 12:00 CET\n"
|
"PO-Revision-Date: 2012-11-22 12:00 CET\n"
|
||||||
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
||||||
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -883,38 +883,53 @@ msgstr "an"
|
||||||
msgid "move_to_task"
|
msgid "move_to_task"
|
||||||
msgstr "nach"
|
msgstr "nach"
|
||||||
|
|
||||||
|
# state definitions
|
||||||
|
|
||||||
|
msgid "task_states"
|
||||||
|
msgstr "Status"
|
||||||
|
|
||||||
|
# state names
|
||||||
|
|
||||||
|
msgid "accepted"
|
||||||
|
msgstr "angenommen"
|
||||||
|
|
||||||
|
msgid "active"
|
||||||
|
msgstr "aktiv"
|
||||||
|
|
||||||
|
msgid "cancelled"
|
||||||
|
msgstr "abgebrochen"
|
||||||
|
|
||||||
|
msgid "closed"
|
||||||
|
msgstr "abgeschlossen"
|
||||||
|
|
||||||
|
msgid "delegated"
|
||||||
|
msgstr "delegiert"
|
||||||
|
|
||||||
|
msgid "done"
|
||||||
|
msgstr "bearbeitet"
|
||||||
|
|
||||||
|
msgid "draft"
|
||||||
|
msgstr "Entwurf"
|
||||||
|
|
||||||
|
msgid "finished"
|
||||||
|
msgstr "beendet"
|
||||||
|
|
||||||
|
msgid "moved"
|
||||||
|
msgstr "verschoben"
|
||||||
|
|
||||||
msgid "new"
|
msgid "new"
|
||||||
msgstr "neu"
|
msgstr "neu"
|
||||||
|
|
||||||
msgid "planned"
|
msgid "planned"
|
||||||
msgstr "geplant"
|
msgstr "geplant"
|
||||||
|
|
||||||
msgid "accepted"
|
msgid "replaced"
|
||||||
msgstr "angenommen"
|
msgstr "ersetzt"
|
||||||
|
|
||||||
msgid "delegated"
|
|
||||||
msgstr "delegiert"
|
|
||||||
|
|
||||||
msgid "running"
|
msgid "running"
|
||||||
msgstr "in Arbeit"
|
msgstr "in Arbeit"
|
||||||
|
|
||||||
msgid "done"
|
# transitions
|
||||||
msgstr "bearbeitet"
|
|
||||||
|
|
||||||
msgid "finished"
|
|
||||||
msgstr "beendet"
|
|
||||||
|
|
||||||
msgid "closed"
|
|
||||||
msgstr "abgeschlossen"
|
|
||||||
|
|
||||||
msgid "cancelled"
|
|
||||||
msgstr "abgebrochen"
|
|
||||||
|
|
||||||
msgid "moved"
|
|
||||||
msgstr "verschoben"
|
|
||||||
|
|
||||||
msgid "replaced"
|
|
||||||
msgstr "ersetzt"
|
|
||||||
|
|
||||||
msgid "plan"
|
msgid "plan"
|
||||||
msgstr "planen"
|
msgstr "planen"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,13 +18,12 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Views and actions for states management.
|
Views and actions for states management.
|
||||||
|
|
||||||
$Id$
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from zope import component
|
from zope import component
|
||||||
from zope.app.pagetemplate import ViewPageTemplateFile
|
from zope.app.pagetemplate import ViewPageTemplateFile
|
||||||
from zope.cachedescriptors.property import Lazy
|
from zope.cachedescriptors.property import Lazy
|
||||||
|
from zope.i18n import translate
|
||||||
|
|
||||||
from cybertools.browser.action import Action, actions
|
from cybertools.browser.action import Action, actions
|
||||||
from cybertools.stateful.interfaces import IStateful, IStatesDefinition
|
from cybertools.stateful.interfaces import IStateful, IStatesDefinition
|
||||||
|
@ -53,9 +52,11 @@ class StateAction(Action):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def description(self):
|
def description(self):
|
||||||
|
lang = self.view.languageInfo.language
|
||||||
|
definition = translate(_(self.definition), target_language=lang)
|
||||||
|
title = translate(_(self.stateObject.title), target_language=lang)
|
||||||
return _(u'State information for $definition: $title',
|
return _(u'State information for $definition: $title',
|
||||||
mapping=dict(definition=self.definition,
|
mapping=dict(definition=definition, title=title))
|
||||||
title=self.stateObject.title))
|
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def stateObject(self):
|
def stateObject(self):
|
||||||
|
|
|
@ -35,16 +35,21 @@ from loops.organize.stateful.base import StatefulLoopsObject
|
||||||
@implementer(IStatesDefinition)
|
@implementer(IStatesDefinition)
|
||||||
def taskStates():
|
def taskStates():
|
||||||
return StatesDefinition('task_states',
|
return StatesDefinition('task_states',
|
||||||
State('planned', 'planned', ('finish', 'cancel'),
|
State('draft', 'draft', ('start', 'cancel',),
|
||||||
color='yellow'),
|
color='yellow'),
|
||||||
State('finished', 'finished', ('reopen'),
|
State('active', 'active', ('finish', 'cancel',),
|
||||||
|
color='yellow'),
|
||||||
|
State('finished', 'finished', ('reopen', 'archive',),
|
||||||
color='green'),
|
color='green'),
|
||||||
State('cancelled', 'cancelled', ('reopen'),
|
State('cancelled', 'cancelled', ('reopen',),
|
||||||
color='grey'),
|
color='grey'),
|
||||||
|
State('archived', 'archived', ('reopen',),
|
||||||
|
color='grey'),
|
||||||
|
Transition('start', 'start', 'active'),
|
||||||
Transition('finish', 'finish', 'finished'),
|
Transition('finish', 'finish', 'finished'),
|
||||||
Transition('cancel', 'cancel', 'cancelled'),
|
Transition('cancel', 'cancel', 'cancelled'),
|
||||||
Transition('reopen', 're-open', 'planned'),
|
Transition('reopen', 're-open', 'draft'),
|
||||||
initialState='planned')
|
initialState='draft')
|
||||||
|
|
||||||
|
|
||||||
class StatefulTask(StatefulLoopsObject):
|
class StatefulTask(StatefulLoopsObject):
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<!-- $Id$ -->
|
|
||||||
|
|
||||||
|
|
||||||
<metal:query define-macro="query">
|
<metal:query define-macro="query">
|
||||||
|
|
Loading…
Add table
Reference in a new issue