From 804051af2b61de0052679c6ac92a263bff097555 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 5 Sep 2016 15:32:18 +0100 Subject: Translate "Next" and "More details". Fixes #231. Fixes #233. --- templates/strings.js | 1 + www/js/map-OpenLayers.js | 2 +- www/js/strings.js | 1 + www/js/views/offline.js | 2 +- www/js/views/photo.js | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/strings.js b/templates/strings.js index f7866ad..aac7650 100644 --- a/templates/strings.js +++ b/templates/strings.js @@ -20,6 +20,7 @@ password: '[% loc('Please enter a password') %]' }, strings: { + next: '[% loc('Next') %]', login_error: '[% loc('There was a problem logging you in. Please try again later.') %]', logout_error: '[% loc('There was a problem logging you out. Please try again later.') %]', login_details_error: '[% loc('There was a problem logging you in. Please check your email and password and that you have confirmed your password.') %]', diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js index 8a60e30..58bace6 100644 --- a/www/js/map-OpenLayers.js +++ b/www/js/map-OpenLayers.js @@ -165,7 +165,7 @@ function fixmystreet_onload() { var popup = new OpenLayers.Popup.FramedCloud("popup", feature.geometry.getBounds().getCenterLonLat(), null, - feature.attributes.title + "
More details", + feature.attributes.title + "
" + FMS.strings.more_details + "", { size: new OpenLayers.Size(0,0), offset: new OpenLayers.Pixel(0,-40) }, true, onPopupClose); feature.popup = popup; diff --git a/www/js/strings.js b/www/js/strings.js index 9cb6ae0..3fdab41 100644 --- a/www/js/strings.js +++ b/www/js/strings.js @@ -20,6 +20,7 @@ password: 'Please enter a password' }, strings: { + next: 'Next', login_error: 'There was a problem logging you in. Please try again later.', logout_error: 'There was a problem logging you out. Please try again later.', login_details_error: 'There was a problem logging you in. Please check your email and password and that you have confirmed your password.', diff --git a/www/js/views/offline.js b/www/js/views/offline.js index 711f7d3..3c2f7af 100644 --- a/www/js/views/offline.js +++ b/www/js/views/offline.js @@ -90,7 +90,7 @@ that.model.set('file', file.toURL()); FMS.saveCurrentDraft(); - $('#photo-next-btn .ui-btn-text').text('Next'); + $('#photo-next-btn .ui-btn-text').text(FMS.strings.next); $('#display_photo').show(); $('#add_photo').hide(); }); diff --git a/www/js/views/photo.js b/www/js/views/photo.js index bbef5fa..8891298 100644 --- a/www/js/views/photo.js +++ b/www/js/views/photo.js @@ -92,7 +92,7 @@ that.model.set('file', file.toURL()); FMS.saveCurrentDraft(); - $('#photo-next-btn .ui-btn-text').text('Next'); + $('#photo-next-btn .ui-btn-text').text(FMS.strings.next); $('#id_photo_button').parents('.ui-btn').hide(); $('#id_existing').parents('.ui-btn').hide(); $('#photo').show(); -- cgit v1.2.3