From 6423455c66b450ee5ca6041c46c18be4be0bd9a0 Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Wed, 15 May 2013 14:23:30 -0400 Subject: [PATCH] starting to add basic translate ui adjustments. --- data/core.yaml | 1 + dist/locales/en.json | 1 + js/id/ui/preset/localized.js | 17 +++++++++++------ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index c1e79ec08..be00c0506 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -126,6 +126,7 @@ 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 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 59e15673a..c80078437 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -160,6 +160,7 @@ "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", "zoom_in_edit": "zoom in to edit the map", "logout": "logout", "loading_auth": "Connecting to OpenStreetMap...", diff --git a/js/id/ui/preset/localized.js b/js/id/ui/preset/localized.js index d6dfc6991..b5af46888 100644 --- a/js/id/ui/preset/localized.js +++ b/js/id/ui/preset/localized.js @@ -15,15 +15,20 @@ iD.ui.preset.localized = function(field, context) { .on('change', change) .call(iD.behavior.accept().on('accept', event.close)); - selection.append('button') - .attr('class', 'localized-add') - .on('click', addBlank) - .append('span') - .attr('class', 'icon plus-dark'); - localizedInputs = selection.append('div') .attr('class', 'localized-wrap'); + var translateButton = selection.append('button') + .attr('class', 'localized-add') + .on('click', addBlank); + + translateButton.append('span') + .attr('class', 'icon translate'); + + translateButton.call(bootstrap.tooltip() + .title(t('translate')) + .placement('top')); + } function addBlank() {