Skip to content

Cannot successfully edit an imported bilingual record #134

@heidivanparys

Description

@heidivanparys

I created the following small test file.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dcat="http://www.w3.org/ns/dcat#"
    xmlns:dct="http://purl.org/dc/terms/"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:dcatap="http://data.europa.eu/r5r/">
    <dcat:Catalog>
        <dcat:dataset>
            <dcat:Dataset>
                <dct:description xml:lang="en">Description</dct:description>
                <dct:description xml:lang="nl">Beschrijving</dct:description>
                <dct:identifier>cec47785-bfbc-416a-8c85-7648b6c07abc</dct:identifier>
                <dct:publisher>
                    <foaf:Agent>
                        <foaf:name xml:lang="en">Example organisation</foaf:name>
                        <foaf:name xml:lang="nl">Voorbeeldorganisatie</foaf:name>
                        <foaf:mbox rdf:resource="mailto:example@example.org" />
                    </foaf:Agent>
                </dct:publisher>
                <dct:title xml:lang="en">Minimal example with English and Dutch</dct:title>
                <dct:title xml:lang="nl">Minimaal voorbeeld met Engels en Nederlands</dct:title>
            </dcat:Dataset>
        </dcat:dataset>
        <dcat:record>
            <dcat:CatalogRecord>
                <dct:language>
                    <skos:Concept rdf:about="http://publications.europa.eu/resource/authority/language/ENG">
                        <skos:inScheme rdf:resource="http://publications.europa.eu/resource/authority/language" />
                    </skos:Concept>
                </dct:language>
                <dct:language>
                    <skos:Concept rdf:about="http://publications.europa.eu/resource/authority/language/NLD">
                        <skos:inScheme rdf:resource="http://publications.europa.eu/resource/authority/language" />
                    </skos:Concept>
                </dct:language>
                <dct:identifier>b5d89334-2424-4751-a23b-cb994c4825e7</dct:identifier>
            </dcat:CatalogRecord>
        </dcat:record>
    </dcat:Catalog>
</rdf:RDF>

I can successfully import the file using "Contribute" -> Import new records".

When I view the record, the title, description and organisation are shown in Dutch when I choose Dutch in the GUI, and in English when I choose English in the GUI.

I noticed though, that "en" is listed as a Metadata language, independent of whether I choose Dutch or English.

Image Image

When I push the "Edit" button, the title, description and organisation can be seen in both languages in the "Dataset" tab.

Image

When I then go to the "Record" tab, it is shown correctly that the languages of the catalog record are English and Dutch.

Image

However, when I then try to go back to the "Dataset" tab, nothing happens.

Image

The log file shows a NullPointerException, see log.txt.

It has something to do with dct:language:

Image

I tested the plugin with the code at commit 81e6433.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions