Skip to content

Commit

Permalink
Order dataTypeAliases entries, refs 1966 (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwjames committed Oct 26, 2016
1 parent 01d9ede commit 36f51a5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
18 changes: 8 additions & 10 deletions i18n/extra/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,28 @@
"_ref_rec": "Reference"
},
"dataTypeAliases":{
"URI": "_uri",
"Float": "_num",
"Integer": "_num",
"Enumeration" : "_txt",
"String": "_txt",
"Phone number": "_tel",
"E-mail": "_ema",
"Geographic coordinate": "_geo",
"Geographic polygon": "_gpo",
"URL": "_uri",
"URI": "_uri",
"Page": "_wpg",
"String": "_txt",
"Text": "_txt",
"Enumeration" : "_txt",
"String": "_txt",
"Code": "_cod",
"Boolean": "_boo",
"Number": "_num",
"Float": "_num",
"Integer": "_num",
"Geographic coordinates": "_geo",
"Geographic coordinate": "_geo",
"Geographic polygon": "_gpo",
"Temperature": "_tem",
"Quantity": "_qty",
"Date": "_dat",
"Email": "_ema",
"E-mail": "_ema",
"Annotation URI": "_anu",
"Telephone number": "_tel",
"Phone number": "_tel",
"Record": "_rec",
"Monolingual text": "_mlt_rec",
"External identifier": "_eid",
Expand Down
9 changes: 7 additions & 2 deletions src/ExtraneousLanguage/ExtraneousLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,15 @@ public function getDatatypeLabels() {
* @return array
*/
public function getCanonicalDatatypeLabels() {
return $this->languageContents->getFromLanguageWithIndex(

$datatypeLabels = $this->languageContents->getFromLanguageWithIndex(
$this->languageContents->getCanonicalFallbackLanguageCode(),
'dataTypeAliases'
'dataTypeLabels'
);

$canonicalPropertyLabels = array_flip( $datatypeLabels );

return $canonicalPropertyLabels;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public function canonicalPropertyLabelsProvider() {
'_boo'
);

$provider[] = array(
'en',
'Float',
'_num'
);

return $provider;
}

Expand Down

0 comments on commit 36f51a5

Please sign in to comment.