diff --git a/browser/icons/dialog-information.png b/browser/icons/dialog-information.png new file mode 100644 index 0000000..1b99d0b Binary files /dev/null and b/browser/icons/dialog-information.png differ diff --git a/browser/icons/dialog-warning.png b/browser/icons/dialog-warning.png new file mode 100644 index 0000000..325e5c0 Binary files /dev/null and b/browser/icons/dialog-warning.png differ diff --git a/organize/interfaces.py b/organize/interfaces.py index 5a5422d..5047f0e 100644 --- a/organize/interfaces.py +++ b/organize/interfaces.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2011 Helmut Merz helmutm@cy55.de +# Copyright (c) 2013 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,8 +18,6 @@ """ Interfaces for organizational stuff like persons, addresses, tasks, services... - -$Id$ """ from zope import schema @@ -30,6 +28,7 @@ from zope.i18nmessageid import MessageFactory from cybertools.composer.schema.factory import Email from cybertools.tracking.interfaces import ITrack from cybertools.util.jeep import Jeep, Term +from cybertools.util.util import KeywordVocabulary _ = MessageFactory('cybertools.organize') @@ -43,31 +42,48 @@ class LinesList(schema.List): pass # persons, addresses, ... +salutations = ((None, u''), + ('m', _(u'Mr')), + ('f', _(u'Mrs'))) + + class IPerson(Interface): """ Resembles a human being with a name (first and last name), a birth date, and a set of addresses. """ + salutation = schema.Choice( + title=_(u'Salutation'), + description=_(u'Salutation in letter.'), + vocabulary=KeywordVocabulary(salutations), + default=None, + required=False) + + academicTitle = schema.TextLine( + title=_(u'Academic Title'), + description=_(u'Academic title or name affix.'), + required=False) + firstName = schema.TextLine( - title=_(u'First name'), - description=_(u'The first name'), + title=_(u'First Name'), + description=_(u'The first name.'), required=False,) lastName = schema.TextLine( - title=_(u'Last name'), - description=_(u'The last name or surname'),) - email = Email(title=_(u'E-Mail address'), - description=_(u'The standard email address of the person'),) + title=_(u'Last Name'), + description=_(u'The last name or surname.'),) + email = Email(title=_(u'E-Mail Address'), + description=_(u'The standard email address of the person.'),) #phoneNumbers = SimpleList( phoneNumbers = schema.List( value_type=schema.TextLine(), default=[], - title=_(u'Phone numbers'), - description=_(u'Note one or more phone numbers here'), + title=_(u'Phone Numbers'), + description=_(u'Note one or more phone numbers here.'), required=False,) birthDate = schema.Date( - title=_(u'Date of birth'), + title=_(u'Date of Birth'), description=_(u'The date of birth - should be a ' - 'datetime.date object'), + 'datetime.date object.'), required=False,) age = schema.Int( diff --git a/organize/locales/de/LC_MESSAGES/cybertools.organize.mo b/organize/locales/de/LC_MESSAGES/cybertools.organize.mo index 6ddda5f..2826550 100644 Binary files a/organize/locales/de/LC_MESSAGES/cybertools.organize.mo and b/organize/locales/de/LC_MESSAGES/cybertools.organize.mo differ diff --git a/organize/locales/de/LC_MESSAGES/cybertools.organize.po b/organize/locales/de/LC_MESSAGES/cybertools.organize.po index f4294b0..1db0f8f 100644 --- a/organize/locales/de/LC_MESSAGES/cybertools.organize.po +++ b/organize/locales/de/LC_MESSAGES/cybertools.organize.po @@ -3,39 +3,57 @@ msgstr "" "Project-Id-Version: $Id$\n" "POT-Creation-Date: 2008-12-01 12:00 CET\n" -"PO-Revision-Date: 2011-11-15 12:00 CET\n" -"Last-Translator: Hannes Plattner \n" +"PO-Revision-Date: 2013-05-17 12:00 CET\n" +"Last-Translator: Helmut Merz \n" "Language-Team: loops developers \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: kwrite\n" -msgid "First name" +msgid "Salutation" +msgstr "Anrede" + +msgid "Salutation in letter." +msgstr "Bitte Anrede auswählen." + +msgid "Academic Title" +msgstr "Titel/Namenszusatz" + +msgid "Academic title or name affix." +msgstr "Akademischer Titel oder Namenszusatz." + +msgid "Mr" +msgstr "Herr" + +msgid "Mrs" +msgstr "Frau" + +msgid "First Name" msgstr "Vorname" -msgid "The first name" -msgstr "Bitte den oder die Vornamen eingeben" +msgid "The first name." +msgstr "Bitte den Vornamen eingeben." -msgid "Last name" +msgid "Last Name" msgstr "Nachname" -msgid "The last name or surname" -msgstr "Bitte den Nachnamen eingeben" +msgid "The last name or surname." +msgstr "Bitte den Nachnamen eingeben." -msgid "E-Mail address" +msgid "E-Mail Address" msgstr "E-Mail-Adresse" -msgid "The standard email address of the person" -msgstr "Bitte eine gültige E-Mail-Adresse eingeben" +msgid "The standard email address of the person." +msgstr "Bitte eine gültige E-Mail-Adresse eingeben." -msgid "Phone numbers" +msgid "Phone Numbers" msgstr "Telefonnummern" -msgid "Note one or more phone numbers here" -msgstr "Bitte eine oder mehrere Telefonnummern (je Zeile eine) eingeben" +msgid "Note one or more phone numbers here." +msgstr "Bitte eine oder mehrere Telefonnummern (je Zeile eine) eingeben." -msgid "Date of birth" +msgid "Date of Birth" msgstr "Geburtsdatum" msgid "Age" diff --git a/stateful/definition.py b/stateful/definition.py index 4f773c5..7ebcf7e 100644 --- a/stateful/definition.py +++ b/stateful/definition.py @@ -43,6 +43,10 @@ class State(object): for k, v in kw.items(): setattr(self, k, v) + @property + def stateIcon(self): + return 'cybertools.icons/' + (self.icon or 'led%s.png' % self.color) + class Action(object): diff --git a/util/__init__.py b/util/__init__.py index 38314f3..8ee1202 100644 --- a/util/__init__.py +++ b/util/__init__.py @@ -1,3 +1,3 @@ """ -$Id$ +common utilities """