Am 18.03.2008 um 12:04 schrieb Hanno Schlichting:
> Hi.
>
> Martin Stadler wrote:
>> So far I met two problems while trying to
internationalize my egg-
>> based products for Plone 3:
>>
>> Workflow
>> --------
>>
>> I can't give a workflow an i18n_domain. Is there
any way to translate
>> my custom workflow states and transitions within an
egg-based
>> product?
>> I read
>> http://maurits.vanrees.org/weblog/ar
chive/2007/09/i18n-locales-and-plone-3.0
>> and
>> http://ww
w.mattdorn.com/content/plone-i18n-a-brief-tutorial#translati
ng-workflow-states-and-transitions
>>
>> Creating an old-style product just to add these few
terms to the
>> plone
>> i18n domain seems to be the only solution.
>
> Yes, this is correct. The Zope3 translation machinery
which handles
> locales folders is not able to work with po files for
the same domain
> spread over multiple packages. So the plone domain is
either claimed
> by
> PloneTranslations (which it probably should) or by your
package. I
> think
> this situation won't change before Plone 4.0 at this
point.
Is there a reason why it is impossible to use my own i18n
domain in my
workflow as I can in ATConentTypes? I don't see why the
state and
transition terms of my product go into the plone domain. If
it were
possible there wouldn't be the need to combine different
domains in
one egg.
>> Form Controller Tool
>> --------------------
>>
>> In one of my products I'm using the Form Controller
Tool because
>> zope.formlib (resp. plone.app.forms) seems to be
unable to handle
>> validation in an appropriate way when it comes to
interdependent
>> fields.
>> I'm creating a custom join_form. In the original it
is
>>
>> from Products.CMFPlone import
PloneMessageFactory as _
>>
>> In my egg-based product I tried to replace it with
>>
>> from mynamespace.myproduct import
MyMessageFactory as _
>>
>> but this gives me an "Insufficient
Privileges". Why? Is there a way
>> to
>> do the translation within my own product and
domain?
>
> If you want to allow the MessageFactory to be used in
trusted code,
> you
> have to allow access to it.
>
> Some code along the lines of:
>
> from AccessControl import ModuleSecurityInfo
>
> ModuleSecurityInfo
>
('mynamespace.myproduct').declarePublic('MyMessageFactory')
>
> should work if you declare the MyMessageFactory in your
packages
> __init__.py.
Yes I do and this works. Thanks very much!
> HTH,
> Hanno
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
_______________________________________________
Plone-i18n mailing list
Plone-i18n lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n
a>
|