backport stable branch
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 22 Sep 2009 12:11:12 +0200
changeset 3369 7b88d12b4ee2
parent 3300 c7c4775a5619 (current diff)
parent 3368 f077f4dfef9f (diff)
child 3373 3cd644bfab12
child 3388 b8be8fc77c27
backport stable branch
__pkginfo__.py
common/i18n.py
common/uilib.py
cwvreg.py
devtools/devctl.py
devtools/htmlparser.py
entities/__init__.py
entities/test/unittest_base.py
entity.py
misc/migration/bootstrapmigration_repository.py
schema.py
selectors.py
server/serverctl.py
server/test/unittest_migractions.py
test/unittest_entity.py
utils.py
view.py
web/facet.py
web/test/unittest_formfields.py
web/test/unittest_magicsearch.py
web/test/unittest_views_editforms.py
web/uicfg.py
web/views/basecontrollers.py
web/views/editcontroller.py
web/views/editforms.py
web/views/formrenderers.py
web/views/forms.py
web/views/magicsearch.py
web/views/treeview.py
web/views/workflow.py
--- a/.hgtags	Thu Sep 17 15:52:46 2009 +0200
+++ b/.hgtags	Tue Sep 22 12:11:12 2009 +0200
@@ -70,3 +70,9 @@
 24ea70f19a48cce60248ab18695925755009bcb8 cubicweb-debian-version-3.4.9-1
 f3d2adf483320d7726136433a41c57b130cbdc15 cubicweb-version-3.4.11
 635a25031f4abdd89c44d17f5d2b0d0d43914511 cubicweb-debian-version-3.4.11-1
+70c0dd1c3b7d747c3a268396a7f79d9a7a3340e6 cubicweb-version-3.5.0
+7e5d0ae8d2026c77f12ab512a4cde9911dcd8896 cubicweb-debian-version-3.5.0-1
+77ed72f3c2602bf300929f8863447653ce1beb0c cubicweb-version-3.5.1
+f476cecd46904f215bd29249ded8508d8f5634d7 cubicweb-debian-version-3.5.1-1
+1f0aa3cd5af2c92df8f9695773b8e465eb6f1795 cubicweb-version-3.5.2
+75cc4aa76fb12c06d4190956aa050cdf19ba4d8f cubicweb-debian-version-3.5.2-1
--- a/__pkginfo__.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/__pkginfo__.py	Tue Sep 22 12:11:12 2009 +0200
@@ -7,7 +7,7 @@
 distname = "cubicweb"
 modname = "cubicweb"
 
-numversion = (3, 5, 0)
+numversion = (3, 5, 2)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL v2'
--- a/common/uilib.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/common/uilib.py	Tue Sep 22 12:11:12 2009 +0200
@@ -115,7 +115,7 @@
 try:
     from lxml import etree
 except (ImportError, AttributeError):
-    # gae environment: lxml not availabel
+    # gae environment: lxml not available
     pass
 else:
 
