linguaplone help

7 messages Options
Embed this post
Permalink
Sisi Nutt

linguaplone help

Reply Threaded More More options
Print post
Permalink

Hi all,

We are close to migrating our public site from a flat html site to
plone, we have a deadline of the 4th of April and we've hit a brick wall
with our conversion scripts for linguaplone (mapping the english content
to the existing spanish and french content and vice versa so that the
content plays nice with linguaplone).

Is there anyone out there who can help with the correct usage of and
interactions between the following routines:

    addTranslationReference()
    removeTranslationReference()
    getTranslations()

The code fragments on http://dev.plone.org/plone/changeset/10329 don't
seem to work correctly. The addTranslationReference() function seems to
operate in the other direction.

Specific questions would be:

1. Does addTranslationReference() add a symetric link, or do we need to
add links in both directions?
(Sometimes we've tried a single link and it seems to work both ways,
other times not)

2. Do we need to use removeTranslationReference() before we can have
another 'hack' at the catalog, or can we just keep resetting the
translations (We're asking this as re-running the same script
progressively produces more errors.)

3. Do we have to use getTranslations() to refresh some sort of cache
before applying new settings ( as seems apparent at
http://dev.plone.org/plone/changeset/10329 ), or is it just for reading
translation settings?

4. How do we get error information back from these routines?

5. Is there any documentaion beyond what is in the linguaplone product
package?

I know this should probably go to the plone users list and I'll send it
there if that is more appropriate but I just wanted to ask here first
because I know more people on this list, which makes me braver :-)

Many thanks to anyone who replies :)

sisi

--
# sisi nutt # extranet coordinator
# Friends of the Earth International
# PO Box 19199 # 1000 GD Amsterdam # The Netherlands
# Tel 31 20 6221369  # Fax 31 20 6392181  # http://www.foei.org
# email [hidden email] # skype foei_sisi

_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Dorneles Treméa (PSOL)

Re: linguaplone help

Reply Threaded More More options
Print post
Permalink
Hey,

> We are close to migrating our public site from a flat html site to
> plone, we have a deadline of the 4th of April and we've hit a brick wall
> with our conversion scripts for linguaplone (mapping the english content
> to the existing spanish and french content and vice versa so that the
> content plays nice with linguaplone).
>
> Is there anyone out there who can help with the correct usage of and
> interactions between the following routines:
>
>     addTranslationReference()
>     removeTranslationReference()
>     getTranslations()

if you want to add a translation for an existing object, the correct
way to do it is: (considering that canonical.Language() != '',
otherwise set it first!):

  language = 'pt-br'
  canonical.addTranslation(language)
  translation = canonical.getTranslation(language)

If you only want to link two existing objects, all you need to do is
(we also consider that translation.Language() != '', otherwise you
first need to set it too!):

  translation.addTranslationReference(canonical)

That's it.

> The code fragments on http://dev.plone.org/plone/changeset/10329 don't
> seem to work correctly. The addTranslationReference() function seems to
> operate in the other direction.

I haven't reviewed that piece of code yet, so I won't comment on
it now.

But you can base your script in the API tests:

http://dev.plone.org/plone/browser/LinguaPlone/trunk/tests/testAPI.py

> Specific questions would be:
>
> 1. Does addTranslationReference() add a symetric link, or do we need to
> add links in both directions?
> (Sometimes we've tried a single link and it seems to work both ways,
> other times not)

All translations must have a 'translationOf' reference pointing to the
cononical object. The canonical object doesn't has any 'translationOf'
reference to any other object.

So, answering this question: you only need to add references to the
translations objects.

Supposing you have two objects, english and portuguese, each one with
a different language. At this point, both objects are canonicals, as
they don't have any references. Now we'll add a translation reference
to portuguese, pointing to english:

  portuguese.addTranslationReference(english)

At this point, only english is canonical, as portuguese now has a
reference pointing to english.

BTW, when you add a reference 'foo' to T, pointing to C, you can:

a) get C from T:

  >>> C in T.getRefs('foo')
  True

b) get T from C:

  >>> T in C.getBRefs('foo')
  True

Note that getBRefs means 'get the backward reference'.

I hope this makes the things a bit more clear now... :-)

> 2. Do we need to use removeTranslationReference() before we can have
> another 'hack' at the catalog, or can we just keep resetting the
> translations (We're asking this as re-running the same script
> progressively produces more errors.)

You can't add a new translation for a language that is already
translated. So it only makes sense to call removeTranslationReference
when you want to unlink two existing objects.

So the first thing before calling addTranslationReference is to check
if the language isn't translated yet:

  if content.Language() not in canonical.getTranslationLanguages():
      content.addTranslationReference(canonical)

I'll probably add this 'guard' to the LinguaPlone code in the next
versions.

> 3. Do we have to use getTranslations() to refresh some sort of cache
> before applying new settings ( as seems apparent at
> http://dev.plone.org/plone/changeset/10329 ), or is it just for reading
> translation settings?

It should not be necessary.

> 4. How do we get error information back from these routines?

When calling addTranslation with an already translated language,
you'll get a AlreadyTranslated exception. I'm not sure what happens
when you directly call addTranslationReference in this case...

> 5. Is there any documentaion beyond what is in the linguaplone product
> package?

Unfortunately, no. On the other hand, the LinguaPlone tests covers
the complete API, which is a good start for developers.

You're welcome to write additional documentation as you go... :-)

> I know this should probably go to the plone users list and I'll send it
> there if that is more appropriate but I just wanted to ask here first
> because I know more people on this list, which makes me braver :-)

I didn't knew about this list until Limi point me to your message...
:-)

> Many thanks to anyone who replies :)

HTH,

--
 ___________________________________________________________________

       Dorneles Treméa · Developer · Plone Solutions · Brazil

   Consulting · Training · Development · http://plonesolutions.com
 ___________________________________________________________________

  Plone Foundation · http://plone.org/foundation · Protecting Plone


_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Sisi Nutt

Re: linguaplone help

Reply Threaded More More options
Print post
Permalink

Dorneles Treméa wrote:
> Hey,

Hi!

Thanks so much for answering. It was really helpful to have things
outlined, and that enabled our programmer Pete to pin point where he was
going wrong (he had not explicitly set the default language to english).

>
>> The code fragments on http://dev.plone.org/plone/changeset/10329 don't
>> seem to work correctly. The addTranslationReference() function seems to
>> operate in the other direction.
>
> I haven't reviewed that piece of code yet, so I won't comment on
> it now.
>
> But you can base your script in the API tests:
>
> http://dev.plone.org/plone/browser/LinguaPlone/trunk/tests/testAPI.py
>

But unfortunatly AddTranslationReference is not in those tests? Would
that be in any of the other tests? Well I'm not a programmer and our
scripts are working now, so I guess that is academic.

>> 5. Is there any documentaion beyond what is in the linguaplone product
>> package?
>
> Unfortunately, no. On the other hand, the LinguaPlone tests covers
> the complete API, which is a good start for developers.
>
> You're welcome to write additional documentation as you go... :-)

Pete has alot of notes about how he's gone about this, so he's going to
document that and we'll whip it into shape for some documentation on
plone (or just in the linguaplone product docs, whichever makes most
sense). I'll send you what we have soon so you can check it over for
best practice etc if that's ok.

>> I know this should probably go to the plone users list and I'll send it
>> there if that is more appropriate but I just wanted to ask here first
>> because I know more people on this list, which makes me braver :-)
>
> I didn't knew about this list until Limi point me to your message...
> :-)

I owe Limi a drink then! And yourself of course, thanks alot for taking
the time to reply. Maybe I should brave the plone users list more often.

>> Many thanks to anyone who replies :)
>
> HTH,

Enormously!

Cheers,
sisi


--
# sisi nutt # extranet coordinator
# Friends of the Earth International
# PO Box 19199 # 1000 GD Amsterdam # The Netherlands
# Tel 31 20 6221369  # Fax 31 20 6392181  # http://www.foei.org
# email [hidden email] # skype foei_sisi

_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Edith van Overveld - SOMO

Multiplone

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Dear people,

I would like to introduce myself. My name is Edith van Overveld, I work for SOMO. We have several websites (five) with a different CMS and at the moment I am starting a project to convert all this sites to Plone. I am asking some proposals to companies who work with Plone in the Netherlands.

Also Paul Roeland is giving me advise.

 

Because we have several websites with a lot of shared information, like news and agenda, I am interested in using Multiplone for this project.

Now I am very interested in your experience with this.

 

My main questions are:

1. One company said it is a bit tricky to use Multiplone, because it is solely designed for Oxfam, so to use it for another project would ask quit some adoptions. What is your opinion/experience on this?

