[PATCH 1 of 6 seda] [i18n] Fix some labels as asked by #17066620

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 29 10:28:36 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1490713077 -7200
#      Tue Mar 28 16:57:57 2017 +0200
# Node ID cad5126a0335566eeb71b8e15d01b831a3307ee6
# Parent  a88deb387b2beaa2b976493fffbab1b7dac467b4
[i18n] Fix some labels as asked by #17066620

Some of them being in .pot, others in persistent vocabularies requiring some
migration.

Closes #17066620

diff --git a/cubicweb_seda/i18n/fr.po b/cubicweb_seda/i18n/fr.po
--- a/cubicweb_seda/i18n/fr.po
+++ b/cubicweb_seda/i18n/fr.po
@@ -5296,11 +5296,11 @@ msgstr ""
 msgctxt "ConceptScheme"
 msgid "seda_appraisal_rule_code_list_version_to_object"
 msgstr ""
 
 msgid "seda_appraisal_rule_object"
-msgstr "durée d'utilité administrative"
+msgstr "durée d'utilité administrative et sort final"
 
 msgctxt "SEDAArchiveTransfer"
 msgid "seda_appraisal_rule_object"
 msgstr ""
 
@@ -5418,11 +5418,11 @@ msgstr ""
 
 msgid "seda_archive_units_tab"
 msgstr "unités d'archives"
 
 msgid "seda_at_code_list_versions_tab"
-msgstr "vocabulaires (CodeListVersions)"
+msgstr "vocabulaires"
 
 msgid "seda_at_data_objects_tab"
 msgstr "objets-données"
 
 msgid "seda_at_diagnose_tab"
@@ -6564,11 +6564,11 @@ msgstr ""
 msgctxt "SEDALegalStatus"
 msgid "seda_legal_status_from"
 msgstr ""
 
 msgid "seda_legal_status_from_object"
-msgstr "statut légal"
+msgstr "nature des archives"
 
 msgctxt "SEDAArchiveTransfer"
 msgid "seda_legal_status_from_object"
 msgstr ""
 
diff --git a/cubicweb_seda/migration/0.9.1_Any.py b/cubicweb_seda/migration/0.9.1_Any.py
--- a/cubicweb_seda/migration/0.9.1_Any.py
+++ b/cubicweb_seda/migration/0.9.1_Any.py
@@ -1,9 +1,18 @@
+# coding: utf-8
+
 for e in rql('Any X groupby X WHERE X container C HAVING COUNT(C) > 1').entities():
     container = max(c.eid for c in e.container)
     e.cw_set(container=None)
     e.cw_set(container=container)
     commit()
 
 sync_schema_props_perms('container')
 
+scheme = cnx.find('ConceptScheme', title=u'SEDA 2 : Status légaux').one()
+for old_label, new_label in [(u'Archive publique', u'Archives publiques'),
+                             (u'Archive privée', u'Archives privées')]:
+    label = rql('Label X WHERE X label %(l)s, X label_of C, C in_scheme S, S eid %(s)s',
+                {'s': scheme.eid, 'l': old_label}).one()
+    label.cw_set(label=new_label)
 
+commit()
diff --git a/cubicweb_seda/migration/data/legal_status.csv b/cubicweb_seda/migration/data/legal_status.csv
--- a/cubicweb_seda/migration/data/legal_status.csv
+++ b/cubicweb_seda/migration/data/legal_status.csv
@@ -1,6 +1,6 @@
 #;$id;Valeur;définition
 type;url;string;string
 lang;;seda;fr
 url;skos:Concept;skos:prefLabel;skos:prefLabel
-;;Public Archive;Archive publique
-;;Private Archive;Archive privée
+;;Public Archive;Archives publiques
+;;Private Archive;Archives privées


More information about the saem-devel mailing list