--- a/debian/changelog	Thu Sep 17 15:52:46 2009 +0200
+++ b/debian/changelog	Tue Sep 22 12:11:12 2009 +0200
@@ -1,3 +1,15 @@
+cubicweb (3.5.2-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- Adrien Di Mascio <Adrien.DiMascio@logilab.fr>  Tue, 22 Sep 2009 09:31:42 +0200
+
+cubicweb (3.5.1-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- Sylvain Thénault <sylvain.thenault@logilab.fr>  Fri, 18 Sep 2009 10:35:00 +0200
+
 cubicweb (3.5.0-1) unstable; urgency=low
 
   * new upstream release
--- a/devtools/dataimport.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/devtools/dataimport.py	Tue Sep 22 12:11:12 2009 +0200
@@ -11,6 +11,7 @@
 
 .. sourcecode:: python
 
+  from cubicweb.devtools.dataimport import *
   # define data generators
   GENERATORS = []
 
--- a/devtools/devctl.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/devtools/devctl.py	Tue Sep 22 12:11:12 2009 +0200
@@ -160,7 +160,9 @@
                     add_msg(w, 'add a %s' % tschema,
                             'inlined:%s.%s.%s' % (etype, rschema, role))
                     add_msg(w, 'remove this %s' % tschema,
-                            'inlined:%s:%s:%s' % (etype, rschema, role))
+                            'inlined:%s.%s.%s' % (etype, rschema, role))
+                    add_msg(w, 'This %s' % tschema,
+                            'inlined:%s.%s.%s' % (etype, rschema, role))
                 if appearsin_addmenu.etype_get(eschema, rschema, role, tschema) and \
                        (libconfig is None or not
                         libappearsin_addmenu.etype_get(eschema, rschema, role, tschema)):
--- a/devtools/htmlparser.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/devtools/htmlparser.py	Tue Sep 22 12:11:12 2009 +0200
@@ -7,6 +7,7 @@
 """
 
 import re
+import sys
 
 from lxml import etree
 
--- a/doc/book/en/development/datamodel/define-workflows.rst	Thu Sep 17 15:52:46 2009 +0200
+++ b/doc/book/en/development/datamodel/define-workflows.rst	Tue Sep 22 12:11:12 2009 +0200
@@ -1,7 +1,5 @@
 .. -*- coding: utf-8 -*-
 
-.. _Workflow:
-
 Define a Workflow
 =================
 
@@ -32,29 +30,23 @@
 There are two ways to create a workflow: from the user interface,
 or by defining it in ``migration/postcreate.py``.
 This script is executed each time a new ``cubicweb-ctl db-init`` is done.
-We strongly recommand to create the workflow in ``migration/postcreate.py``
+We strongly recommend to create the workflow in ``migration/postcreate.py``
 and we will now show you how. Read `Under the hood`_ to understand why.
 
-Update the schema
-~~~~~~~~~~~~~~~~~
-If we want a State for our BlogEntry, we have to define a relation
-``in_state`` in the schema of BlogEntry. So we add
-the line ``in_state (...)``::
+The state of a entity is managed by the `in_state` attribute which can be added to you entity schema by two ways:
+
+* direct inheritance by subclassing your class from `cubicweb.schema.WorkflowableEntityType`
+* by delegation using `cubicweb.schema.make_worflowable` (usable as a decorator)
+
+About our example of BlogEntry, we must have:
 
-  class BlogEntry(EntityType):
-      title = String(maxsize=100, required=True)
-      publish_date = Date(default='TODAY')
-      text_format = String(meta=True, internationalizable=True, maxsize=50,
-                           default='text/rest', constraints=[format_constraint])
-      text = String(fulltextindexed=True)
-      category = String(vocabulary=('important','business'))
-      entry_of = SubjectRelation('Blog', cardinality='?*')
-      in_state = SubjectRelation('State', cardinality='1*')
+.. sourcecode:: python
+
+  from cubicweb.schema import WorkflowableEntityType
 
-As you updated the schema, you have to re-execute ``cubicweb-ctl db-init``
-to initialize the database and migrate your existing entities.
+  class BlogEntry(EntityType, WorkflowableEntityType):
+      ...
 
-[WRITE ABOUT MIGRATION]
 
 Create states, transitions and group permissions
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -65,7 +57,9 @@
 We will only discuss the methods we use to create a workflow in this example.
 
 To define our workflow for BlogDemo, please add the following lines
-to ``migration/postcreate.py``::
+to ``migration/postcreate.py``:
+
+.. sourcecode:: python
 
   _ = unicode
 
@@ -73,32 +67,34 @@
 
 This adds the `moderators` user group.
 
-::
+.. sourcecode:: python
+
+  wf = add_workflow(u'your workflow description', 'BlogEntry')
 
-  submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
-  published = add_state(_('published'), 'BlogEntry')
+At first, instanciate a new workflow object with a gentle description and the concerned entity types (this one can be a tuple for multiple value).
+
+.. sourcecode:: python
 
-``add_state`` expects as first argument the name of the state you want
-to create, then the entity type on which the state can be applied,
-and an optional argument to say if it is supposed to be the initial state
-of the entity type.
+  submitted = wf.add_state(_('submitted'), initial=True)
+  published = wf.add_state(_('published'))
 
-::
+``add_state`` expects as first argument the name of the state you want to create and an optional argument to say if it is supposed to be the initial state of the entity type.
 
-  add_transition(_('approve_blogentry'), 'BlogEntry', (submitted,), published, ('moderators', 'managers'),)
+.. sourcecode:: python
+
+  wf.add_transition(_('approve_blogentry'), (submitted,), published, ('moderators', 'managers'),)
 
 
 ``add_transition`` expects
 
-  * as the first argument the name of the
-    transition, then the entity type on which the transition can be applied,
-  * then the list of states on which the transition can be trigged,
+  * as the first argument the name of the transition
+  * then the list of states on which the transition can be triggered,
   * the target state of the transition,
   * and the permissions
     (e.g. a list of user groups who can apply the transition; the user
     has to belong to at least one of the listed group to perform the action).
 
-::
+.. sourcecode:: python
 
   checkpoint()
 
@@ -106,22 +102,20 @@
   Do not forget to add the `_()` in front of all states and transitions names while creating
   a workflow so that they will be identified by the i18n catalog scripts.
 
-In addition to the user group condition, we could have added a RQL condition.
-In this case, the user can only perform the action if
-the two conditions are satisfied.
+In addition to the user group conditions which the user needs to belong to one of those, we could have added a RQL condition.
+In this case, the user can only perform the action if the two conditions are satisfied.
 
-If we use a RQL condition on a transition, we can use the following
-variables:
+If we use a RQL condition on a transition, we can use the following variables:
 
 * `%(eid)s`, object's eid
 * `%(ueid)s`, user executing the query eid
 * `%(seid)s`, the object's current state eid
 
 
-.. image:: ../../images/lax-book.03-transitions-view.en.png
+.. image:: ../../images/03-transitions-view.en.png
 
 You can notice that in the action box of a BlogEntry, the state
-is now listed as well as the possible transitions defined by the workflow.
+is now listed as well as the possible transitions for the current state defined by the workflow.
 The transitions will only be displayed for users having the right permissions.
 In our example, the transition `approve_blogentry` will only be displayed
 for the users belonging to the group `moderators` or `managers`.
@@ -132,28 +126,26 @@
 
 A workflow is a collection of entities of type ``State`` and of type ``Transition``
 which are standard *CubicWeb* entity types.
-For instance, the following lines::
+
+For instance, the preceding lines:
 
-  submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
-  published = add_state(_('published'), 'BlogEntry')
+.. sourcecode:: python
+
+  submitted = wf.add_state(_('submitted'), initial=True)
+  published = wf.add_state(_('published'))
 
 will create two entities of type ``State``, one with name 'submitted', and the other
-with name 'published'. Whereas::
+with name 'published'. Whereas:
 
-  add_transition(_('approve_blogentry'), 'BlogEntry', (submitted,), published, ('moderators', 'managers'),)
+.. sourcecode:: python
+
+  wf.add_transition(_('approve_blogentry'), (submitted,), published, ('moderators', 'managers'),)
 
-will create an entity of type ``Transition`` with name 'approve_blogentry' which will
+will create an entity of type ``Transition`` with name `approve_blogentry` which will
 be linked to the ``State`` entities created before.
-As a consequence, we could use the administration interface to do these operations.
-But it is not recommanded because it will be uselessly complicated
-and will be only local to your instance.
+As a consequence, we could use the administration interface to do these operations. But it is not recommended because it will be uselessly complicated and will be only local to your instance.
+
+Indeed, if you create the states and transitions through the user interface, next time you initialize the database you will have to re-create all the entities.
+The user interface should only be a reference for you to view the states and transitions, but is not the appropriate interface to define your application workflow.
 
 
-Indeed, if you create the states and transitions through the user interface,
-next time you initialize the database
-you will have to re-create all the entities.
-The user interface should only be a reference for you to view the states
-and transitions, but is not the appropriate interface to define your
-application workflow.
-
-
--- a/doc/book/fr/06-define-workflows.fr.txt	Thu Sep 17 15:52:46 2009 +0200
+++ b/doc/book/fr/06-define-workflows.fr.txt	Tue Sep 22 12:11:12 2009 +0200
@@ -2,11 +2,92 @@
 
 Définition de workflow
 ======================
-On peut mettre une condition rql ou/et un groupe auquel doit appartenir l'utilisateur.
+
+Avant-propos
+------------
+
+Un worflow décrit comment les entités vont être utilisés à travers différents états. Nous avons donc pour un workflow donné un ensemble d'états, un "graphe de transition" c'est-à-dire la liste des transitions possibles d'un état à un autre.
+
+Nous allons définir ici un simple workflow pour l'exemple du blog avec seulement deux états: `en attente` et `publié`. Il est nécessaire d'avoir préalablement créé une application simple *CubicWeb* en dix minutes (voir :ref:`BlogFiveMinutes`).
+
+Mise en place du workflow
+-------------------------
+
+Nous allons créer un workflow pour contrôler la qualité des BlogEntry soumis à l'instance. Lorsque un BlogEntry est créé par un utilisateur, son état doit être `en attente`. Pour être visible par tous, il doit être ensuite mis à l'état `publié`. Pour le changement d'état d'`en attente` à `publié`, nous avons besoin d'une transition que nous appellerons `approuve_blogentry`.
+
+Un état BlogEntry ne doit pas pouvoir être modifiable par les utilisateurs. Nous allons donc créé un groupe de modération `moderateurs` et ce groupe aura les permissions idoines pour publier un BlogEntry.
+
+Il existe deux manières de créer un workflow: depuis l'interface utilisateur ou en le définissant dans le fichier ``migration/postcreate.py``.
+Ce script est exécuté à chaque lancement de la commande ``cubicweb-ctl db-init``.
+Nous encourageons vivement la création dans ``migration/postcreate.py`` que nous allons vous montrer ici. Lire `Sous le capot`_ pour en comprendre les raisons.
+
+L'état d'une entité est sauvegardé par l'attribut `in_state` qui peut être ajouté à votre schéma d'entité par deux façons:
+
+* héritage direct en utilisant la classe `cubicweb.schema.WorkflowableEntityType`
+* par délégation en utilisant `cubicweb.schema.make_worflowable` (utilisable comme un décorateur également)
+
+Pour notre exemple de BlogEntry, nous devons avoir:
+
+.. sourcecode:: python
+
+  from cubicweb.schema import WorkflowableEntityType
+
+  class BlogEntry(EntityType, WorkflowableEntityType):
+      ...
+
+
+Création des états, transitions et les permissions de groupe
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Le script ``postcreate.py`` est exécuté dans un environnement spécial où plusieurs primitives *CubicWeb* peuvent être utilsées.
+Elles sont toutes définies dans ``class ServerMigrationHelper``.
+Nous allons maintenant voir dans le prochain example celles utilisées pour créer un workflow.
+
+Pour définir notre workflow pour BlogDemo, veuillez ajouter les lignes suivantes au script ``migration/postcreate.py``:
 
-Si on met à la fois un(ou plusieurs) groupe et une condition RQL, il faut que les deux soient respectés.
+.. sourcecode:: python
+
+  _ = unicode
+
+  moderators = add_entity('CWGroup', name=u"modérateurs")
+
+Cela va ajouter le groupe utilisateur `moderators`.
+
+.. sourcecode:: python
+
+  wf = add_workflow(u'une description succincte de votre workflow', 'BlogEntry')
+
+Ceci va premièrement instancier un nouvel objet workflow avec une description sommaire mais pertinente et le type d'entité concerné (un tuple pour être utilisé pour des valeurs multiples).
+
+.. sourcecode:: python
+
+  submitted = wf.add_state(_('submitted'), initial=True)
+  published = wf.add_state(_('published'))
+
+``add_state`` attend comme premier argument le nom de l'état que vous voulez créer et un argument optionnel pour signifier si c'est l'état initial supposé pour ce type d'entité.
 
-Si on met plusieurs groupes, il faut que l'utilisateur soit dans un des groupes.
+.. sourcecode:: python
+
+  wf.add_transition(_('approuve_blogentry'), (submitted,), published, ('moderators', 'managers'),)
+
+``add_transition`` attend:
+
+  * comme premier argument le nom de la transition
+  * ensuite la liste des états pour lesquels les transitions peuvent être tirées,
+  * l'état attendu en fin de transition,
+  * et les permissions
+    (c'est-à-dire la liste des goupes utilisateurs qui peuvnet appliquer la transition; l'utilisateur devant appartenir à l'un des groupes listés pour être autoriser à exécuter l'action).
+
+.. sourcecode:: python
+
+
+  checkpoint()
+
+.. note::
+  Dans le script de création d'un workflow, penser à mettre `_()` autour des noms d'états et de transitions pour que ceux si soient pris en compte par les scripts de gestion des catalogues i18n.
+
+En complément de condition sur des groupes utilisateur dont l'utilisateur doit appartenir à l'in d'entre eux, vous pouvez utiliser une RQL condition.
+Dans ce cas, l'utilisateur peut seulement exécuter une action si les deux conditions sont satisfaites.
 
 Pour la condition RQL sur une transition, on peut y mettre les substitutions suivantes :
 
@@ -14,141 +95,35 @@
 * `%(ueid)s`, eid de l'utilisateur qui fait la requête
 * `%(seid)s`, eid de l'état courant de l'objet
 
-Dans le script de création d'un workflow, penser à mettre `_()` autour des noms d'états et de transitions
-pour que ceux si soient pris en compte par les scripts de gestion des catalogues i18n.
-
-General
--------
-
-A workflow can be defined in a `LAX` application thanks to the system 
-entities ``State`` and ``Transition``. Those are defined within all 
-LAX application and can be set-up through the main administrator interface.
-
-Once your schema is defined, you can start creating the set of states and
-the required transitions for your applications entities.
-
-You first need to define the states and then the transitions between those
-to complete your workflow.
+.. image:: ../../images/03-transitions-view.en.png
 
-A ``State`` defines the status of an entity. While creating a new state, 
-you will be first given the option to select the entity type the state
-can be applied to. By choosing ``Apply``, a new section will be displayed
-in the editing screen to enable you to add relation to the state you are
-creating.
-
-A ``Transition`` is also based on an entity type it can be applied to.
-By choosing ``Apply``, a new section will be displayed in the editing 
-screen to enable you to add relation to the transition you are
-creating.
-
-At the transition level you will also define the group of user which can
-aplly this transition to an object.
-
-
-Example of a simple workflow
-----------------------------
-
-Please see the tutorial to view and example of a simple workflow.
+Vous pouvez remarqué que dans la boîte d'action d'un BlogEntry, l'état est maintenant listé ainsi que les possibles transitions définis pour l'état en cours dans le workflow. Les transitions ne sont seulement affichées pour les utilisateurs ayant les bonnes permissions.
+Dans notre exemple, la transition `approuve_blogentry` sera seulement affichée pour les utilisateurs appartenant au groupe `moderators` or `managers`.
 
 
-[Create a simple workflow for BlogDemo, to have a moderator approve new blog 
-entry to be published. This implies, specify a dedicated group of blog
-moderator as well as hide the view of a blog entry to the user until
-it reaches the state published]
-
-Set-up a workflow
------------------
-
-Before starting, make sure you refresh your mind by reading [link to
-definition_workflow chapter].
+Sous le capot
+~~~~~~~~~~~~~
 
-We want to create a workflow to control the quality of the BlogEntry 
-submitted on your application. When a BlogEntry is created by a user
-its state should be `submitted`. To be visible to all, it needs to
-be in the state `published`. To move from `submitted` to `published`
-we need a transition that we can name `approve_blogentry`.
-
-We do not want every user to be allowed to change the state of a 
-BlogEntry. We need to define a group of user, `moderators`, and 
-this group will have appropriate permissions to approve BlogEntry
-to be published and visible to all.
+Un workflow est une collection d'entités de type `State`` et ``Transition`` qui sont des types d'entités standards de *CubicWeb*.
 
-There are two ways to create a workflow, form the user interface,
-and also by defining it in ``migration/postcreate.py``. This script
-is executed each time a new ``./bin/laxctl db-init`` is done. 
-If you create the states and transitions through the user interface
-this means that next time you will need to initialize the database
-you will have to re-create all the entities. 
-We strongly recommand you create the workflow in ``migration\postcreate.py``
-and we will now show you how.
-The user interface would only be a reference for you to view the states 
-and transitions but is not the appropriate interface to define your
-application workflow.
+Par exemple, les lignes précédentes:
 
-Update the schema
-~~~~~~~~~~~~~~~~~
-To enable a BlogEntry to have a State, we have to define a relation
-``in_state`` in the schema of BlogEntry. Please do as follows, add
-the line ``in_state (...)``::
+.. sourcecode:: python
 
-  class BlogEntry(EntityType):
-      title = String(maxsize=100, required=True)
-      publish_date = Date(default='TODAY')
-      text_format = String(meta=True, internationalizable=True, maxsize=50,
-                           default='text/rest', constraints=[format_constraint])
-      text = String(fulltextindexed=True)
-      category = String(vocabulary=('important','business'))
-      entry_of = SubjectRelation('Blog', cardinality='?*')
-      in_state = SubjectRelation('State', cardinality='1*')
+  submitted = wf.add_state(_('en attente'), initial=True)
+  published = wf.add_state(_('publié'))
 
-As you updated the schema, you will have re-execute ``./bin/laxctl db-init``
-to initialize the database and migrate your existing entities.
-[WRITE ABOUT MIGRATION]
-
-Create states, transitions and group permissions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-At the time the ``postcreate.py`` script is executed, several methods
-can be used. They are all defined in the ``class ServerMigrationHelper``.
-We will only discuss the method we use to create a wrokflow here.
+vont créé deux entités de type ``State``, l'une avec le nom 'submitted' et l'autre avec le nom 'published'. Tandis que:
 
-To define our workflow for BlogDemo, please add the following lines
-to ``migration/postcreate.py``::
-  
-  _ = unicode
-
-  moderators      = add_entity('CWGroup', name=u"moderators")
+.. sourcecode:: python
 
-  submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
-  published = add_state(_('published'), 'BlogEntry')
-
-  add_transition(_('approve_blogentry'), 'BlogEntry', (submitted,), published, ('moderators', 'managers'),)
-
-  checkpoint()
+  wf.add_transition(_('approuve_blogentry'), (submitted,), published, ('moderators', 'managers'),)
 
-``add_entity`` is used here to define the new group of users that we
-need to define the transitions, `moderators`.
-If this group required by the transition is not defined before the
-transition is created, it will not create the relation `transition 
-require the group moderator`.
-
-``add_state`` expects as the first argument the name of the state you are
-willing to create, then the entity type on which the state can be applied, 
-and an optionnal argument to set if the state is the initial state
-of the entity type or not.
+va créé une entité de type ``Transition`` avec le nom `approuve_blogentry` qui sera relié aux entités ``State`` créées précédemment.
 
-``add_transition`` expects as the first argument the name of the 
-transition, then the entity type on which we can apply the transition,
-then the list of possible initial states from which the transition
-can be applied, the target state of the transition, and the permissions
-(e.g. list of the groups of users who can apply the transition).
+Dès lors, nous pouvons utiliser l'interface d'administration pour ces opérations. Mais ce n'est pas recommandé à cause de la complexité superflue et du fait que ces changements ne seront locaux qu'à cette instance.
 
-.. image:: images/lax-book.03-transitions-view.fr.png
-
-You can now notice that in the actions box of a BlogEntry, the state
-is now listed as well as the possible transitions from this state
-defined by the workflow. This transition, as defined in the workflow,
-will only being displayed for the users belonging to the group
-moderators of managers.
+En effet, si vous créez les états et les transitions à travers l'interface utilisateur, la prochaine initialisation de la base de données vous oblige à recréer toutes les entités.
+L'interface utilisateur devrait être seulement connu par vous pour la visualisation des états et transitions, mais ce n'est pas celle appropriée pour définir vos workflows applicatifs.
 
 
--- a/entities/__init__.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/entities/__init__.py	Tue Sep 22 12:11:12 2009 +0200
@@ -150,15 +150,15 @@
 
     # edition helper functions ################################################
 
-    def linked_to(self, rtype, target, remove=True):
+    def linked_to(self, rtype, role, remove=True):
         """if entity should be linked to another using __linkto form param for
-        the given relation/target, return eids of related entities
+        the given relation/role, return eids of related entities
 
         This method is consuming matching link-to information from form params
         if `remove` is True (by default).
         """
         try:
-            return self.__linkto[(rtype, target)]
+            return self.__linkto[(rtype, role)]
         except AttributeError:
             self.__linkto = {}
         except KeyError:
@@ -166,15 +166,15 @@
         linktos = list(self.req.list_form_param('__linkto'))
         linkedto = []
         for linkto in linktos[:]:
-            ltrtype, eid, lttarget = linkto.split(':')
-            if rtype == ltrtype and target == lttarget:
+            ltrtype, eid, ltrole = linkto.split(':')
+            if rtype == ltrtype and role == ltrole:
                 # delete __linkto from form param to avoid it being added as
                 # hidden input
                 if remove:
                     linktos.remove(linkto)
                     self.req.form['__linkto'] = linktos
                 linkedto.append(typed_eid(eid))
-        self.__linkto[(rtype, target)] = linkedto
+        self.__linkto[(rtype, role)] = linkedto
         return linkedto
 
     # edit controller callbacks ###############################################
--- a/entities/schemaobjs.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/entities/schemaobjs.py	Tue Sep 22 12:11:12 2009 +0200
@@ -63,14 +63,18 @@
         * raise ValidationError if inlining is'nt possible
         * eventually return True
         """
-        rtype = self.name
-        rschema = self.schema.rschema(rtype)
+        rschema = self.schema.rschema(self.name)
         if inlined == rschema.inlined:
             return False
         if inlined:
-            for (stype, otype) in rschema.iter_rdefs():
-                card = rschema.rproperty(stype, otype, 'cardinality')[0]
+            # don't use the persistent schema, we may miss cardinality changes
+            # in the same transaction
+            for rdef in self.reverse_relation_type:
+                card = rdef.cardinality[0]
                 if not card in '?1':
+                    rtype = self.name
+                    stype = rdef.stype
+                    otype = rdef.otype
                     msg = self.req._("can't set inlined=%(inlined)s, "
                                      "%(stype)s %(rtype)s %(otype)s "
                                      "has cardinality=%(card)s")
--- a/i18n/en.po	Thu Sep 17 15:52:46 2009 +0200
+++ b/i18n/en.po	Tue Sep 22 12:11:12 2009 +0200
@@ -533,9 +533,17 @@
 msgid "This CWConstraintType"
 msgstr "This constraint type"
 
+msgctxt "inlined:CWRelation.from_entity.subject"
+msgid "This CWEType"
+msgstr ""
+
 msgid "This CWEType"
 msgstr "This entity type"
 
+msgctxt "inlined:CWRelation.to_entity.subject"
+msgid "This CWEType"
+msgstr ""
+
 msgid "This CWGroup"
 msgstr "This group"
 
@@ -548,12 +556,20 @@
 msgid "This CWRType"
 msgstr "This relation type"
 
+msgctxt "inlined:CWRelation.relation_type.subject"
+msgid "This CWRType"
+msgstr "This relation type"
+
 msgid "This CWRelation"
 msgstr "This relation"
 
 msgid "This CWUser"
 msgstr "This user"
 
+msgctxt "inlined:CWUser.use_email.subject"
+msgid "This EmailAddress"
+msgstr "email address"
+
 msgid "This EmailAddress"
 msgstr "This email address"
 
@@ -894,6 +910,9 @@
 msgid "add State allowed_transition WorkflowTransition subject"
 msgstr "workflow-transition"
 
+msgid "add State state_of Workflow object"
+msgstr "state"
+
 msgid "add Transition condition RQLExpression subject"
 msgstr "condition"
 
@@ -903,17 +922,23 @@
 msgid "add Transition destination_state State subject"
 msgstr "destination state"
 
+msgid "add Transition transition_of Workflow object"
+msgstr "transition"
+
 msgid "add WorkflowTransition condition RQLExpression subject"
 msgstr "workflow-transition"
 
 msgid "add WorkflowTransition subworkflow_exit SubWorkflowExitPoint subject"
 msgstr "subworkflow exit-point"
 
-msgctxt "inlined:CWRelation.from_entity.subject"
+msgid "add WorkflowTransition transition_of Workflow object"
+msgstr "workflow-transition"
+
+msgctxt "inlined:CWRelation.to_entity.subject"
 msgid "add a CWEType"
 msgstr "add an entity type"
 
-msgctxt "inlined:CWRelation.to_entity.subject"
+msgctxt "inlined:CWRelation.from_entity.subject"
 msgid "add a CWEType"
 msgstr "add an entity type"
 
@@ -943,22 +968,22 @@
 # (no object form for final relation types)
 msgctxt "CWEType"
 msgid "add_permission"
-msgstr ""
+msgstr "add permission"
 
 msgctxt "CWRType"
 msgid "add_permission"
-msgstr ""
+msgstr "add permission"
+
+msgctxt "RQLExpression"
+msgid "add_permission_object"
+msgstr "used to define add permission on"
+
+msgid "add_permission_object"
+msgstr "has permission to add"
 
 msgctxt "CWGroup"
 msgid "add_permission_object"
-msgstr ""
-
-msgctxt "RQLExpression"
-msgid "add_permission_object"
-msgstr ""
-
-msgid "add_permission_object"
-msgstr "has permission to add"
+msgstr "can add"
 
 #, python-format
 msgid "added %(etype)s #%(eid)s (%(title)s)"
@@ -978,13 +1003,13 @@
 
 msgctxt "EmailAddress"
 msgid "address"
-msgstr ""
-
-msgid "alias"
-msgstr ""
+msgstr "address"
 
 msgctxt "EmailAddress"
 msgid "alias"
+msgstr "alias"
+
+msgid "alias"
 msgstr ""
 
 msgid "allow to set a specific workflow for an entity"
@@ -1001,20 +1026,20 @@
 
 msgctxt "State"
 msgid "allowed_transition"
-msgstr ""
-
-msgctxt "BaseTransition"
+msgstr "allowed transition"
+
 msgid "allowed_transition_object"
-msgstr ""
+msgstr "incoming states"
+
+msgctxt "WorkflowTransition"
+msgid "allowed_transition_object"
+msgstr "incoming states"
 
 msgctxt "Transition"
 msgid "allowed_transition_object"
-msgstr ""
-
-msgctxt "WorkflowTransition"
-msgid "allowed_transition_object"
-msgstr ""
-
+msgstr "incoming states"
+
+msgctxt "BaseTransition"
 msgid "allowed_transition_object"
 msgstr "incoming states"
 
@@ -1100,7 +1125,7 @@
 
 msgctxt "CWUser"
 msgid "bookmarked_by_object"
-msgstr ""
+msgstr "uses bookmarks"
 
 msgid "bookmarked_by_object"
 msgstr "has bookmarks"
@@ -1186,24 +1211,24 @@
 msgid "by relation"
 msgstr ""
 
-msgid "by_transition"
-msgstr ""
-
 msgctxt "TrInfo"
 msgid "by_transition"
 msgstr "by transition"
 
+msgid "by_transition"
+msgstr "by transition"
+
+msgctxt "WorkflowTransition"
+msgid "by_transition_object"
+msgstr "transition information"
+
 msgctxt "BaseTransition"
 msgid "by_transition_object"
-msgstr ""
+msgstr "transition information"
 
 msgctxt "Transition"
 msgid "by_transition_object"
-msgstr ""
-
-msgctxt "WorkflowTransition"
-msgid "by_transition_object"
-msgstr ""
+msgstr "transition information"
 
 msgid "by_transition_object"
 msgstr "transition information"
@@ -1253,17 +1278,17 @@
 msgid "cancel this insert"
 msgstr ""
 
+msgctxt "CWRelation"
 msgid "cardinality"
-msgstr ""
+msgstr "cardinality"
+
+msgid "cardinality"
+msgstr "cardinality"
 
 msgctxt "CWAttribute"
 msgid "cardinality"
 msgstr "cardinality"
 
-msgctxt "CWRelation"
-msgid "cardinality"
-msgstr ""
-
 msgid "category"
 msgstr ""
 
@@ -1288,7 +1313,7 @@
 
 msgctxt "TrInfo"
 msgid "comment"
-msgstr ""
+msgstr "comment"
 
 msgid "comment_format"
 msgstr "format"
@@ -1362,33 +1387,33 @@
 
 msgctxt "CWRelation"
 msgid "composite"
-msgstr ""
-
+msgstr "composite"
+
+msgctxt "WorkflowTransition"
 msgid "condition"
-msgstr ""
-
-msgctxt "BaseTransition"
-msgid "condition"
-msgstr ""
+msgstr "condition"
 
 msgctxt "Transition"
 msgid "condition"
-msgstr ""
-
-msgctxt "WorkflowTransition"
+msgstr "condition"
+
 msgid "condition"
-msgstr ""
+msgstr "condition"
+
+msgctxt "BaseTransition"
+msgid "condition"
+msgstr "condition"
 
 msgid "condition:"
-msgstr ""
+msgstr "condtion:"
+
+msgid "condition_object"
+msgstr "condition of"
 
 msgctxt "RQLExpression"
 msgid "condition_object"
 msgstr ""
 
-msgid "condition_object"
-msgstr "condition of"
-
 msgid "confirm password"
 msgstr ""
 
@@ -1403,11 +1428,11 @@
 msgid "constrained_by"
 msgstr "constrained by"
 
+msgid "constrained_by_object"
+msgstr "constraints"
+
 msgctxt "CWConstraint"
 msgid "constrained_by_object"
-msgstr ""
-
-msgid "constrained_by_object"
 msgstr "constraints"
 
 msgid "constraint factory"
@@ -1522,10 +1547,6 @@
 msgid "created_by"
 msgstr "created by"
 
-msgctxt "CWUser"
-msgid "created_by_object"
-msgstr ""
-
 msgid "created_by_object"
 msgstr "has created"
 
@@ -1594,6 +1615,9 @@
 msgid "creating State (State allowed_transition Transition %(linkto)s)"
 msgstr "creating a state able to trigger transition %(linkto)s"
 
+msgid "creating State (State state_of Workflow %(linkto)s)"
+msgstr "creating state of workflow %(linkto)s"
+
 msgid "creating State (Transition %(linkto)s destination_state State)"
 msgstr "creating destination state for transition %(linkto)s"
 
@@ -1608,11 +1632,19 @@
 msgid "creating Transition (Transition destination_state State %(linkto)s)"
 msgstr "creating transition leading to state %(linkto)s"
 
+msgid "creating Transition (Transition transition_of Workflow %(linkto)s)"
+msgstr "creating transition of workflow %(linkto)s"
+
 msgid ""
 "creating WorkflowTransition (State %(linkto)s allowed_transition "
 "WorkflowTransition)"
 msgstr "creating workflow-transition leading to state %(linkto)s"
 
+msgid ""
+"creating WorkflowTransition (WorkflowTransition transition_of Workflow %"
+"(linkto)s)"
+msgstr "creating workflow-transition of workflow %(linkto)s"
+
 msgid "creation"
 msgstr ""
 
@@ -1622,19 +1654,19 @@
 msgid "creation_date"
 msgstr "creation date"
 
+msgctxt "CWConstraint"
+msgid "cstrtype"
+msgstr "constraint type"
+
 msgid "cstrtype"
 msgstr "constraint's type"
 
-msgctxt "CWConstraint"
-msgid "cstrtype"
-msgstr ""
+msgid "cstrtype_object"
+msgstr "used by"
 
 msgctxt "CWConstraintType"
 msgid "cstrtype_object"
-msgstr ""
-
-msgid "cstrtype_object"
-msgstr "used by"
+msgstr "constraint type of"
 
 msgid "csv entities export"
 msgstr ""
@@ -1649,14 +1681,6 @@
 msgid "custom_workflow"
 msgstr "custom workflow"
 
-msgctxt "CWUser"
-msgid "custom_workflow"
-msgstr "custom workflow"
-
-msgctxt "Workflow"
-msgid "custom_workflow_object"
-msgstr ""
-
 msgid "custom_workflow_object"
 msgstr "custom workflow of"
 
@@ -1702,17 +1726,17 @@
 msgid "default workflow for an entity type"
 msgstr ""
 
-msgid "default_workflow"
-msgstr "default workflow"
-
 msgctxt "CWEType"
 msgid "default_workflow"
 msgstr "default workflow"
 
-msgctxt "Workflow"
+msgid "default_workflow"
+msgstr "default workflow"
+
 msgid "default_workflow_object"
-msgstr ""
-
+msgstr "default workflow of"
+
+msgctxt "Workflow"
 msgid "default_workflow_object"
 msgstr "default workflow of"
 
@@ -1780,22 +1804,22 @@
 msgid "delete_permission"
 msgstr "can be deleted by"
 
+msgctxt "CWRType"
+msgid "delete_permission"
+msgstr "delete permission"
+
 msgctxt "CWEType"
 msgid "delete_permission"
 msgstr "delete permission"
 
-msgctxt "CWRType"
-msgid "delete_permission"
-msgstr ""
-
-msgctxt "CWGroup"
 msgid "delete_permission_object"
-msgstr ""
+msgstr "has permission to delete"
 
 msgctxt "RQLExpression"
 msgid "delete_permission_object"
-msgstr ""
-
+msgstr "has permission to delete"
+
+msgctxt "CWGroup"
 msgid "delete_permission_object"
 msgstr "has permission to delete"
 
@@ -1815,25 +1839,17 @@
 msgid "description"
 msgstr ""
 
-msgctxt "CWEType"
+msgctxt "Transition"
 msgid "description"
-msgstr ""
-
-msgctxt "CWRelation"
-msgid "description"
-msgstr ""
+msgstr "description"
 
 msgctxt "Workflow"
 msgid "description"
-msgstr ""
-
-msgctxt "CWAttribute"
+msgstr "description"
+
+msgctxt "CWRelation"
 msgid "description"
-msgstr ""
-
-msgctxt "Transition"
-msgid "description"
-msgstr ""
+msgstr "description"
 
 msgctxt "WorkflowTransition"
 msgid "description"
@@ -1841,26 +1857,34 @@
 
 msgctxt "State"
 msgid "description"
-msgstr ""
+msgstr "description"
+
+msgctxt "CWEType"
+msgid "description"
+msgstr "description"
 
 msgctxt "CWRType"
 msgid "description"
-msgstr ""
+msgstr "description"
 
 msgctxt "BaseTransition"
 msgid "description"
-msgstr ""
+msgstr "description"
+
+msgctxt "CWAttribute"
+msgid "description"
+msgstr "description"
+
+msgctxt "CWRelation"
+msgid "description_format"
+msgstr "format"
 
 msgid "description_format"
 msgstr "format"
 
 msgctxt "CWEType"
 msgid "description_format"
-msgstr ""
-
-msgctxt "CWRelation"
-msgid "description_format"
-msgstr ""
+msgstr "format"
 
 msgctxt "Workflow"
 msgid "description_format"
@@ -1902,17 +1926,17 @@
 msgid "destination_state"
 msgstr "destination state"
 
-msgctxt "Transition"
-msgid "destination_state"
-msgstr ""
-
 msgctxt "SubWorkflowExitPoint"
 msgid "destination_state"
 msgstr "destination state"
 
+msgctxt "Transition"
+msgid "destination_state"
+msgstr ""
+
 msgctxt "State"
 msgid "destination_state_object"
-msgstr ""
+msgstr "destination of"
 
 msgid "destination_state_object"
 msgstr "destination of"
@@ -2067,10 +2091,10 @@
 msgid "expected:"
 msgstr ""
 
+msgctxt "RQLExpression"
 msgid "expression"
 msgstr ""
 
-msgctxt "RQLExpression"
 msgid "expression"
 msgstr ""
 
@@ -2079,7 +2103,7 @@
 
 msgctxt "RQLExpression"
 msgid "exprtype"
-msgstr ""
+msgstr "expression type"
 
 msgid "external page"
 msgstr ""
@@ -2129,10 +2153,10 @@
 msgid "file tree view"
 msgstr ""
 
+msgctxt "CWEType"
 msgid "final"
 msgstr ""
 
-msgctxt "CWEType"
 msgid "final"
 msgstr ""
 
@@ -2140,10 +2164,10 @@
 msgid "final"
 msgstr ""
 
+msgctxt "CWUser"
 msgid "firstname"
 msgstr ""
 
-msgctxt "CWUser"
 msgid "firstname"
 msgstr ""
 
@@ -2153,13 +2177,13 @@
 msgid "follow"
 msgstr ""
 
+msgctxt "CWProperty"
+msgid "for_user"
+msgstr ""
+
 msgid "for_user"
 msgstr "for user"
 
-msgctxt "CWProperty"
-msgid "for_user"
-msgstr ""
-
 msgctxt "CWUser"
 msgid "for_user_object"
 msgstr ""
@@ -2190,7 +2214,7 @@
 
 msgctxt "CWEType"
 msgid "from_entity_object"
-msgstr ""
+msgstr "subjec relation"
 
 msgid "from_entity_object"
 msgstr "subjet relation"
@@ -2207,7 +2231,7 @@
 
 msgctxt "State"
 msgid "from_state_object"
-msgstr ""
+msgstr "transitions from this state"
 
 msgid "from_state_object"
 msgstr "transitions from this state"
@@ -2215,20 +2239,20 @@
 msgid "full text or RQL query"
 msgstr ""
 
-msgid "fulltext_container"
-msgstr ""
-
 msgctxt "CWRType"
 msgid "fulltext_container"
 msgstr "fulltext container"
 
-msgid "fulltextindexed"
-msgstr "fulltext indexed"
+msgid "fulltext_container"
+msgstr "fulltext container"
 
 msgctxt "CWAttribute"
 msgid "fulltextindexed"
 msgstr ""
 
+msgid "fulltextindexed"
+msgstr "fulltext indexed"
+
 msgid "generic plot"
 msgstr ""
 
@@ -2348,94 +2372,6 @@
 msgid "identity"
 msgstr ""
 
-msgctxt "CWRelation"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "Bookmark"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWAttribute"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWConstraintType"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "State"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "BaseTransition"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWEType"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "Workflow"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWGroup"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "TrInfo"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWConstraint"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWUser"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "Transition"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWRType"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "SubWorkflowExitPoint"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "ExternalUri"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWCache"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "WorkflowTransition"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "RQLExpression"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWPermission"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "EmailAddress"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWProperty"
-msgid "identity_object"
-msgstr ""
-
 msgid "identity_object"
 msgstr "identity"
 
@@ -2453,16 +2389,16 @@
 msgid "in memory relation schema"
 msgstr ""
 
+msgctxt "CWUser"
 msgid "in_group"
 msgstr "in group"
 
-msgctxt "CWUser"
 msgid "in_group"
 msgstr "in group"
 
 msgctxt "CWGroup"
 msgid "in_group_object"
-msgstr ""
+msgstr "contains"
 
 msgid "in_group_object"
 msgstr "contains"
@@ -2470,14 +2406,6 @@
 msgid "in_state"
 msgstr "in state"
 
-msgctxt "CWUser"
-msgid "in_state"
-msgstr "in state"
-
-msgctxt "State"
-msgid "in_state_object"
-msgstr ""
-
 msgid "in_state_object"
 msgstr "state of"
 
@@ -2499,7 +2427,7 @@
 
 msgctxt "CWAttribute"
 msgid "indexed"
-msgstr ""
+msgstr "indexed"
 
 msgid "indicate the current state of an entity"
 msgstr ""
@@ -2519,16 +2447,16 @@
 msgid "initial state for this workflow"
 msgstr ""
 
+msgctxt "Workflow"
 msgid "initial_state"
 msgstr "initial state"
 
-msgctxt "Workflow"
 msgid "initial_state"
 msgstr "initial state"
 
 msgctxt "State"
 msgid "initial_state_object"
-msgstr ""
+msgstr "initial state of"
 
 msgid "initial_state_object"
 msgstr "initial state of"
@@ -2538,7 +2466,7 @@
 
 msgctxt "CWRType"
 msgid "inlined"
-msgstr ""
+msgstr "inlined"
 
 msgid "instance schema"
 msgstr ""
@@ -2588,17 +2516,9 @@
 msgid "is_instance_of"
 msgstr ""
 
-msgctxt "CWEType"
-msgid "is_instance_of_object"
-msgstr ""
-
 msgid "is_instance_of_object"
 msgstr "is instance of"
 
-msgctxt "CWEType"
-msgid "is_object"
-msgstr ""
-
 msgid "is_object"
 msgstr "has instances"
 
@@ -2616,7 +2536,7 @@
 
 msgctxt "CWPermission"
 msgid "label"
-msgstr ""
+msgstr "label"
 
 msgid "language of the user interface"
 msgstr ""
@@ -2688,7 +2608,7 @@
 
 msgctxt "CWUser"
 msgid "login"
-msgstr ""
+msgstr "login"
 
 msgid "login or email"
 msgstr ""
@@ -2706,12 +2626,12 @@
 msgid "main informations"
 msgstr ""
 
-msgid "mainvars"
-msgstr ""
-
 msgctxt "RQLExpression"
 msgid "mainvars"
-msgstr ""
+msgstr "main vars"
+
+msgid "mainvars"
+msgstr "main vars"
 
 msgid "manage"
 msgstr ""
@@ -2774,6 +2694,38 @@
 msgid "my custom search"
 msgstr ""
 
+msgctxt "CWPermission"
+msgid "name"
+msgstr "name"
+
+msgctxt "State"
+msgid "name"
+msgstr "name"
+
+msgctxt "BaseTransition"
+msgid "name"
+msgstr ""
+
+msgctxt "CWRType"
+msgid "name"
+msgstr ""
+
+msgctxt "CWGroup"
+msgid "name"
+msgstr ""
+
+msgctxt "WorkflowTransition"
+msgid "name"
+msgstr ""
+
+msgctxt "CWCache"
+msgid "name"
+msgstr ""
+
+msgid "name"
+msgstr ""
+
+msgctxt "CWConstraintType"
 msgid "name"
 msgstr ""
 
@@ -2789,38 +2741,6 @@
 msgid "name"
 msgstr ""
 
-msgctxt "CWGroup"
-msgid "name"
-msgstr ""
-
-msgctxt "CWConstraintType"
-msgid "name"
-msgstr ""
-
-msgctxt "WorkflowTransition"
-msgid "name"
-msgstr ""
-
-msgctxt "State"
-msgid "name"
-msgstr ""
-
-msgctxt "CWPermission"
-msgid "name"
-msgstr ""
-
-msgctxt "CWRType"
-msgid "name"
-msgstr ""
-
-msgctxt "BaseTransition"
-msgid "name"
-msgstr ""
-
-msgctxt "CWCache"
-msgid "name"
-msgstr ""
-
 msgid "name of the cache"
 msgstr ""
 
@@ -2923,16 +2843,16 @@
 msgid "order"
 msgstr ""
 
+msgctxt "CWRelation"
 msgid "ordernum"
 msgstr "order"
 
 msgctxt "CWAttribute"
 msgid "ordernum"
-msgstr ""
-
-msgctxt "CWRelation"
+msgstr "order"
+
 msgid "ordernum"
-msgstr ""
+msgstr "order"
 
 msgid "owl"
 msgstr ""
@@ -2943,10 +2863,6 @@
 msgid "owned_by"
 msgstr "owned by"
 
-msgctxt "CWUser"
-msgid "owned_by_object"
-msgstr ""
-
 msgid "owned_by_object"
 msgstr "owns"
 
@@ -2974,7 +2890,7 @@
 
 msgctxt "Bookmark"
 msgid "path"
-msgstr ""
+msgstr "path"
 
 msgid "permission"
 msgstr ""
@@ -2994,12 +2910,12 @@
 msgid "pick existing bookmarks"
 msgstr ""
 
+msgctxt "CWProperty"
 msgid "pkey"
 msgstr "key"
 
-msgctxt "CWProperty"
 msgid "pkey"
-msgstr ""
+msgstr "key"
 
 msgid "please correct errors below"
 msgstr ""
@@ -3018,14 +2934,14 @@
 
 msgctxt "EmailAddress"
 msgid "prefered_form"
-msgstr ""
+msgstr "prefered form"
 
 msgctxt "EmailAddress"
 msgid "prefered_form_object"
-msgstr ""
+msgstr "prefered over"
 
 msgid "prefered_form_object"
-msgstr ""
+msgstr "prefered over"
 
 msgid "preferences"
 msgstr ""
@@ -3043,13 +2959,13 @@
 msgid "primary_email"
 msgstr "primary email"
 
+msgid "primary_email_object"
+msgstr "primary email of"
+
 msgctxt "EmailAddress"
 msgid "primary_email_object"
 msgstr ""
 
-msgid "primary_email_object"
-msgstr "primary email of"
-
 msgid "progress"
 msgstr ""
 
@@ -3065,9 +2981,6 @@
 msgid "read_perm"
 msgstr "read perm"
 
-msgid "read_permission"
-msgstr "can be read by"
-
 msgctxt "CWEType"
 msgid "read_permission"
 msgstr "read permission"
@@ -3076,6 +2989,12 @@
 msgid "read_permission"
 msgstr "read permission"
 
+msgid "read_permission"
+msgstr "can be read by"
+
+msgid "read_permission_object"
+msgstr "has permission to delete"
+
 msgctxt "CWGroup"
 msgid "read_permission_object"
 msgstr ""
@@ -3084,9 +3003,6 @@
 msgid "read_permission_object"
 msgstr ""
 
-msgid "read_permission_object"
-msgstr "has permission to delete"
-
 msgid "registry"
 msgstr ""
 
@@ -3111,13 +3027,13 @@
 msgid "relation_type"
 msgstr "relation type"
 
+msgid "relation_type_object"
+msgstr "relation definitions"
+
 msgctxt "CWRType"
 msgid "relation_type_object"
 msgstr ""
 
-msgid "relation_type_object"
-msgstr "relation definitions"
-
 msgid "relations"
 msgstr ""
 
@@ -3127,21 +3043,25 @@
 msgid "relative url of the bookmarked page"
 msgstr ""
 
-msgctxt "inlined:CWRelation:from_entity:subject"
+msgctxt "inlined:CWRelation.from_entity.subject"
 msgid "remove this CWEType"
-msgstr "remove this entity type"
-
-msgctxt "inlined:CWRelation:to_entity:subject"
+msgstr ""
+
+msgctxt "inlined:CWRelation.to_entity.subject"
 msgid "remove this CWEType"
-msgstr "remove this entity type"
-
-msgctxt "inlined:CWRelation:relation_type:subject"
+msgstr ""
+
+msgctxt "inlined:CWRelation.relation_type.subject"
 msgid "remove this CWRType"
-msgstr "remove this relation type"
-
-msgctxt "inlined:CWUser:use_email:subject"
+msgstr ""
+
+msgctxt "inlined:CWUser.use_email.subject"
 msgid "remove this EmailAddress"
-msgstr "remove this email address"
+msgstr ""
+
+msgctxt "WorkflowTransition"
+msgid "require_group"
+msgstr "require group"
 
 msgid "require_group"
 msgstr "require the group"
@@ -3158,10 +3078,6 @@
 msgid "require_group"
 msgstr "require group"
 
-msgctxt "WorkflowTransition"
-msgid "require_group"
-msgstr "require group"
-
 msgctxt "CWGroup"
 msgid "require_group_object"
 msgstr ""
@@ -3355,13 +3271,13 @@
 msgid "specializes"
 msgstr ""
 
+msgid "specializes_object"
+msgstr "specialized by"
+
 msgctxt "CWEType"
 msgid "specializes_object"
 msgstr ""
 
-msgid "specializes_object"
-msgstr "specialized by"
-
 msgid "startup views"
 msgstr ""
 
@@ -3379,13 +3295,13 @@
 "workflow for this entity first."
 msgstr ""
 
+msgctxt "State"
+msgid "state_of"
+msgstr ""
+
 msgid "state_of"
 msgstr "state of"
 
-msgctxt "State"
-msgid "state_of"
-msgstr ""
-
 msgctxt "Workflow"
 msgid "state_of_object"
 msgstr ""
@@ -3443,10 +3359,10 @@
 msgid "subworkflow_object"
 msgstr "subworkflow of"
 
+msgctxt "SubWorkflowExitPoint"
 msgid "subworkflow_state"
 msgstr "subworkflow state"
 
-msgctxt "SubWorkflowExitPoint"
 msgid "subworkflow_state"
 msgstr "subworkflow state"
 
@@ -3556,6 +3472,7 @@
 msgid "to associate with"
 msgstr ""
 
+msgctxt "CWRelation"
 msgid "to_entity"
 msgstr "to entity"
 
@@ -3563,7 +3480,6 @@
 msgid "to_entity"
 msgstr "to entity"
 
-msgctxt "CWRelation"
 msgid "to_entity"
 msgstr "to entity"
 
@@ -3577,20 +3493,20 @@
 msgid "to_interval_end"
 msgstr "to"
 
+msgctxt "TrInfo"
+msgid "to_state"
+msgstr ""
+
 msgid "to_state"
 msgstr "to state"
 
-msgctxt "TrInfo"
-msgid "to_state"
-msgstr ""
+msgid "to_state_object"
+msgstr "transitions to this state"
 
 msgctxt "State"
 msgid "to_state_object"
 msgstr ""
 
-msgid "to_state_object"
-msgstr "transitions to this state"
-
 msgid "todo_by"
 msgstr "to do by"
 
@@ -3606,9 +3522,6 @@
 msgid "transition may not be fired"
 msgstr ""
 
-msgid "transition_of"
-msgstr "transition of"
-
 msgctxt "BaseTransition"
 msgid "transition_of"
 msgstr "transition of"
@@ -3621,6 +3534,9 @@
 msgid "transition_of"
 msgstr ""
 
+msgid "transition_of"
+msgstr "transition of"
+
 msgctxt "Workflow"
 msgid "transition_of_object"
 msgstr ""
@@ -3694,13 +3610,13 @@
 msgid "up"
 msgstr ""
 
+msgctxt "CWUser"
+msgid "upassword"
+msgstr ""
+
 msgid "upassword"
 msgstr "password"
 
-msgctxt "CWUser"
-msgid "upassword"
-msgstr ""
-
 msgid "update"
 msgstr ""
 
@@ -3714,25 +3630,25 @@
 msgid "update_permission"
 msgstr ""
 
-msgctxt "CWGroup"
 msgid "update_permission_object"
-msgstr ""
+msgstr "has permission to update"
 
 msgctxt "RQLExpression"
 msgid "update_permission_object"
 msgstr ""
 
+msgctxt "CWGroup"
 msgid "update_permission_object"
-msgstr "has permission to update"
+msgstr ""
 
 #, python-format
 msgid "updated %(etype)s #%(eid)s (%(title)s)"
 msgstr ""
 
+msgctxt "ExternalUri"
 msgid "uri"
 msgstr ""
 
-msgctxt "ExternalUri"
 msgid "uri"
 msgstr ""
 
@@ -3744,13 +3660,13 @@
 "states in workflow's definitions."
 msgstr ""
 
+msgctxt "CWUser"
+msgid "use_email"
+msgstr ""
+
 msgid "use_email"
 msgstr "use email"
 
-msgctxt "CWUser"
-msgid "use_email"
-msgstr ""
-
 msgctxt "EmailAddress"
 msgid "use_email_object"
 msgstr ""
@@ -3805,11 +3721,11 @@
 msgid "value"
 msgstr ""
 
-msgctxt "CWConstraint"
+msgctxt "CWProperty"
 msgid "value"
 msgstr ""
 
-msgctxt "CWProperty"
+msgctxt "CWConstraint"
 msgid "value"
 msgstr ""
 
@@ -3859,14 +3775,6 @@
 msgid "wf_info_for"
 msgstr "record for"
 
-msgctxt "TrInfo"
-msgid "wf_info_for"
-msgstr ""
-
-msgctxt "CWUser"
-msgid "wf_info_for_object"
-msgstr ""
-
 msgid "wf_info_for_object"
 msgstr "workflow history"
 
@@ -3895,10 +3803,10 @@
 msgid "workflow to which this transition belongs"
 msgstr ""
 
+msgctxt "Workflow"
 msgid "workflow_of"
 msgstr ""
 
-msgctxt "Workflow"
 msgid "workflow_of"
 msgstr ""
 
@@ -3927,131 +3835,18 @@
 msgid "you should probably delete that property"
 msgstr ""
 
-#~ msgid "add a BaseTransition"
-#~ msgstr "XXX"
-
-#~ msgid "add a Bookmark"
-#~ msgstr "add a bookmark"
-
-#~ msgid "add a CWAttribute"
-#~ msgstr "add an attribute"
-
-#~ msgid "add a CWCache"
-#~ msgstr "add a cubicweb cache"
-
-#~ msgid "add a CWConstraint"
-#~ msgstr "add a constraint"
-
-#~ msgid "add a CWConstraintType"
-#~ msgstr "add a constraint type"
-
-#~ msgid "add a CWEType"
-#~ msgstr "add an entity type"
-
-#~ msgid "add a CWGroup"
-#~ msgstr "add a group"
-
-#~ msgid "add a CWPermission"
-#~ msgstr "add a permission"
-
-#~ msgid "add a CWProperty"
-#~ msgstr "add a property"
-
-#~ msgid "add a CWRType"
-#~ msgstr "add a relation type"
-
-#~ msgid "add a CWRelation"
-#~ msgstr "add a relation"
-
-#~ msgid "add a CWUser"
-#~ msgstr "add a user"
-
-#~ msgid "add a EmailAddress"
-#~ msgstr "add an email address"
-
-#~ msgid "add a ExternalUri"
-#~ msgstr "and an external uri"
-
-#~ msgid "add a RQLExpression"
-#~ msgstr "add a rql expression"
-
-#~ msgid "add a State"
-#~ msgstr "add a state"
-
-#~ msgid "add a SubWorkflowExitPoint"
-#~ msgstr "add a subworkflow exit-point"
-
-#~ msgid "add a TrInfo"
-#~ msgstr "add a transition information"
-
-#~ msgid "add a Transition"
-#~ msgstr "add a transition"
-
-#~ msgid "add a Workflow"
-#~ msgstr "add a workflow"
-
-#~ msgid "add a WorkflowTransition"
-#~ msgstr "add a workflow-transition"
-
-#~ msgid "remove this Bookmark"
-#~ msgstr "remove this bookmark"
-
-#~ msgid "remove this CWAttribute"
-#~ msgstr "remove this attribute"
-
-#~ msgid "remove this CWCache"
-#~ msgstr "remove this cubicweb cache"
-
-#~ msgid "remove this CWConstraint"
-#~ msgstr "remove this constraint"
-
-#~ msgid "remove this CWConstraintType"
-#~ msgstr "remove this constraint type"
-
+#~ msgctxt "inlined:CWRelation:from_entity:subject"
+#~ msgid "remove this CWEType"
+#~ msgstr "remove this entity type"
+
+#~ msgctxt "inlined:CWRelation:to_entity:subject"
 #~ msgid "remove this CWEType"
 #~ msgstr "remove this entity type"
 
-#~ msgid "remove this CWGroup"
-#~ msgstr "remove this group"
-
-#~ msgid "remove this CWPermission"
-#~ msgstr "remove this permission"
-
-#~ msgid "remove this CWProperty"
-#~ msgstr "remove this property"
-
+#~ msgctxt "inlined:CWRelation:relation_type:subject"
 #~ msgid "remove this CWRType"
 #~ msgstr "remove this relation type"
 
-#~ msgid "remove this CWRelation"
-#~ msgstr "remove this relation"
-
-#~ msgid "remove this CWUser"
-#~ msgstr "remove this user"
-
+#~ msgctxt "inlined:CWUser:use_email:subject"
 #~ msgid "remove this EmailAddress"
 #~ msgstr "remove this email address"
-
-#~ msgid "remove this ExternalUri"
-#~ msgstr "remove this external uri"
-
-#~ msgid "remove this RQLExpression"
-#~ msgstr "remove this RQL expression"
-
-#~ msgid "remove this State"
-#~ msgstr "remove this state"
-
-#~ msgid "remove this SubWorkflowExitPoint"
-#~ msgstr "remove this subworkflow exit-point"
-
-#~ msgid "remove this TrInfo"
-#~ msgstr "remove this transition information"
-
-#~ msgid "remove this Transition"
-#~ msgstr "remove this transition"
-
-#~ msgid "remove this Workflow"
-#~ msgstr "remove this workflow"
-
-#~ msgid "remove this WorkflowTransition"
-#~ msgstr "remove this workflow-transition"
--- a/i18n/es.po	Thu Sep 17 15:52:46 2009 +0200
+++ b/i18n/es.po	Tue Sep 22 12:11:12 2009 +0200
@@ -541,9 +541,17 @@
 msgid "This CWConstraintType"
 msgstr "Este tipo de Restricción"
 
+msgctxt "inlined:CWRelation.to_entity.subject"
+msgid "This CWEType"
+msgstr ""
+
 msgid "This CWEType"
 msgstr "Este tipo de Entidad"
 
+msgctxt "inlined:CWRelation.from_entity.subject"
+msgid "This CWEType"
+msgstr ""
+
 msgid "This CWGroup"
 msgstr "Este grupo"
 
@@ -553,6 +561,10 @@
 msgid "This CWProperty"
 msgstr "Esta propiedad"
 
+msgctxt "inlined:CWRelation.relation_type.subject"
+msgid "This CWRType"
+msgstr ""
+
 msgid "This CWRType"
 msgstr "Este tipo de relación"
 
@@ -565,6 +577,10 @@
 msgid "This EmailAddress"
 msgstr "Esta dirección electrónica"
 
+msgctxt "inlined:CWUser.use_email.subject"
+msgid "This EmailAddress"
+msgstr ""
+
 msgid "This ExternalUri"
 msgstr ""
 
@@ -917,6 +933,9 @@
 msgid "add State allowed_transition WorkflowTransition subject"
 msgstr ""
 
+msgid "add State state_of Workflow object"
+msgstr ""
+
 msgid "add Transition condition RQLExpression subject"
 msgstr "Restricción"
 
@@ -926,20 +945,26 @@
 msgid "add Transition destination_state State subject"
 msgstr "Estado de salida"
 
+msgid "add Transition transition_of Workflow object"
+msgstr ""
+
 msgid "add WorkflowTransition condition RQLExpression subject"
 msgstr ""
 
 msgid "add WorkflowTransition subworkflow_exit SubWorkflowExitPoint subject"
 msgstr ""
 
-msgctxt "inlined:CWRelation.from_entity.subject"
-msgid "add a CWEType"
+msgid "add WorkflowTransition transition_of Workflow object"
 msgstr ""
 
 msgctxt "inlined:CWRelation.to_entity.subject"
 msgid "add a CWEType"
 msgstr ""
 
+msgctxt "inlined:CWRelation.from_entity.subject"
+msgid "add a CWEType"
+msgstr ""
+
 msgctxt "inlined:CWRelation.relation_type.subject"
 msgid "add a CWRType"
 msgstr ""
@@ -959,14 +984,14 @@
 
 # subject and object forms for each relation type
 # (no object form for final relation types)
+msgctxt "CWEType"
 msgid "add_permission"
-msgstr "Autorización para agregar"
+msgstr ""
 
 # subject and object forms for each relation type
 # (no object form for final relation types)
-msgctxt "CWEType"
 msgid "add_permission"
-msgstr ""
+msgstr "Autorización para agregar"
 
 msgctxt "CWRType"
 msgid "add_permission"
@@ -976,13 +1001,13 @@
 msgid "add_permission_object"
 msgstr ""
 
+msgid "add_permission_object"
+msgstr "tiene la autorización para agregar"
+
 msgctxt "RQLExpression"
 msgid "add_permission_object"
 msgstr ""
 
-msgid "add_permission_object"
-msgstr "tiene la autorización para agregar"
-
 #, python-format
 msgid "added %(etype)s #%(eid)s (%(title)s)"
 msgstr "Agregado %(etype)s #%(eid)s (%(title)s)"
@@ -998,20 +1023,20 @@
 msgid "addrelated"
 msgstr ""
 
+msgctxt "EmailAddress"
+msgid "address"
+msgstr ""
+
 msgid "address"
 msgstr "dirección"
 
 msgctxt "EmailAddress"
-msgid "address"
+msgid "alias"
 msgstr ""
 
 msgid "alias"
 msgstr "alias"
 
-msgctxt "EmailAddress"
-msgid "alias"
-msgstr ""
-
 msgid "allow to set a specific workflow for an entity"
 msgstr ""
 
@@ -1021,13 +1046,13 @@
 msgid "allowed transitions from this state"
 msgstr "transiciones autorizadas desde este estado"
 
+msgctxt "State"
+msgid "allowed_transition"
+msgstr ""
+
 msgid "allowed_transition"
 msgstr "transición autorizada"
 
-msgctxt "State"
-msgid "allowed_transition"
-msgstr ""
-
 msgctxt "BaseTransition"
 msgid "allowed_transition_object"
 msgstr ""
@@ -1214,14 +1239,14 @@
 msgid "by relation"
 msgstr "por relación"
 
-msgid "by_transition"
-msgstr ""
-
 msgctxt "TrInfo"
 msgid "by_transition"
 msgstr ""
 
-msgctxt "BaseTransition"
+msgid "by_transition"
+msgstr ""
+
+msgctxt "WorkflowTransition"
 msgid "by_transition_object"
 msgstr ""
 
@@ -1229,10 +1254,10 @@
 msgid "by_transition_object"
 msgstr ""
 
-msgctxt "WorkflowTransition"
 msgid "by_transition_object"
 msgstr ""
 
+msgctxt "BaseTransition"
 msgid "by_transition_object"
 msgstr ""
 
@@ -1283,16 +1308,16 @@
 msgid "cancel this insert"
 msgstr "Cancelar esta inserción"
 
+msgctxt "CWRelation"
 msgid "cardinality"
-msgstr "cardinalidad"
+msgstr ""
 
 msgctxt "CWAttribute"
 msgid "cardinality"
 msgstr ""
 
-msgctxt "CWRelation"
 msgid "cardinality"
-msgstr ""
+msgstr "cardinalidad"
 
 msgid "category"
 msgstr "categoria"
@@ -1320,13 +1345,13 @@
 msgid "comment"
 msgstr ""
 
+msgctxt "TrInfo"
+msgid "comment_format"
+msgstr ""
+
 msgid "comment_format"
 msgstr "Formato"
 
-msgctxt "TrInfo"
-msgid "comment_format"
-msgstr ""
-
 msgid "components"
 msgstr "Componentes"
 
@@ -1390,13 +1415,13 @@
 msgid "components_rqlinput_description"
 msgstr "La barra de demanda rql, en el encabezado de página"
 
+msgctxt "CWRelation"
+msgid "composite"
+msgstr ""
+
 msgid "composite"
 msgstr "composite"
 
-msgctxt "CWRelation"
-msgid "composite"
-msgstr ""
-
 msgid "condition"
 msgstr "condición"
 
@@ -1425,9 +1450,6 @@
 msgid "confirm password"
 msgstr "Confirmar contraseña"
 
-msgid "constrained_by"
-msgstr "Restricción hecha por"
-
 msgctxt "CWAttribute"
 msgid "constrained_by"
 msgstr ""
@@ -1436,13 +1458,16 @@
 msgid "constrained_by"
 msgstr ""
 
-msgctxt "CWConstraint"
-msgid "constrained_by_object"
-msgstr ""
+msgid "constrained_by"
+msgstr "Restricción hecha por"
 
 msgid "constrained_by_object"
 msgstr "ha restringido"
 
+msgctxt "CWConstraint"
+msgid "constrained_by_object"
+msgstr ""
+
 msgid "constraint factory"
 msgstr "FAbrica de restricciones"
 
@@ -1571,10 +1596,6 @@
 msgid "created_by"
 msgstr "creado por"
 
-msgctxt "CWUser"
-msgid "created_by_object"
-msgstr ""
-
 msgid "created_by_object"
 msgstr "ha creado"
 
@@ -1651,6 +1672,9 @@
 msgid "creating State (State allowed_transition Transition %(linkto)s)"
 msgstr "Creación de un estado que pueda ir hacia la transición %(linkto)s"
 
+msgid "creating State (State state_of Workflow %(linkto)s)"
+msgstr ""
+
 msgid "creating State (Transition %(linkto)s destination_state State)"
 msgstr "Creación de un estado destinación de la transición %(linkto)s"
 
@@ -1665,11 +1689,19 @@
 msgid "creating Transition (Transition destination_state State %(linkto)s)"
 msgstr "Creación de un transición hacia el estado %(linkto)s"
 
+msgid "creating Transition (Transition transition_of Workflow %(linkto)s)"
+msgstr ""
+
 msgid ""
 "creating WorkflowTransition (State %(linkto)s allowed_transition "
 "WorkflowTransition)"
 msgstr ""
 
+msgid ""
+"creating WorkflowTransition (WorkflowTransition transition_of Workflow %"
+"(linkto)s)"
+msgstr ""
+
 msgid "creation"
 msgstr "Creación"
 
@@ -1686,13 +1718,13 @@
 msgid "cstrtype"
 msgstr ""
 
+msgid "cstrtype_object"
+msgstr "utilizado por"
+
 msgctxt "CWConstraintType"
 msgid "cstrtype_object"
 msgstr ""
 
-msgid "cstrtype_object"
-msgstr "utilizado por"
-
 msgid "csv entities export"
 msgstr "Exportar entidades en csv"
 
@@ -1706,14 +1738,6 @@
 msgid "custom_workflow"
 msgstr ""
 
-msgctxt "CWUser"
-msgid "custom_workflow"
-msgstr ""
-
-msgctxt "Workflow"
-msgid "custom_workflow_object"
-msgstr ""
-
 msgid "custom_workflow_object"
 msgstr ""
 
@@ -1773,13 +1797,13 @@
 msgid "default_workflow_object"
 msgstr ""
 
+msgctxt "CWAttribute"
+msgid "defaultval"
+msgstr ""
+
 msgid "defaultval"
 msgstr "Valor por defecto"
 
-msgctxt "CWAttribute"
-msgid "defaultval"
-msgstr ""
-
 msgid "define a CubicWeb user"
 msgstr "Define un usuario CubicWeb"
 
@@ -1847,10 +1871,6 @@
 msgid "delete_permission"
 msgstr ""
 
-msgctxt "CWGroup"
-msgid "delete_permission_object"
-msgstr ""
-
 msgctxt "RQLExpression"
 msgid "delete_permission_object"
 msgstr ""
@@ -1858,6 +1878,10 @@
 msgid "delete_permission_object"
 msgstr "posee la autorización de eliminar"
 
+msgctxt "CWGroup"
+msgid "delete_permission_object"
+msgstr ""
+
 #, python-format
 msgid "deleted %(etype)s #%(eid)s (%(title)s)"
 msgstr "Eliminación de la entidad %(etype)s #%(eid)s (%(title)s)"
@@ -1873,14 +1897,19 @@
 msgid "depends on the constraint type"
 msgstr "Depende del tipo de condición"
 
+msgctxt "State"
 msgid "description"
-msgstr "Descripción"
-
-msgctxt "CWEType"
+msgstr ""
+
+msgctxt "WorkflowTransition"
 msgid "description"
 msgstr ""
 
-msgctxt "CWRelation"
+msgctxt "Transition"
+msgid "description"
+msgstr ""
+
+msgctxt "CWAttribute"
 msgid "description"
 msgstr ""
 
@@ -1888,21 +1917,16 @@
 msgid "description"
 msgstr ""
 
-msgctxt "CWAttribute"
-msgid "description"
-msgstr ""
-
-msgctxt "Transition"
+msgctxt "CWRelation"
 msgid "description"
 msgstr ""
 
-msgctxt "WorkflowTransition"
+msgctxt "CWEType"
 msgid "description"
 msgstr ""
 
-msgctxt "State"
 msgid "description"
-msgstr ""
+msgstr "Descripción"
 
 msgctxt "CWRType"
 msgid "description"
@@ -1912,18 +1936,23 @@
 msgid "description"
 msgstr ""
 
+msgctxt "BaseTransition"
 msgid "description_format"
-msgstr "Formato"
-
-msgctxt "CWEType"
+msgstr ""
+
+msgctxt "CWRType"
 msgid "description_format"
 msgstr ""
 
-msgctxt "CWRelation"
+msgctxt "State"
 msgid "description_format"
 msgstr ""
 
-msgctxt "Workflow"
+msgctxt "WorkflowTransition"
+msgid "description_format"
+msgstr ""
+
+msgctxt "Transition"
 msgid "description_format"
 msgstr ""
 
@@ -1931,25 +1960,20 @@
 msgid "description_format"
 msgstr ""
 
-msgctxt "Transition"
+msgctxt "Workflow"
 msgid "description_format"
 msgstr ""
 
-msgctxt "WorkflowTransition"
-msgid "description_format"
-msgstr ""
-
-msgctxt "State"
+msgctxt "CWRelation"
 msgid "description_format"
 msgstr ""
 
-msgctxt "CWRType"
+msgctxt "CWEType"
 msgid "description_format"
 msgstr ""
 
-msgctxt "BaseTransition"
 msgid "description_format"
-msgstr ""
+msgstr "Formato"
 
 msgid "destination state"
 msgstr ""
@@ -1960,24 +1984,24 @@
 msgid "destination state of a transition"
 msgstr "Estado destino de una transición"
 
+msgctxt "Transition"
+msgid "destination_state"
+msgstr ""
+
 msgid "destination_state"
 msgstr "Estado destino"
 
-msgctxt "Transition"
-msgid "destination_state"
-msgstr ""
-
 msgctxt "SubWorkflowExitPoint"
 msgid "destination_state"
 msgstr ""
 
-msgctxt "State"
-msgid "destination_state_object"
-msgstr ""
-
 msgid "destination_state_object"
 msgstr "Destino de"
 
+msgctxt "State"
+msgid "destination_state_object"
+msgstr ""
+
 msgid "detach attached file"
 msgstr "soltar el archivo existente"
 
@@ -2135,13 +2159,13 @@
 msgid "expected:"
 msgstr "Previsto :"
 
+msgctxt "RQLExpression"
+msgid "expression"
+msgstr ""
+
 msgid "expression"
 msgstr "Expresión"
 
-msgctxt "RQLExpression"
-msgid "expression"
-msgstr ""
-
 msgid "exprtype"
 msgstr "Tipo de la expresión"
 
@@ -2200,34 +2224,34 @@
 msgid "final"
 msgstr "Final"
 
+msgctxt "CWRType"
+msgid "final"
+msgstr ""
+
 msgctxt "CWEType"
 msgid "final"
 msgstr ""
 
-msgctxt "CWRType"
-msgid "final"
+msgctxt "CWUser"
+msgid "firstname"
 msgstr ""
 
 msgid "firstname"
 msgstr "Nombre"
 
-msgctxt "CWUser"
-msgid "firstname"
-msgstr ""
-
 msgid "foaf"
 msgstr "Amigo de un Amigo, FOAF"
 
 msgid "follow"
 msgstr "Seguir la liga"
 
+msgctxt "CWProperty"
+msgid "for_user"
+msgstr ""
+
 msgid "for_user"
 msgstr "Para el usuario"
 
-msgctxt "CWProperty"
-msgid "for_user"
-msgstr ""
-
 msgctxt "CWUser"
 msgid "for_user_object"
 msgstr ""
@@ -2256,23 +2280,23 @@
 msgid "from_entity"
 msgstr ""
 
+msgid "from_entity_object"
+msgstr "Relación sujeto"
+
 msgctxt "CWEType"
 msgid "from_entity_object"
 msgstr ""
 
-msgid "from_entity_object"
-msgstr "Relación sujeto"
-
 msgid "from_interval_start"
 msgstr ""
 
+msgctxt "TrInfo"
+msgid "from_state"
+msgstr ""
+
 msgid "from_state"
 msgstr "De el estado"
 
-msgctxt "TrInfo"
-msgid "from_state"
-msgstr ""
-
 msgctxt "State"
 msgid "from_state_object"
 msgstr ""
@@ -2283,20 +2307,20 @@
 msgid "full text or RQL query"
 msgstr "Texto de búsqueda o demanda RQL"
 
+msgctxt "CWRType"
+msgid "fulltext_container"
+msgstr ""
+
 msgid "fulltext_container"
 msgstr "Contenedor de texto indexado"
 
-msgctxt "CWRType"
-msgid "fulltext_container"
+msgctxt "CWAttribute"
+msgid "fulltextindexed"
 msgstr ""
 
 msgid "fulltextindexed"
 msgstr "Indexación de texto"
 
-msgctxt "CWAttribute"
-msgid "fulltextindexed"
-msgstr ""
-
 msgid "generic plot"
 msgstr "Trazado de curbas estándares"
 
@@ -2422,94 +2446,6 @@
 msgid "identity"
 msgstr "es idéntico a"
 
-msgctxt "CWRelation"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "Bookmark"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWAttribute"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWConstraintType"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "State"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "BaseTransition"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWEType"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "Workflow"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWGroup"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "TrInfo"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWConstraint"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWUser"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "Transition"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWRType"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "SubWorkflowExitPoint"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "ExternalUri"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWCache"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "WorkflowTransition"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "RQLExpression"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWPermission"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "EmailAddress"
-msgid "identity_object"
-msgstr ""
-
-msgctxt "CWProperty"
-msgid "identity_object"
-msgstr ""
-
 msgid "identity_object"
 msgstr "es idéntico a"
 
@@ -2529,31 +2465,23 @@
 msgid "in memory relation schema"
 msgstr "Esquema de la relación en memoria"
 
+msgctxt "CWUser"
+msgid "in_group"
+msgstr ""
+
 msgid "in_group"
 msgstr "En el grupo"
 
-msgctxt "CWUser"
-msgid "in_group"
-msgstr ""
+msgid "in_group_object"
+msgstr "Miembros"
 
 msgctxt "CWGroup"
 msgid "in_group_object"
 msgstr ""
 
-msgid "in_group_object"
-msgstr "Miembros"
-
 msgid "in_state"
 msgstr "estado"
 
-msgctxt "CWUser"
-msgid "in_state"
-msgstr ""
-
-msgctxt "State"
-msgid "in_state_object"
-msgstr ""
-
 msgid "in_state_object"
 msgstr "estado de"
 
@@ -2570,13 +2498,13 @@
 msgid "index this attribute's value in the plain text index"
 msgstr "Indexar el valor de este atributo en el índice de texto simple"
 
+msgctxt "CWAttribute"
+msgid "indexed"
+msgstr ""
+
 msgid "indexed"
 msgstr "Indexado"
 
-msgctxt "CWAttribute"
-msgid "indexed"
-msgstr ""
-
 msgid "indicate the current state of an entity"
 msgstr "Indica el estado actual de una entidad"
 
@@ -2603,20 +2531,20 @@
 msgid "initial_state"
 msgstr ""
 
+msgid "initial_state_object"
+msgstr "es el estado inicial de"
+
 msgctxt "State"
 msgid "initial_state_object"
 msgstr ""
 
-msgid "initial_state_object"
-msgstr "es el estado inicial de"
+msgctxt "CWRType"
+msgid "inlined"
+msgstr ""
 
 msgid "inlined"
 msgstr "Puesto en línea"
 
-msgctxt "CWRType"
-msgid "inlined"
-msgstr ""
-
 msgid "instance schema"
 msgstr ""
 
@@ -2669,17 +2597,9 @@
 msgid "is_instance_of"
 msgstr "es una instancia de"
 
-msgctxt "CWEType"
-msgid "is_instance_of_object"
-msgstr ""
-
 msgid "is_instance_of_object"
 msgstr "tiene como instancias"
 
-msgctxt "CWEType"
-msgid "is_object"
-msgstr ""
-
 msgid "is_object"
 msgstr "tiene por instancia"
 
@@ -2705,13 +2625,13 @@
 msgid "last connection date"
 msgstr "Ultima fecha de conexión"
 
+msgctxt "CWUser"
+msgid "last_login_time"
+msgstr ""
+
 msgid "last_login_time"
 msgstr "Ultima fecha de conexión"
 
-msgctxt "CWUser"
-msgid "last_login_time"
-msgstr ""
-
 msgid "latest modification time of an entity"
 msgstr "Fecha de la última modificación de una entidad "
 
@@ -2860,26 +2780,7 @@
 msgid "my custom search"
 msgstr "Mi busqueda personalizada"
 
-msgid "name"
-msgstr "Nombre"
-
-msgctxt "CWEType"
-msgid "name"
-msgstr ""
-
-msgctxt "Transition"
-msgid "name"
-msgstr ""
-
-msgctxt "Workflow"
-msgid "name"
-msgstr ""
-
-msgctxt "CWGroup"
-msgid "name"
-msgstr ""
-
-msgctxt "CWConstraintType"
+msgctxt "CWRType"
 msgid "name"
 msgstr ""
 
@@ -2891,11 +2792,10 @@
 msgid "name"
 msgstr ""
 
-msgctxt "CWPermission"
 msgid "name"
-msgstr ""
-
-msgctxt "CWRType"
+msgstr "Nombre"
+
+msgctxt "CWGroup"
 msgid "name"
 msgstr ""
 
@@ -2903,10 +2803,30 @@
 msgid "name"
 msgstr ""
 
+msgctxt "Workflow"
+msgid "name"
+msgstr ""
+
 msgctxt "CWCache"
 msgid "name"
 msgstr ""
 
+msgctxt "CWConstraintType"
+msgid "name"
+msgstr ""
+
+msgctxt "Transition"
+msgid "name"
+msgstr ""
+
+msgctxt "CWEType"
+msgid "name"
+msgstr ""
+
+msgctxt "CWPermission"
+msgid "name"
+msgstr ""
+
 msgid "name of the cache"
 msgstr "Nombre del Cache"
 
@@ -3015,9 +2935,6 @@
 msgid "order"
 msgstr "orden"
 
-msgid "ordernum"
-msgstr "orden"
-
 msgctxt "CWAttribute"
 msgid "ordernum"
 msgstr ""
@@ -3026,6 +2943,9 @@
 msgid "ordernum"
 msgstr ""
 
+msgid "ordernum"
+msgstr "orden"
+
 msgid "owl"
 msgstr "owl"
 
@@ -3035,10 +2955,6 @@
 msgid "owned_by"
 msgstr "pertenece a"
 
-msgctxt "CWUser"
-msgid "owned_by_object"
-msgstr ""
-
 msgid "owned_by_object"
 msgstr "pertenece al objeto"
 
@@ -3085,13 +3001,13 @@
 msgid "pick existing bookmarks"
 msgstr "Seleccione los favoritos existentes"
 
+msgctxt "CWProperty"
+msgid "pkey"
+msgstr ""
+
 msgid "pkey"
 msgstr "pkey"
 
-msgctxt "CWProperty"
-msgid "pkey"
-msgstr ""
-
 msgid "please correct errors below"
 msgstr "Favor de corregir errores"
 
@@ -3104,10 +3020,10 @@
 msgid "powered by CubicWeb"
 msgstr ""
 
+msgctxt "EmailAddress"
 msgid "prefered_form"
 msgstr ""
 
-msgctxt "EmailAddress"
 msgid "prefered_form"
 msgstr ""
 
@@ -3134,13 +3050,13 @@
 msgid "primary_email"
 msgstr ""
 
+msgid "primary_email_object"
+msgstr "Dirección de email principal (objeto)"
+
 msgctxt "EmailAddress"
 msgid "primary_email_object"
 msgstr ""
 
-msgid "primary_email_object"
-msgstr "Dirección de email principal (objeto)"
-
 msgid "progress"
 msgstr "Avance"
 
@@ -3167,6 +3083,9 @@
 msgid "read_permission"
 msgstr ""
 
+msgid "read_permission_object"
+msgstr "Objeto_permiso_lectura"
+
 msgctxt "CWGroup"
 msgid "read_permission_object"
 msgstr ""
@@ -3175,9 +3094,6 @@
 msgid "read_permission_object"
 msgstr ""
 
-msgid "read_permission_object"
-msgstr "Objeto_permiso_lectura"
-
 msgid "registry"
 msgstr ""
 
@@ -3194,11 +3110,11 @@
 msgid "relation_type"
 msgstr "tipo de relación"
 
-msgctxt "CWAttribute"
+msgctxt "CWRelation"
 msgid "relation_type"
 msgstr ""
 
-msgctxt "CWRelation"
+msgctxt "CWAttribute"
 msgid "relation_type"
 msgstr ""
 
@@ -3218,22 +3134,26 @@
 msgid "relative url of the bookmarked page"
 msgstr "Url relativa de la pagina"
 
-msgctxt "inlined:CWRelation:from_entity:subject"
+msgctxt "inlined:CWRelation.to_entity.subject"
 msgid "remove this CWEType"
 msgstr ""
 
-msgctxt "inlined:CWRelation:to_entity:subject"
+msgctxt "inlined:CWRelation.from_entity.subject"
 msgid "remove this CWEType"
 msgstr ""
 
-msgctxt "inlined:CWRelation:relation_type:subject"
+msgctxt "inlined:CWRelation.relation_type.subject"
 msgid "remove this CWRType"
 msgstr ""
 
-msgctxt "inlined:CWUser:use_email:subject"
+msgctxt "inlined:CWUser.use_email.subject"
 msgid "remove this EmailAddress"
 msgstr ""
 
+msgctxt "WorkflowTransition"
+msgid "require_group"
+msgstr ""
+
 msgid "require_group"
 msgstr "Requiere grupo"
 
@@ -3241,15 +3161,11 @@
 msgid "require_group"
 msgstr ""
 
-msgctxt "Transition"
-msgid "require_group"
-msgstr ""
-
 msgctxt "CWPermission"
 msgid "require_group"
 msgstr ""
 
-msgctxt "WorkflowTransition"
+msgctxt "Transition"
 msgid "require_group"
 msgstr ""
 
@@ -3478,20 +3394,20 @@
 "workflow for this entity first."
 msgstr ""
 
+msgctxt "State"
+msgid "state_of"
+msgstr ""
+
 msgid "state_of"
 msgstr "estado_de"
 
-msgctxt "State"
-msgid "state_of"
-msgstr ""
+msgid "state_of_object"
+msgstr "objeto_estado_de"
 
 msgctxt "Workflow"
 msgid "state_of_object"
 msgstr ""
 
-msgid "state_of_object"
-msgstr "objeto_estado_de"
-
 msgid "status change"
 msgstr "cambio de estatus"
 
@@ -3511,41 +3427,41 @@
 msgid "subject_plural:"
 msgstr "sujetos:"
 
+msgctxt "WorkflowTransition"
 msgid "subworkflow"
 msgstr ""
 
-msgctxt "WorkflowTransition"
 msgid "subworkflow"
 msgstr ""
 
 msgid "subworkflow state"
 msgstr ""
 
-msgid "subworkflow_exit"
-msgstr ""
-
 msgctxt "WorkflowTransition"
 msgid "subworkflow_exit"
 msgstr ""
 
-msgctxt "SubWorkflowExitPoint"
-msgid "subworkflow_exit_object"
+msgid "subworkflow_exit"
 msgstr ""
 
 msgid "subworkflow_exit_object"
 msgstr ""
 
+msgctxt "SubWorkflowExitPoint"
+msgid "subworkflow_exit_object"
+msgstr ""
+
+msgid "subworkflow_object"
+msgstr ""
+
 msgctxt "Workflow"
 msgid "subworkflow_object"
 msgstr ""
 
-msgid "subworkflow_object"
-msgstr ""
-
+msgctxt "SubWorkflowExitPoint"
 msgid "subworkflow_state"
 msgstr ""
 
-msgctxt "SubWorkflowExitPoint"
 msgid "subworkflow_state"
 msgstr ""
 
@@ -3566,13 +3482,13 @@
 msgid "surname"
 msgstr ""
 
+msgctxt "CWRType"
+msgid "symetric"
+msgstr ""
+
 msgid "symetric"
 msgstr "simetrico"
 
-msgctxt "CWRType"
-msgid "symetric"
-msgstr ""
-
 msgid "system entities"
 msgstr "entidades de sistema"
 
@@ -3638,13 +3554,13 @@
 msgid "timetable"
 msgstr "tabla de tiempos"
 
+msgctxt "Bookmark"
+msgid "title"
+msgstr ""
+
 msgid "title"
 msgstr "titulo"
 
-msgctxt "Bookmark"
-msgid "title"
-msgstr ""
-
 msgid "to"
 msgstr "a"
 
@@ -3655,34 +3571,34 @@
 msgid "to associate with"
 msgstr "a asociar con"
 
+msgctxt "CWRelation"
 msgid "to_entity"
-msgstr "hacia entidad"
+msgstr ""
 
 msgctxt "CWAttribute"
 msgid "to_entity"
 msgstr ""
 
-msgctxt "CWRelation"
 msgid "to_entity"
-msgstr ""
+msgstr "hacia entidad"
+
+msgid "to_entity_object"
+msgstr "hacia entidad objeto"
 
 msgctxt "CWEType"
 msgid "to_entity_object"
 msgstr ""
 
-msgid "to_entity_object"
-msgstr "hacia entidad objeto"
-
 msgid "to_interval_end"
 msgstr ""
 
+msgctxt "TrInfo"
+msgid "to_state"
+msgstr ""
+
 msgid "to_state"
 msgstr "hacia el estado"
 
-msgctxt "TrInfo"
-msgid "to_state"
-msgstr ""
-
 msgctxt "State"
 msgid "to_state_object"
 msgstr ""
@@ -3705,21 +3621,21 @@
 msgid "transition may not be fired"
 msgstr ""
 
+msgctxt "Transition"
+msgid "transition_of"
+msgstr ""
+
 msgid "transition_of"
 msgstr "transicion de"
 
+msgctxt "WorkflowTransition"
+msgid "transition_of"
+msgstr ""
+
 msgctxt "BaseTransition"
 msgid "transition_of"
 msgstr ""
 
-msgctxt "Transition"
-msgid "transition_of"
-msgstr ""
-
-msgctxt "WorkflowTransition"
-msgid "transition_of"
-msgstr ""
-
 msgctxt "Workflow"
 msgid "transition_of_object"
 msgstr ""
@@ -3813,6 +3729,9 @@
 msgid "update_permission"
 msgstr ""
 
+msgid "update_permission_object"
+msgstr "objeto de autorización de modificaciones"
+
 msgctxt "CWGroup"
 msgid "update_permission_object"
 msgstr ""
@@ -3821,17 +3740,14 @@
 msgid "update_permission_object"
 msgstr ""
 
-msgid "update_permission_object"
-msgstr "objeto de autorización de modificaciones"
-
 #, python-format
 msgid "updated %(etype)s #%(eid)s (%(title)s)"
 msgstr "actualización de la entidad %(etype)s #%(eid)s (%(title)s)"
 
+msgctxt "ExternalUri"
 msgid "uri"
 msgstr ""
 
-msgctxt "ExternalUri"
 msgid "uri"
 msgstr ""
 
@@ -3845,13 +3761,13 @@
 "utilizado para definir una transición desde uno o multiples estados hacia "
 "uno o varios estados destino en las definiciones del workflow"
 
+msgctxt "CWUser"
+msgid "use_email"
+msgstr ""
+
 msgid "use_email"
 msgstr "correo electrónico"
 
-msgctxt "CWUser"
-msgid "use_email"
-msgstr ""
-
 msgctxt "EmailAddress"
 msgid "use_email_object"
 msgstr ""
@@ -3911,6 +3827,10 @@
 msgid "validating..."
 msgstr "validando ..."
 
+msgctxt "CWProperty"
+msgid "value"
+msgstr ""
+
 msgid "value"
 msgstr "valor"
 
@@ -3918,10 +3838,6 @@
 msgid "value"
 msgstr ""
 
-msgctxt "CWProperty"
-msgid "value"
-msgstr ""
-
 msgid "value associated to this key is not editable manually"
 msgstr "el valor asociado a este elemento no es editable manualmente"
 
@@ -3968,14 +3884,6 @@
 msgid "wf_info_for"
 msgstr "historial de"
 
-msgctxt "TrInfo"
-msgid "wf_info_for"
-msgstr ""
-
-msgctxt "CWUser"
-msgid "wf_info_for_object"
-msgstr ""
-
 msgid "wf_info_for_object"
 msgstr "historial de transiciones"
 
@@ -4039,9 +3947,6 @@
 #~ msgid "There is no workflow defined for this entity."
 #~ msgstr "No hay workflow para este entidad"
 
-#~ msgid "This %s"
-#~ msgstr "Este %s"
-
 #~ msgid ""
 #~ "You have no access to this view or it's not applyable to current data"
 #~ msgstr "No tiene acceso a esta vista o No es aplicable a los datos actuales"
--- a/i18n/fr.po	Thu Sep 17 15:52:46 2009 +0200
+++ b/i18n/fr.po	Tue Sep 22 12:11:12 2009 +0200
@@ -540,9 +540,17 @@
 msgid "This CWConstraintType"
 msgstr "Ce type de contrainte"
 
+msgctxt "inlined:CWRelation.from_entity.subject"
+msgid "This CWEType"
+msgstr "type d'entité sujet"
+
 msgid "This CWEType"
 msgstr "Ce type d'entité"
 
+msgctxt "inlined:CWRelation.to_entity.subject"
+msgid "This CWEType"
+msgstr "type d'entité objet"
+
 msgid "This CWGroup"
 msgstr "Ce groupe"
 
@@ -555,12 +563,20 @@
 msgid "This CWRType"
 msgstr "Ce type de relation"
 
+msgctxt "inlined:CWRelation.relation_type.subject"
+msgid "This CWRType"
+msgstr "Ce type de relation"
+
 msgid "This CWRelation"
-msgstr "Cette définition de relation non finale"
+msgstr "Cette définition de relation"
 
 msgid "This CWUser"
 msgstr "Cet utilisateur"
 
+msgctxt "inlined:CWUser.use_email.subject"
+msgid "This EmailAddress"
+msgstr "adresse électronique"
+
 msgid "This EmailAddress"
 msgstr "Cette adresse électronique"
 
@@ -911,7 +927,7 @@
 msgstr "utilisateur"
 
 msgid "add CWUser use_email EmailAddress subject"
-msgstr "addresse email"
+msgstr "adresse email"
 
 msgid "add State allowed_transition Transition object"
 msgstr "état en entrée"
@@ -922,6 +938,9 @@
 msgid "add State allowed_transition WorkflowTransition subject"
 msgstr "transition workflow en sortie"
 
+msgid "add State state_of Workflow object"
+msgstr "état"
+
 msgid "add Transition condition RQLExpression subject"
 msgstr "condition"
 
@@ -931,20 +950,26 @@
 msgid "add Transition destination_state State subject"
 msgstr "état de sortie"
 
+msgid "add Transition transition_of Workflow object"
+msgstr "transition"
+
 msgid "add WorkflowTransition condition RQLExpression subject"
 msgstr "condition"
 
 msgid "add WorkflowTransition subworkflow_exit SubWorkflowExitPoint subject"
 msgstr "sortie de sous-workflow"
 
-msgctxt "inlined:CWRelation.from_entity.subject"
-msgid "add a CWEType"
-msgstr "ajouter un type d'entité sujet"
+msgid "add WorkflowTransition transition_of Workflow object"
+msgstr "transition workflow"
 
 msgctxt "inlined:CWRelation.to_entity.subject"
 msgid "add a CWEType"
 msgstr "ajouter un type d'entité objet"
 
+msgctxt "inlined:CWRelation.from_entity.subject"
+msgid "add a CWEType"
+msgstr "ajouter un type d'entité sujet"
+
 msgctxt "inlined:CWRelation.relation_type.subject"
 msgid "add a CWRType"
 msgstr "ajouter un type de relation"
@@ -977,10 +1002,6 @@
 msgid "add_permission"
 msgstr "permission d'ajout"
 
-msgctxt "CWGroup"
-msgid "add_permission_object"
-msgstr "a la permission d'ajouter"
-
 msgctxt "RQLExpression"
 msgid "add_permission_object"
 msgstr "a la permission d'ajouter"
@@ -988,6 +1009,10 @@
 msgid "add_permission_object"
 msgstr "a la permission d'ajouter"
 
+msgctxt "CWGroup"
+msgid "add_permission_object"
+msgstr "a la permission d'ajouter"
+
 #, python-format
 msgid "added %(etype)s #%(eid)s (%(title)s)"
 msgstr "ajout de l'entité %(etype)s #%(eid)s (%(title)s)"
@@ -1010,10 +1035,10 @@
 msgid "address"
 msgstr "adresse électronique"
 
+msgctxt "EmailAddress"
 msgid "alias"
 msgstr "alias"
 
-msgctxt "EmailAddress"
 msgid "alias"
 msgstr "alias"
 
@@ -1027,13 +1052,16 @@
 msgstr "transitions autorisées depuis cet état"
 
 msgid "allowed_transition"
-msgstr "transition autorisée"
+msgstr "transitions autorisées"
 
 msgctxt "State"
 msgid "allowed_transition"
 msgstr "transitions autorisées"
 
-msgctxt "BaseTransition"
+msgid "allowed_transition_object"
+msgstr "états en entrée"
+
+msgctxt "WorkflowTransition"
 msgid "allowed_transition_object"
 msgstr "transition autorisée de"
 
@@ -1041,13 +1069,10 @@
 msgid "allowed_transition_object"
 msgstr "transition autorisée de"
 
-msgctxt "WorkflowTransition"
+msgctxt "BaseTransition"
 msgid "allowed_transition_object"
 msgstr "transition autorisée de"
 
-msgid "allowed_transition_object"
-msgstr "états en entrée"
-
 msgid "am/pm calendar (month)"
 msgstr "calendrier am/pm (mois)"
 
@@ -1061,7 +1086,7 @@
 msgstr "calendrier am/pm (année)"
 
 msgid "an electronic mail address associated to a short alias"
-msgstr "une addresse électronique associée à un alias"
+msgstr "une adresse électronique associée à un alias"
 
 msgid "an error occured"
 msgstr "une erreur est survenue"
@@ -1220,13 +1245,17 @@
 msgid "by relation"
 msgstr "via la relation"
 
-msgid "by_transition"
-msgstr "transition"
-
 msgctxt "TrInfo"
 msgid "by_transition"
 msgstr "transition"
 
+msgid "by_transition"
+msgstr "transition"
+
+msgctxt "WorkflowTransition"
+msgid "by_transition_object"
+msgstr "a pour information"
+
 msgctxt "BaseTransition"
 msgid "by_transition_object"
 msgstr "a pour information"
@@ -1235,10 +1264,6 @@
 msgid "by_transition_object"
 msgstr "a pour information"
 
-msgctxt "WorkflowTransition"
-msgid "by_transition_object"
-msgstr "a pour information"
-
 msgid "by_transition_object"
 msgstr "changement d'états"
 
@@ -1289,6 +1314,10 @@
 msgid "cancel this insert"
 msgstr "annuler cette insertion"
 
+msgctxt "CWRelation"
+msgid "cardinality"
+msgstr "cardinalité"
+
 msgid "cardinality"
 msgstr "cardinalité"
 
@@ -1296,10 +1325,6 @@
 msgid "cardinality"
 msgstr "cardinalité"
 
-msgctxt "CWRelation"
-msgid "cardinality"
-msgstr "cardinalité"
-
 msgid "category"
 msgstr "categorie"
 
@@ -1403,10 +1428,7 @@
 msgid "composite"
 msgstr "composite"
 
-msgid "condition"
-msgstr "condition"
-
-msgctxt "BaseTransition"
+msgctxt "WorkflowTransition"
 msgid "condition"
 msgstr "condition"
 
@@ -1414,17 +1436,20 @@
 msgid "condition"
 msgstr "condition"
 
-msgctxt "WorkflowTransition"
+msgid "condition"
+msgstr "condition"
+
+msgctxt "BaseTransition"
 msgid "condition"
 msgstr "condition"
 
 msgid "condition:"
 msgstr "condition :"
 
-msgctxt "RQLExpression"
 msgid "condition_object"
 msgstr "condition de"
 
+msgctxt "RQLExpression"
 msgid "condition_object"
 msgstr "condition de"
 
@@ -1442,10 +1467,10 @@
 msgid "constrained_by"
 msgstr "contraint par"
 
-msgctxt "CWConstraint"
 msgid "constrained_by_object"
 msgstr "contrainte de"
 
+msgctxt "CWConstraint"
 msgid "constrained_by_object"
 msgstr "contrainte de"
 
@@ -1578,10 +1603,6 @@
 msgid "created_by"
 msgstr "créé par"
 
-msgctxt "CWUser"
-msgid "created_by_object"
-msgstr "a créé"
-
 msgid "created_by_object"
 msgstr "a créé"
 
@@ -1658,6 +1679,9 @@
 msgid "creating State (State allowed_transition Transition %(linkto)s)"
 msgstr "création d'un état pouvant aller vers la transition %(linkto)s"
 
+msgid "creating State (State state_of Workflow %(linkto)s)"
+msgstr "création d'un état du workflow  %(linkto)s"
+
 msgid "creating State (Transition %(linkto)s destination_state State)"
 msgstr "création d'un état destination de la transition %(linkto)s"
 
@@ -1672,11 +1696,19 @@
 msgid "creating Transition (Transition destination_state State %(linkto)s)"
 msgstr "création d'une transition vers l'état %(linkto)s"
 
+msgid "creating Transition (Transition transition_of Workflow %(linkto)s)"
+msgstr "création d'une transition du workflow %(linkto)s"
+
 msgid ""
 "creating WorkflowTransition (State %(linkto)s allowed_transition "
 "WorkflowTransition)"
 msgstr "création d'une transition workflow autorisée depuis l'état %(linkto)s"
 
+msgid ""
+"creating WorkflowTransition (WorkflowTransition transition_of Workflow %"
+"(linkto)s)"
+msgstr "création d'une transition workflow du workflow %(linkto)s"
+
 msgid "creation"
 msgstr "création"
 
@@ -1686,20 +1718,20 @@
 msgid "creation_date"
 msgstr "date de création"
 
-msgid "cstrtype"
-msgstr "type de constrainte"
-
 msgctxt "CWConstraint"
 msgid "cstrtype"
 msgstr "type"
 
+msgid "cstrtype"
+msgstr "type de constrainte"
+
+msgid "cstrtype_object"
+msgstr "utilisé par"
+
 msgctxt "CWConstraintType"
 msgid "cstrtype_object"
 msgstr "type des contraintes"
 
-msgid "cstrtype_object"
-msgstr "utilisé par"
-
 msgid "csv entities export"
 msgstr "export d'entités en CSV"
 
@@ -1713,14 +1745,6 @@
 msgid "custom_workflow"
 msgstr "workflow spécifique"
 
-msgctxt "CWUser"
-msgid "custom_workflow"
-msgstr "workflow spécifique"
-
-msgctxt "Workflow"
-msgid "custom_workflow_object"
-msgstr "workflow spécifique de"
-
 msgid "custom_workflow_object"
 msgstr "workflow de"
 
@@ -1766,17 +1790,17 @@
 msgid "default workflow for an entity type"
 msgstr "workflow par défaut pour un type d'entité"
 
-msgid "default_workflow"
-msgstr "workflow par défaut"
-
 msgctxt "CWEType"
 msgid "default_workflow"
 msgstr "workflow par défaut"
 
-msgctxt "Workflow"
+msgid "default_workflow"
+msgstr "workflow par défaut"
+
 msgid "default_workflow_object"
 msgstr "workflow par défaut de"
 
+msgctxt "Workflow"
 msgid "default_workflow_object"
 msgstr "workflow par défaut de"
 
@@ -1851,25 +1875,25 @@
 msgid "delete_permission"
 msgstr "permission de supprimer"
 
+msgctxt "CWRType"
+msgid "delete_permission"
+msgstr "permission de supprimer"
+
 msgctxt "CWEType"
 msgid "delete_permission"
 msgstr "permission de supprimer"
 
-msgctxt "CWRType"
-msgid "delete_permission"
-msgstr "permission de supprimer"
+msgid "delete_permission_object"
+msgstr "a la permission de supprimer"
+
+msgctxt "RQLExpression"
+msgid "delete_permission_object"
+msgstr "peut supprimer"
 
 msgctxt "CWGroup"
 msgid "delete_permission_object"
 msgstr "peut supprimer"
 
-msgctxt "RQLExpression"
-msgid "delete_permission_object"
-msgstr "peut supprimer"
-
-msgid "delete_permission_object"
-msgstr "a la permission de supprimer"
-
 #, python-format
 msgid "deleted %(etype)s #%(eid)s (%(title)s)"
 msgstr "suppression de l'entité %(etype)s #%(eid)s (%(title)s)"
@@ -1888,11 +1912,7 @@
 msgid "description"
 msgstr "description"
 
-msgctxt "CWEType"
-msgid "description"
-msgstr "description"
-
-msgctxt "CWRelation"
+msgctxt "Transition"
 msgid "description"
 msgstr "description"
 
@@ -1900,11 +1920,7 @@
 msgid "description"
 msgstr "description"
 
-msgctxt "CWAttribute"
-msgid "description"
-msgstr "description"
-
-msgctxt "Transition"
+msgctxt "CWRelation"
 msgid "description"
 msgstr "description"
 
@@ -1916,6 +1932,10 @@
 msgid "description"
 msgstr "description"
 
+msgctxt "CWEType"
+msgid "description"
+msgstr "description"
+
 msgctxt "CWRType"
 msgid "description"
 msgstr "description"
@@ -1924,6 +1944,14 @@
 msgid "description"
 msgstr "description"
 
+msgctxt "CWAttribute"
+msgid "description"
+msgstr "description"
+
+msgctxt "CWRelation"
+msgid "description_format"
+msgstr "format"
+
 msgid "description_format"
 msgstr "format"
 
@@ -1931,10 +1959,6 @@
 msgid "description_format"
 msgstr "format"
 
-msgctxt "CWRelation"
-msgid "description_format"
-msgstr "format"
-
 msgctxt "Workflow"
 msgid "description_format"
 msgstr "format"
@@ -1975,11 +1999,11 @@
 msgid "destination_state"
 msgstr "état de destination"
 
-msgctxt "Transition"
+msgctxt "SubWorkflowExitPoint"
 msgid "destination_state"
 msgstr "état de destination"
 
-msgctxt "SubWorkflowExitPoint"
+msgctxt "Transition"
 msgid "destination_state"
 msgstr "état de destination"
 
@@ -2146,13 +2170,13 @@
 msgid "expected:"
 msgstr "attendu :"
 
-msgid "expression"
-msgstr "expression"
-
 msgctxt "RQLExpression"
 msgid "expression"
 msgstr "rql de l'expression"
 
+msgid "expression"
+msgstr "expression"
+
 msgid "exprtype"
 msgstr "type de l'expression"
 
@@ -2208,10 +2232,10 @@
 msgid "file tree view"
 msgstr "arborescence (fichiers)"
 
+msgctxt "CWEType"
 msgid "final"
 msgstr "final"
 
-msgctxt "CWEType"
 msgid "final"
 msgstr "final"
 
@@ -2219,10 +2243,10 @@
 msgid "final"
 msgstr "final"
 
+msgctxt "CWUser"
 msgid "firstname"
 msgstr "prénom"
 
-msgctxt "CWUser"
 msgid "firstname"
 msgstr "prénom"
 
@@ -2232,13 +2256,13 @@
 msgid "follow"
 msgstr "suivre le lien"
 
-msgid "for_user"
-msgstr "pour l'utilisateur"
-
 msgctxt "CWProperty"
 msgid "for_user"
 msgstr "propriété de l'utilisateur"
 
+msgid "for_user"
+msgstr "pour l'utilisateur"
+
 msgctxt "CWUser"
 msgid "for_user_object"
 msgstr "a pour préférence"
@@ -2294,20 +2318,20 @@
 msgid "full text or RQL query"
 msgstr "texte à rechercher ou requête RQL"
 
-msgid "fulltext_container"
-msgstr "conteneur du texte indexé"
-
 msgctxt "CWRType"
 msgid "fulltext_container"
 msgstr "objet à indexer"
 
-msgid "fulltextindexed"
-msgstr "indexation du texte"
+msgid "fulltext_container"
+msgstr "conteneur du texte indexé"
 
 msgctxt "CWAttribute"
 msgid "fulltextindexed"
 msgstr "texte indexé"
 
+msgid "fulltextindexed"
+msgstr "indexation du texte"
+
 msgid "generic plot"
 msgstr "tracé de courbes standard"
 
@@ -2434,94 +2458,6 @@
 msgid "identity"
 msgstr "est identique à"
 
-msgctxt "CWRelation"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "Bookmark"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWAttribute"
-msgid "identity_object"
-msgstr "est indentique à"
-
-msgctxt "CWConstraintType"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "State"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "BaseTransition"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWEType"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "Workflow"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWGroup"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "TrInfo"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWConstraint"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWUser"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "Transition"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWRType"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "SubWorkflowExitPoint"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "ExternalUri"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWCache"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "WorkflowTransition"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "RQLExpression"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWPermission"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "EmailAddress"
-msgid "identity_object"
-msgstr "est identique à"
-
-msgctxt "CWProperty"
-msgid "identity_object"
-msgstr "est identique à"
-
 msgid "identity_object"
 msgstr "est identique à"
 
@@ -2541,13 +2477,13 @@
 msgid "in memory relation schema"
 msgstr "schéma de la relation en mémoire"
 
-msgid "in_group"
-msgstr "dans le groupe"
-
 msgctxt "CWUser"
 msgid "in_group"
 msgstr "fait partie du groupe"
 
+msgid "in_group"
+msgstr "dans le groupe"
+
 msgctxt "CWGroup"
 msgid "in_group_object"
 msgstr "contient les utilisateurs"
@@ -2558,14 +2494,6 @@
 msgid "in_state"
 msgstr "état"
 
-msgctxt "CWUser"
-msgid "in_state"
-msgstr "dans l'état"
-
-msgctxt "State"
-msgid "in_state_object"
-msgstr "état des entités"
-
 msgid "in_state_object"
 msgstr "état de"
 
@@ -2608,10 +2536,10 @@
 msgid "initial state for this workflow"
 msgstr "état initial pour ce workflow"
 
+msgctxt "Workflow"
 msgid "initial_state"
 msgstr "état initial"
 
-msgctxt "Workflow"
 msgid "initial_state"
 msgstr "état initial"
 
@@ -2682,15 +2610,7 @@
 msgid "is_instance_of"
 msgstr "est une instance de"
 
-msgctxt "CWEType"
 msgid "is_instance_of_object"
-msgstr "type de l'entité"
-
-msgid "is_instance_of_object"
-msgstr "type de"
-
-msgctxt "CWEType"
-msgid "is_object"
 msgstr "type de"
 
 msgid "is_object"
@@ -2805,10 +2725,10 @@
 msgid "main informations"
 msgstr "Informations générales"
 
+msgctxt "RQLExpression"
 msgid "mainvars"
 msgstr "variables principales"
 
-msgctxt "RQLExpression"
 msgid "mainvars"
 msgstr "variables principales"
 
@@ -2873,6 +2793,38 @@
 msgid "my custom search"
 msgstr "ma recherche personnalisée"
 
+msgctxt "CWPermission"
+msgid "name"
+msgstr "nom"
+
+msgctxt "State"
+msgid "name"
+msgstr "nom"
+
+msgctxt "BaseTransition"
+msgid "name"
+msgstr "nom"
+
+msgctxt "CWRType"
+msgid "name"
+msgstr "nom"
+
+msgctxt "CWGroup"
+msgid "name"
+msgstr "nom"
+
+msgctxt "WorkflowTransition"
+msgid "name"
+msgstr "nom"
+
+msgctxt "CWCache"
+msgid "name"
+msgstr "nom"
+
+msgid "name"
+msgstr "nom"
+
+msgctxt "CWConstraintType"
 msgid "name"
 msgstr "nom"
 
@@ -2888,38 +2840,6 @@
 msgid "name"
 msgstr "nom"
 
-msgctxt "CWGroup"
-msgid "name"
-msgstr "nom"
-
-msgctxt "CWConstraintType"
-msgid "name"
-msgstr "nom"
-
-msgctxt "WorkflowTransition"
-msgid "name"
-msgstr "nom"
-
-msgctxt "State"
-msgid "name"
-msgstr "nom"
-
-msgctxt "CWPermission"
-msgid "name"
-msgstr "nom"
-
-msgctxt "CWRType"
-msgid "name"
-msgstr "nom"
-
-msgctxt "BaseTransition"
-msgid "name"
-msgstr "nom"
-
-msgctxt "CWCache"
-msgid "name"
-msgstr "nom"
-
 msgid "name of the cache"
 msgstr "nom du cache applicatif"
 
@@ -3024,16 +2944,16 @@
 msgid "order"
 msgstr "ordre"
 
+msgctxt "CWRelation"
 msgid "ordernum"
-msgstr "ordre"
+msgstr "numéro d'ordre"
 
 msgctxt "CWAttribute"
 msgid "ordernum"
 msgstr "numéro d'ordre"
 
-msgctxt "CWRelation"
 msgid "ordernum"
-msgstr "numéro d'ordre"
+msgstr "ordre"
 
 msgid "owl"
 msgstr "owl"
@@ -3044,10 +2964,6 @@
 msgid "owned_by"
 msgstr "appartient à"
 
-msgctxt "CWUser"
-msgid "owned_by_object"
-msgstr "propriétaire de"
-
 msgid "owned_by_object"
 msgstr "possède"
 
@@ -3096,13 +3012,13 @@
 msgid "pick existing bookmarks"
 msgstr "récupérer des signets existants"
 
-msgid "pkey"
-msgstr "clé"
-
 msgctxt "CWProperty"
 msgid "pkey"
 msgstr "code de la propriété"
 
+msgid "pkey"
+msgstr "clé"
+
 msgid "please correct errors below"
 msgstr "veuillez corriger les erreurs ci-dessous"
 
@@ -3145,13 +3061,13 @@
 msgid "primary_email"
 msgstr "email principal"
 
+msgid "primary_email_object"
+msgstr "adresse email principale (object)"
+
 msgctxt "EmailAddress"
 msgid "primary_email_object"
 msgstr "adresse principale de"
 
-msgid "primary_email_object"
-msgstr "adresse email principale (object)"
-
 msgid "progress"
 msgstr "avancement"
 
@@ -3167,9 +3083,6 @@
 msgid "read_perm"
 msgstr "lecture"
 
-msgid "read_permission"
-msgstr "permission de lire"
-
 msgctxt "CWEType"
 msgid "read_permission"
 msgstr "permission d'ajouter"
@@ -3178,6 +3091,12 @@
 msgid "read_permission"
 msgstr "permission d'ajouter"
 
+msgid "read_permission"
+msgstr "permission de lire"
+
+msgid "read_permission_object"
+msgstr "a la permission de lire"
+
 msgctxt "CWGroup"
 msgid "read_permission_object"
 msgstr "peut lire"
@@ -3186,9 +3105,6 @@
 msgid "read_permission_object"
 msgstr "peut lire"
 
-msgid "read_permission_object"
-msgstr "a la permission de lire"
-
 msgid "registry"
 msgstr "registre"
 
@@ -3213,10 +3129,10 @@
 msgid "relation_type"
 msgstr "type de relation"
 
-msgctxt "CWRType"
 msgid "relation_type_object"
 msgstr "définition"
 
+msgctxt "CWRType"
 msgid "relation_type_object"
 msgstr "définition"
 
@@ -3229,22 +3145,26 @@
 msgid "relative url of the bookmarked page"
 msgstr "url relative de la page"
 
-msgctxt "inlined:CWRelation:from_entity:subject"
+msgctxt "inlined:CWRelation.from_entity.subject"
 msgid "remove this CWEType"
-msgstr "supprimer ce type d'entité"
-
-msgctxt "inlined:CWRelation:to_entity:subject"
+msgstr "supprimer ce sujet de relation"
+
+msgctxt "inlined:CWRelation.to_entity.subject"
 msgid "remove this CWEType"
-msgstr "supprimer ce type d'entité"
-
-msgctxt "inlined:CWRelation:relation_type:subject"
+msgstr "supprimer cet objet de la relation"
+
+msgctxt "inlined:CWRelation.relation_type.subject"
 msgid "remove this CWRType"
-msgstr "supprimer ce type de relation"
-
-msgctxt "inlined:CWUser:use_email:subject"
+msgstr "supprimer cette relation"
+
+msgctxt "inlined:CWUser.use_email.subject"
 msgid "remove this EmailAddress"
 msgstr "supprimer cette adresse électronique"
 
+msgctxt "WorkflowTransition"
+msgid "require_group"
+msgstr "restreinte au groupe"
+
 msgid "require_group"
 msgstr "nécessite le groupe"
 
@@ -3260,10 +3180,6 @@
 msgid "require_group"
 msgstr "restreinte au groupe"
 
-msgctxt "WorkflowTransition"
-msgid "require_group"
-msgstr "restreinte au groupe"
-
 msgctxt "CWGroup"
 msgid "require_group_object"
 msgstr "dé"
@@ -3469,10 +3385,10 @@
 msgid "specializes"
 msgstr "spécialise"
 
-msgctxt "CWEType"
 msgid "specializes_object"
 msgstr "parent de"
 
+msgctxt "CWEType"
 msgid "specializes_object"
 msgstr "parent de"
 
@@ -3495,10 +3411,10 @@
 "l'état n'appartient pas au workflow courant de l'entité. Vous désirez peut-"
 "être spécifier que cette entité doit utiliser ce workflow."
 
+msgctxt "State"
 msgid "state_of"
 msgstr "état de"
 
-msgctxt "State"
 msgid "state_of"
 msgstr "état de"
 
@@ -3554,21 +3470,21 @@
 
 msgctxt "Workflow"
 msgid "subworkflow_object"
-msgstr ""
+msgstr "sous workflow de"
 
 msgid "subworkflow_object"
 msgstr "utilisé par la transition"
 
-msgid "subworkflow_state"
-msgstr "état du sous-workflow"
-
 msgctxt "SubWorkflowExitPoint"
 msgid "subworkflow_state"
 msgstr "état"
 
+msgid "subworkflow_state"
+msgstr "état du sous-workflow"
+
 msgctxt "State"
 msgid "subworkflow_state_object"
-msgstr ""
+msgstr "état de sortie de"
 
 msgid "subworkflow_state_object"
 msgstr "état de sortie de"
@@ -3673,16 +3589,16 @@
 msgid "to associate with"
 msgstr "pour associer à"
 
+msgctxt "CWRelation"
 msgid "to_entity"
-msgstr "vers l'entité"
+msgstr "pour l'entité"
 
 msgctxt "CWAttribute"
 msgid "to_entity"
 msgstr "pour l'entité"
 
-msgctxt "CWRelation"
 msgid "to_entity"
-msgstr "pour l'entité"
+msgstr "vers l'entité"
 
 msgctxt "CWEType"
 msgid "to_entity_object"
@@ -3694,20 +3610,20 @@
 msgid "to_interval_end"
 msgstr "à"
 
-msgid "to_state"
-msgstr "vers l'état"
-
 msgctxt "TrInfo"
 msgid "to_state"
 msgstr "état de destination"
 
+msgid "to_state"
+msgstr "vers l'état"
+
+msgid "to_state_object"
+msgstr "transitions vers cet état"
+
 msgctxt "State"
 msgid "to_state_object"
 msgstr "transition vers cet état"
 
-msgid "to_state_object"
-msgstr "transitions vers cet état"
-
 msgid "todo_by"
 msgstr "à faire par"
 
@@ -3723,9 +3639,6 @@
 msgid "transition may not be fired"
 msgstr "la transition ne peut-être déclenchée"
 
-msgid "transition_of"
-msgstr "transition de"
-
 msgctxt "BaseTransition"
 msgid "transition_of"
 msgstr "transition de"
@@ -3738,6 +3651,9 @@
 msgid "transition_of"
 msgstr "transition de"
 
+msgid "transition_of"
+msgstr "transition de"
+
 msgctxt "Workflow"
 msgid "transition_of_object"
 msgstr "a pour transition"
@@ -3811,10 +3727,10 @@
 msgid "up"
 msgstr "haut"
 
+msgctxt "CWUser"
 msgid "upassword"
 msgstr "mot de passe"
 
-msgctxt "CWUser"
 msgid "upassword"
 msgstr "mot de passe"
 
@@ -3831,25 +3747,25 @@
 msgid "update_permission"
 msgstr "permission de modifier"
 
-msgctxt "CWGroup"
 msgid "update_permission_object"
-msgstr "peut modifier"
+msgstr "à la permission de modifier"
 
 msgctxt "RQLExpression"
 msgid "update_permission_object"
 msgstr "peut modifier"
 
+msgctxt "CWGroup"
 msgid "update_permission_object"
-msgstr "à la permission de modifier"
+msgstr "peut modifier"
 
 #, python-format
 msgid "updated %(etype)s #%(eid)s (%(title)s)"
 msgstr "modification de l'entité %(etype)s #%(eid)s (%(title)s)"
 
+msgctxt "ExternalUri"
 msgid "uri"
 msgstr "uri"
 
-msgctxt "ExternalUri"
 msgid "uri"
 msgstr "uri"
 
@@ -3863,13 +3779,13 @@
 "utiliser dans une définition de processus pour ajouter une transition depuis "
 "un ou plusieurs états vers un état de destination."
 
-msgid "use_email"
-msgstr "adresse électronique"
-
 msgctxt "CWUser"
 msgid "use_email"
 msgstr "utilise l'adresse électronique"
 
+msgid "use_email"
+msgstr "adresse électronique"
+
 msgctxt "EmailAddress"
 msgid "use_email_object"
 msgstr "utilisée par"
@@ -3930,14 +3846,14 @@
 msgid "value"
 msgstr "valeur"
 
+msgctxt "CWProperty"
+msgid "value"
+msgstr "valeur"
+
 msgctxt "CWConstraint"
 msgid "value"
 msgstr "contrainte"
 
-msgctxt "CWProperty"
-msgid "value"
-msgstr "valeur"
-
 msgid "value associated to this key is not editable manually"
 msgstr "la valeur associée à cette clé n'est pas éditable manuellement"
 
@@ -3985,14 +3901,6 @@
 msgid "wf_info_for"
 msgstr "historique de"
 
-msgctxt "TrInfo"
-msgid "wf_info_for"
-msgstr "information de transition"
-
-msgctxt "CWUser"
-msgid "wf_info_for_object"
-msgstr "historique des transitions"
-
 msgid "wf_info_for_object"
 msgstr "historique des transitions"
 
@@ -4021,10 +3929,10 @@
 msgid "workflow to which this transition belongs"
 msgstr "workflow auquel cette transition appartient"
 
+msgctxt "Workflow"
 msgid "workflow_of"
 msgstr "workflow de"
 
-msgctxt "Workflow"
 msgid "workflow_of"
 msgstr "workflow de"
 
@@ -4053,180 +3961,18 @@
 msgid "you should probably delete that property"
 msgstr "vous devriez probablement supprimer cette propriété"
 
-#~ msgid "This %s"
-#~ msgstr "Ce %s"
-
-#~ msgid "add a BaseTransition"
-#~ msgstr "XXX"
-
-#~ msgid "add a Bookmark"
-#~ msgstr "ajouter un signet"
-
-#~ msgid "add a CWAttribute"
-#~ msgstr "ajouter un type de relation"
-
-#~ msgid "add a CWCache"
-#~ msgstr "ajouter un cache applicatif"
-
-#~ msgid "add a CWConstraint"
-#~ msgstr "ajouter une contrainte"
-
-#~ msgid "add a CWConstraintType"
-#~ msgstr "ajouter un type de contrainte"
-
-#~ msgid "add a CWEType"
-#~ msgstr "ajouter un type d'entité"
-
-#~ msgid "add a CWGroup"
-#~ msgstr "ajouter un groupe d'utilisateurs"
-
-#~ msgid "add a CWPermission"
-#~ msgstr "ajouter une permission"
-
-#~ msgid "add a CWProperty"
-#~ msgstr "ajouter une propriété"
-
-#~ msgid "add a CWRType"
-#~ msgstr "ajouter un type de relation"
-
-#~ msgid "add a CWRelation"
-#~ msgstr "ajouter une relation"
-
-#~ msgid "add a CWUser"
-#~ msgstr "ajouter un utilisateur"
-
-#~ msgid "add a EmailAddress"
-#~ msgstr "ajouter une adresse email"
-
-#~ msgid "add a ExternalUri"
-#~ msgstr "ajouter une Uri externe"
-
-#~ msgid "add a RQLExpression"
-#~ msgstr "ajouter une expression rql"
-
-#~ msgid "add a State"
-#~ msgstr "ajouter un état"
-
-#~ msgid "add a SubWorkflowExitPoint"
-#~ msgstr "ajouter une sortie de sous-workflow"
-
-#~ msgid "add a TrInfo"
-#~ msgstr "ajouter une information de transition"
-
-#~ msgid "add a Transition"
-#~ msgstr "ajouter une transition"
-
-#~ msgid "add a Workflow"
-#~ msgstr "ajouter un workflow"
-
-#~ msgid "add a WorkflowTransition"
-#~ msgstr "ajouter une transition workflow"
-
-#~ msgctxt "CWRelation"
-#~ msgid "created_by"
-#~ msgstr "créée par"
-
-#~ msgctxt "Bookmark"
-#~ msgid "created_by"
-#~ msgstr "créé par"
-
-#~ msgctxt "CWAttribute"
-#~ msgid "created_by"
-#~ msgstr "créé par"
-
-#~ msgctxt "CWConstraintType"
-#~ msgid "created_by"
-#~ msgstr "créé par"
-
-#~ msgctxt "RQLExpression"
-#~ msgid "created_by"
-#~ msgstr "créée par"
-
-#~ msgctxt "BaseTransition"
-#~ msgid "created_by"
-#~ msgstr "créée par"
-
-#~ msgctxt "CWEType"
-#~ msgid "created_by"
-#~ msgstr "créé par"
-
-#~ msgctxt "Workflow"
-#~ msgid "created_by"
-#~ msgstr "créé par"
-
-#~ msgctxt "CWGroup"
-#~ msgid "created_by"
-#~ msgstr "créé par"
-
-#~ msgctxt "TrInfo"
-#~ msgid "created_by"
-#~ msgstr "créée par"
-
-#~ msgid "default workflow for this entity type"
-#~ msgstr "workflow par défaut pour un type d'entité"
-
-#~ msgid "remove this BaseTransition"
-#~ msgstr "XXX"
-
-#~ msgid "remove this Bookmark"
-#~ msgstr "supprimer ce signet"
-
-#~ msgid "remove this CWAttribute"
-#~ msgstr "supprimer cet attribut"
-
-#~ msgid "remove this CWCache"
-#~ msgstr "supprimer ce cache applicatif"
-
-#~ msgid "remove this CWConstraint"
-#~ msgstr "supprimer cette contrainte"
-
-#~ msgid "remove this CWConstraintType"
-#~ msgstr "supprimer ce type de contrainte"
-
+#~ msgctxt "inlined:CWRelation:from_entity:subject"
+#~ msgid "remove this CWEType"
+#~ msgstr "supprimer ce type d'entité"
+
+#~ msgctxt "inlined:CWRelation:to_entity:subject"
 #~ msgid "remove this CWEType"
 #~ msgstr "supprimer ce type d'entité"
 
-#~ msgid "remove this CWGroup"
-#~ msgstr "supprimer ce groupe"
-
-#~ msgid "remove this CWPermission"
-#~ msgstr "supprimer cette permission"
-
-#~ msgid "remove this CWProperty"
-#~ msgstr "supprimer cette propriété"
-
+#~ msgctxt "inlined:CWRelation:relation_type:subject"
 #~ msgid "remove this CWRType"
-#~ msgstr "supprimer cette définition de relation"
-
-#~ msgid "remove this CWRelation"
-#~ msgstr "supprimer cette relation"
-
-#~ msgid "remove this CWUser"
-#~ msgstr "supprimer cet utilisateur"
-
+#~ msgstr "supprimer ce type de relation"
+
+#~ msgctxt "inlined:CWUser:use_email:subject"
 #~ msgid "remove this EmailAddress"
-#~ msgstr "supprimer cette adresse email"
-
-#~ msgid "remove this ExternalUri"
-#~ msgstr "supprimer cette Uri externe"
-
-#~ msgid "remove this RQLExpression"
-#~ msgstr "supprimer cette expression rql"
-
-#~ msgid "remove this State"
-#~ msgstr "supprimer cet état"
-
-#~ msgid "remove this SubWorkflowExitPoint"
-#~ msgstr "supprimer ce point de sortie"
-
-#~ msgid "remove this TrInfo"
-#~ msgstr "retirer cette information de transition"
-
-#~ msgid "remove this Transition"
-#~ msgstr "supprimer cette transition"
-
-#~ msgid "remove this Workflow"
-#~ msgstr "supprimer ce workflow"
-
-#~ msgid "remove this WorkflowTransition"
-#~ msgstr "supprimer cette transition workflow"
+#~ msgstr "supprimer cette adresse électronique"
--- a/misc/migration/bootstrapmigration_repository.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/misc/migration/bootstrapmigration_repository.py	Tue Sep 22 12:11:12 2009 +0200
@@ -53,7 +53,7 @@
             {'et': et.eid, 'wf': wf.eid}, 'et', ask_confirm=False)
         rql('SET T transition_of WF WHERE T transition_of ET, ET eid %(et)s, WF eid %(wf)s',
             {'et': et.eid, 'wf': wf.eid}, 'et', ask_confirm=False)
