- // Pull in 118n names for node/way
- var featureNameSelectTypeTranslations = new Array();
- featureNameSelectTypeTranslations['node'] = "#{I18n.t('browse.start_rjs.object_list.selected.type.node')}"
- featureNameSelectTypeTranslations['way'] = "#{I18n.t('browse.start_rjs.object_list.selected.type.way')}"
- return featureNameSelectTypeTranslations[featureType(feature)] + " " + feature.osm_id;
+ return feature.osm_id;
+ }
+ }
+
+ function featureNameSelect(feature) {
+ if (feature.attributes['name:#{I18n.locale}']) {
+ return feature.attributes['name:#{I18n.locale}'];
+ } else if (feature.attributes.name) {
+ return feature.attributes.name;
+ } else if (featureType(feature) == "node") {
+ return i18n("#{I18n.t('browse.start_rjs.object_list.selected.type.node')}", { id: feature.osm_id });
+ } else if (featureType(feature) == "way") {
+ return i18n("#{I18n.t('browse.start_rjs.object_list.selected.type.way')}", { id: feature.osm_id });