# HG changeset patch # User Sandrine Ribeau # Date 1228849559 28800 # Node ID 1632e01a58a9111b895e51a28c1c738ab9462e85 # Parent cd9cc01538355b3735bee4d129ab407926a8d60b [doc] Translation to english. diff -r cd9cc0153835 -r 1632e01a58a9 doc/book/en/B040-define-workflows.en.txt --- a/doc/book/en/B040-define-workflows.en.txt Mon Dec 08 17:33:58 2008 -0800 +++ b/doc/book/en/B040-define-workflows.en.txt Tue Dec 09 11:05:59 2008 -0800 @@ -1,7 +1,9 @@ .. -*- coding: utf-8 -*- +.. _Workflow: + Workflow definition -====================== +=================== General ------- diff -r cd9cc0153835 -r 1632e01a58a9 doc/book/en/B080-internationalization.en.txt --- a/doc/book/en/B080-internationalization.en.txt Mon Dec 08 17:33:58 2008 -0800 +++ b/doc/book/en/B080-internationalization.en.txt Tue Dec 09 11:05:59 2008 -0800 @@ -18,42 +18,42 @@ * in your application : handle the translation catalog -String internalization ----------------------- +String internationalization +--------------------------- In the Python code and cubicweb-tal templates translatable strings can be marked in one of the following ways : * by using the *built-in* function `_` :: - class PrimaryView(EntityView): - """the full view of an non final entity""" - id = 'primary' - title = _('primary') + class PrimaryView(EntityView): + """the full view of an non final entity""" + id = 'primary' + title = _('primary') OR * by using the equivalent request's method :: - class NoResultView(EmptyRsetView): - """default view when no result has been found""" - id = 'noresult' + class NoResultView(EmptyRsetView): + """default view when no result has been found""" + id = 'noresult' - def call(self, **kwargs): - self.w(u'
%s
\n' - % self.req._('No result matching query')) + def call(self, **kwargs): + self.w(u'
%s
\n' + % self.req._('No result matching query')) The goal of the *built-in* function `_` is only **to mark the -translatable strings**, it will only return the translation string -it-self, but not it's translation. +translatable strings**, it will only return the string to translate +it-self, but not its translation. -In the other hand the request's method `_` is ment to retrive the +In the other hand the request's method `self.req._` is meant to retrieve the proper translation of translation strings in the requested language. Translations in cubicweb-tal template can also be done with TAL tags `i18n:content` and `i18n:replace`. -Note :: +.. note:: We dont need to mark the translation strings of entities/relations used by a particular application's schema as they are generated @@ -63,22 +63,22 @@ Handle the translation catalog ------------------------------ -Once the internalization is done in your application's code, you need +Once the internationalization is done in your application's code, you need to populate and update the translation catalog. Cubicweb provides the following commands for this purpose: * `i18nlibupdate` updates Cubicweb framework's translation - catalogs. Unless you work on the framework development, you dont + catalogs. Unless you work on the framework development, you don't need to use this command. * `i18nupdate` updates the translation catalogs of *one particular - component* (or of all components). FIXME After this command is + component* (or of all components). After this command is executed you must update the translation files *.po* in the "i18n" directory of your template. This command will of course not remove - existing translations still in use + existing translations still in use. -* `i18ncompile` recompile the transaltion catalogs of *one particular +* `i18ncompile` recompile the translation catalogs of *one particular instance* (or of all instances) after the translation catalogs of its components have been updated. This command is automatically called every time you create or update your instance. The compiled diff -r cd9cc0153835 -r 1632e01a58a9 doc/book/en/B090-ui-components.en.txt --- a/doc/book/en/B090-ui-components.en.txt Mon Dec 08 17:33:58 2008 -0800 +++ b/doc/book/en/B090-ui-components.en.txt Tue Dec 09 11:05:59 2008 -0800 @@ -1,5 +1,5 @@ -Autres composants de l'interface web -==================================== +Others web interface components +=============================== Actions ------- diff -r cd9cc0153835 -r 1632e01a58a9 doc/book/en/B100-hooks.en.txt --- a/doc/book/en/B100-hooks.en.txt Mon Dec 08 17:33:58 2008 -0800 +++ b/doc/book/en/B100-hooks.en.txt Tue Dec 09 11:05:59 2008 -0800 @@ -1,16 +1,15 @@ .. -*- coding: utf-8 -*- -Les crochets (*hooks*) -====================== +Hooks +===== XXX FILLME -Les crochets sont appelés avant ou après la mise à jour d'une entité ou d'une -relations dans le dépot +*Hooks* are executed before or after updating an entity or a relation in the +repository. -Leur prototypes sont les suivants - - +Their prototypes are as follows: + * after_add_entity (session, entity) * after_update_entity (session, entity) * after_delete_entity (session, eid) diff -r cd9cc0153835 -r 1632e01a58a9 doc/book/en/B110-notifications.en.txt --- a/doc/book/en/B110-notifications.en.txt Mon Dec 08 17:33:58 2008 -0800 +++ b/doc/book/en/B110-notifications.en.txt Tue Dec 09 11:05:59 2008 -0800 @@ -1,6 +1,6 @@ .. -*- coding: utf-8 -*- -Gestion de notifications +Notifications management ======================== XXX FILLME diff -r cd9cc0153835 -r 1632e01a58a9 doc/book/en/B120-migration.en.txt --- a/doc/book/en/B120-migration.en.txt Mon Dec 08 17:33:58 2008 -0800 +++ b/doc/book/en/B120-migration.en.txt Tue Dec 09 11:05:59 2008 -0800 @@ -4,215 +4,207 @@ Migration ========= -Une des idées de base d'Erudi est la création incrémentale d'application, et -pour cela de nombreuses actions sont fournies afin de facilement faire évoluer -une application et tout particulièrement le modèle de données manipulé sans -perdre les données des instances existantes. +One of the main concept in `CubicWeb` is to create incremental applications +and for this purpose multiple actions are provided to facilitate the improvement +of an application and in particular changes applied to the data model +without loosing existing data. -La version courante d'un modèle d'application est données dans le fichier -`__pkginfo__.py` sous forme d'un tuple de 3 entiers. - +The current version of an application model is provided in the file +`__pkginfo__.py` as a tuple of 3 integers. -Gestion des scripts de migrations ---------------------------------- -Les scripts des migrations doivent être placés dans le répertoire `migration` de -l'application, et nommé de la manière suivante : +Migration scripts management +---------------------------- + +Migration scripts needs to be located in the directory `migration` of your +application and nammed accordingly: :: - [_]_.py + [_]_.py -dans lequel : +in which : -* X.Y.Z correspond au n° de version du modèle vers lequel le script permet de - migrer, +* X.Y.Z is the model version number to which the script enable to migrate -* le *mode* (entre le dernier "_" et l'extension ".py") indique à quelle partie - de l'application (serveur RQL, serveur web) le script s'applique en cas - d'installation distribuée. Il peut valoir : +* *mode* (between the last "_" and the extension ".py") indicates which part + of the application (RQL server, web server) the script applies to in case + of distributed installation. Its value could be : - * `common`, s'applique aussi bien sur le serveur RQL que sur le serveur web, - et met à jour des fichiers sur le disque (migration de fichier de - configuration par exemple). + * `common`, applies to the RQL server as well as the web server and updates + files on the hard drive (configuration files migration by example). + + * `web`, applies only to the web server and updates files on the hard drive - * `web`, s'applique uniquement sur le serveur web, et met à jour des fichiers - sur le disque + * `repository`, applies only to the RQL server and updates files on the + hard drive - * `repository`, s'applique uniquement sur le serveur RQL, et met à jour des - fichiers sur le disque - - * `Any`, s'applique uniquement sur le serveur RQL, et met à jour des - données en base (migrations de schéma et de données par ex.) - + * `Any`, applies only to the RQL server and updates data in the database + (schema and data migration by example) -Toujours dans le répertoire `migration`, le fichier spécial `depends.map` permet -d'indiquer que pour migrer vers une version spécifique du modèle, il faut tout -d'abord avoir migrer vers une version données de erudi. Ce fichier peut contenir -des commentaires (lignes commençant par un "#"), et une dépendance est notée sur -une ligne de la manière suivante : :: +Again in the directory `migration`, the file `depends.map` allows to indicate +that to migrate to a particular model version, you always have to first migrate +to a particular `CubicWeb` version. This file can contains comments (lines +starting by `#`) and a dependancy is listed as follows: :: + + : - : - -Par exemple :: +By example: :: 0.12.0: 2.26.0 0.13.0: 2.27.0 # 0.14 works with 2.27 <= erudi <= 2.28 at least 0.15.0: 2.28.0 +Base context +------------ -Contexte de base ----------------- -Les identifiants suivants sont préféfinis dans les scripts de migration : +The following identifiers are pre-defined in the migration scripts: -* `config`, configuration de l'instance +* `config`, instance configuration -* `interactive_mode`, booléen indiquant si le script est éxécuté en mode - interactif ou non +* `interactive_mode`, boolean indicating that the script is executed in + an intercative mode or not -* `appltemplversion`, version du modèle d'application de l'instance +* `appltemplversion`, application model version of the instance -* `applerudiversion`, version erudi de l'instance +* `applerudiversion`, cubicweb instance version -* `templversion`, version du modéle d'application installée +* `templversion`, installed application model version -* `erudiversion`, version erudi installée +* `erudiversion`, installed cubicweb version -* `confirm(question)`, fonction posant une question et retournant vrai si - l'utilisateur a répondu oui, faux sinon (retourne toujours vrai en mode non - interactif) +* `confirm(question)`, function interrogating the user and returning true + if the user answers yes, false otherwise (always returns true when in a + non-interactive mode) -* `_`, fonction équivalente à `unicode` permettant de marquer des chaines à - internationaliser dans les scripts de migration +* `_`, function fonction equivalent to `unicode` allowing to flag the strings + to internationalize in the migration scripts -Dans les scripts "repository", les identifiants suivant sont également définis : +In the `repository` scripts, the following identifiers are also defined: -* `checkpoint`, demande confirmant et effectue un "commit" au point d'appel +* `checkpoint`, request confirming and executing a "commit" at checking point -* `repo_schema`, schéma persistent de l'instance (i.e. schéma de l'instance en - cours de migration) +* `repo_schema`, instance persisting schema (e.g. instance schema of the + current migration) -* `newschema`, schéma installé sur le système de fichier (i.e. schéma de la - version à jour du modèle et de erudi) +* `newschema`, installed schema on the file system (e.g. schema of + the updated model and erudi) -* `sqlcursor`, un curseur SQL pour les très rares cas où il est réellement - nécessaire ou avantageux de passer par du sql +* `sqlcursor`, SQL cursor for very rare cases where it is really + necessary or beneficial to go through the sql -* `repo`, l'objet repository +* `repo`, repository object -Migration de schéma -------------------- -Les fonctions de migration de schéma suivantes sont disponibles dans les scripts -"repository" : +Schema migration +---------------- +The following functions for schema migration are available in the `repository` +scripts: -* `add_attribute(etype, attrname, attrtype=None, commit=True)`, ajoute un - nouvel attribut à un type d'entité existante. Si le type de celui-ci n'est pas - spécifié il est extrait du schéma à jour. +* `add_attribute(etype, attrname, attrtype=None, commit=True)`, adds a new + attribute to an existing entity type. If the attribute type is not specified, + then it is extracted from the updated schema. -* `drop_attribute(etype, attrname, commit=True)`, supprime un - attribut à un type d'entité existante. +* `drop_attribute(etype, attrname, commit=True)`, removes an attribute from an + existing entity type. -* `rename_attribute(etype, oldname, newname, commit=True)`, renomme un attribut +* `rename_attribute(etype, oldname, newname, commit=True)`, rename an attribute -* `add_entity_type(etype, auto=True, commit=True)`, ajoute un nouveau type - d'entité. Si `auto` est vrai, toutes les relations utilisant ce type d'entité - et ayant un type d'entité connu à l'autre extrémité vont également être - ajoutées. +* `add_entity_type(etype, auto=True, commit=True)`, adds a new entity type. + If `auto` is True, all the relations using this entity type and having a known + entity type on the other hand will automatically be added. -* `drop_entity_type(etype, commit=True)`, supprime un type d'entité et toutes - les relations l'utilisant. +* `drop_entity_type(etype, commit=True)`, removes an entity type and all the + relations using it. -* `rename_entity_type(oldname, newname, commit=True)`, renomme un type d'entité +* `rename_entity_type(oldname, newname, commit=True)`, renames an entity type -* `add_relation_type(rtype, addrdef=True, commit=True)`, ajoute un nouveau type - de relation. Si `addrdef` est vrai, toutes les définitions de relation de ce - type seront également ajoutées. +* `add_relation_type(rtype, addrdef=True, commit=True)`, adds a new relation + type. If `addrdef` is True, all the relations definitions of this type will + be added. + +* `drop_relation_type(rtype, commit=True)`, removes a relation type and all the + definitions of this type. -* `drop_relation_type(rtype, commit=True)`, supprime un type de relation et - toutes les définitions de ce type. +* `rename_relation(oldname, newname, commit=True)`, renames a relation. + +* `add_relation_definition(subjtype, rtype, objtype, commit=True)`, adds a new + relation definition. + +* `drop_relation_definition(subjtype, rtype, objtype, commit=True)`, removes + a relation definition. -* `rename_relation(oldname, newname, commit=True)`, renomme une relation. - -* `add_relation_definition(subjtype, rtype, objtype, commit=True)`, ajoute une - définition de relation. - -* `drop_relation_definition(subjtype, rtype, objtype, commit=True)`, supprime - une définition de relation. - -* `synchronize_permissions(ertype, commit=True)`, synchronise les permissions - d'un type d'entité ou de relation +* `synchronize_permissions(ertype, commit=True)`, synchronizes permissions on + an entity type or relation type. -* `synchronize_rschema(rtype, commit=True)`, synchronise les propriétés et - permissions d'un type de relation. +* `synchronize_rschema(rtype, commit=True)`, synchronizes properties and permissions + on a relation type. -* `synchronize_eschema(etype, commit=True)`, synchronise les propriétés et - permissions d'un type d'entité. +* `synchronize_eschema(etype, commit=True)`, synchronizes properties and persmissions + on an entity type. -* `synchronize_schema(commit=True)`, synchronise le schéma persistent avec le - schéma à jour (mais sans ajouter ni supprimer de nouveaux types d'entités ou - de relations ni de définitions de relation). +* `synchronize_schema(commit=True)`, synchronizes the persisting schema with the + updated schema (but without adding or removing new entity types, relations types + or even relations definitions). -* `change_relation_props(subjtype, rtype, objtype, commit=True, **kwargs)`, change - les propriétés d'une definition de relation en utilisant les arguments nommés - pour les propriétés à changer. +* `change_relation_props(subjtype, rtype, objtype, commit=True, **kwargs)`, changes + properties of a relation definition by using the nammed parameters of the properties + to change. + +* `set_widget(etype, rtype, widget, commit=True)`, changes the widget used for the + relation of entity type . + +* `set_size_constraint(etype, rtype, size, commit=True)`, changes the size constraints + for the relation of entity type . + +Data migration +-------------- +The following functions for data migration are available in the `repository` scripts: + +* `rql(rql, kwargs=None, cachekey=None, ask_confirm=True)`, executes an arbitrary RQL + query, either to interrogate or update. A result set object is returned. + +* `add_entity(etype, *args, **kwargs)`, adds a nes entity type of the given + type. The attributes and relations values are specified using the nammed and + positionned parameters. + +Workflow creation +----------------- -* `set_widget(etype, rtype, widget, commit=True)`, change le widget à utiliser - pour la relation du type d'entité +The following functions for workflow creation are available in the `repository` +scripts: + +* `add_state(name, stateof, initial=False, commit=False, **kwargs)`, adds a new state + in the workflow. + +* `add_transition(name, transitionof, fromstates, tostate, requiredgroups=(), commit=False, **kwargs)`, + adds a new transition in the workflow. + +You can find more details about workflows in the chapter :ref:`Workflow` . -* `set_size_constraint(etype, rtype, size, commit=True)`, change la contrainte - de taille pour la relation du type d'entité +Configuration migration +----------------------- + +The following functions for configuration migration are available in all the +scripts: + +* `option_renamed(oldname, newname)`, indicates that an option has been renammed + +* `option_group_change(option, oldgroup, newgroup)`, indicates that an option does not + belong anymore to the same group. + +* `option_added(oldname, newname)`, indicates that an option has been added. + +* `option_removed(oldname, newname)`, indicates that an option has been deleted. -Migration de données --------------------- -Les fonctions de migration de données suivantes sont disponibles dans les scripts -"repository" : - -* `rql(rql, kwargs=None, cachekey=None, ask_confirm=True)`, éxécute une - requête rql arbitraire, d'interrogation ou de modification. Un objet result - set est retourné. - -* `add_entity(etype, *args, **kwargs)`, ajoute une nouvelle entité du type - données. La valeur des attributs et relations est spécifiée en utilisant les - arguments nommés et positionnels. - - -Création de workflow --------------------- -Les fonctions de création de workflow suivantes sont disponibles dans les scripts -"repository" : - -* `add_state(name, stateof, initial=False, commit=False, **kwargs)`, ajoute un - nouvel état de workflow - -* `add_transition(name, transitionof, fromstates, tostate, requiredgroups=(), commit=False, **kwargs)`, - ajoute une nouvelle transtion de workflow +Others migration functions +-------------------------- +Those functions are only used for low level operations that could not be +accomplished otherwise or to repair damaged databases during interactive +session. They are available in the `repository` scripts: -Migration de configuration --------------------------- -Les fonctions de migration de configuration suivantes sont disponibles dans tout -les scripts : - -* `option_renamed(oldname, newname)`, indique qu'une option a été renommée - -* `option_group_change(option, oldgroup, newgroup)`, indique qu'une option a - changé de groupe - -* `option_added(oldname, newname)`, indique qu'une option a été ajoutée - -* `option_removed(oldname, newname)`, indique qu'une option a été supprimée - - -Autres fonctions de migration ------------------------------ -Ces fonctions ne sont utilisés que pour des opérations de bas niveau -irréalisables autrement ou pour réparer des bases cassées lors de session -interactive. Elles sont disponibles dans les scripts "repository". - -* `sqlexec(sql, args=None, ask_confirm=True)`, éxécute une requête sql - arbitraire, à n'utiliser - +* `sqlexec(sql, args=None, ask_confirm=True)`, executes an arbitrary SQL query * `add_entity_type_table(etype, commit=True)` * `add_relation_type_table(rtype, commit=True)` * `uninline_relation(rtype, commit=True)`