Clarify undo/redo tooltips (fixes #1670)

This commit is contained in:
John Firebaugh
2013-08-13 15:23:25 -07:00
parent 31e0d83ca1
commit 1b65034045
3 changed files with 17 additions and 5 deletions
+6 -2
View File
@@ -129,8 +129,12 @@ en:
multiple: "Split {n} lines/area boundaries."
not_eligible: Lines can't be split at their beginning or end.
multiple_ways: There are too many lines here to split.
nothing_to_undo: Nothing to undo.
nothing_to_redo: Nothing to redo.
undo:
tooltip: "Undo: {action}"
nothing: Nothing to undo.
redo:
tooltip: "Redo: {action}"
nothing: Nothing to redo.
tooltip_keyhint: "Shortcut:"
just_edited: "You just edited OpenStreetMap!"
browser_notice: "This editor is supported in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. Please upgrade your browser or use Potlatch 2 to edit the map."
+8 -2
View File
@@ -166,8 +166,14 @@
"multiple_ways": "There are too many lines here to split."
}
},
"nothing_to_undo": "Nothing to undo.",
"nothing_to_redo": "Nothing to redo.",
"undo": {
"tooltip": "Undo: {action}",
"nothing": "Nothing to undo."
},
"redo": {
"tooltip": "Redo: {action}",
"nothing": "Nothing to redo."
},
"tooltip_keyhint": "Shortcut:",
"just_edited": "You just edited OpenStreetMap!",
"browser_notice": "This editor is supported in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. Please upgrade your browser or use Potlatch 2 to edit the map.",
+3 -1
View File
@@ -20,7 +20,9 @@ iD.ui.UndoRedo = function(context) {
.placement('bottom')
.html(true)
.title(function (d) {
return iD.ui.tooltipHtml(d.annotation() || t('nothing_to_' + d.id), d.cmd);
return iD.ui.tooltipHtml(d.annotation() ?
t(d.id + '.tooltip', {action: d.annotation()}) :
t(d.id + '.nothing'), d.cmd);
});
var buttons = selection.selectAll('button')