Ticket #1698: cpsi18n_howto-translate_cps.patch

File cpsi18n_howto-translate_cps.patch, 1.8 kB (added by tracguest, 2 years ago)

Improvements for CPS >= 3.4

  • doc/howto-translate_cps.txt

    old new  
    8282``label_language_en_US``. 
    8383 
    8484Then add your language to the language vocabulary defined in 
    85 ``CPSDocument/skins/cps_document/getDocumentVocabularies.py``. 
     85``CPSDocument/skins/cps_document/getDocumentVocabularies.py`` if 
     86you use CPS < 3.4.  For CPS >= 3.4, do the same in 
     87''CPSDefault/profiles/default/vocabularies/language_voc.xml''. 
    8688There are three keys to add: the first one is the i18n label, the 
    8789same that you used to name your po file; the second one is how you 
    8890name your language in your own language -- note how some strings 
     
    9193gets translated. 
    9294 
    9395If you use CPS < 3.4, you will also need to modify the file 
    94 ``CPSDefault/zmi/manage_addCPSSiteForm.dtml``. There's a Languages 
     96``CPSDefault/zmi/manage_addCPSSiteForm.dtml``. If you use CPS >= 3.4, 
     97then do the same in ``CPSDefault/factory.py``.  There's a Languages 
    9598box which contains a list of two element tuples. Add a new tuple 
    9699for your language. The first element will be the i18n label and 
    97100the second your language name in English. 
     
    108111 
    109112Updating the translations from the translation files can be done through the 
    110113`portal_setup` tool (located at the root of your CPS instance in the `ZMI`) by 
    111 importing the needed steps from the `Import` tab. 
     114importing the needed steps from the `Import` tab, but before that you need to add 
     115your language code to the `available_languages` property of your CPS site  
     116(`Property` tab of your CPS instance in the `ZMI`). 
    112117 
    113118If the translations you are doing only affect the CPSDefault, CPSSchemas, 
    114119CPSDocument, CPSDirectory, CPSNavigation, CPSPortlets, and CPSSkins products,