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 From aa1d6f8a74e44f82ad874dd5b2b24c2772deec9a Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 5 Sep 2016 15:39:01 +0100 Subject: Translated "Untitled draft". --- locale/FixMyStreetMobileApp.po | 84 +++++++++++---------- .../LC_MESSAGES/FixMyStreetMobileApp.po | 86 ++++++++++++---------- templates/strings.js | 1 + www/js/models/draft.js | 2 +- www/js/strings.js | 1 + 5 files changed, 93 insertions(+), 81 deletions(-) diff --git a/locale/FixMyStreetMobileApp.po b/locale/FixMyStreetMobileApp.po index 11900db..bfe2816 100644 --- a/locale/FixMyStreetMobileApp.po +++ b/locale/FixMyStreetMobileApp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: struan@mysociety.org\n" -"POT-Creation-Date: 2013-09-18 18:01+0100\n" +"POT-Creation-Date: 2016-09-05 15:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid "(optional)" msgstr "" -#: templates/existing.html:12 templates/strings.js:40 +#: templates/existing.html:12 templates/strings.js:42 msgid "-- Pick a category --" msgstr "" @@ -45,7 +45,7 @@ msgstr "" msgid "Add an existing photo" msgstr "" -#: templates/strings.js:31 +#: templates/strings.js:33 msgid "An error was encountered when submitting your report: " msgstr "" @@ -61,7 +61,7 @@ msgstr "" msgid "Confirm Location" msgstr "" -#: templates/submit_password.html:38 +#: templates/submit_password.html:46 msgid "Confirm name" msgstr "" @@ -73,11 +73,11 @@ msgstr "" msgid "Continue" msgstr "" -#: templates/strings.js:39 +#: templates/strings.js:41 msgid "Could not access location services. Please check permissions." msgstr "" -#: templates/strings.js:42 +#: templates/strings.js:44 msgid "Could not get location." msgstr "" @@ -113,7 +113,7 @@ msgstr "" msgid "Further Details" msgstr "" -#: templates/strings.js:41 +#: templates/strings.js:43 msgid "Got location." msgstr "" @@ -137,11 +137,11 @@ msgstr "" msgid "If you start compiling a report, but don't finish and send it, it'll appear in this menu so you can finish it later" msgstr "" -#: templates/strings.js:44 +#: templates/strings.js:46 msgid "Invalid email" msgstr "" -#: templates/strings.js:45 +#: templates/strings.js:47 msgid "Invalid report" msgstr "" @@ -149,7 +149,7 @@ msgstr "" msgid "Locate (optional)" msgstr "" -#: templates/strings.js:28 +#: templates/strings.js:30 msgid "Location error" msgstr "" @@ -157,11 +157,11 @@ msgstr "" msgid "Login" msgstr "" -#: templates/strings.js:53 +#: templates/strings.js:55 msgid "More details" msgstr "" -#: templates/strings.js:30 +#: templates/strings.js:32 msgid "More than one location matched that name. Select one below or try entering street name and area, or a postcode." msgstr "" @@ -169,11 +169,11 @@ msgstr "" msgid "New Report Here" msgstr "" -#: templates/details.html:3 templates/details_extra.html:3 templates/photo.html:6 +#: templates/details.html:3 templates/details_extra.html:3 templates/photo.html:6 templates/strings.js:23 msgid "Next" msgstr "" -#: templates/strings.js:52 +#: templates/strings.js:54 msgid "No network connection available for submitting your report. Please try again later." msgstr "" @@ -193,11 +193,11 @@ msgstr "" msgid "Oh dear - we can't detect an internet connection. However you can still start a report now and complete it later, by going to 'drafts' when you're back online." msgstr "" -#: templates/submit_confirm.html:21 templates/submit_name.html:26 +#: templates/submit_confirm.html:29 templates/submit_name.html:26 msgid "Optionally enter your phone number" msgstr "" -#: templates/strings.js:47 +#: templates/strings.js:49 msgid "Photo added" msgstr "" @@ -213,7 +213,7 @@ msgstr "" msgid "Please confirm your name, if you want it to be public and optionally your phone number." msgstr "" -#: templates/strings.js:34 +#: templates/strings.js:36 msgid "Please enter a location" msgstr "" @@ -249,11 +249,11 @@ msgstr "" msgid "Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box below" msgstr "" -#: templates/strings.js:8 templates/submit_confirm.html:18 templates/submit_name.html:23 +#: templates/strings.js:8 templates/submit_confirm.html:26 templates/submit_name.html:23 msgid "Please enter your name" msgstr "" -#: templates/submit_password.html:28 +#: templates/submit_password.html:36 msgid "Please enter your phone number (optional)" msgstr "" @@ -265,7 +265,7 @@ msgstr "" msgid "Please give us some basic details, and you're nearly done." msgstr "" -#: templates/strings.js:37 +#: templates/strings.js:39 msgid "Please search for a street name and area, or postcode." msgstr "" @@ -277,7 +277,7 @@ msgstr "" msgid "Remove Photo" msgstr "" -#: templates/submit_confirm.html:29 templates/submit_password.html:15 +#: templates/submit_confirm.html:37 templates/submit_password.html:15 msgid "Report" msgstr "" @@ -289,7 +289,7 @@ msgstr "" msgid "Reposition Report Here" msgstr "" -#: templates/strings.js:51 +#: templates/strings.js:53 msgid "Save for Later" msgstr "" @@ -297,7 +297,7 @@ msgstr "" msgid "Save for later" msgstr "" -#: templates/strings.js:27 +#: templates/strings.js:29 msgid "Search for a place or postcode" msgstr "" @@ -313,7 +313,7 @@ msgstr "" msgid "Set Report Location" msgstr "" -#: templates/submit_confirm.html:25 templates/submit_name.html:31 templates/submit_password.html:33 +#: templates/submit_confirm.html:33 templates/submit_name.html:31 templates/submit_password.html:41 msgid "Show my name publicly" msgstr "" @@ -333,7 +333,7 @@ msgstr "" msgid "Skip" msgstr "" -#: templates/strings.js:38 +#: templates/strings.js:40 msgid "Sorry, but we weren't able to establish your location accurately enough to show you a map. Please enter a location in the search box instead" msgstr "" @@ -365,47 +365,47 @@ msgstr "" msgid "There isn't an internet connection, do you want to save the current report for later?" msgstr "" -#: templates/strings.js:36 +#: templates/strings.js:38 msgid "There was a problem checking if we have all the details we need. Please try again later." msgstr "" -#: templates/strings.js:35 +#: templates/strings.js:37 msgid "There was a problem checking we cover this location. Please try again later." msgstr "" -#: templates/strings.js:25 +#: templates/strings.js:27 msgid "There was a problem logging you in. Please check your email and password and that you have confirmed your password." msgstr "" -#: templates/strings.js:23 +#: templates/strings.js:25 msgid "There was a problem logging you in. Please try again later." msgstr "" -#: templates/strings.js:24 +#: templates/strings.js:26 msgid "There was a problem logging you out. Please try again later." msgstr "" -#: templates/strings.js:29 +#: templates/strings.js:31 msgid "There was a problem looking up your location." msgstr "" -#: templates/strings.js:32 +#: templates/strings.js:34 msgid "There was a problem submitting your report. Please try again later." msgstr "" -#: templates/strings.js:33 +#: templates/strings.js:35 msgid "There was a problem submitting your report. Please try again." msgstr "" -#: templates/strings.js:46 +#: templates/strings.js:48 msgid "There was a problem taking your photo." msgstr "" -#: templates/strings.js:49 +#: templates/strings.js:51 msgid "There was a problem uploading your report." msgstr "" -#: templates/strings.js:26 +#: templates/strings.js:28 msgid "There was a problem with your email/password combination. If you have forgotten your password, or do not have one, you can set one by returning to the email screen and selecting the set password option. Passwords are not activated until the link in the confirmation email is clicked." msgstr "" @@ -421,7 +421,7 @@ msgstr "" msgid "This report has a position." msgstr "" -#: templates/submit_name.html:16 templates/submit_name.html:17 +#: templates/submit_confirm.html:19 templates/submit_confirm.html:20 templates/submit_name.html:16 templates/submit_name.html:17 templates/submit_password.html:26 templates/submit_password.html:27 msgid "Title" msgstr "" @@ -429,7 +429,7 @@ msgstr "" msgid "To skip this step in future, you can set a password now." msgstr "" -#: templates/offline.html:2 templates/strings.js:50 +#: templates/offline.html:2 templates/strings.js:52 msgid "Try Again" msgstr "" @@ -437,7 +437,11 @@ msgstr "" msgid "Unsent Report" msgstr "" -#: templates/strings.js:48 +#: templates/strings.js:24 +msgid "Untitled draft" +msgstr "" + +#: templates/strings.js:50 msgid "Uploading images may take some time, please be patient" msgstr "" @@ -469,7 +473,7 @@ msgstr "" msgid "discard" msgstr "" -#: templates/strings.js:43 +#: templates/strings.js:45 msgid "required" msgstr "" diff --git a/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po b/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po index f9a2a5a..611a5e7 100644 --- a/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po +++ b/locale/en_GB.UTF-8/LC_MESSAGES/FixMyStreetMobileApp.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: struan@mysociety.org\n" -"POT-Creation-Date: 2013-09-18 18:01+0100\n" +"POT-Creation-Date: 2016-09-05 15:35+0100\n" "PO-Revision-Date: 2013-09-18 18:01+0100\n" "Last-Translator: Struan \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid "(optional)" msgstr "" -#: templates/existing.html:12 templates/strings.js:40 +#: templates/existing.html:12 templates/strings.js:42 msgid "-- Pick a category --" msgstr "" @@ -45,7 +45,7 @@ msgstr "" msgid "Add an existing photo" msgstr "" -#: templates/strings.js:31 +#: templates/strings.js:33 msgid "An error was encountered when submitting your report: " msgstr "" @@ -61,7 +61,7 @@ msgstr "" msgid "Confirm Location" msgstr "" -#: templates/submit_password.html:38 +#: templates/submit_password.html:46 msgid "Confirm name" msgstr "" @@ -73,11 +73,11 @@ msgstr "" msgid "Continue" msgstr "" -#: templates/strings.js:39 +#: templates/strings.js:41 msgid "Could not access location services. Please check permissions." msgstr "" -#: templates/strings.js:42 +#: templates/strings.js:44 msgid "Could not get location." msgstr "" @@ -115,7 +115,7 @@ msgstr "" msgid "Further Details" msgstr "" -#: templates/strings.js:41 +#: templates/strings.js:43 msgid "Got location." msgstr "" @@ -141,11 +141,11 @@ msgid "" "in this menu so you can finish it later" msgstr "" -#: templates/strings.js:44 +#: templates/strings.js:46 msgid "Invalid email" msgstr "" -#: templates/strings.js:45 +#: templates/strings.js:47 msgid "Invalid report" msgstr "" @@ -153,7 +153,7 @@ msgstr "" msgid "Locate (optional)" msgstr "" -#: templates/strings.js:28 +#: templates/strings.js:30 msgid "Location error" msgstr "" @@ -161,11 +161,11 @@ msgstr "" msgid "Login" msgstr "" -#: templates/strings.js:53 +#: templates/strings.js:55 msgid "More details" msgstr "" -#: templates/strings.js:30 +#: templates/strings.js:32 msgid "" "More than one location matched that name. Select one below or try entering " "street name and area, or a postcode." @@ -176,11 +176,11 @@ msgid "New Report Here" msgstr "" #: templates/details.html:3 templates/details_extra.html:3 -#: templates/photo.html:6 +#: templates/photo.html:6 templates/strings.js:23 msgid "Next" msgstr "" -#: templates/strings.js:52 +#: templates/strings.js:54 msgid "" "No network connection available for submitting your report. Please try again " "later." @@ -207,11 +207,11 @@ msgid "" "back online." msgstr "" -#: templates/submit_confirm.html:21 templates/submit_name.html:26 +#: templates/submit_confirm.html:29 templates/submit_name.html:26 msgid "Optionally enter your phone number" msgstr "" -#: templates/strings.js:47 +#: templates/strings.js:49 msgid "Photo added" msgstr "" @@ -229,7 +229,7 @@ msgid "" "phone number." msgstr "" -#: templates/strings.js:34 +#: templates/strings.js:36 msgid "Please enter a location" msgstr "" @@ -267,12 +267,12 @@ msgid "" "wish your name to be shown on the site, untick the box below" msgstr "" -#: templates/strings.js:8 templates/submit_confirm.html:18 +#: templates/strings.js:8 templates/submit_confirm.html:26 #: templates/submit_name.html:23 msgid "Please enter your name" msgstr "" -#: templates/submit_password.html:28 +#: templates/submit_password.html:36 msgid "Please enter your phone number (optional)" msgstr "" @@ -284,7 +284,7 @@ msgstr "" msgid "Please give us some basic details, and you're nearly done." msgstr "" -#: templates/strings.js:37 +#: templates/strings.js:39 msgid "Please search for a street name and area, or postcode." msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Remove Photo" msgstr "" -#: templates/submit_confirm.html:29 templates/submit_password.html:15 +#: templates/submit_confirm.html:37 templates/submit_password.html:15 msgid "Report" msgstr "" @@ -308,7 +308,7 @@ msgstr "" msgid "Reposition Report Here" msgstr "" -#: templates/strings.js:51 +#: templates/strings.js:53 msgid "Save for Later" msgstr "" @@ -316,7 +316,7 @@ msgstr "" msgid "Save for later" msgstr "" -#: templates/strings.js:27 +#: templates/strings.js:29 msgid "Search for a place or postcode" msgstr "" @@ -332,8 +332,8 @@ msgstr "" msgid "Set Report Location" msgstr "" -#: templates/submit_confirm.html:25 templates/submit_name.html:31 -#: templates/submit_password.html:33 +#: templates/submit_confirm.html:33 templates/submit_name.html:31 +#: templates/submit_password.html:41 msgid "Show my name publicly" msgstr "" @@ -353,7 +353,7 @@ msgstr "" msgid "Skip" msgstr "" -#: templates/strings.js:38 +#: templates/strings.js:40 msgid "" "Sorry, but we weren't able to establish your location accurately enough to " "show you a map. Please enter a location in the search box instead" @@ -389,52 +389,52 @@ msgid "" "for later?" msgstr "" -#: templates/strings.js:36 +#: templates/strings.js:38 msgid "" "There was a problem checking if we have all the details we need. Please try " "again later." msgstr "" -#: templates/strings.js:35 +#: templates/strings.js:37 msgid "" "There was a problem checking we cover this location. Please try again later." msgstr "" -#: templates/strings.js:25 +#: templates/strings.js:27 msgid "" "There was a problem logging you in. Please check your email and password and " "that you have confirmed your password." msgstr "" -#: templates/strings.js:23 +#: templates/strings.js:25 msgid "There was a problem logging you in. Please try again later." msgstr "" -#: templates/strings.js:24 +#: templates/strings.js:26 msgid "There was a problem logging you out. Please try again later." msgstr "" -#: templates/strings.js:29 +#: templates/strings.js:31 msgid "There was a problem looking up your location." msgstr "" -#: templates/strings.js:32 +#: templates/strings.js:34 msgid "There was a problem submitting your report. Please try again later." msgstr "" -#: templates/strings.js:33 +#: templates/strings.js:35 msgid "There was a problem submitting your report. Please try again." msgstr "" -#: templates/strings.js:46 +#: templates/strings.js:48 msgid "There was a problem taking your photo." msgstr "" -#: templates/strings.js:49 +#: templates/strings.js:51 msgid "There was a problem uploading your report." msgstr "" -#: templates/strings.js:26 +#: templates/strings.js:28 msgid "" "There was a problem with your email/password combination. If you have " "forgotten your password, or do not have one, you can set one by returning to " @@ -458,7 +458,9 @@ msgstr "" msgid "This report has a position." msgstr "" +#: templates/submit_confirm.html:19 templates/submit_confirm.html:20 #: templates/submit_name.html:16 templates/submit_name.html:17 +#: templates/submit_password.html:26 templates/submit_password.html:27 msgid "Title" msgstr "" @@ -466,7 +468,7 @@ msgstr "" msgid "To skip this step in future, you can set a password now." msgstr "" -#: templates/offline.html:2 templates/strings.js:50 +#: templates/offline.html:2 templates/strings.js:52 msgid "Try Again" msgstr "" @@ -474,7 +476,11 @@ msgstr "" msgid "Unsent Report" msgstr "" -#: templates/strings.js:48 +#: templates/strings.js:24 +msgid "Untitled draft" +msgstr "" + +#: templates/strings.js:50 msgid "Uploading images may take some time, please be patient" msgstr "" @@ -511,7 +517,7 @@ msgstr "" msgid "discard" msgstr "" -#: templates/strings.js:43 +#: templates/strings.js:45 msgid "required" msgstr "" diff --git a/templates/strings.js b/templates/strings.js index aac7650..63e3bed 100644 --- a/templates/strings.js +++ b/templates/strings.js @@ -21,6 +21,7 @@ }, strings: { next: '[% loc('Next') %]', + untitled_draft: '[% loc('Untitled draft') %]', 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/models/draft.js b/www/js/models/draft.js index ec6cff6..56d8111 100644 --- a/www/js/models/draft.js +++ b/www/js/models/draft.js @@ -21,7 +21,7 @@ if ( this.get('title') ) { desc += this.get('title'); } else { - desc += 'Untitled draft'; + desc += FMS.strings.untitled_draft; } desc += '
' + moment.utc( this.get('created') ).fromNow() + ''; diff --git a/www/js/strings.js b/www/js/strings.js index 3fdab41..1dabd30 100644 --- a/www/js/strings.js +++ b/www/js/strings.js @@ -21,6 +21,7 @@ }, strings: { next: 'Next', + untitled_draft: 'Untitled draft', 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.', -- cgit v1.2.3