Skip to content
Snippets Groups Projects
Commit 579390db authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Added english texts for default values of sample dataset and spatial reference

parent 261dcd07
No related branches found
No related tags found
1 merge request!52Added applicableLegislation and hvdCategory support
...@@ -23,7 +23,6 @@ import ckan.lib.helpers as helpers ...@@ -23,7 +23,6 @@ import ckan.lib.helpers as helpers
from collections import OrderedDict from collections import OrderedDict
import pkg_resources import pkg_resources
CKAN_TYPES = {'http://dcat-ap.de/def/datasetTypes/collection': 'collection'} CKAN_TYPES = {'http://dcat-ap.de/def/datasetTypes/collection': 'collection'}
get_action = logic.get_action get_action = logic.get_action
...@@ -561,7 +560,7 @@ def odsh_load_mdk_sample_dataset(): ...@@ -561,7 +560,7 @@ def odsh_load_mdk_sample_dataset():
with open(sample_data_file_path) as mapping_json: with open(sample_data_file_path) as mapping_json:
MDK_MAPPING = json.loads( MDK_MAPPING = json.loads(
mapping_json.read(), object_pairs_hook=OrderedDict) mapping_json.read(), object_pairs_hook=OrderedDict)
default = [{'value': 'Musterdatensatz wählen..', 'key': ''}] default = [{'value': toolkit._('Select sample dataset..'), 'key': ''}]
mdk = [{'key': key, 'value': MDK_MAPPING[key]} mdk = [{'key': key, 'value': MDK_MAPPING[key]}
for key in MDK_MAPPING] for key in MDK_MAPPING]
result = default+mdk result = default+mdk
...@@ -732,6 +731,7 @@ def get_spatial_for_selection(): ...@@ -732,6 +731,7 @@ def get_spatial_for_selection():
spatial_mapping = list(cr) spatial_mapping = list(cr)
unique_mapping = [] unique_mapping = []
unique_mapping.append({'value': toolkit._('Select spatial reference..'), 'key': ''})
seen_values = set() seen_values = set()
for key, value, _ in spatial_mapping: for key, value, _ in spatial_mapping:
if value in seen_values: if value in seen_values:
...@@ -757,7 +757,6 @@ def get_spatial_for_selection(): ...@@ -757,7 +757,6 @@ def get_spatial_for_selection():
seen_values.add(value) seen_values.add(value)
unique_mapping.append({'key': '', 'value': ''})
return unique_mapping return unique_mapping
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment