Make success UI translatable. Fixes #1425

This commit is contained in:
Tom MacWright
2013-05-07 15:28:34 -04:00
parent fc8ae64890
commit 044bd937a7
3 changed files with 15 additions and 4 deletions

View File

@@ -185,6 +185,11 @@ en:
error: An error occurred while trying to save
uploading: Uploading changes to OpenStreetMap.
unsaved_changes: You have unsaved changes
success:
edited_osm: "Edited OSM!"
facebook: "Share on Facebook"
tweet: "Tweet"
okay: "Okay"
splash:
welcome: Welcome to the iD OpenStreetMap editor
text: "iD is a friendly but powerful tool for contributing to the world's best free world map. This is version {version}. For more information see {website} and report bugs at {github}."

View File

@@ -228,6 +228,12 @@
"uploading": "Uploading changes to OpenStreetMap.",
"unsaved_changes": "You have unsaved changes"
},
"success": {
"edited_osm": "Edited OSM!",
"facebook": "Share on Facebook",
"tweet": "Tweet",
"okay": "Okay"
},
"splash": {
"welcome": "Welcome to the iD OpenStreetMap editor",
"text": "iD is a friendly but powerful tool for contributing to the world's best free world map. This is version {version}. For more information see {website} and report bugs at {github}.",

View File

@@ -11,7 +11,7 @@ iD.ui.Success = function(connection) {
var m = changeset.comment ?
changeset.comment.substring(0, 130) : '';
var message = (m || 'Edited OSM!') + ' ' +
var message = (m || t('success.edited_osm')) + ' ' +
connection.changesetURL(changeset.id);
var links = body.append('div').attr('class','modal-actions cf');
@@ -31,7 +31,7 @@ iD.ui.Success = function(connection) {
return 'https://twitter.com/intent/tweet?source=webclient&text=' +
encodeURIComponent(message);
})
.text('Tweet');
.text(t('success.tweet'));
links.append('a')
.attr('class','col4 facebook')
@@ -39,7 +39,7 @@ iD.ui.Success = function(connection) {
.attr('href', function() {
return 'https://facebook.com/sharer/sharer.php?u=' + encodeURIComponent(message);
})
.text('Share on Facebook');
.text(t('success.facebook'));
var section = body.append('div').attr('class','modal-section cf');
@@ -48,7 +48,7 @@ iD.ui.Success = function(connection) {
.on('click.save', function() {
event.cancel();
})
.text('Okay')
.text(t('success.okay'))
.node().focus();
}