[Product-Developers] Re: languageIndependent fields not updated

Philip Bauer philip at starzel.de
Thu Mar 5 17:38:09 UTC 2009


Am 05.03.2009 um 18:11 schrieb Wolfgang Thomas:

> Philip Bauer wrote:
>> Hi all,
>> i have a problem with languageIndependent fields.
>> My ContentType "staffmember" has a
>> the value of languageIdependent fields is not changed after the  
>> canonical field is changed.
>> I have a ContentType called StaffMember and for example an  
>> StringField 'email'
>>    atapi.StringField(
>>        name='email',
>>        required=False,
>>        searchable=False,
>>        languageIndependent=True,
>>        validators = ('isEmail',),
>>        storage=atapi.AnnotationStorage(),
>>        widget=atapi.StringWidget(
>>            label=_(u"Email"),
>>            label_msgid='staffmember_label_email',
>>            description=_(u""),
>>            description_msgid='staffmember_help_email',
>>        ),
>>    ),
>> Since email doesn't change when translating (compared to jobTitle  
>> or such) it's marked as langageIndependent.
>> When I translate that person, the 'email'-value of the canonical  
>> version is kept - so far so good.
>> But when I change the value in the canoical version after  
>> translating (imagine this persons email changed because he changed  
>> his department) the original value is kept in the translated  
>> version - with no chance for me to override or sync it again.
>> As far as i see this only happens to text- and stringfields, files  
>> and images are not affected.
>> Am i missing something or is it a bug?
>> I use:
>> Plone 3.2.1
>> Zope (Zope 2.10.6-final, python 2.4.4, darwin)
>> Python 2.4.4
>> LinguaPlone 2.4
>> Archetypes 1.5.10-dev
>> ATVocabularyManager 1.5-alpha
>> Regards,
>> Philip
>> *************
>> Philip Bauer
>> Adlzreiterstr. 37
>> 80337 München
>> Tel: 089 - 57 08 56 85
>> Mobil: 0176 - 23 55 05 05
>> philip at starzel.de
>> www.starzel.de
>
> Hi Philip,
>
> we had a very similar problem. Could it be that the value _does_ get  
> written to the translation when you edit the canonical, but that you  
> just don't see it, because the translation didn't get reindexed?

Hello Wolfgang,

could that have been fixed in http://dev.plone.org/plone/changeset/ 
22566 ?
>
>
> In other words, if you edit the canonical and change the email, then  
> edit the translation (to trigger the reindexing), do you then see  
> the updated value?
>
Good idea, but sadly not. LinguaPlone shows different values when I  
use Boolean-, Line- and StringFields.

> For this usecase we introduced a checkbox-Field  
> "reindexTranslations" to several of the content types we use. The  
> person editing a canonical object can tick this box to indicate that  
> reindexing should be done. An event-handler for  
> zope.lifecycleevent.interfaces.IObjectModifiedEvent then checks if  
> the property is set, and if so, it reindexes all translations and  
> unsets the property again.
>
> Of course you could just reindex all translations of an object  
> automatically every time you save, but that will introduce some  
> extra waiting time for the editor...
>
That would still be better than more UI or differing values. But  
reindexing the catalogue has no effect.

> Or is your problem different, i.e. the value does not get propagated  
> to translations at all?
I guess that's the problem.

Philip
>
>
>
> Cheers,
> Wolfgang
>
>
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers





More information about the Product-Developers mailing list