Micro translation framework.

This commit is contained in:
Tom MacWright
2013-01-29 18:34:40 -05:00
parent 699041019f
commit 4ed44ef9f0
10 changed files with 71 additions and 16 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ iD.ui.inspector = function() {
.attr('class', 'inspector-inner tag-wrap fillL2');
inspectorwrap.append('h4')
.text('Edit tags');
.text(t('edit_tags'));
tagList = inspectorwrap.append('ul');
@@ -149,7 +149,7 @@ iD.ui.inspector = function() {
iD.ui.flash()
.select('.content')
.append('h3')
.text('This is no documentation available for this tag combination');
.text(t('no_documentation_combination'));
}
});
} else if (d.key) {
@@ -167,7 +167,7 @@ iD.ui.inspector = function() {
iD.ui.flash()
.select('.content')
.append('h3')
.text('This is no documentation available for this key');
.text(t('no_documentation_key'));
}
});
}
+3 -3
View File
@@ -35,7 +35,7 @@ iD.ui.layerswitcher = function(map) {
.append('button')
.attr('tabindex', -1)
.attr('class', 'fillD')
.attr('title', 'Layer Settings')
.attr('title', t('layer_settings'))
.html("<span class='layers icon'></span>")
.on('click.layerswitcher-toggle', toggle);
@@ -59,7 +59,7 @@ iD.ui.layerswitcher = function(map) {
.append('div')
.attr('class', 'opacity-options-wrapper');
opa.append('h4').text('Layers');
opa.append('h4').text(t('layers'));
opa.append('ul')
.attr('class', 'opacity-options')
@@ -68,7 +68,7 @@ iD.ui.layerswitcher = function(map) {
.enter()
.append('li')
.attr('data-original-title', function(d) {
return (d * 100) + "% opacity";
return t('percent_opacity', { opacity: (d * 100) });
})
.on('click.set-opacity', function(d) {
d3.select('#tile-g')
+1 -1
View File
@@ -18,7 +18,7 @@ iD.ui.notice = function(selection) {
div.append('span')
.attr('class', 'notice-text')
.text('zoom in to edit the map');
.text(t('zoom_in_edit'));
notice.message = function(_) {
if (_) {
+5 -5
View File
@@ -9,8 +9,8 @@ iD.ui.save = function() {
tooltip = bootstrap.tooltip()
.placement('bottom');
selection.html("<span class='label'>Save</span><small id='as-username'></small>")
.attr('title', 'Save changes to OpenStreetMap, making them visible to other users')
selection.html("<span class='label'>" + t('save') + "</span><small id='as-username'></small>")
.attr('title', t('save_help'))
.attr('tabindex', -1)
.property('disabled', true)
.call(tooltip)
@@ -18,7 +18,7 @@ iD.ui.save = function() {
function commit(e) {
d3.select('.shaded').remove();
var l = iD.ui.loading('Uploading changes to OpenStreetMap.', true);
var l = iD.ui.loading(t('uploading_changes'), true);
connection.putChangeset(history.changes(), e.comment, history.imagery_used(), function(err, changeset_id) {
l.remove();
history.reset();
@@ -27,7 +27,7 @@ iD.ui.save = function() {
var desc = iD.ui.confirm()
.select('.description');
desc.append('h2')
.text('An error occurred while trying to save');
.text(t('save_error'));
desc.append('p').text(err.responseText);
} else {
var modal = iD.ui.modal();
@@ -67,7 +67,7 @@ iD.ui.save = function() {
});
} else {
iD.ui.confirm().select('.description')
.append('h3').text('You don\'t have any changes to save.');
.append('h3').text(t('no_changes'));
}
});
+2 -2
View File
@@ -8,7 +8,7 @@ iD.ui.success = function(connection) {
var section = body.append('div').attr('class','modal-section fillD');
header.append('h2').text('You Just Edited OpenStreetMap!');
header.append('h2').text(t('just_edited'));
var m = '';
if (changeset.comment) {
@@ -24,7 +24,7 @@ iD.ui.success = function(connection) {
})
.attr('target', '_blank')
.attr('class', 'success-action')
.text('View on OSM');
.text(t('view_on_osm'));
header.append('a')
.attr('target', '_blank')
+1 -1
View File
@@ -24,7 +24,7 @@ iD.ui.tagReference = function(selection) {
referenceBody
.append('h5')
.text('Description');
.text(t('description'));
if (selection.datum().image) {
referenceBody
+1 -1
View File
@@ -34,7 +34,7 @@ iD.ui.userpanel = function(connection) {
.append('a')
.attr('class', 'logout')
.attr('href', '#')
.text('logout')
.text(t('logout'))
.on('click.logout', function() {
d3.event.preventDefault();
event.logout();