-        rql('SET WF initial_state S WHERE ET initial_state S, S state_of ET, ET eid %(et)s, WF eid %(wf)s',
+        rql('SET WF initial_state S WHERE ET initial_state S, ET eid %(et)s, WF eid %(wf)s',
             {'et': et.eid, 'wf': wf.eid}, 'et', ask_confirm=False)
 
 
--- a/schema.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/schema.py	Tue Sep 22 12:11:12 2009 +0200
@@ -958,9 +958,12 @@
 NEED_PERM_FORMATS = [_('text/cubicweb-page-template')]
 
 @monkeypatch(FormatConstraint)
-def vocabulary(self, entity=None, req=None):
-    if req is None and entity is not None:
+def vocabulary(self, entity=None, form=None):
+    req = None
+    if form is None and entity is not None:
         req = entity.req
+    elif form is not None:
+        req = form.req
     if req is not None and req.user.has_permission(PERM_USE_TEMPLATE_FORMAT):
         return self.regular_formats + tuple(NEED_PERM_FORMATS)
     return self.regular_formats
--- a/schemas/workflow.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/schemas/workflow.py	Tue Sep 22 12:11:12 2009 +0200
@@ -27,7 +27,6 @@
                                   constraints=[RQLConstraint('O final FALSE')])
 
     initial_state = SubjectRelation('State', cardinality='?*',
-                                   # S initial_state O, O state_of S
                                    constraints=[RQLConstraint('O state_of S')],
                                    description=_('initial state for this workflow'))
 
