Commit 6954877d authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[.po generation] closes #1902315: c i18ncube doesn't consider relation definition description

--HG--
branch : stable
parent bb956f43e8d4
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
......@@ -154,6 +154,9 @@ def _generate_schema_pot(w, vreg, schema, libconfig=None):
for cstrtype in CONSTRAINTS:
add_msg(w, cstrtype)
done = set()
for eschema in sorted(schema.entities()):
if eschema.type in libschema:
done.add(eschema.description)
for eschema in sorted(schema.entities()):
etype = eschema.type
if etype not in libschema:
......@@ -202,16 +205,20 @@ def _generate_schema_pot(w, vreg, schema, libconfig=None):
w('# subject and object forms for each relation type\n')
w('# (no object form for final or symmetric relation types)\n')
w('\n')
for rschema in sorted(schema.relations()):
if rschema.type in libschema:
done.add(rschema.type)
done.add(rschema.description)
for rschema in sorted(schema.relations()):
rtype = rschema.type
if rtype not in libschema:
# bw compat, necessary until all translation of relation are done
# properly...
add_msg(w, rtype)
done.add(rtype)
if rschema.description and rschema.description not in done:
done.add(rschema.description)
add_msg(w, rschema.description)
done.add(rtype)
done.add(rschema.description)
librschema = None
else:
librschema = libschema.rschema(rtype)
......@@ -221,7 +228,7 @@ def _generate_schema_pot(w, vreg, schema, libconfig=None):
for subjschema in rschema.subjects():
if not subjschema in libsubjects:
add_msg(w, rtype, subjschema.type)
if not (schema.rschema(rtype).final or rschema.symmetric):
if not (rschema.final or rschema.symmetric):
if rschema not in NO_I18NCONTEXT:
libobjects = librschema and librschema.objects() or ()
for objschema in rschema.objects():
......@@ -231,6 +238,14 @@ def _generate_schema_pot(w, vreg, schema, libconfig=None):
# bw compat, necessary until all translation of relation are
# done properly...
add_msg(w, '%s_object' % rtype)
for rdef in rschema.rdefs.itervalues():
if not rdef.description or rdef.description in done:
continue
if (librschema is None or
(rdef.subject, rdef.object) not in librschema.rdefs or
librschema.rdefs[(rdef.subject, rdef.object)].description != rdef.description):
add_msg(w, rdef.description)
done.add(rdef.description)
for objid in _iter_vreg_objids(vreg, vregdone):
add_msg(w, '%s_description' % objid)
add_msg(w, objid)
......
......@@ -1250,6 +1250,9 @@ msgstr "Nutzername oder Passwort falsch"
msgid "auto"
msgstr "automatisch"
msgid "autocomputed attribute used to ensure transition coherency"
msgstr ""
msgid "automatic"
msgstr "automatisch"
......@@ -2288,9 +2291,6 @@ msgstr "bearbeitbare Tabelle"
msgid "eid"
msgstr ""
msgid "email address to use for notification"
msgstr "E-Mail-Adresse für Mitteilungen."
msgid "emails successfully sent"
msgstr "E-Mails erfolgreich versandt."
......@@ -2619,6 +2619,18 @@ msgstr ""
msgid "groups"
msgstr "Gruppen"
msgid "groups allowed to add entities/relations of this type"
msgstr ""
msgid "groups allowed to delete entities/relations of this type"
msgstr ""
msgid "groups allowed to read entities/relations of this type"
msgstr ""
msgid "groups allowed to update entities/relations of this type"
msgstr ""
msgid "groups grant permissions to the user"
msgstr "die Gruppen geben dem Nutzer Rechte"
......@@ -3604,6 +3616,18 @@ msgstr "Änderungen rückgängig machen"
msgid "right"
msgstr "rechts"
msgid "rql expression allowing to add entities/relations of this type"
msgstr ""
msgid "rql expression allowing to delete entities/relations of this type"
msgstr ""
msgid "rql expression allowing to read entities/relations of this type"
msgstr ""
msgid "rql expression allowing to update entities/relations of this type"
msgstr ""
msgid "rql expressions"
msgstr "RQL-Ausdrücke"
......@@ -4323,6 +4347,9 @@ msgstr "Kodierung für die Nutzerschnittstelle"
msgid "user preferences"
msgstr "Nutzereinstellungen"
msgid "user's email account"
msgstr ""
msgid "users"
msgstr "Nutzer"
......@@ -4521,3 +4548,6 @@ msgstr "Sie sollten diese Eigenschaft wahrscheinlich löschen."
#, python-format
msgid "you should un-inline relation %s which is supported and may be crossed "
msgstr ""
#~ msgid "email address to use for notification"
#~ msgstr "E-Mail-Adresse für Mitteilungen."
......@@ -1205,6 +1205,9 @@ msgstr ""
msgid "auto"
msgstr "automatic"
msgid "autocomputed attribute used to ensure transition coherency"
msgstr ""
msgid "automatic"
msgstr ""
......@@ -2233,9 +2236,6 @@ msgstr ""
msgid "eid"
msgstr ""
msgid "email address to use for notification"
msgstr ""
msgid "emails successfully sent"
msgstr ""
......@@ -2554,6 +2554,18 @@ msgstr ""
msgid "groups"
msgstr ""
msgid "groups allowed to add entities/relations of this type"
msgstr ""
msgid "groups allowed to delete entities/relations of this type"
msgstr ""
msgid "groups allowed to read entities/relations of this type"
msgstr ""
msgid "groups allowed to update entities/relations of this type"
msgstr ""
msgid "groups grant permissions to the user"
msgstr ""
......@@ -3511,6 +3523,18 @@ msgstr ""
msgid "right"
msgstr ""
msgid "rql expression allowing to add entities/relations of this type"
msgstr ""
msgid "rql expression allowing to delete entities/relations of this type"
msgstr ""
msgid "rql expression allowing to read entities/relations of this type"
msgstr ""
msgid "rql expression allowing to update entities/relations of this type"
msgstr ""
msgid "rql expressions"
msgstr ""
......@@ -4209,6 +4233,9 @@ msgstr ""
msgid "user preferences"
msgstr ""
msgid "user's email account"
msgstr ""
msgid "users"
msgstr ""
......
......@@ -1261,6 +1261,9 @@ msgstr "Usuario o contraseña incorrecta"
msgid "auto"
msgstr "Automático"
msgid "autocomputed attribute used to ensure transition coherency"
msgstr ""
msgid "automatic"
msgstr "Automático"
......@@ -2327,9 +2330,6 @@ msgstr "Tabla modificable"
msgid "eid"
msgstr "eid"
msgid "email address to use for notification"
msgstr "Dirección electrónica a utilizarse para notificar"
msgid "emails successfully sent"
msgstr "Mensajes enviados con éxito"
......@@ -2661,6 +2661,18 @@ msgstr "Grupo en el cual el usuario debe estar lograr la transición"
msgid "groups"
msgstr "Grupos"
msgid "groups allowed to add entities/relations of this type"
msgstr ""
msgid "groups allowed to delete entities/relations of this type"
msgstr ""
msgid "groups allowed to read entities/relations of this type"
msgstr ""
msgid "groups allowed to update entities/relations of this type"
msgstr ""
msgid "groups grant permissions to the user"
msgstr "Los grupos otorgan los permisos al usuario"
......@@ -3654,6 +3666,18 @@ msgstr "Anular modificación"
msgid "right"
msgstr "Derecha"
msgid "rql expression allowing to add entities/relations of this type"
msgstr ""
msgid "rql expression allowing to delete entities/relations of this type"
msgstr ""
msgid "rql expression allowing to read entities/relations of this type"
msgstr ""
msgid "rql expression allowing to update entities/relations of this type"
msgstr ""
msgid "rql expressions"
msgstr "Expresiones RQL"
......@@ -4373,6 +4397,9 @@ msgstr "Encoding de la interfaz de usuario"
msgid "user preferences"
msgstr "Preferencias"
msgid "user's email account"
msgstr ""
msgid "users"
msgstr "Usuarios"
......@@ -4576,3 +4603,6 @@ msgstr ""
#~ msgctxt "CWAttribute"
#~ msgid "cw_schema_object"
#~ msgstr "mapeado por"
#~ msgid "email address to use for notification"
#~ msgstr "Dirección electrónica a utilizarse para notificar"
......@@ -164,7 +164,7 @@ msgstr "l'action '%s' ne prend pas d'option"
#, python-format
msgid ""
"'%s' action for in_state relation should at least have 'linkattr=name' option"
msgstr ""
msgstr "l'action '%s' pour la relation in_state doit au moins avoir l'option 'linkattr=name'"
#, python-format
msgid "'%s' action requires 'linkattr' option"
......@@ -1174,7 +1174,7 @@ msgstr "transitions autorisées depuis cet état"
#, python-format
msgid "allowed values for \"action\" are %s"
msgstr ""
msgstr "les valeurs autorisées pour \"action\" sont %s"
msgid "allowed_transition"
msgstr "transitions autorisées"
......@@ -1259,6 +1259,9 @@ msgstr "Identifiant ou mot de passe incorrect"
msgid "auto"
msgstr "automatique"
msgid "autocomputed attribute used to ensure transition coherency"
msgstr "attribut calculé automatiquement pour assurer la cohérence de la transition"
msgid "automatic"
msgstr "automatique"
......@@ -2326,9 +2329,6 @@ msgstr "table éditable"
msgid "eid"
msgstr "eid"
msgid "email address to use for notification"
msgstr "adresse email à utiliser pour la notification"
msgid "emails successfully sent"
msgstr "courriels envoyés avec succès"
......@@ -2660,6 +2660,18 @@ msgstr ""
msgid "groups"
msgstr "groupes"
msgid "groups allowed to add entities/relations of this type"
msgstr "groupes autorisés à ajouter des entités/relations de ce type"
msgid "groups allowed to delete entities/relations of this type"
msgstr "groupes autorisés à supprimer des entités/relations de ce type"
msgid "groups allowed to read entities/relations of this type"
msgstr "groupes autorisés à lire des entités/relations de ce type"
msgid "groups allowed to update entities/relations of this type"
msgstr "groupes autorisés à mettre à jour des entités/relations de ce type"
msgid "groups grant permissions to the user"
msgstr "les groupes donnent des permissions à l'utilisateur"
......@@ -3239,10 +3251,10 @@ msgid "no associated permissions"
msgstr "aucune permission associée"
msgid "no content next link"
msgstr ""
msgstr "pas de lien 'suivant'"
msgid "no content prev link"
msgstr ""
msgstr "pas de lien 'précédent'"
msgid "no edited fields specified"
msgstr "aucun champ à éditer spécifié"
......@@ -3655,6 +3667,18 @@ msgstr "annuler les changements"
msgid "right"
msgstr "droite"
msgid "rql expression allowing to add entities/relations of this type"
msgstr "expression rql autorisant à ajouter des entités/relations de ce type"
msgid "rql expression allowing to delete entities/relations of this type"
msgstr "expression rql autorisant à supprimer des entités/relations de ce type"
msgid "rql expression allowing to read entities/relations of this type"
msgstr "expression rql autorisant à lire des entités/relations de ce type"
msgid "rql expression allowing to update entities/relations of this type"
msgstr "expression rql autorisant à mettre à jour des entités/relations de ce type"
msgid "rql expressions"
msgstr "conditions rql"
......@@ -4013,10 +4037,10 @@ msgid "the value \"%s\" is already used, use another one"
msgstr "la valeur \"%s\" est déjà utilisée, veuillez utiliser une autre valeur"
msgid "there is no next page"
msgstr ""
msgstr "il n'y a pas de page suivante"
msgid "there is no previous page"
msgstr ""
msgstr "il n'y a pas de page précédente"
msgid "this action is not reversible!"
msgstr ""
......@@ -4372,6 +4396,9 @@ msgstr "encodage utilisé dans l'interface utilisateur"
msgid "user preferences"
msgstr "préférences utilisateur"
msgid "user's email account"
msgstr "email de l'utilisateur"
msgid "users"
msgstr "utilisateurs"
......@@ -4572,7 +4599,3 @@ msgid "you should un-inline relation %s which is supported and may be crossed "
msgstr ""
"vous devriez enlevé la mise en ligne de la relation %s qui est supportée et "
"peut-être croisée"
#~ msgctxt "CWAttribute"
#~ msgid "cw_schema_object"
#~ msgstr "mappé par"
......@@ -83,7 +83,7 @@ class use_email_relation(RelationDefinition):
class primary_email(RelationDefinition):
"""user's primary email"""
"""the prefered email"""
__permissions__ = {
'read': ('managers', 'users', 'guests',),
'add': ('managers', RRQLExpression('U has_update_permission S'),),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment