aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-16 12:06:29 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-16 12:21:13 +0000
commit84021a8fb660661d60c68b4ee75906062dfb7f73 (patch)
tree069ca711bb3052b9888eefec87b05e01ead590ca /web/js
parent197770171474954c9bc94687adce0223b2471c56 (diff)
Add some missing JS translatable strings, update .po files.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/fixmystreet.js8
-rw-r--r--web/js/map-OpenLayers.js6
2 files changed, 7 insertions, 7 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 98e92606d..4ac467d49 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -43,11 +43,11 @@ $(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;
@@ -60,7 +60,7 @@ $(function(){
update: { required: true },
rznvy: { required: true }
},
- messages: validation_strings,
+ messages: translation_strings,
onkeyup: false,
onfocusout: false,
errorElement: 'div',
@@ -134,7 +134,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'));
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 85ab09889..b76a7b166 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -349,7 +349,7 @@ $(function(){
$('#sub_map_links').show();
//only on mobile
$('#mob_sub_map_links').remove();
- $('.mobile-map-banner').html('<a href="/">Home</a> Place pin on map');
+ $('.mobile-map-banner').html('<a href="/">' + translation_strings.home + '</a> ' + translation_strings.place_pin_on_map);
fixmystreet.page = 'around';
});
@@ -538,13 +538,13 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
height = $map_box.height();
$map_box.append(
'<p id="mob_sub_map_links">' +
- '<a href="#" id="try_again">Try again</a>' +
+ '<a href="#" id="try_again">' + translation_strings.try_again + '</a>' +
'<a href="#ok" id="mob_ok">OK</a>' +
'</p>'
).css({ position: 'relative', width: width, height: height, marginBottom: '1em' });
// Making it relative here makes it much easier to do the scrolling later
- $('.mobile-map-banner').html('<a href="/">Home</a> Right place?');
+ $('.mobile-map-banner').html('<a href="/">' + translation_strings.home + '</a> ' + translation_strings.right_place);
// mobile user clicks 'ok' on map
$('#mob_ok').toggle(function(){