--- a/selectors.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/selectors.py	Tue Sep 22 12:11:12 2009 +0200
@@ -528,12 +528,10 @@
     @lltrace
     def __call__(self, cls, req, rset=None, row=None, col=0, **kwargs):
         try:
-            trname = req.execute('Any XN WHERE X is Transition, X eid %(x)s, X name XN',
-                                 {'x': typed_eid(req.form['treid'])})[0][0]
-        except (KeyError, IndexError):
-            return 0
-        # XXX check this is a transition that apply to the object?
-        if not trname in self.expected:
+            # XXX check this is a transition that apply to the object?
+            if not kwargs['transition'].name in self.expected:
+                return 0
+        except KeyError:
             return 0
         return 1
 
@@ -612,15 +610,15 @@
                 etype = req.form['etype']
             except KeyError:
                 return 0
-        else:
-            # only check this is a known type if etype comes from req.form,
-            # else we want the error to propagate
-            try:
-                etype = req.vreg.case_insensitive_etypes[etype.lower()]
-                req.form['etype'] = etype
-            except KeyError:
-                return 0
-        return self.score_class(req.vreg['etypes'].etype_class(etype), req)
+            else:
+                # only check this is a known type if etype comes from req.form,
+                # else we want the error to propagate
+                try:
+                    etype = cls.vreg.case_insensitive_etypes[etype.lower()]
+                    req.form['etype'] = etype
+                except KeyError:
+                    return 0
+        return self.score_class(cls.vreg['etypes'].etype_class(etype), req)
 
 
 class entity_implements(ImplementsMixIn, EntitySelector):
@@ -670,6 +668,10 @@
         if not (rschema.has_perm(req, self.action)
                 or rschema.has_local_role(self.action)):
             return 0
+        if self.action != 'read':
+            if not (rschema.has_perm(req, 'read')
+                    or rschema.has_local_role('read')):
+                return 0
         score = super(relation_possible, self).__call__(cls, req, *args, **kwargs)
         return score
 
--- a/server/serverctl.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/server/serverctl.py	Tue Sep 22 12:11:12 2009 +0200
@@ -312,7 +312,7 @@
         # postgres specific stuff
         if driver == 'postgres':
             # install plpythonu/plpgsql language if not installed by the cube
-            langs = ('plpgsql',) if sys.platform == 'win32' else ('plpythonu', 'plpgsql') 
+            langs = sys.platform == 'win32' and ('plpgsql',) or ('plpythonu', 'plpgsql')
             for extlang in langs:
                 helper.create_language(cursor, extlang)
         cursor.close()
--- a/server/test/data/migration/postcreate.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/server/test/data/migration/postcreate.py	Tue Sep 22 12:11:12 2009 +0200
@@ -6,18 +6,20 @@
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
 
-todoeid = add_state(u'todo', 'Note', initial=True)
-doneeid = add_state(u'done', 'Note')
-add_transition(u'redoit', 'Note', (doneeid,), todoeid)
-add_transition(u'markasdone', 'Note', (todoeid,), doneeid)
+wf = add_workflow(u'note workflow', 'Note')
+todo = wf.add_state(u'todo', initial=True)
+done = wf.add_state(u'done')
+wf.add_transition(u'redoit', done, todo)
+wf.add_transition(u'markasdone', todo, done)
 checkpoint()
 
-pitetre = add_state(u'pitetre', 'Affaire', initial=True)
-encours = add_state(u'en cours', 'Affaire')
-finie = add_state(u'finie', 'Affaire')
-bennon = add_state(u'ben non', 'Affaire')
-add_transition(u'abort', 'Affaire', (pitetre,), bennon)
-add_transition(u'start', 'Affaire', (pitetre,), encours)
-add_transition(u'end', 'Affaire', (encours,), finie)
+wf = add_workflow(u'affaire workflow', 'Affaire')
+pitetre = wf.add_state(u'pitetre', initial=True)
+encours = wf.add_state(u'en cours')
+finie = wf.add_state(u'finie')
+bennon = wf.add_state(u'ben non')
+wf.add_transition(u'abort', pitetre, bennon)
+wf.add_transition(u'start', pitetre, encours)
+wf.add_transition(u'end', encours, finie)
 checkpoint()
 
--- a/skeleton/__pkginfo__.py.tmpl	Thu Sep 17 15:52:46 2009 +0200
+++ b/skeleton/__pkginfo__.py.tmpl	Tue Sep 22 12:11:12 2009 +0200
@@ -19,8 +19,6 @@
 
 web = 'http://www.cubicweb.org/project/%%s' %% distname
 
-pyversions = ['2.4']
-
 
 from os import listdir as _listdir
 from os.path import join, isdir, exists, dirname
