layout_dir_* Variabilisation des messages d'erreur

"Cedric Marfil" <[email protected]>
Newsgroups gmane.comp.web.zope.cps.general.french
Message-ID <[email protected]>
Bonsoir,
J'ai modifié le code de CPS pour que les messages d'erreur soient traduit dans le layout des directories en m'inspirant des layout_default. Pouvez intégrer ces modifications au trunk si ce n'est pas déjà fait ?

Au début :
<tal:block define="
  layout options/layout;
  ds options/datastructure;
  creation creation|nothing;
  formaction python: test(creation, 'cpsdirectory_entry_create_form',
                                    'cpsdirectory_entry_edit_form');
  cpsmcat nocall:here/translation_service;
  ">

Dans la récupération des informations du widget :
    <tal:block define="widget cell/widget;
                       wid widget/getWidgetId;
                       err python: ds.getError(wid);
                       err_mapping python:ds.getErrorMapping(wid);
                       is_edit python: cell['widget_mode'] == 'edit';
                       is_required python: is_edit and widget.is_required;
                       global has_edits python: has_edits or is_edit;
                       tooltip_id python:wid + '_help';
                       ">

Dans la trduction du message d'erreur:
            <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
              <em style="color: red"
                  tal:content="msg">err</em>
            </tal:block>


Merci d'avance

Cordialement

--------------------------------------------------------------------------------
Cédric Marfil
Concepteur Réalisateur Intégrateur Confirmé
Tél. direct: 03.20.65.34.82
Mail: [email protected]

Capgemini
181 rue Jules Delcenserie
59700 Marcq en Baroeul


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.

_______________________________________________
cps-users-fr 
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.