[CPS-translators] Problems to make new languages availables in CPS

Miguel Sánchez Beato miguel.sanchez at iavante.es
Thu Jun 14 18:21:37 CEST 2007


Miguel Sánchez Beato escribió:
> Miguel Sánchez Beato escribió:
>> Hello. I'm trying to make available 2 new languages in CPS 3.4.4, 
>> these are Galician and Portuguese. The translation have been done 
>> before and the obly thing left is to make them viweable and available 
>> to select in CPS.
>> I've followed the documentation 
>> (http://www.cps-project.org/sections/documentation/cps-dev-center/platform-products/cpsi18n/cps-translation-howto) 
>> but it seems that there is something i haven't done right.
>>
>> This is waht I have done (Once the .po are inside the products):
>>
>> *1. Modify CPSdefault/factory.py to include the new languages:*
>>
>> /...
>> class CPSSiteConfigurator(object):
>>    """Configurator for a CPS Site.
>>    """
>>
>>    prechecked_extensions = ()
>>    mandatory_extensions = ()
>>
>>    available_languages = (              {'id': 'nl', 'title': 'Dutch'},
>>        {'id': 'en', 'title': 'English', 'checked': True},
>>        {'id': 'eu', 'title': 'Euskara'},
>>        {'id': 'fr', 'title': 'French', 'checked': True},
>>        {'id': 'de', 'title': 'German'},
>>        {'id': 'gl', 'title': 'Galician'},
>>        {'id': 'it', 'title': 'Italian'},
>>        {'id': 'mg', 'title': 'Malagasy'},
>>        {'id': 'pt', 'title': 'Portuguese'},
>>        {'id': 'pt_BR', 'title': 'Portugese (Brazilian)'},
>>        {'id': 'ro', 'title': 'Romanian'},
>>        {'id': 'es', 'title': 'Spanish', 'checked': True},
>>        {'id': 'ca', 'title': 'Valencian/Catalan'},
>>        )
>>
>>    addForm = PageTemplateFile('zmi/siteAddForm', globals())/
>> /.../
>>
>> 2. Modify the xml file for languages vocabularies in 
>> CPSDefault/profiles/default/vocabularies/languages_voc.xml
>> /
>> <?xml version="1.0"?>
>> <object name="language_voc" meta_type="CPS Vocabulary">
>> <property name="title"></property>
>> <property name="title_msgid"></property>
>> <property name="description"></property>
>> <property name="acl_write_roles">Manager</property>
>> <item key="fr" msgid="label_language_fr">Français</item>
>> <item key="en" msgid="label_language_en">English</item>
>> <item key="es" msgid="label_language_es">Castellano</item>
>> <item key="de" msgid="label_language_de">Deutsch</item>
>> <item key="it" msgid="label_language_it">Italiano</item>
>> <item key="nl" msgid="label_language_nl">Nederlands</item>
>> <item key="pt_BR" msgid="label_language_pt_BR">Brasileiro</item>
>> <item key="mg" msgid="label_language_mg">Malagasy</item>
>> <item key="ro" msgid="label_language_ro">Romana</item>
>> <item key="eu" msgid="label_language_eu">Euskara</item>
>> <item key="pt" msgid="label_language_pt">Portuguese</item>
>> <item key="gl" msgid="label_language_gl">Galician</item>
>> <item key="ca" msgid="label_language_ca">Valencian/Catalan</item>
>> </object>
>> /
>> 3. Modify the script 
>> CPSDocument/skins/cps_document/getDocumentVocabularies.py
>> /
>> ...
>> 'language_voc': {
>>        'type': 'CPS Vocabulary',
>>        'data': {'tuples': (
>>            ('fr', 'Franais', 'label_language_fr'),
>>            ('en', 'English', 'label_language_en'),
>>            ('es', 'Castellano', 'label_language_es'),
>>            ('de', 'Deutsch', 'label_language_de'),
>>            ('it', 'Italiano', 'label_language_it'),
>>            ('nl', 'Nederlands', 'label_language_nl'),
>>            ('pt_BR', 'Brasileiro', 'label_language_pt_BR'),
>>            ('mg', 'Malagasy', 'label_language_mg'),
>>            ('ro', 'Romana', 'label_language_ro'),
>>            ('eu', 'Euskara', 'label_language_eu'),
>>            ('ca', 'Valencian/Catalan', 'label_language_ca'),
>>            ('gl', 'Galician', 'label_language_gl'),
>>            ('pt', 'Portuguese', 'label_language_pt'),
>>            )},
>>        },
>> .../
>>
>>
> I forgot:
>
> 4. I have added the languages in CPSDefault/i18n/custom.pot
> /...
> # Languages
> ###########
> msgid "label_language_en"
> msgstr ""
>
> msgid "label_language_fr"
> msgstr ""
>
> msgid "label_language_nl"
> msgstr ""
>
> msgid "label_language_it"
> msgstr ""
>
> msgid "label_language_de"
> msgstr ""
>
> msgid "label_language_es"
> msgstr ""
>
> msgid "label_language_pt_BR"
> msgstr ""
>
> msgid "label_language_mg"
> msgstr ""
>
> msgid "label_language_ro"
> msgstr ""
>
> msgid "label_language_eu"
> msgstr ""
>
> msgid "label_language_ca"
> msgstr ""
>
> msgid "label_language_gl"
> msgstr ""
>
> msgid "label_language_pt"
> msgstr ""/
> ...
>
>> But it still fail when I try to translate the portal to the new 
>> languages, that is, the languages appears in the combo boxes (linke 
>> in the languages portlet), but the translations are not rendered 
>> (There is no galician and portuguese tabs in the Localizer tool 
>> within the ZMI).
>>
>> Any ideas about what I haven't done yet ?
>>
>> Thank you a lot!
>>
>
>

OK! It is working, it was just a problem of labels. Thank you anyway!


-- 

*Miguel Sánchez Beato * 
*Técnico de Software Libre * 
FUNDACIÓN IAVANTE

miguel.sanchez at iavante.es
Tel. 951 015 358 *(915358)*

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene 
información confidencial exclusivamente dirigida a su(s) 
destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively 
directed to its adressee(s). Any copy or distribution will have to be 
authorized by IAVANTE.

 




This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.