--- a/test/unittest_entity.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/test/unittest_entity.py	Tue Sep 22 12:11:12 2009 +0200
@@ -348,6 +348,18 @@
         e['content'] = u'C&apos;est un exemple s&eacute;rieux'
         self.assertEquals(tidy(e.printable_value('content')),
                           u"C'est un exemple sérieux")
+        e['content'] = u'<div x:foo="bar">ms orifice produces weird html</div>'
+        self.assertEquals(tidy(e.printable_value('content')),
+                          u'<div>ms orifice produces weird html</div>')
+        import tidy as tidymod # apt-get install python-tidy
+        tidy = lambda x: str(tidymod.parseString(x.encode('utf-8'),
+                                                 **{'drop_proprietary_attributes': True,
+                                                    'output_xhtml': True,
+                                                    'show_body_only' : True,
+                                                    'quote-nbsp' : False,
+                                                    'char_encoding' : 'utf8'})).decode('utf-8').strip()
+        self.assertEquals(tidy(e.printable_value('content')),
+                          u'<div>ms orifice produces weird html</div>')
         # make sure valid xhtml is left untouched
         e['content'] = u'<div>R&amp;D<br/></div>'
         self.assertEquals(e.printable_value('content'), e['content'])
--- a/utils.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/utils.py	Tue Sep 22 12:11:12 2009 +0200
@@ -10,15 +10,18 @@
 from logilab.mtconverter import xml_escape
 
 import locale
+import sys
+import decimal
+import datetime as pydatetime
 from md5 import md5
-import sys
-import datetime as pydatetime
 from datetime import datetime, timedelta, date
 from time import time, mktime
 from random import randint, seed
 from calendar import monthrange
 import decimal
 
+import simplejson
+
 # initialize random seed from current time
 seed()
 try:
@@ -116,7 +119,10 @@
 else:
     from uuid import uuid4
     def make_uid(key):
-        return str(key) + str(uuid4())
+        # remove dash, generated uid are used as identifier sometimes (sql table
+        # names at least)
+        return str(key) + str(uuid4()).replace('-', '')
+
 
 def dump_class(cls, clsname):
     """create copy of a class by creating an empty class inheriting
--- a/view.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/view.py	Tue Sep 22 12:11:12 2009 +0200
@@ -313,7 +313,7 @@
             w = self.w
         if row:
             w(u'<div class="row">')
-        if show_label:
+        if show_label and label:
             if tr:
                 label = display_name(self.req, label)
             w(u'<span class="label">%s</span>' % label)
--- a/web/data/cubicweb.css	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/data/cubicweb.css	Tue Sep 22 12:11:12 2009 +0200
@@ -526,6 +526,20 @@
   text-decoration: underline;
 }
 
+/* download box XXX move to its own file? */
+div.downloadBoxTitle{
+ background : #8FBC8F;
+ font-weight: bold;
+}
+
+div.downloadBox{
+ font-weight: bold;
+}
+
+div.downloadBox div.sideBoxBody{
+ background : #EEFED9;
+}
+
 /**************/
 /* navigation */
 /**************/
--- a/web/data/cubicweb.edition.js	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/data/cubicweb.edition.js	Tue Sep 22 12:11:12 2009 +0200
@@ -243,9 +243,9 @@
  * @param ttype : the target (inlined) entity type
  * @param rtype : the relation type between both entities
  */
-function addInlineCreationForm(peid, ttype, rtype, role, insertBefore) {
+function addInlineCreationForm(peid, ttype, rtype, role, i18nctx, insertBefore) {
     insertBefore = insertBefore || getNode('add' + rtype + ':' + peid + 'link').parentNode;
-    var d = asyncRemoteExec('inline_creation_form', peid, ttype, rtype, role);
+    var d = asyncRemoteExec('inline_creation_form', peid, ttype, rtype, role, i18nctx);
     d.addCallback(function (response) {
         var dom = getDomFromResponse(response);
         preprocessAjaxLoad(null, dom);
@@ -254,7 +254,7 @@
         form.insertBefore(insertBefore).slideDown('fast');
         updateInlinedEntitiesCounters(rtype);
         reorderTabindex();
-        form.trigger('inlinedform-added');
+        jQuery(CubicWeb).trigger('inlinedform-added', form);
         // if the inlined form contains a file input, we must force
         // the form enctype to multipart/form-data
         if (form.find('input:file').length) {
@@ -350,11 +350,11 @@
 }
 
 
-function handleFormValidationResponse(formid, onsuccess, onfailure, result) {
+function handleFormValidationResponse(formid, onsuccess, onfailure, result, cbargs) {
     // Success
     if (result[0]) {
 	if (onsuccess) {
-             onsuccess(result, formid);
+             onsuccess(result, formid, cbargs);
 	} else {
 	    document.location.href = result[1];
 	}
@@ -374,7 +374,7 @@
     updateMessage(_('please correct errors below'));
     document.location.hash = '#header';
     if (onfailure) {
-	onfailure(formid);
+	onfailure(formid, cbargs);
     }
     return false;
 }
@@ -481,10 +481,10 @@
 	return false;
     }
     d.addCallback(function (result, req) {
-        handleFormValidationResponse(divid+'-form', noop, noop, result);
-	if (reload) {
+        if (handleFormValidationResponse(divid+'-form', noop, noop, result)) {
+          if (reload) {
 	    document.location.href = result[1].split('?')[0];
-	} else {
+	  } else {
 	    var fieldview = getNode('value-' + divid);
 	    // XXX using innerHTML is very fragile and won't work if
 	    // we mix XHTML and HTML
@@ -494,7 +494,8 @@
 		// hide global error messages
 		hideInlineEdit(eid, rtype, divid);
 	    }
-	}
+	  }
+        }
 	return false;
     });
     return false;
--- a/web/facet.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/facet.py	Tue Sep 22 12:11:12 2009 +0200
@@ -176,7 +176,15 @@
 
 def insert_attr_select_relation(rqlst, mainvar, rtype, role, attrname,
                                 sortfuncname=None, sortasc=True):
-    """modify a syntax tree to retrieve only relevant attribute `attr` of `var`"""
+    """modify a syntax tree to :
+    * link a new variable to `mainvar` through `rtype` (where mainvar has `role`)
+    * retrieve only the newly inserted variable and its `attrname`
+
+    Sorting:
+    * on `attrname` ascendant (`sortasc`=True) or descendant (`sortasc`=False)
+    * on `sortfuncname`(`attrname`) if `sortfuncname` is specified
+    * no sort if `sortasc` is None
+    """
     _cleanup_rqlst(rqlst, mainvar)
     var = _prepare_vocabulary_rqlst(rqlst, mainvar, rtype, role)
     # not found, create one
@@ -186,7 +194,8 @@
     if rqlst.groupby:
         if not attrvar in rqlst.groupby:
             rqlst.add_group_var(attrvar)
-    _set_orderby(rqlst, attrvar, sortasc, sortfuncname)
+    if sortasc is not None:
+        _set_orderby(rqlst, attrvar, sortasc, sortfuncname)
     # add attribute variable to selection
     rqlst.add_selected(attrvar)
     # add is restriction if necessary
@@ -346,6 +355,8 @@
     sortfunc = None
     # ascendant/descendant sorting
     sortasc = True
+    # if you want to call a view on the entity instead of using `target_attr`
+    label_vid = None
 
     @property
     def title(self):
@@ -356,10 +367,14 @@
         """
         rqlst = self.rqlst
         rqlst.save_state()
+        if self.label_vid is not None and self.sortfunc is None:
+            sort = None # will be sorted on label
+        else:
+            sort = self.sortasc
         try:
             mainvar = self.filtered_variable
             insert_attr_select_relation(rqlst, mainvar, self.rtype, self.role,
-                                        self.target_attr, self.sortfunc, self.sortasc)
+                                        self.target_attr, self.sortfunc, sort)
             try:
                 rset = self.rqlexec(rqlst.as_string(), self.rset.args, self.rset.cachekey)
             except:
@@ -384,8 +399,14 @@
             rqlst.recover()
 
     def rset_vocabulary(self, rset):
-        _ = self.req._
-        return [(_(label), eid) for eid, label in rset]
+        if self.label_vid is None:
+            _ = self.req._
+            return [(_(label), eid) for eid, label in rset]
+        if self.sortfunc is None:
+            return sorted((entity.view(self.label_vid), entity.eid)
+                          for entity in rset.entities())
+        return [(entity.view(self.label_vid), entity.eid)
+                for entity in rset.entities()]
 
     @cached
     def support_and(self):
@@ -531,6 +552,7 @@
                                             self.formatvalue(supvalue),
                                             self.attrtype, '<=')
 
+
 class DateRangeFacet(RangeFacet):
     attrtype = 'Date' # only date types are supported
 
@@ -571,6 +593,7 @@
         else:
             self.rqlst.add_relation(var, self.rtype, self.filtered_variable)
 
+
 ## html widets ################################################################
 
 class FacetVocabularyWidget(HTMLWidget):
@@ -656,7 +679,7 @@
         facet = self.facet
         facet.req.add_js('ui.slider.js')
         facet.req.add_css('ui.all.css')
-        sliderid = make_uid('the slider')
+        sliderid = make_uid('theslider')
         facetid = xml_escape(self.facet.id)
         facet.req.html_headers.add_onload(self.onload % {
             'sliderid': sliderid,
@@ -722,6 +745,7 @@
         self.w(u'<a href="javascript: {}">%s</a>' % xml_escape(self.label))
         self.w(u'</div>')
 
+
 class CheckBoxFacetWidget(HTMLWidget):
     selected_img = "black-check.png"
     unselected_img = "black-uncheck.png"
@@ -753,6 +777,7 @@
         self.w(u'</div>\n')
         self.w(u'</div>\n')
 
+
 class FacetSeparator(HTMLWidget):
     def __init__(self, label=None):
         self.label = label or u'&#160;'
--- a/web/formfields.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/formfields.py	Tue Sep 22 12:11:12 2009 +0200
@@ -22,6 +22,22 @@
     Radio, Select, DateTimePicker)
 
 
+def vocab_sort(vocab):
+    """sort vocabulary, considering option groups"""
+    result = []
+    partresult = []
+    for label, value in vocab:
+        if value is None: # opt group start
+            if partresult:
+                result += sorted(partresult)
+                partresult = []
+            result.append( (label, value) )
+        else:
+            partresult.append( (label, value) )
+    result += sorted(partresult)
+    return result
+
+
 class Field(object):
     """field class is introduced to control what's displayed in forms. It makes
     the link between something to edit and its display in the form. Actual
@@ -189,7 +205,7 @@
         if self.internationalizable:
             vocab = [(form.req._(label), value) for label, value in vocab]
         if self.sort:
-            vocab = sorted(vocab)
+            vocab = vocab_sort(vocab)
         return vocab
 
     def form_init(self, form):
@@ -267,7 +283,7 @@
                 # else we want a format selector
                 fkwargs['widget'] = Select()
                 fcstr = FormatConstraint()
-                fkwargs['choices'] = fcstr.vocabulary(req=req)
+                fkwargs['choices'] = fcstr.vocabulary(form=form)
                 fkwargs['internationalizable'] = True
                 fkwargs['initial'] = lambda f: f.form_field_format(self)
             field = StringField(name=self.name + '_format', **fkwargs)
@@ -474,7 +490,7 @@
             relatedvocab = []
         vocab = res + form.form_field_vocabulary(self) + relatedvocab
         if self.sort:
-            vocab = sorted(vocab)
+            vocab = vocab_sort(vocab)
         return vocab
 
     def format_single_value(self, req, value):
@@ -513,7 +529,10 @@
         help = rschema.rproperty(targetschema, eschema, 'description')
     kwargs['required'] = card in '1+'
     kwargs['name'] = rschema.type
-    kwargs['label'] = (eschema.type, rschema.type)
+    if role == 'object':
+        kwargs['label'] = (eschema.type + '_object', rschema.type)
+    else:
+        kwargs['label'] = (eschema.type, rschema.type)
     kwargs.setdefault('help', help)
     if rschema.is_final():
         if skip_meta_attr and rschema in eschema.meta_attributes():
--- a/web/test/unittest_formfields.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/test/unittest_formfields.py	Tue Sep 22 12:11:12 2009 +0200
@@ -128,5 +128,16 @@
         self.commit()
         self.assertEquals(description_format_field.initial(form), 'text/rest')
 
+
+class UtilsTC(TestCase):
+    def test_vocab_sort(self):
+        self.assertEquals(vocab_sort([('Z', 1), ('A', 2),
+                                      ('Group 1', None), ('Y', 3), ('B', 4),
+                                      ('Group 2', None), ('X', 5), ('C', 6)]),
+                          [('A', 2), ('Z', 1),
+                           ('Group 1', None), ('B', 4), ('Y', 3),
+                           ('Group 2', None), ('C', 6), ('X', 5)]
+                          )
+
 if __name__ == '__main__':
     unittest_main()
--- a/web/test/unittest_magicsearch.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/test/unittest_magicsearch.py	Tue Sep 22 12:11:12 2009 +0200
@@ -27,9 +27,12 @@
     u'address' : u"adresse",
     u'use_email' : u"adel",
     }
+
 def _translate(msgid):
     return translations.get(msgid, msgid)
 
+def _ctxtranslate(ctx, msgid):
+    return _translate(msgid)
 
 from cubicweb.web.views.magicsearch import translate_rql_tree, QSPreProcessor, QueryTranslator
 
@@ -39,7 +42,7 @@
     def setUp(self):
         super(QueryTranslatorTC, self).setUp()
         self.req = self.request()
-        self.vreg.config.translations = {'en': _translate}
+        self.vreg.config.translations = {'en': (_translate, _ctxtranslate)}
         proc = self.vreg['components'].select('magicsearch', self.req)
         self.proc = [p for p in proc.processors if isinstance(p, QueryTranslator)][0]
 
@@ -63,7 +66,7 @@
     """test suite for QSPreProcessor"""
     def setUp(self):
         super(QSPreProcessorTC, self).setUp()
-        self.vreg.config.translations = {'en': _translate}
+        self.vreg.config.translations = {'en': (_translate, _ctxtranslate)}
         self.req = self.request()
         proc = self.vreg['components'].select('magicsearch', self.req)
         self.proc = [p for p in proc.processors if isinstance(p, QSPreProcessor)][0]
@@ -179,7 +182,7 @@
 
     def setUp(self):
         super(ProcessorChainTC, self).setUp()
-        self.vreg.config.translations = {'en': _translate}
+        self.vreg.config.translations = {'en': (_translate, _ctxtranslate)}
         self.req = self.request()
         self.proc = self.vreg['components'].select('magicsearch', self.req)
 
--- a/web/test/unittest_views_editforms.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/test/unittest_views_editforms.py	Tue Sep 22 12:11:12 2009 +0200
@@ -151,11 +151,13 @@
     def test_automatic_inline_edit_formview(self):
         geid = self.execute('CWGroup X LIMIT 1')[0][0]
         rset = self.execute('CWUser X LIMIT 1')
-        self.view('inline-edition', rset, row=0, rtype='in_group', peid=geid, template=None).source
+        self.view('inline-edition', rset, row=0, col=0, rtype='in_group',
+                  peid=geid, role='subject', template=None, i18nctx='').source
 
     def test_automatic_inline_creation_formview(self):
         geid = self.execute('CWGroup X LIMIT 1')[0][0]
-        self.view('inline-creation', None, etype='CWUser', rtype='in_group', peid=geid, template=None).source
+        self.view('inline-creation', None, etype='CWUser', rtype='in_group',
+                  peid=geid, template=None, i18nctx='', role='subject').source
 
 
 if __name__ == '__main__':
--- a/web/uicfg.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/uicfg.py	Tue Sep 22 12:11:12 2009 +0200
@@ -180,7 +180,8 @@
 
 def init_autoform_section(rtag, sschema, rschema, oschema, role):
     if rtag.get(sschema, rschema, oschema, role) is None:
-        if autoform_is_inlined.get(sschema, rschema, oschema, role):
+        if autoform_is_inlined.get(sschema, rschema, oschema, role) or \
+               autoform_is_inlined.get(sschema, rschema, oschema, neg_role(role)):
             section = 'generated'
         elif sschema.is_metadata(rschema):
             section = 'metadata'
--- a/web/views/autoform.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/autoform.py	Tue Sep 22 12:11:12 2009 +0200
@@ -46,6 +46,8 @@
     rinlined = uicfg.autoform_is_inlined
     rpermissions_overrides = uicfg.autoform_permissions_overrides
 
+    # class methods mapping schema relations to fields in the form ############
+
     @classmethod
     def erelations_by_category(cls, entity, categories=None, permission=None,
                                rtags=None, strict=False):
@@ -158,6 +160,8 @@
                 raise
             return field
 
+    # base automatic entity form methods #######################################
+
     def __init__(self, *args, **kwargs):
         super(AutomaticEntityForm, self).__init__(*args, **kwargs)
         entity = self.edited_entity
@@ -185,6 +189,51 @@
             return None
         return self.maxrelitems + 1
 
+    @property
+    def form_needs_multipart(self):
+        """true if the form needs enctype=multipart/form-data"""
+        if super(AutomaticEntityForm, self).form_needs_multipart:
+            return True
+        # take a look at inlined forms to check (recursively) if they
+        # need multipart handling.
+        # XXX: this is very suboptimal because inlined forms will be
+        #      selected / instantiated twice : here and during form rendering.
+        #      Potential solutions:
+        #       -> use subforms for inlined forms to get easiser access
+        #       -> use a simple onload js function to check if there is
+        #          a input type=file in the form
+        #       -> generate the <form> node when the content is rendered
+        #          and we know the correct enctype (formrenderer's w attribute
+        #          is not a StringIO)
+        for rschema, targettypes, role in self.inlined_relations():
+            # inlined forms don't handle multiple target types
+            if len(targettypes) != 1:
+                continue
+            targettype = targettypes[0]
+            if self.should_inline_relation_form(rschema, targettype, role):
+                entity = self.vreg['etypes'].etype_class(targettype)(self.req)
+                subform = self.vreg['forms'].select('edition', self.req, entity=entity)
+                if subform.form_needs_multipart:
+                    return True
+        return False
+
+    def action(self):
+        """return the form's action attribute. Default to validateform if not
+        explicitly overriden.
+        """
+        try:
+            return self._action
+        except AttributeError:
+            return self.build_url('validateform')
+
+    def set_action(self, value):
+        """override default action"""
+        self._action = value
+
+    action = property(action, set_action)
+
+    # methods mapping edited entity relations to fields in the form ############
+
     def relations_by_category(self, categories=None, permission=None):
         """return a list of (relation schema, target schemas, role) matching
         given category(ies) and permission
@@ -211,26 +260,13 @@
         return self.esrelations_by_category(self.edited_entity, categories,
                                            permission, strict=strict)
 
-    def action(self):
-        """return the form's action attribute. Default to validateform if not
-        explicitly overriden.
-        """
-        try:
-            return self._action
-        except AttributeError:
-            return self.build_url('validateform')
-
-    def set_action(self, value):
-        """override default action"""
-        self._action = value
-
-    action = property(action, set_action)
-
     def editable_attributes(self):
         """return a list of (relation schema, role) to edit for the entity"""
         return [(rschema, role) for rschema, _, role in self.relations_by_category(
                 self.attrcategories, 'add') if rschema != 'eid']
 
+    # generic relations modifier ###############################################
+
     def relations_table(self):
         """yiels 3-tuples (rtype, target, related_list)
         where <related_list> itself a list of :
@@ -287,13 +323,33 @@
                 eview = '%s (%s)' % (eview, display_name(self.req, 'Basket'))
             yield rtype, pendingid, jscall, label, reid, eview
 
-    # should_* method extracted to allow overriding
+    # inlined forms support ####################################################
 
     def should_inline_relation_form(self, rschema, targettype, role):
         """return true if the given relation with entity has role and a
         targettype target should be inlined
         """
-        return self.rinlined.etype_get(self.edited_entity.id, rschema, role, targettype)
+        return self.rinlined.etype_get(self.edited_entity.id, rschema, role,
+                                       targettype)
+
+    def display_inline_edition_form(self, w, rschema, targettype, role,
+                                     i18nctx):
+        """display inline forms for already related entities.
+
+        Return True if some inlined form are actually displayed
+        """
+        existant = False
+        entity = self.edited_entity
+        related = entity.has_eid() and entity.related(rschema, role)
+        if related:
+            # display inline-edition view for all existing related entities
+            for i, relentity in enumerate(related.entities()):
+                if relentity.has_perm('update'):
+                    w(self.view('inline-edition', related, row=i, col=0,
+                                rtype=rschema, role=role, ptype=entity.e_schema,
+                                peid=entity.eid, i18nctx=i18nctx))
+                    existant = True
+        return existant
 
     def should_display_inline_creation_form(self, rschema, existant, card):
         """return true if a creation form should be inlined
@@ -302,6 +358,17 @@
         """
         return not existant and card in '1+' or self.req.form.has_key('force_%s_display' % rschema)
 
+    def display_inline_creation_form(self, w, rschema, targettype, role,
+                                     i18nctx):
+        """display inline forms to a newly related (hence created) entity.
+
+        Return True if some inlined form are actually displayed
+        """
+        entity = self.edited_entity
+        w(self.view('inline-creation', None, etype=targettype,
+                    peid=entity.eid, ptype=entity.e_schema,
+                    rtype=rschema, role=role, i18nctx=i18nctx))
+
     def should_display_add_new_relation_link(self, rschema, existant, card):
         """return true if we should add a link to add a new creation form
         (through ajax call)
@@ -311,6 +378,14 @@
         """
         return not existant or card in '+*'
 
+    def should_hide_add_new_relation_link(self, rschema, card):
+        """return true if once an inlined creation form is added, the 'add new'
+        link should be hidden
+
+        by default true if the relation has single cardinality
+        """
+        return card in '1?'
+
 
 def etype_relation_field(etype, rtype, role='subject'):
     eschema = AutomaticEntityForm.schema.eschema(etype)
--- a/web/views/basecontrollers.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/basecontrollers.py	Tue Sep 22 12:11:12 2009 +0200
@@ -213,12 +213,13 @@
     def response(self, domid, status, args, entity):
         callback = str(self.req.form.get('__onsuccess', 'null'))
         errback = str(self.req.form.get('__onfailure', 'null'))
+        cbargs = str(self.req.form.get('__cbargs', 'null'))
         self.req.set_content_type('text/html')
         jsargs = simplejson.dumps((status, args, entity), cls=CubicWebJsonEncoder)
         return """<script type="text/javascript">
  wp = window.parent;
- window.parent.handleFormValidationResponse('%s', %s, %s, %s);
-</script>""" %  (domid, callback, errback, jsargs)
+ window.parent.handleFormValidationResponse('%s', %s, %s, %s, %s);
+</script>""" %  (domid, callback, errback, jsargs, cbargs)
 
     def publish(self, rset=None):
         self.req.json_request = True
@@ -376,12 +377,12 @@
 
     @check_pageid
     @xhtmlize
-    def js_inline_creation_form(self, peid, ttype, rtype, role):
+    def js_inline_creation_form(self, peid, ttype, rtype, role, i18nctx):
         view = self.vreg['views'].select('inline-creation', self.req,
                                          etype=ttype, peid=peid, rtype=rtype,
                                          role=role)
         return self._call_view(view, etype=ttype, peid=peid,
-                               rtype=rtype, role=role)
+                               rtype=rtype, role=role, i18nctx=i18nctx)
 
     @jsonize
     def js_validate_form(self, action, names, values):
--- a/web/views/editcontroller.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/editcontroller.py	Tue Sep 22 12:11:12 2009 +0200
@@ -51,7 +51,8 @@
         try:
             methodname = form.pop('__method', None)
             for eid in req.edited_eids():
-                formparams = req.extract_entity_params(eid)
+                # __type and eid
+                formparams = req.extract_entity_params(eid, minparams=2)
                 if methodname is not None:
                     entity = req.entity_from_eid(eid)
                     method = getattr(entity, methodname)
--- a/web/views/editforms.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/editforms.py	Tue Sep 22 12:11:12 2009 +0200
@@ -326,11 +326,9 @@
 
     def call(self, **kwargs):
         """creation view for an entity"""
+        # at this point we know etype is a valid entity type, thanks to our
+        # selector
         etype = kwargs.pop('etype', self.req.form.get('etype'))
-        try:
-            etype = self.vreg.case_insensitive_etypes[etype.lower()]
-        except KeyError:
-            raise RequestError(self.req._('no such entity type %s') % etype)
         entity = self.vreg['etypes'].etype_class(etype)(self.req)
         self.initialize_varmaker()
         entity.eid = self.varmaker.next()
@@ -454,7 +452,7 @@
         for i in xrange(len(rset)):
             self.wview(self.id, rset, row=i, **kwargs)
 
-    def cell_call(self, row, col, peid, rtype, role='subject', **kwargs):
+    def cell_call(self, row, col, peid, rtype, role, i18nctx, **kwargs):
         """
         :param peid: the parent entity's eid hosting the inline form
         :param rtype: the relation bridging `etype` and `peid`
@@ -463,23 +461,25 @@
         entity = self.rset.get_entity(row, col)
         divonclick = "restoreInlinedEntity('%s', '%s', '%s')" % (peid, rtype,
                                                                  entity.eid)
-        self.render_form(entity, peid, rtype, role, divonclick=divonclick)
+        self.render_form(entity, peid, rtype, role, i18nctx,
+                         divonclick=divonclick)
 
-    def render_form(self, entity, peid, rtype, role, **kwargs):
+    def render_form(self, entity, peid, rtype, role, i18nctx, **kwargs):
         """fetch and render the form"""
         form = self.vreg['forms'].select('edition', self.req, entity=entity,
                                          form_renderer_id='inline',
                                          mainform=False, copy_nav_params=False)
         self.add_hiddens(form, entity, peid, rtype, role)
         divid = '%s-%s-%s' % (peid, rtype, entity.eid)
-        title = self.schema.rschema(rtype).display_name(self.req, role)
-        removejs = self.removejs % (peid, rtype,entity.eid)
+        title = self.req.pgettext(i18nctx, 'This %s' % entity.e_schema)
+        removejs = self.removejs % (peid, rtype, entity.eid)
         countkey = '%s_count' % rtype
         try:
             self.req.data[countkey] += 1
         except:
             self.req.data[countkey] = 1
         self.w(form.form_render(divid=divid, title=title, removejs=removejs,
+                                i18nctx=i18nctx,
                                 counter=self.req.data[countkey], **kwargs))
 
     def add_hiddens(self, form, entity, peid, rtype, role):
@@ -511,7 +511,7 @@
                   & specified_etype_implements('Any'))
     removejs = "removeInlineForm('%s', '%s', '%s')"
 
-    def call(self, etype, peid, rtype, role='subject', **kwargs):
+    def call(self, etype, peid, rtype, role, i18nctx, **kwargs):
         """
         :param etype: the entity type being created in the inline form
         :param peid: the parent entity's eid hosting the inline form
@@ -519,10 +519,11 @@
         :param role: the role played by the `peid` in the relation
         """
         try:
-            entity = self.vreg['etypes'].etype_class(etype)(self.req, None, None)
+            cls = self.vreg['etypes'].etype_class(etype)
         except:
             self.w(self.req._('no such entity type %s') % etype)
             return
         self.initialize_varmaker()
+        entity = cls(self.req)
         entity.eid = self.varmaker.next()
-        self.render_form(entity, peid, rtype, role)
+        self.render_form(entity, peid, rtype, role, i18nctx, **kwargs)
--- a/web/views/formrenderers.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/formrenderers.py	Tue Sep 22 12:11:12 2009 +0200
@@ -475,6 +475,9 @@
         w(u'</table>')
         w(u'</fieldset>')
 
+    # NOTE: should_* and display_* method extracted and moved to the form to
+    # ease overriding
+
     def inline_entities_form(self, w, form):
         """create a form to edit entity's inlined relations"""
         if not hasattr(form, 'inlined_relations'):
@@ -494,12 +497,10 @@
     def inline_relation_form(self, w, form, rschema, targettype, role):
         entity = form.edited_entity
         __ = self.req.pgettext
+        i18nctx = 'inlined:%s.%s.%s' % (entity.e_schema, rschema, role)
         w(u'<div id="inline%sslot">' % rschema)
-        existant = entity.has_eid() and entity.related(rschema)
-        if existant:
-            # display inline-edition view for all existing related entities
-            w(form.view('inline-edition', existant, rtype=rschema, role=role,
-                        ptype=entity.e_schema, peid=entity.eid))
+        existant = form.display_inline_edition_form(w, rschema, targettype,
+                                                    role, i18nctx)
         if role == 'subject':
             card = rschema.rproperty(entity.e_schema, targettype, 'cardinality')[0]
         else:
@@ -507,9 +508,8 @@
         # there is no related entity and we need at least one: we need to
         # display one explicit inline-creation view
         if form.should_display_inline_creation_form(rschema, existant, card):
-            w(form.view('inline-creation', None, etype=targettype,
-                        peid=entity.eid, ptype=entity.e_schema,
-                        rtype=rschema, role=role))
+            form.display_inline_creation_form(w, rschema, targettype,
+                                              role, i18nctx)
             existant = True
         # we can create more than one related entity, we thus display a link
         # to add new related entities
@@ -517,13 +517,12 @@
             divid = "addNew%s%s%s:%s" % (targettype, rschema, role, entity.eid)
             w(u'<div class="inlinedform" id="%s" cubicweb:limit="true">'
               % divid)
-            js = "addInlineCreationForm('%s', '%s', '%s', '%s')" % (
-                entity.eid, targettype, rschema, role)
-            if card in '1?':
+            js = "addInlineCreationForm('%s', '%s', '%s', '%s', '%s')" % (
+                entity.eid, targettype, rschema, role, i18nctx)
+            if form.should_hide_add_new_relation_link(rschema, card):
                 js = "toggleVisibility('%s'); %s" % (divid, js)
-            ctx = 'inlined:%s.%s.%s' % (entity.e_schema, rschema, role)
             w(u'<a class="addEntity" id="add%s:%slink" href="javascript: %s" >+ %s.</a>'
-              % (rschema, entity.eid, js, __(ctx, 'add a %s' % targettype)))
+              % (rschema, entity.eid, js, __(i18nctx, 'add a %s' % targettype)))
             w(u'</div>')
             w(u'<div class="trame_grise">&#160;</div>')
         w(u'</div>')
@@ -547,7 +546,9 @@
             w(u'<div id="notice-%s" class="notice">%s</div>' % (
                 values['divid'], self.req._('click on the box to cancel the deletion')))
         w(u'<div class="iformBody">')
-        values['removemsg'] = self.req.__('remove this %s' % form.edited_entity.e_schema)
+        eschema = form.edited_entity.e_schema
+        ctx = values.pop('i18nctx')
+        values['removemsg'] = self.req.pgettext(ctx, 'remove this %s' % eschema)
         w(u'<div class="iformTitle"><span>%(title)s</span> '
           '#<span class="icounter">%(counter)s</span> '
           '[<a href="javascript: %(removejs)s;noop();">%(removemsg)s</a>]</div>'
--- a/web/views/forms.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/forms.py	Tue Sep 22 12:11:12 2009 +0200
@@ -82,9 +82,10 @@
         for key, val in kwargs.items():
             if key in NAV_FORM_PARAMETERS:
                 self.form_add_hidden(key, val)
-            else:
-                assert hasattr(self.__class__, key) and not key[0] == '_', key
+            elif hasattr(self.__class__, key) and not key[0] == '_':
                 setattr(self, key, val)
+            # skip other parameters, usually given for selection
+            # (else write a custom class to handle them)
         if mainform:
             self.form_add_hidden('__errorurl', self.session_key())
             self.form_add_hidden('__domid', self.domid)
@@ -530,7 +531,8 @@
                 break
         return result
 
-    def srelations_by_category(self, categories=None, permission=None):
+    def srelations_by_category(self, categories=None, permission=None,
+                               strict=False):
         return ()
 
     def should_display_add_new_relation_link(self, rschema, existant, card):
--- a/web/views/magicsearch.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/magicsearch.py	Tue Sep 22 12:11:12 2009 +0200
@@ -119,7 +119,7 @@
         return TRANSLATION_MAPS[lang]
     except KeyError:
         assert lang in config.translations, '%s %s' % (lang, config.translations)
-        tr = config.translations[lang]
+        tr, ctxtr = config.translations[lang]
         langmap = {}
         for etype in schema.entities():
             etype = str(etype)
--- a/web/views/plots.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/plots.py	Tue Sep 22 12:11:12 2009 +0200
@@ -104,7 +104,7 @@
     def _render(self, req, width=500, height=400):
         # XXX IE requires excanvas.js
         req.add_js( ('jquery.flot.js', 'cubicweb.flot.js', 'excanvas.js') )
-        figid = u'figure%s' % make_uid('foo')
+        figid = u'figure%s' % req.varmaker.next()
         plotdefs = []
         plotdata = []
         self.w(u'<div id="%s" style="width: %spx; height: %spx;"></div>' %
--- a/web/views/treeview.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/treeview.py	Tue Sep 22 12:11:12 2009 +0200
@@ -7,9 +7,10 @@
 """
 __docformat__ = "restructuredtext en"
 
+import simplejson as json
+
 from logilab.common.decorators import monkeypatch
 from logilab.mtconverter import xml_escape
-
 from cubicweb.utils import make_uid
 from cubicweb.interfaces import ITree
 from cubicweb.selectors import implements
@@ -21,33 +22,54 @@
 class TreeView(EntityView):
     id = 'treeview'
     itemvid = 'treeitemview'
+    subvid = 'oneline'
     css_classes = 'treeview widget'
     title = _('tree view')
 
-    def call(self, subvid=None, treeid=None, initial_load=True, initial_thru_ajax=False):
+    def _init_params(self, subvid, treeid, initial_load, initial_thru_ajax, morekwargs):
+        form = self.req.form
         if subvid is None:
-            subvid = self.req.form.pop('treesubvid', 'oneline') # consume it
+            subvid = form.pop('treesubvid', self.subvid) # consume it
         if treeid is None:
-            treeid = self.req.form.pop('treeid', None)
+            treeid = form.pop('treeid', None)
             if treeid is None:
-                self.warning('Tree state won\'t be properly restored after next reload')
-                treeid = make_uid('throw away uid')
-        toplevel_thru_ajax = self.req.form.pop('treeview_top', False) or initial_thru_ajax
-        toplevel = toplevel_thru_ajax or (initial_load and not self.req.form.get('fname'))
+                treeid = 'throw_away' + make_uid('uid')
+        if 'morekwargs' in self.req.form:
+            ajaxargs = json.loads(form.pop('morekwargs'))
+            # got unicode & python keywords must be strings
+            morekwargs.update(dict((str(k), v)
+                                   for k, v in ajaxargs.iteritems()))
+        toplevel_thru_ajax = form.pop('treeview_top', False) or initial_thru_ajax
+        toplevel = toplevel_thru_ajax or (initial_load and not form.get('fname'))
+        return subvid, treeid, toplevel_thru_ajax, toplevel
+
+    def _init_headers(self, treeid, toplevel_thru_ajax):
+        self.req.add_css('jquery.treeview.css')
+        self.req.add_js(('cubicweb.ajax.js', 'cubicweb.widgets.js', 'jquery.treeview.js'))
+        self.req.html_headers.add_onload(u"""
+jQuery("#tree-%s").treeview({toggle: toggleTree, prerendered: true});""" % treeid,
+                                         jsoncall=toplevel_thru_ajax)
+
+    def call(self, subvid=None, treeid=None,
+             initial_load=True, initial_thru_ajax=False, **morekwargs):
+        subvid, treeid, toplevel_thru_ajax, toplevel = self._init_params(
+            subvid, treeid, initial_load, initial_thru_ajax, morekwargs)
         ulid = ' '
         if toplevel:
+            self._init_headers(treeid, toplevel_thru_ajax)
             ulid = ' id="tree-%s"' % treeid
         self.w(u'<ul%s class="%s">' % (ulid, self.css_classes))
         for rowidx in xrange(len(self.rset)):
             self.wview(self.itemvid, self.rset, row=rowidx, col=0,
-                       vid=subvid, parentvid=self.id, treeid=treeid)
+                       vid=subvid, parentvid=self.id, treeid=treeid, **morekwargs)
         self.w(u'</ul>')
-        if toplevel:
-            self.req.add_css('jquery.treeview.css')
-            self.req.add_js(('cubicweb.ajax.js', 'cubicweb.widgets.js', 'jquery.treeview.js'))
-            self.req.html_headers.add_onload(u"""
-jQuery("#tree-%s").treeview({toggle: toggleTree, prerendered: true});""" % treeid,
-                                             jsoncall=toplevel_thru_ajax)
+
+    def cell_call(self, *args, **allargs):
+        """ does not makes much sense until you have to invoke
+        somentity.view('treeview') """
+        allargs.pop('row')
+        allargs.pop('col')
+        self.call(*args, **allargs)
 
 class FileTreeView(TreeView):
     """specific version of the treeview to display file trees
@@ -56,8 +78,9 @@
     css_classes = 'treeview widget filetree'
     title = _('file tree view')
 
-    def call(self, subvid=None, treeid=None, initial_load=True):
-        super(FileTreeView, self).call(treeid=treeid, subvid='filetree-oneline', initial_load=initial_load)
+    def call(self, subvid=None, treeid=None, initial_load=True, **kwargs):
+        super(FileTreeView, self).call(treeid=treeid, subvid='filetree-oneline',
+                                       initial_load=initial_load, **kwargs)
 
 class FileItemInnerView(EntityView):
     """inner view used by the TreeItemView instead of oneline view
@@ -106,7 +129,7 @@
             return str(eeid) in treestate.value.split(';')
         return self.default_branch_state_is_open
 
-    def cell_call(self, row, col, treeid, vid='oneline', parentvid='treeview'):
+    def cell_call(self, row, col, treeid, vid='oneline', parentvid='treeview', **morekwargs):
         w = self.w
         entity = self.rset.get_entity(row, col)
         liclasses = []
@@ -120,10 +143,11 @@
         else:
             rql = entity.children_rql() % {'x': entity.eid}
             url = xml_escape(self.build_url('json', rql=rql, vid=parentvid,
-                                             pageid=self.req.pageid,
-                                             treeid=treeid,
-                                             fname='view',
-                                             treesubvid=vid))
+                                            pageid=self.req.pageid,
+                                            treeid=treeid,
+                                            fname='view',
+                                            treesubvid=vid,
+                                            morekwargs=json.dumps(morekwargs)))
             divclasses = ['hitarea']
             if is_open:
                 liclasses.append('collapsable')
@@ -142,8 +166,11 @@
                 w(u'<li class="%s">' % u' '.join(liclasses))
             else:
                 w(u'<li cubicweb:loadurl="%s" class="%s">' % (url, u' '.join(liclasses)))
-            divtail = """ onclick="asyncRemoteExec('node_clicked', '%s', '%s')" """ %\
-                (treeid, entity.eid)
+            if treeid.startswith('throw_away'):
+                divtail = ''
+            else:
+                divtail = """ onclick="asyncRemoteExec('node_clicked', '%s', '%s')" """ %\
+                    (treeid, entity.eid)
             w(u'<div class="%s"%s></div>' % (u' '.join(divclasses), divtail))
 
             # add empty <ul> because jquery's treeview plugin checks for
@@ -151,8 +178,8 @@
             if not is_open:
                 w(u'<ul class="placeholder"><li>place holder</li></ul>')
         # the local node info
-        self.wview(vid, self.rset, row=row, col=col)
+        self.wview(vid, self.rset, row=row, col=col, **morekwargs)
         if is_open and not is_leaf: #  => rql is defined
-            self.wview(parentvid, self.req.execute(rql), treeid=treeid, initial_load=False)
+            self.wview(parentvid, self.req.execute(rql), treeid=treeid, initial_load=False, **morekwargs)
         w(u'</li>')
 
--- a/web/views/workflow.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/workflow.py	Tue Sep 22 12:11:12 2009 +0200
@@ -29,6 +29,15 @@
 _abaa.tag_subject_of(('State', 'allowed_transition', 'BaseTransition'), False)
 _abaa.tag_object_of(('SubWorkflowExitPoint', 'destination_state', 'State'),
                     False)
+_abaa.tag_object_of(('State', 'state_of', 'Workflow'), True)
+_abaa.tag_object_of(('Transition', 'transition_of', 'Workflow'), True)
+_abaa.tag_object_of(('WorkflowTransition', 'transition_of', 'Workflow'), True)
+
+_afs = uicfg.autoform_section
+_afs.tag_subject_of(('TrInfo', 'to_state', '*'), 'generated')
+_afs.tag_subject_of(('TrInfo', 'from_state', '*'), 'generated')
+_afs.tag_object_of(('State', 'allowed_transition', '*'), 'primary')
+
 
 # IWorkflowable views #########################################################
 
@@ -43,15 +52,20 @@
 class ChangeStateFormView(form.FormViewMixIn, view.EntityView):
     id = 'statuschange'
     title = _('status change')
-    __select__ = implements(IWorkflowable) & match_form_params('treid')
+    __select__ = (one_line_rset() & implements(IWorkflowable)
+                  & match_form_params('treid'))
 
     def cell_call(self, row, col):
         entity = self.rset.get_entity(row, col)
         transition = self.req.entity_from_eid(self.req.form['treid'])
         dest = transition.destination()
         _ = self.req._
-        form = self.vreg['forms'].select('changestate', self.req, entity=entity,
-                                         redirect_path=self.redirectpath(entity))
+        # specify both rset/row/col and entity in case implements selector (and
+        # not entity_implements) is used on custom form
+        form = self.vreg['forms'].select(
+            'changestate', self.req, rset=self.rset, row=row, col=col,
+            entity=entity, transition=transition,
+            redirect_path=self.redirectpath(entity))
         self.w(form.error_message())
         self.w(u'<h4>%s %s</h4>\n' % (_(transition.name),
                                       entity.view('oneline')))
@@ -187,7 +201,7 @@
 
     def node_properties(self, stateortransition):
         """return default DOT drawing options for a state or transition"""
-        props = {'label': stateortransition.name,
+        props = {'label': stateortransition.printable_value('name'),
                  'fontname': 'Courier'}
         if hasattr(stateortransition, 'state_of'):
             props['shape'] = 'box'
@@ -201,7 +215,7 @@
             if tr.require_group:
                 descr.append('%s %s'% (
                     self._('groups:'),
-                    ','.join(g.name for g in tr.require_group)))
+                    ','.join(g.printable_value('name') for g in tr.require_group)))
             if tr.condition:
                 descr.append('%s %s'% (
                     self._('condition:'),