Browse Source

added empire to coarse translation

pull/1002/head
Stephen Hess 7 years ago
parent
commit
18e7673dc1
  1. 8
      helper/type_mapping.js
  2. 2
      test/unit/helper/type_mapping.js
  3. 6
      test/unit/sanitizer/_layers.js

8
helper/type_mapping.js

@ -49,7 +49,7 @@ var LAYERS_BY_SOURCE = {
openaddresses: [ 'address' ], openaddresses: [ 'address' ],
geonames: [ 'country','macroregion', 'region', 'county','localadmin', geonames: [ 'country','macroregion', 'region', 'county','localadmin',
'locality','borough', 'neighbourhood', 'venue' ], 'locality','borough', 'neighbourhood', 'venue' ],
whosonfirst: [ 'continent', 'country', 'dependency', 'macroregion', 'region', whosonfirst: [ 'continent', 'empire', 'country', 'dependency', 'macroregion', 'region',
'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough',
'neighbourhood', 'microhood', 'disputed', 'venue', 'postalcode', 'neighbourhood', 'microhood', 'disputed', 'venue', 'postalcode',
'continent', 'ocean', 'marinearea'] 'continent', 'ocean', 'marinearea']
@ -61,9 +61,9 @@ var LAYERS_BY_SOURCE = {
* may have layers that mean the same thing but have a different name * may have layers that mean the same thing but have a different name
*/ */
var LAYER_ALIASES = { var LAYER_ALIASES = {
'coarse': [ 'continent', 'country', 'dependency', 'macroregion', 'region', 'coarse': [ 'continent', 'empire', 'country', 'dependency', 'macroregion',
'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough', 'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood',
'neighbourhood', 'microhood', 'disputed', 'postalcode', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode',
'continent', 'ocean', 'marinearea'] 'continent', 'ocean', 'marinearea']
}; };

2
test/unit/helper/type_mapping.js

@ -12,7 +12,7 @@ module.exports.tests.interfaces = function(test, common) {
test('alias layer mapping', function(t) { test('alias layer mapping', function(t) {
t.deepEquals(type_mapping.layer_mapping.coarse, t.deepEquals(type_mapping.layer_mapping.coarse,
[ 'continent', 'country', 'dependency', 'macroregion', [ 'continent', 'empire', 'country', 'dependency', 'macroregion',
'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood',
'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode',
'continent', 'ocean', 'marinearea']); 'continent', 'ocean', 'marinearea']);

6
test/unit/sanitizer/_layers.js

@ -41,7 +41,7 @@ module.exports.tests.sanitize_layers = function(test, common) {
sanitizer.sanitize(raw, clean); sanitizer.sanitize(raw, clean);
var admin_layers = [ 'continent', 'country', 'dependency', 'macroregion', var admin_layers = [ 'continent', 'empire', 'country', 'dependency', 'macroregion',
'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood',
'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode', 'ocean', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode', 'ocean',
'marinearea' ]; 'marinearea' ];
@ -77,7 +77,7 @@ module.exports.tests.sanitize_layers = function(test, common) {
sanitizer.sanitize(raw, clean); sanitizer.sanitize(raw, clean);
var expected_layers = [ 'continent', 'country', 'dependency', var expected_layers = [ 'continent', 'empire', 'country', 'dependency',
'macroregion', 'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macroregion', 'region', 'locality', 'localadmin', 'macrocounty', 'county',
'macrohood', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode', 'macrohood', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode',
'ocean', 'marinearea']; 'ocean', 'marinearea'];
@ -114,7 +114,7 @@ module.exports.tests.sanitize_layers = function(test, common) {
sanitizer.sanitize(raw, clean); sanitizer.sanitize(raw, clean);
var coarse_layers = [ 'continent', var coarse_layers = [ 'continent', 'empire',
'country', 'dependency', 'macroregion', 'region', 'locality', 'localadmin', 'country', 'dependency', 'macroregion', 'region', 'locality', 'localadmin',
'macrocounty', 'county', 'macrohood', 'borough', 'neighbourhood', 'microhood', 'macrocounty', 'county', 'macrohood', 'borough', 'neighbourhood', 'microhood',
'disputed', 'postalcode', 'ocean', 'marinearea' ]; 'disputed', 'postalcode', 'ocean', 'marinearea' ];

Loading…
Cancel
Save