[PATCH seda] [vocabularies] Fix seda languages for the MIME type vocabulary

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Aug 16 16:07:53 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1502890386 -7200
#      Wed Aug 16 15:33:06 2017 +0200
# Node ID 12ff9f4270d1a39153cd059aeb4f826f6816c929
# Parent  2849b0757245c6d69888718c12452e75d7371f18
[vocabularies] Fix seda languages for the MIME type vocabulary

Values are not SEDA 2 specific, they should be used for every SEDA version, so
change 'SEDA-2' into 'SEDA' else the english value is used for SEDA 1.0 and
0.2.

Closes extranet #32206261

diff --git a/cubicweb_seda/migration/0.10.6_Any.py b/cubicweb_seda/migration/0.10.6_Any.py
new file mode 100644
--- /dev/null
+++ b/cubicweb_seda/migration/0.10.6_Any.py
@@ -0,0 +1,10 @@
+scheme = cnx.find('ConceptScheme', title=u'Types MIME').one()
+sql("""
+UPDATE cw_label SET cw_language_code = 'seda'
+FROM cw_concept, in_scheme_relation
+WHERE in_scheme_relation.eid_to = {}
+AND cw_concept.cw_eid = in_scheme_relation.eid_from
+AND cw_label_of = cw_concept.cw_eid
+AND cw_language_code = 'seda-2'
+""".format(scheme.eid))
+
diff --git a/cubicweb_seda/migration/data/mime_types.csv b/cubicweb_seda/migration/data/mime_types.csv
--- a/cubicweb_seda/migration/data/mime_types.csv
+++ b/cubicweb_seda/migration/data/mime_types.csv
@@ -1,8 +1,8 @@
-#;$id;libellé SEDA 2;libellé anglais
+#;$id;libellé SEDA;libellé anglais
 type;url;string;string
-lang;;seda-2;en
+lang;;seda;en
 url;skos:Concept;skos:prefLabel;skos:prefLabel
 ;;application/1d-interleaved-parityfec;1d-interleaved-parityfec
 ;;application/3gpp-ims+xml;3gpp-ims+xml
 ;;application/activemessage;activemessage
 ;;application/andrew-inset;andrew-inset


More information about the saem-devel mailing list