[i18n] Fix some labels as asked by #17066620
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 28 Mar 2017 16:57:57 +0200
changeset 2545 fe959b171205
parent 2544 d642581ad90b
child 2546 377976b673e0
[i18n] Fix some labels as asked by #17066620 Some of them being in .pot, others in persistent vocabularies requiring some migration. Closes #17066620
cubicweb_seda/i18n/fr.po
cubicweb_seda/migration/0.9.1_Any.py
cubicweb_seda/migration/data/legal_status.csv
--- a/cubicweb_seda/i18n/fr.po	Wed Mar 29 09:54:11 2017 +0200
+++ b/cubicweb_seda/i18n/fr.po	Tue Mar 28 16:57:57 2017 +0200
@@ -5298,7 +5298,7 @@
 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"
@@ -5420,7 +5420,7 @@
 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"
@@ -6566,7 +6566,7 @@
 msgstr ""
 
 msgid "seda_legal_status_from_object"
-msgstr "statut légal"
+msgstr "nature des archives"
 
 msgctxt "SEDAArchiveTransfer"
 msgid "seda_legal_status_from_object"
--- a/cubicweb_seda/migration/0.9.1_Any.py	Wed Mar 29 09:54:11 2017 +0200
+++ b/cubicweb_seda/migration/0.9.1_Any.py	Tue Mar 28 16:57:57 2017 +0200
@@ -1,3 +1,5 @@
+# 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)
@@ -6,4 +8,11 @@
 
 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()
--- a/cubicweb_seda/migration/data/legal_status.csv	Wed Mar 29 09:54:11 2017 +0200
+++ b/cubicweb_seda/migration/data/legal_status.csv	Tue Mar 28 16:57:57 2017 +0200
@@ -2,5 +2,5 @@
 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