aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-01 15:28:08 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-04 06:53:02 +0000
commit488a8f21a0c1bc2b9501c9d94d69db56cccd80ae (patch)
tree68becf501e9492466a80015e8ace9a7fb1557cfa /web/js/fixmystreet.js
parent3e0d12e8584d132b573f536ab5cd01e24241827b (diff)
parent28aa1dd7fb1c9bc93aa204afae67cf68fe36ee6b (diff)
Merge remote branch 'origin/zurich'
Conflicts: bin/open311-populate-service-list bin/send-comments bin/update-all-reports conf/crontab.ugly db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/App/Controller/Report/New.pm perllib/FixMyStreet/App/Controller/Reports.pm perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/LichfieldDC.pm perllib/FixMyStreet/DB/Result/Open311conf.pm perllib/FixMyStreet/DB/Result/Problem.pm perllib/FixMyStreet/DB/ResultSet/Problem.pm perllib/FixMyStreet/SendReport.pm perllib/FixMyStreet/SendReport/Email.pm perllib/FixMyStreet/SendReport/Open311.pm perllib/Open311/GetServiceRequestUpdates.pm perllib/Open311/PopulateServiceList.pm t/app/controller/report_new.t t/app/controller/rss.t templates/web/bromley/report/display.html templates/web/default/admin/council_contacts.html templates/web/default/common_header_tags.html templates/web/default/dashboard/index.html templates/web/default/front/stats.html templates/web/default/report/_main.html templates/web/default/report/update-form.html templates/web/emptyhomes/index.html templates/web/emptyhomes/report/display.html templates/web/emptyhomes/report/new/councils_text_all.html templates/web/emptyhomes/reports/body.html templates/web/emptyhomes/reports/index.html templates/web/fixmystreet/report/new/fill_in_details_form.html templates/web/fixmystreet/report/update-form.html web/cobrands/fixmystreet/fixmystreet.js web/js/fixmystreet.js
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 1d5ef6b97..e25c2a571 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -43,18 +43,18 @@ $(function(){
// FIXME - needs to use translated string
jQuery.validator.addMethod('validCategory', function(value, element) {
- return this.optional(element) || value != '-- Pick a category --'; }, validation_strings.category );
+ return this.optional(element) || value != '-- Pick a category --'; }, translation_strings.category );
jQuery.validator.addMethod('validName', function(value, element) {
var validNamePat = /\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i;
- return this.optional(element) || value.length > 5 && value.match( /\S/ ) && value.match( /\s/ ) && !value.match( validNamePat ); }, validation_strings.category );
+ return this.optional(element) || value.length > 5 && value.match( /\S/ ) && value.match( /\s/ ) && !value.match( validNamePat ); }, translation_strings.category );
var form_submitted = 0;
var submitted = false;
$("form.validate").validate({
rules: validation_rules,
- messages: validation_strings,
+ messages: translation_strings,
onkeyup: false,
onfocusout: false,
errorElement: 'div',
@@ -128,7 +128,7 @@ $(function(){
// Geolocation
if (geo_position_js.init()) {
- var link = '<a href="#LINK" id="geolocate_link">&hellip; ' + validation_strings.geolocate + '</a>';
+ var link = '<a href="#LINK" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
$('form[action="/alert/list"]').append(link.replace('LINK','alert/list'));
if ($('body.frontpage').length) {
$('#postcodeForm').after(link.replace('LINK','around'));
@@ -153,13 +153,13 @@ $(function(){
}, function(err) {
$link.find('img').remove();
if (err.code == 1) { // User said no
- $link.html("You declined; please fill in the box above");
+ $link.html(translation_strings.geolocation_declined);
} else if (err.code == 2) { // No position
- $link.html("Could not look up location");
+ $link.html(translation_strings.geolocation_no_position);
} else if (err.code == 3) { // Too long
- $link.html("No result returned");
+ $link.html(translation_strings.geolocation_no_result);
} else { // Unknown
- $link.html("Unknown error");
+ $link.html(translation_strings.geolocation_unknown);
}
}, {
enableHighAccuracy: true,