Skip to content

Commit dfb8a8c

Browse files
committed
Partial revert. No need for prefixes
1 parent 141f520 commit dfb8a8c

File tree

3 files changed

+15
-24
lines changed

3 files changed

+15
-24
lines changed

DCAT.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,9 @@ function validateConfig( array $config ) {
7171
*/
7272
function makeI18nBlob( array $langs, array $config ) {
7373
// load i18n files into i18n array
74-
$prefix = "dcatap-";
7574
$i18n = array();
7675
foreach ( $langs as $langCode => $filename ) {
77-
$json = json_decode( file_get_contents( $filename ), true );
78-
$i18n[$langCode] = array();
79-
// strip prefix
80-
foreach ( $json as $key => $value ) {
81-
if ( is_string( $value ) ) {
82-
$key = substr( $key, strlen( $prefix ) );
83-
$i18n[$langCode][$key] = $value;
84-
}
85-
}
76+
$i18n[$langCode] = json_decode( file_get_contents( $filename ), true );
8677
}
8778

8879
// load catalog i18n info from URL and add to i18n object

i18n/en.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"@metadata": {
33
"authors": ["Lokal_Profil"]
44
},
5-
"dcatap-dataset-live-title": "Live access",
6-
"dcatap-dataset-live-description": "The live version of the data, includes entities and properties. Only non-deprecated formats are listed as distributions.",
7-
"dcatap-dataset-dump-title": "Entity dump of $1",
8-
"dcatap-dataset-dump-description": "A static dump of all entites for the given date.",
9-
"dcatap-distribution-ld-description": "The Linked Data endpoint. Format is resolved through content negotiation.",
10-
"dcatap-distribution-api-description": "The MediaWiki API endpoint. Format is given through the \"format\" parameter.",
11-
"dcatap-distribution-dump-description": "A gziped $1 file."
5+
"dataset-live-title": "Live access",
6+
"dataset-live-description": "The live version of the data, includes entities and properties. Only non-deprecated formats are listed as distributions.",
7+
"dataset-dump-title": "Entity dump of $1",
8+
"dataset-dump-description": "A static dump of all entites for the given date.",
9+
"distribution-ld-description": "The Linked Data endpoint. Format is resolved through content negotiation.",
10+
"distribution-api-description": "The MediaWiki API endpoint. Format is given through the \"format\" parameter.",
11+
"distribution-dump-description": "A gziped $1 file."
1212
}

i18n/qqq.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"@metadata": {
33
"authors": ["Lokal_Profil"]
44
},
5-
"dcatap-dataset-live-title": "The title for the live access dataset",
6-
"dcatap-dataset-live-description": "The description of the live access dataset. For terminology see https://www.wikidata.org/wiki/Wikidata:Glossary. For deprecation see https://en.wikipedia.org/wiki/Deprecation.",
7-
"dcatap-dataset-dump-title": "The title for the entity dump where $1 is the date of the dump in the format YYYYMMDD",
8-
"dcatap-dataset-dump-description": "The description of the entity dump for the given date.",
9-
"dcatap-distribution-ld-description": "The description of the Linked Data endpoint. For content negotiation see https://en.wikipedia.org/wiki/Content_negotiation",
10-
"dcatap-distribution-api-description": "The description of the MediaWiki API endpoint. Leave \"format\" untranslated.",
11-
"dcatap-distribution-dump-description": "The description of a dump file where $1 is the file format."
5+
"dataset-live-title": "The title for the live access dataset",
6+
"dataset-live-description": "The description of the live access dataset. For terminology see https://www.wikidata.org/wiki/Wikidata:Glossary. For deprecation see https://en.wikipedia.org/wiki/Deprecation.",
7+
"dataset-dump-title": "The title for the entity dump where $1 is the date of the dump in the format YYYYMMDD",
8+
"dataset-dump-description": "The description of the entity dump for the given date.",
9+
"distribution-ld-description": "The description of the Linked Data endpoint. For content negotiation see https://en.wikipedia.org/wiki/Content_negotiation",
10+
"distribution-api-description": "The description of the MediaWiki API endpoint. Leave \"format\" untranslated.",
11+
"distribution-dump-description": "The description of a dump file where $1 is the file format."
1212
}

0 commit comments

Comments
 (0)