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" | ||||
| "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" | ||||
| "Language-Team: loops developers <helmutm@cy55.de>\n" | ||||
| "MIME-Version: 1.0\n" | ||||
|  | @ -883,38 +883,53 @@ msgstr "an" | |||
| msgid "move_to_task" | ||||
| 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" | ||||
| msgstr "neu" | ||||
| 
 | ||||
| msgid "planned" | ||||
| msgstr "geplant" | ||||
| 
 | ||||
| msgid "accepted" | ||||
| msgstr "angenommen" | ||||
| 
 | ||||
| msgid "delegated" | ||||
| msgstr "delegiert" | ||||
| msgid "replaced" | ||||
| msgstr "ersetzt" | ||||
| 
 | ||||
| msgid "running" | ||||
| msgstr "in Arbeit" | ||||
| 
 | ||||
| msgid "done" | ||||
| msgstr "bearbeitet" | ||||
| 
 | ||||
| msgid "finished" | ||||
| msgstr "beendet" | ||||
| 
 | ||||
| msgid "closed" | ||||
| msgstr "abgeschlossen" | ||||
| 
 | ||||
| msgid "cancelled" | ||||
| msgstr "abgebrochen" | ||||
| 
 | ||||
| msgid "moved" | ||||
| msgstr "verschoben" | ||||
| 
 | ||||
| msgid "replaced" | ||||
| msgstr "ersetzt" | ||||
| # transitions | ||||
| 
 | ||||
| msgid "plan" | ||||
| 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 | ||||
| #  it under the terms of the GNU General Public License as published by | ||||
|  | @ -18,13 +18,12 @@ | |||
| 
 | ||||
| """ | ||||
| Views and actions for states management. | ||||
| 
 | ||||
| $Id$ | ||||
| """ | ||||
| 
 | ||||
| from zope import component | ||||
| from zope.app.pagetemplate import ViewPageTemplateFile | ||||
| from zope.cachedescriptors.property import Lazy | ||||
| from zope.i18n import translate | ||||
| 
 | ||||
| from cybertools.browser.action import Action, actions | ||||
| from cybertools.stateful.interfaces import IStateful, IStatesDefinition | ||||
|  | @ -53,9 +52,11 @@ class StateAction(Action): | |||
| 
 | ||||
|     @Lazy | ||||
|     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', | ||||
|                  mapping=dict(definition=self.definition, | ||||
|                               title=self.stateObject.title)) | ||||
|                  mapping=dict(definition=definition, title=title)) | ||||
| 
 | ||||
|     @Lazy | ||||
|     def stateObject(self): | ||||
|  |  | |||
|  | @ -35,16 +35,21 @@ from loops.organize.stateful.base import StatefulLoopsObject | |||
| @implementer(IStatesDefinition) | ||||
| def taskStates(): | ||||
|     return StatesDefinition('task_states', | ||||
|         State('planned', 'planned', ('finish', 'cancel'), | ||||
|         State('draft', 'draft', ('start', 'cancel',), | ||||
|               color='yellow'), | ||||
|         State('finished', 'finished', ('reopen'), | ||||
|         State('active', 'active', ('finish', 'cancel',), | ||||
|               color='yellow'), | ||||
|         State('finished', 'finished', ('reopen', 'archive',), | ||||
|               color='green'), | ||||
|         State('cancelled', 'cancelled', ('reopen'), | ||||
|         State('cancelled', 'cancelled', ('reopen',), | ||||
|               color='grey'), | ||||
|         State('archived', 'archived', ('reopen',), | ||||
|               color='grey'), | ||||
|         Transition('start', 'start', 'active'), | ||||
|         Transition('finish', 'finish', 'finished'), | ||||
|         Transition('cancel', 'cancel', 'cancelled'), | ||||
|         Transition('reopen', 're-open', 'planned'), | ||||
|         initialState='planned') | ||||
|         Transition('reopen', 're-open', 'draft'), | ||||
|         initialState='draft') | ||||
| 
 | ||||
| 
 | ||||
| class StatefulTask(StatefulLoopsObject): | ||||
|  |  | |||
|  | @ -1,4 +1,3 @@ | |||
| <!-- $Id$ --> | ||||
| 
 | ||||
| 
 | ||||
| <metal:query define-macro="query"> | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue