New translation system, that generates screens for updating translations through the web, within the configuration.
This commit is contained in:
parent
f3604624de
commit
ead9f7c2de
22 changed files with 525 additions and 278 deletions
|
@ -3,8 +3,10 @@ from AccessControl import ClassSecurityInfo
|
|||
from DateTime import DateTime
|
||||
from Products.Archetypes.atapi import *
|
||||
import Products.<!applicationName!>.config
|
||||
from Extensions.appyWrappers import <!genClassName!>_Wrapper
|
||||
from Products.CMFCore.utils import UniqueObject
|
||||
from appy.gen.plone25.mixins import BaseMixin
|
||||
from appy.gen.plone25.mixins.ToolMixin import ToolMixin
|
||||
from Extensions.appyWrappers import <!genClassName!>_Wrapper
|
||||
<!imports!>
|
||||
|
||||
schema = Schema((<!fields!>
|
||||
|
@ -18,19 +20,20 @@ class <!genClassName!>(<!parents!>):
|
|||
archetype_name = '<!genClassName!>'
|
||||
meta_type = '<!genClassName!>'
|
||||
portal_type = '<!genClassName!>'
|
||||
allowed_content_types = []
|
||||
allowed_content_types = ()
|
||||
filter_content_types = 0
|
||||
global_allow = 1
|
||||
global_allow = <!global_allow!>
|
||||
immediate_view = 'skyn/view'
|
||||
default_view = 'skyn/view'
|
||||
suppl_views = ()
|
||||
typeDescription = '<!genClassName!>'
|
||||
typeDescMsgId = '<!genClassName!>_edit_descr'
|
||||
i18nDomain = '<!applicationName!>'
|
||||
schema = fullSchema
|
||||
wrapperClass = <!genClassName!>_Wrapper
|
||||
for elem in dir(BaseMixin):
|
||||
schema = fullSchema
|
||||
for elem in dir(<!baseMixin!>):
|
||||
if not elem.startswith('__'): security.declarePublic(elem)
|
||||
<!static!>
|
||||
<!commonMethods!>
|
||||
<!methods!>
|
||||
<!register!>
|
|
@ -266,6 +266,13 @@ div.appyPopup {
|
|||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
.translationLabel {
|
||||
background-color: #EAEAEA;
|
||||
border-bottom: 1px dashed grey;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* Uncomment this if you want to hide breadcrumbs */
|
||||
/*
|
||||
#portal-breadcrumbs {
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
<!codeHeader!>
|
||||
from AccessControl import ClassSecurityInfo
|
||||
from DateTime import DateTime
|
||||
from Products.Archetypes.atapi import *
|
||||
from Products.CMFCore.utils import UniqueObject
|
||||
import Products.<!applicationName!>.config
|
||||
from appy.gen.plone25.mixins.ToolMixin import ToolMixin
|
||||
from Extensions.appyWrappers import AbstractWrapper, <!wrapperClass!>
|
||||
|
||||
schema = Schema((<!fields!>
|
||||
),)
|
||||
fullSchema = OrderedBaseFolderSchema.copy() + schema.copy()
|
||||
|
||||
class <!toolName!>(ToolMixin, UniqueObject, OrderedBaseFolder):
|
||||
'''Tool for <!applicationName!>.'''
|
||||
security = ClassSecurityInfo()
|
||||
__implements__ = (getattr(UniqueObject,'__implements__',()),) + (getattr(OrderedBaseFolder,'__implements__',()),)
|
||||
|
||||
archetype_name = '<!toolName!>'
|
||||
meta_type = '<!toolName!>'
|
||||
portal_type = '<!toolName!>'
|
||||
allowed_content_types = ()
|
||||
filter_content_types = 0
|
||||
global_allow = 0
|
||||
#content_icon = '<!toolName!>.gif'
|
||||
immediate_view = 'skyn/view'
|
||||
default_view = 'skyn/view'
|
||||
suppl_views = ()
|
||||
typeDescription = "<!toolName!>"
|
||||
typeDescMsgId = '<!toolName!>_edit_descr'
|
||||
i18nDomain = '<!applicationName!>'
|
||||
allMetaTypes = <!metaTypes!>
|
||||
wrapperClass = <!wrapperClass!>
|
||||
schema = fullSchema
|
||||
schema["id"].widget.visible = False
|
||||
schema["title"].widget.visible = False
|
||||
# When browsing into the tool, the 'configure' portlet should be displayed.
|
||||
left_slots = ['here/portlet_prefs/macros/portlet']
|
||||
right_slots = []
|
||||
for elem in dir(ToolMixin):
|
||||
if not elem.startswith('__'): security.declarePublic(elem)
|
||||
|
||||
# Tool constructor has no id argument, the id is fixed.
|
||||
def __init__(self, id=None):
|
||||
OrderedBaseFolder.__init__(self, '<!toolInstanceName!>')
|
||||
self.setTitle('<!applicationName!>')
|
||||
<!commonMethods!>
|
||||
<!methods!>
|
||||
registerType(<!toolName!>, '<!applicationName!>')
|
|
@ -1,34 +0,0 @@
|
|||
<!codeHeader!>
|
||||
from AccessControl import ClassSecurityInfo
|
||||
from Products.Archetypes.atapi import *
|
||||
import Products.<!applicationName!>.config
|
||||
from appy.gen.plone25.mixins import BaseMixin
|
||||
from Extensions.appyWrappers import <!wrapperClass!>
|
||||
|
||||
schema = Schema((<!fields!>
|
||||
),)
|
||||
fullSchema = BaseSchema.copy() + schema.copy()
|
||||
|
||||
class <!applicationName!>User(BaseMixin, BaseContent):
|
||||
'''User mixin.'''
|
||||
security = ClassSecurityInfo()
|
||||
__implements__ = (getattr(BaseContent,'__implements__',()),)
|
||||
archetype_name = '<!applicationName!>User'
|
||||
meta_type = '<!applicationName!>User'
|
||||
portal_type = '<!applicationName!>User'
|
||||
allowed_content_types = []
|
||||
filter_content_types = 0
|
||||
global_allow = 1
|
||||
immediate_view = 'skyn/view'
|
||||
default_view = 'skyn/view'
|
||||
suppl_views = ()
|
||||
typeDescription = "<!applicationName!>User"
|
||||
typeDescMsgId = '<!applicationName!>User_edit_descr'
|
||||
i18nDomain = '<!applicationName!>'
|
||||
schema = fullSchema
|
||||
wrapperClass = <!wrapperClass!>
|
||||
for elem in dir(BaseMixin):
|
||||
if not elem.startswith('__'): security.declarePublic(elem)
|
||||
<!commonMethods!>
|
||||
<!methods!>
|
||||
registerType(<!applicationName!>User, '<!applicationName!>')
|
|
@ -3,16 +3,13 @@ from appy.gen import *
|
|||
from appy.gen.plone25.wrappers import AbstractWrapper
|
||||
from appy.gen.plone25.wrappers.ToolWrapper import ToolWrapper
|
||||
from appy.gen.plone25.wrappers.UserWrapper import UserWrapper
|
||||
from appy.gen.plone25.wrappers.TranslationWrapper import TranslationWrapper
|
||||
from Globals import InitializeClass
|
||||
from AccessControl import ClassSecurityInfo
|
||||
<!imports!>
|
||||
|
||||
class User(UserWrapper):
|
||||
'''This class represents a user.'''
|
||||
<!userBody!>
|
||||
class Tool(ToolWrapper):
|
||||
'''This class represents the tool for this application.'''
|
||||
folder=True
|
||||
<!toolBody!>
|
||||
<!User!>
|
||||
<!Translation!>
|
||||
<!Tool!>
|
||||
<!wrappers!>
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -45,7 +45,7 @@ setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, tuple(defaultAddRoles))
|
|||
|
||||
# Applications classes, in various formats
|
||||
rootClasses = [<!rootClasses!>]
|
||||
appClasses = <!appClasses!>
|
||||
appClasses = [<!appClasses!>]
|
||||
appClassNames = [<!appClassNames!>]
|
||||
allClassNames = [<!allClassNames!>]
|
||||
# List of classes that must be hidden from the catalog
|
||||
|
@ -66,7 +66,7 @@ workflowInstances = {}
|
|||
# In the following dict, we store, for every Appy class, the ordered list of
|
||||
# appy types (included inherited ones).
|
||||
attributes = {<!attributes!>}
|
||||
# In the followinf dict, we store, for every Appy class, a dict of appy types
|
||||
# In the following dict, we store, for every Appy class, a dict of appy types
|
||||
# keyed by their names.
|
||||
attributesDict = {<!attributesDict!>}
|
||||
|
||||
|
@ -81,4 +81,5 @@ languages = [<!languages!>]
|
|||
languageSelector = <!languageSelector!>
|
||||
minimalistPlone = <!minimalistPlone!>
|
||||
appFrontPage = <!appFrontPage!>
|
||||
sourceLanguage = '<!sourceLanguage!>'
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue