Le 13 déc. 2010 à 10:49, Martijn Jacobs a écrit :

> Hi Gilles,
> 
> If you take a look at the tests of ATVocabularyManager you can see some 
> examples there how to create vocabularies in code.
> 
> So you can register an importStep 
> (http://plone.org/documentation/manual/plone-community-developer-documentation/components/genericsetup#custom-setup-code-setuphandlers-py)
>  and use createSimpleVocabs (from Products.ATVocabularyManager.utils.vocabs) 
> to create any vocabularies when running your install profile.
> 
> See also _createTestVocabulary of 
> https://svn.plone.org/svn/archetypes/Products.ATVocabularyManager/trunk/Products/ATVocabularyManager/tests/testSimpleVocabulary.py

Many thanks Martijn,

That's a good starter, but I didn't explain the complete problem. A customer 
made some vocaburies (SimpleVocabulary based) in a tests server. In addition, 
these vocabularies are ranslated with LinguaPlone. And I have to export these 
vocabularies from this tests server to a production server and possibly in a 
development server.

I'd prefer use VDEX vocabularies, but unfortunately my customer prefers to have 
a TTW control of terms and translations (XML is somehow chinese or hebrew to 
him).

Exporting a portal_vocabularies.zexp does not work because at import time, some 
terms are looking for their canonical translation (don't ask me why, I don't 
know). And this raises an exception.

So I'll (try to) build an export/import utility that keeps LP translations if 
any if I find enough time for this, possibly usable from GenericSetup.

Many thanks
-- 
Gilles Lenfant

> 
> 
> Martijn
> 
>> Hi,
>> 
>> I'm developing a site with ATVM with SortedSimpleVocabulary items. Making 
>> the content types work with ATVM is easy but I'm looking for a way to export 
>> the vocabulary from the development site to the production site to have 
>> pre-populated vocabularies. Either programmaticaly or through some UI but I 
>> didn't find anything suited.
>> 
>> GeneriSetup does not show and export step for ATVM. Did I miss something 
>> since I noticed that the doc speaks of export and import from XML files ?
>> 
>> Thanks by advance for any hint.
> 
> 
> -- 
> Martijn Jacobs
> http://www.fourdigits.nl/mensen/martijn-jacobs
> 
> Four Digits BV
> http://www.fourdigits.nl
> Willemsplein 44, 6811 KD, Arnhem
> tel: +31(0)26 4422700 fax: +31(0)84 2206117
> KVK 091621370000 BTW 8161.22.234.B01
> 

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to