diff --git a/js/id/ui/preset/combo.js b/js/id/ui/preset/combo.js index 12195a6c4..dc1b93d88 100644 --- a/js/id/ui/preset/combo.js +++ b/js/id/ui/preset/combo.js @@ -2,6 +2,7 @@ iD.ui.preset.combo = iD.ui.preset.typeCombo = function(field) { var event = d3.dispatch('change'), optstrings = field.strings && field.strings.options, + optarray = field.options, strings = {}, input; @@ -28,6 +29,11 @@ iD.ui.preset.typeCombo = function(field) { strings[k] = field.t('options.' + k, { 'default': v }); }); stringsLoaded(); + } else if (optarray) { + _.each(optarray, function(k) { + strings[k] = k.replace(/_+/g, ' '); + }); + stringsLoaded(); } else { iD.taginfo().values({key: field.key}, function(err, data) { if (!err) { @@ -53,7 +59,7 @@ iD.ui.preset.typeCombo = function(field) { return o; })); - placeholders = strs.length ? strs : keys; + placeholders = strs.length > 1 ? strs : keys; input.attr('placeholder', field.placeholder() || (placeholders.slice(0, 3).join(', ') + '...')); }