Op 14-08-11 13:00, Armin Stroß-Radschinski schreef:
Examples
================
This is one of my Archetype fields schema in one of my content types files:
~/instances/MySite/src/mytranslated.package/mytranslated/package/content/tour.py
The schema file:
-------------------------------------------------
....
atapi.StringField('productCode',
required=False,
searchable=True,
languageIndependent=False,
storage=atapi.AnnotationStorage(),
widget=atapi.StringWidget(label_msgid='MyTranslationDomain_label_productCode',
label=_(u"Product Code"),
i18n_domain='MyTranslationDomain',
description_msgid='MyTranslationDomain_help_productCode',
description=_(u"A short unique code to identify our products"),
),
),
Here you are combining two ways of doing i18n: the archetypes specific
way with label_msgid and i18n_domain and the general way of using the
underscore (MessageFactory). I recommend using only the new way. So
that would be like this:
widget=atapi.StringWidget(label_msgid='',
label=_(u'MyTranslationDomain_label_productCode',
default=u"Product Code"),
description=_(u'MyTranslationDomain_help_productCode',
default=u"A short unique code to identify our products"),
),
--
Maurits van Rees
Web App Programmer at Zest Software: http://zestsoftware.nl
Personal website: http://maurits.vanrees.org/
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers