[gen] Added a i18n label used for the title of web pages and added a default favicon and the possibility to override it.
This commit is contained in:
parent
d799398de1
commit
6367924b05
|
@ -397,6 +397,7 @@ class ZopeGenerator(Generator):
|
|||
# Some global i18n messages
|
||||
poMsg = msg(app, '', app); poMsg.produceNiceDefault()
|
||||
self.labels += [poMsg,
|
||||
msg('app_name', '', msg.APP_NAME),
|
||||
msg('workflow_state', '', msg.WORKFLOW_STATE),
|
||||
msg('appy_title', '', msg.APPY_TITLE),
|
||||
msg('data_change', '', msg.DATA_CHANGE),
|
||||
|
|
|
@ -124,7 +124,11 @@ class ZopeInstaller:
|
|||
zopeName = name
|
||||
if hasattr(zopeFolder.aq_base, zopeName): continue
|
||||
f = file(j(root, name))
|
||||
if ext in gen.File.imageExts:
|
||||
if zopeName == 'favicon.ico':
|
||||
if not hasattr(self.app, zopeName):
|
||||
# Copy it at the root. Else, IE won't notice it.
|
||||
manage_addImage(self.app, zopeName, f)
|
||||
elif ext in gen.File.imageExts:
|
||||
manage_addImage(zopeFolder, zopeName, f)
|
||||
elif ext == '.pt':
|
||||
manage_addPageTemplate(zopeFolder,zopeName,'',f.read())
|
||||
|
|
|
@ -26,6 +26,7 @@ fallbacks = {'en': 'en-us en-ca',
|
|||
class PoMessage:
|
||||
'''Represents a i18n message (po format).'''
|
||||
CONFIG = "Configuration panel for product '%s'"
|
||||
APP_NAME = "Appy"
|
||||
# The following messages (starting with MSG_) correspond to tool
|
||||
# attributes added for every gen-class (warning: the message IDs correspond
|
||||
# to MSG_<attributePrefix>).
|
||||
|
|
|
@ -115,8 +115,7 @@ img { border: 0; vertical-align: middle}
|
|||
.objectTitle { font-size: 11pt; border-bottom: 3px solid grey;
|
||||
font-weight: bold;}
|
||||
.by { padding-top: 5px;}
|
||||
.workflow { text-align: center; border-top: 1px solid grey;
|
||||
background-color: #ececec }
|
||||
.workflow { text-align: center; border-top: 1px solid grey }
|
||||
.underTitle { background-color: #e9e9e9 }
|
||||
.objectNavigate { margin-top: 3px;}
|
||||
.underline { border-bottom: 1px dotted grey;}
|
||||
|
|
BIN
gen/ui/close.png
Normal file
BIN
gen/ui/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 226 B |
BIN
gen/ui/favicon.ico
Normal file
BIN
gen/ui/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -19,7 +19,8 @@
|
|||
tal:attributes="dir python: tool.getLanguageDirection(lang)">
|
||||
|
||||
<head>
|
||||
<title tal:content="tool/getAppName"></title>
|
||||
<title tal:content="python: _('app_name')"></title>
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico"/>
|
||||
<tal:link repeat="name tool/getGlobalCssJs">
|
||||
<link tal:condition="python: name.endswith('.css') and not ((dir == 'ltr') and (name == 'appyrtl.css'))"
|
||||
rel="stylesheet" type="text/css" tal:attributes="href string:$appUrl/ui/$name"/>
|
||||
|
|
Loading…
Reference in a new issue