From aa446c074a7ecfaa97ed15062e793dbfc4a317f0 Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Wed, 15 May 2013 17:31:16 -0400 Subject: [PATCH] better placeholder text / proper translation --- data/core.yaml | 7 +++++-- dist/locales/en.json | 7 ++++++- js/id/ui/preset/localized.js | 7 ++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 2933770ca..555d9bcd8 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -126,8 +126,11 @@ en: just_edited: "You just edited OpenStreetMap!" browser_notice: "This editor is supported in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. Please upgrade your browser or use Potlatch 2 to edit the map." view_on_osm: "View on OSM" - translate: Translate - localized_translation_label: Translation + translate: + translate: Translate + localized_translation_label: Translation + localized_translation_language: Choose language + localized_translation_name: Name zoom_in_edit: zoom in to edit the map logout: logout loading_auth: "Connecting to OpenStreetMap..." diff --git a/dist/locales/en.json b/dist/locales/en.json index 02c032568..cb78fa1e1 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -160,7 +160,12 @@ "just_edited": "You just edited OpenStreetMap!", "browser_notice": "This editor is supported in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. Please upgrade your browser or use Potlatch 2 to edit the map.", "view_on_osm": "View on OSM", - "translate": "Translate", + "translate": { + "translate": "Translate", + "localized_translation_label": "Translation", + "localized_translation_language": "Choose language", + "localized_translation_name": "Name" + }, "localized_translation_label": "Translation", "zoom_in_edit": "zoom in to edit the map", "logout": "logout", diff --git a/js/id/ui/preset/localized.js b/js/id/ui/preset/localized.js index 9056afbff..2776795d1 100644 --- a/js/id/ui/preset/localized.js +++ b/js/id/ui/preset/localized.js @@ -23,7 +23,7 @@ iD.ui.preset.localized = function(field, context) { .attr('class', 'icon plus'); translateButton.call(bootstrap.tooltip() - .title(t('translate')) + .title(t('translate.translate')) .placement('top')); localizedInputs = selection.append('div') @@ -99,13 +99,13 @@ iD.ui.preset.localized = function(field, context) { wrap.append('label') .attr('class','form-label') - .text(t('localized_translation_label')) + .text(t('translate.localized_translation_label')) .attr('for','localized-lang'); wrap.append('input') .attr('class', 'localized-lang') .attr('type', 'text') - .attr('placeholder','Choose language') + .attr('placeholder',t('translate.localized_translation_language')) .on('blur', changeLang) .on('change', changeLang) .call(langcombo); @@ -114,6 +114,7 @@ iD.ui.preset.localized = function(field, context) { .on('blur', changeValue) .on('change', changeValue) .attr('type', 'text') + .attr('placeholder', t('translate.localized_translation_name')) .attr('class', 'localized-value'); wrap.append('button')