[gen] Bugfixin the sync of i18n files; allow to include XHTML within messages in Appy popups.
This commit is contained in:
parent
834817c27b
commit
d5a9450d72
|
@ -449,8 +449,9 @@ class ZopeGenerator(Generator):
|
|||
baseLabels = po.PoParser(appyPoFileName).parse().messages
|
||||
else:
|
||||
baseLabels = appyLabels
|
||||
poFile.update(baseLabels + self.labels.get(),
|
||||
self.options.i18nClean, keepExistingOrder=False)
|
||||
poFile.update(baseLabels + self.labels.get() + \
|
||||
potFile.getCustomMessages(), self.options.i18nClean,
|
||||
keepExistingOrder=False)
|
||||
poFile.generate()
|
||||
# Generate corresponding fields on the Translation class
|
||||
page = '1'
|
||||
|
|
|
@ -276,6 +276,11 @@ class PoFile:
|
|||
res = '%s-%s-%s.po' % (self.applicationName, self.domain, language)
|
||||
return res
|
||||
|
||||
def getCustomMessages(self):
|
||||
'''Returns, the list of messages from self.messages whose ID starts with
|
||||
"custom_".'''
|
||||
return [m for m in self.messages if m.id.startswith('custom_')]
|
||||
|
||||
class PoParser:
|
||||
'''Allows to parse a i18n file. The result is produced in self.res as a
|
||||
PoFile instance.'''
|
||||
|
|
|
@ -570,7 +570,7 @@ class AbstractWrapper(object):
|
|||
layoutTarget=obj">:tool.pxLayoutedObject</x>
|
||||
</form>
|
||||
<script type="text/javascript"
|
||||
if="confirmMsg">:'askConfirm(%s,%s,%s)' % \
|
||||
if="confirmMsg">::'askConfirm(%s,%s,%s)' % \
|
||||
(q('script'), q('postConfirmedEditForm()'), q(confirmMsg))</script>
|
||||
<x>:tool.pxPageBottom</x>
|
||||
</x>''', template=pxTemplate, hook='content')
|
||||
|
|
Loading…
Reference in a new issue