Skip to content

Commit

Permalink
Add translation namesspace and i18n:translate to the dexterity schema
Browse files Browse the repository at this point in the history
definitions for the content types that have extra field defined on top of the
behavior composition. Otherwise no translations can be picked up.
  • Loading branch information
fredvd committed Aug 21, 2017
1 parent 6ad1b0a commit a428777
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ New features:

Bug fixes:

- Add translation namesspace and i18n:translate to the dexterity schema
definitions for the content types that have extra field defined on top of the
behavior composition. Otherwise no translations can be picked up.
[fredvd]

- Use original raw text and mimetype when indexing rich text.
This avoids a double transform (raw source to output mimetype to plain text).
Includes a reindex of the SearchableText index for Collections, Documents and News Items.
Expand Down
4 changes: 2 additions & 2 deletions plone/app/contenttypes/schema/file.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<field name="title" type="zope.schema.TextLine">
<description />
<required>False</required>
<title>Title</title>
<title i18n:translate="">Title</title>
</field>
<field name="description" type="zope.schema.Text">
<description />
<required>False</required>
<title>Description</title>
<title i18n:translate="">Description</title>
</field>
<field name="file" type="plone.namedfile.field.NamedBlobFile"
marshal:primary="true">
Expand Down
4 changes: 2 additions & 2 deletions plone/app/contenttypes/schema/image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<field name="title" type="zope.schema.TextLine">
<description />
<required>False</required>
<title>Title</title>
<title i18n:translate="">Title</title>
</field>
<field name="description" type="zope.schema.Text">
<description />
<required>False</required>
<title>Description</title>
<title i18n:translate="">Description</title>
</field>
<field name="image" type="plone.namedfile.field.NamedBlobImage"
marshal:primary="true">
Expand Down
9 changes: 6 additions & 3 deletions plone/app/contenttypes/schema/link.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<model xmlns="http://namespaces.plone.org/supermodel/schema"
xmlns:form="http://namespaces.plone.org/supermodel/form">
xmlns:form="http://namespaces.plone.org/supermodel/form"
xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="plone">
<schema>
<field name="remoteUrl" type="zope.schema.TextLine" form:widget="plone.app.z3cform.widget.LinkFieldWidget">
<default>http://</default>
<description>The link is used almost verbatim, relative links become absolute and the strings "${navigation_root_url}" and "${portal_url}" get replaced with the real navigation_root_url or portal_url. If in doubt which one to use, please use navigation_root_url.
<description i18n:translate="description_linktype_url">The link is used almost verbatim, relative links become absolute and the strings "${navigation_root_url}" and "${portal_url}" get replaced with the real navigation_root_url or portal_url. If in doubt which one to use, please use navigation_root_url.
</description>
<title>URL</title>
<title i18n:translate="">URL</title>
</field>
</schema>
</model>

0 comments on commit a428777

Please sign in to comment.