GovDataOfficial / DCAT-AP.de-SHACL-Validation

SHACL-Shapes für DCAT-AP.de
https://www.itb.ec.europa.eu/shacl/dcat-ap.de/upload
GNU Affero General Public License v3.0
10 stars 7 forks source link

Support for English #11

Closed costas80 closed 2 years ago

costas80 commented 2 years ago

Adapted the DCAT-AP.de validator configuration to support English alongside German (which remains the validator's default language). As part of this update:

Making this update also resolved some remaining translation issues of the current version. Such examples are the "about" footer and the "busy" message that is displayed while validation is being carried out.

Important: The current pull request covers only the validator's texts and labels. To have complete support for both English and German you would still need to add relevant translations to the SHACL shape files. This is done by adding language-specific sh:message entries for each shape.

For example, taking a shape such as the following:

    sh:property [
        sh:severity sh:Violation ;
        sh:message "Pflicht (K12): Alle Datenstrukturen, die direkt an das GovData Portal geliefert werden, MÜSSEN ihre Herkunft über eine eindeutige Kennzeichnung des Datenbereitstellers über die DatenbereitstellerID (dcatde:contributorID) ausweisen. - Seite 13"; 
        sh:path dcatde:contributorID ;
        sh:minCount 1 ;
    ]

it would need to be adapted to define an sh:message for each language as follows:

    sh:property [
        sh:severity sh:Violation ;
        sh:message "Pflicht (K12): Alle Datenstrukturen, die direkt an das GovData Portal geliefert werden, MÜSSEN ihre Herkunft über eine eindeutige Kennzeichnung des Datenbereitstellers über die DatenbereitstellerID (dcatde:contributorID) ausweisen. - Seite 13"@de ; 
        sh:message "Mandatory (K12): All data structures that are delivered directly to the GovData Portal MUST identify their origin by clearly identifying the data provider using the data provider ID (dcatde:contributorID). - Page 13"@en ; 
        sh:path dcatde:contributorID ;
        sh:minCount 1 ;
    ]

Without updating the shapes as described, the produced reports will remain identical to what is currently produced. This means that although a user has selected English on the UI, the produced reports will still contain German messages.

Needless to say, this PR relates to adding English support, but extending further for additional languages is a matter of adding the language to the configuration, adding its translation file, and adding the relevant sh:messages to the shapes. All official EU languages can be added easily in this way.