2. The conclusion of one of the companies is that it would be so much easier and less work to make five separated websites then to make this five sites connected by Multiplone, therefore using Multiplone for this project would cost a lot more money. What is your opinion on this?

 

Furthermore I would like to hear more about your experiences and maybe some tips & tricks on this project.

Sisi, maybe we can meet?

 

kind regards,

Edith

 

 

___________________________________________________

 

 

 

Stichting Onderzoek Multinationale Ondernemingen

Centre for Research on Multinational Corporations

 

Edith van Overveld

Communication Officer

Keizersgracht 132

1015 CW Amsterdam

The Netherlands

Tel           +31 (0)20 6391291

Fax          +31 (0)20 6391321

skypename: edith.van.overveld

[hidden email] 

 

subscribe to the SOMO quarterly newsletter to keep informed of SOMO news and activities.



_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Peter Hollands

Re: Multiplone

Reply Threaded More More options
Print post
Permalink
Edith,

Stay on Mainstream standard Plone unless you have overwhelming reasons to
want to "put all your eggs in one basket".

You have options to enable closer integration of the sites by:

o Arranging to have one central point of authentication (LDAP)
      [Oxfam have done very interesting work on this ]
o Arranging to have cross site search (possibly using Google Search boxes)
       [Oxfam know most of the issues with that as they have used Google]
o Use RDF / RSS feeds to provide integration of new news articles both
      within SOMA and ALL of your Partners. [standard facilities in Plone ]
o Using a common brand / style and cascading style sheets.

You can de-couple many of the issues of the different sites. And try to
get one site going quickly - and build a success momentum  as you go. It's an
easier people change management process within your organisation and
partners. (Decision making will be faster ).

It will also be much easier when you come to upgrade through future Plone
releases.

Regards, Peter

On Thursday 29 March 2007 11:10, Edith van Overveld - SOMO wrote:
> 2. The conclusion of one of the companies is that it would be so much
> easier and less work to make five separated websites then to make this five
> sites connected by Multiplone, therefore using Multiplone for this project
> would cost a lot more money. What is your opinion on this?
>

_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Sam Stainsby-2

Re: Multiplone

Reply Threaded More More options
Print post
Permalink
Peter Hollands wrote:
> Edith,
>
> Stay on Mainstream standard Plone unless you have overwhelming reasons to
> want to "put all your eggs in one basket".
>
> You have options to enable closer integration of the sites by:
>
> o Arranging to have one central point of authentication (LDAP)
>       [Oxfam have done very interesting work on this ]

Note also that our open source Plone product for identity management is
about to be released as an alpha:
http://sustainablesoftware.com.au/projects/ssidm/
  ... "your identity data can be periodically exported to an LDAP server
to provide enterprise-quality directory and authentication/authorisation
services throughout your organisation"

--
Sam Stainsby  -  Managing Director
Sustainable Software Pty Ltd
"open knowledge :: social conscience"
ABN:     32 117 186 286
WWW:     http://sustainablesoftware.com.au/
E-mail:  [hidden email]
Jabber:  [hidden email]
Tel/Fax: +61 7 3289 5491    Mobile: +61 405 380 844

_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Jon Stahl

Re: Multiplone

Reply Threaded More More options
Print post
Permalink
In reply to this post by Peter Hollands

Peter Hollands wrote:
Edith,

Stay on Mainstream standard Plone unless you have overwhelming reasons to
want to "put all your eggs in one basket".

You have options to enable closer integration of the sites by:

o Arranging to have one central point of authentication (LDAP)
      [Oxfam have done very interesting work on this ]
o Arranging to have cross site search (possibly using Google Search boxes)
       [Oxfam know most of the issues with that as they have used Google]
o Use RDF / RSS feeds to provide integration of new news articles both
      within SOMA and ALL of your Partners. [standard facilities in Plone ]
o Using a common brand / style and cascading style sheets.
I think Peter's advice is very sound.  I don't know much about your exact situation, but you should explore the simpler options to achieve sufficient "integration" between your sites first.  You may also wish to consider revisiting your information architecture -- maybe you don't really need 5 sites.  Any streamlining you can do up front may wind up saving you a lot of work.

best,
jon
-----------
Jon Stahl
www.onenw.org
ONE/Northwest
-----
Jon Stahl, Director of Web Solutions
ONE/Northwest - Online Networking for the Environment
http://www.onenw.org