mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 06:35:20 +02:00
Show count and use plural forms for more operation strings (re: #8014)
This commit is contained in:
+34
-20
@@ -101,8 +101,9 @@ en:
|
||||
multiple: Make these features circular.
|
||||
key: O
|
||||
annotation:
|
||||
single: Made a feature circular.
|
||||
multiple: Made features circular.
|
||||
feature:
|
||||
one: Made a feature circular.
|
||||
other: "Made {n} features circular."
|
||||
multiple_blockers:
|
||||
multiple: These can't be made circular for multiple reasons.
|
||||
not_closed:
|
||||
@@ -132,11 +133,11 @@ en:
|
||||
key: Q
|
||||
annotation:
|
||||
corner:
|
||||
single: Squared a corner.
|
||||
multiple: Squared several corners.
|
||||
one: Squared a corner.
|
||||
other: "Squared {n} corners."
|
||||
feature:
|
||||
single: Squared the corners of a feature.
|
||||
multiple: Squared the corners of several features.
|
||||
one: Squared the corners of a feature.
|
||||
other: "Squared the corners of {n} features."
|
||||
multiple_blockers:
|
||||
multiple: These can't be squared for multiple reasons.
|
||||
end_vertex:
|
||||
@@ -165,9 +166,12 @@ en:
|
||||
lines: Straighten these lines.
|
||||
key: S
|
||||
annotation:
|
||||
points: Straightened several points.
|
||||
line: Straightened a line.
|
||||
lines: Straightened several lines.
|
||||
point:
|
||||
one: Straightened a point.
|
||||
other: "Straightened {n} points."
|
||||
line:
|
||||
one: Straightened a line.
|
||||
other: "Straightened {n} lines."
|
||||
too_bendy:
|
||||
single: This can't be straightened because it bends too much.
|
||||
multiple: These can't be straightened because they bend too much.
|
||||
@@ -316,7 +320,9 @@ en:
|
||||
line: Moved a line.
|
||||
area: Moved an area.
|
||||
relation: Moved a relation.
|
||||
multiple: Moved multiple features.
|
||||
feature:
|
||||
one: "Moved a feature."
|
||||
other: "Moved {n} features."
|
||||
incomplete_relation:
|
||||
single: This feature can't be moved because it hasn't been fully downloaded.
|
||||
multiple: These features can't be moved because they haven't been fully downloaded.
|
||||
@@ -345,11 +351,13 @@ en:
|
||||
short: Y
|
||||
annotation:
|
||||
long:
|
||||
single: Flipped a feature across its long axis.
|
||||
multiple: Flipped multiple features across their long axis.
|
||||
feature:
|
||||
one: Flipped a feature across its long axis.
|
||||
other: "Flipped {n} features across their long axis."
|
||||
short:
|
||||
single: Flipped a feature across its short axis.
|
||||
multiple: Flipped multiple features across their short axis.
|
||||
feature:
|
||||
one: Flipped a feature across its short axis.
|
||||
other: "Flipped {n} features across their short axis."
|
||||
incomplete_relation:
|
||||
single: This feature can't be flipped because it hasn't been fully downloaded.
|
||||
multiple: These features can't be flipped because they haven't been fully downloaded.
|
||||
@@ -371,8 +379,10 @@ en:
|
||||
annotation:
|
||||
line: Rotated a line.
|
||||
area: Rotated an area.
|
||||
multiple: Rotated multiple features.
|
||||
relation: Rotated a relation.
|
||||
feature:
|
||||
one: Rotated a feature.
|
||||
other: "Rotated {n} features."
|
||||
incomplete_relation:
|
||||
single: This feature can't be rotated because it hasn't been fully downloaded.
|
||||
multiple: These features can't be rotated because they haven't been fully downloaded.
|
||||
@@ -395,11 +405,15 @@ en:
|
||||
features: Flip the directions of these features.
|
||||
key: V
|
||||
annotation:
|
||||
point: Reversed a point.
|
||||
points: Reversed multiple points.
|
||||
line: Reversed a line.
|
||||
lines: Reversed multiple lines.
|
||||
features: Reversed multiple features.
|
||||
point:
|
||||
one: Reversed a point.
|
||||
other: "Reversed {n} points."
|
||||
line:
|
||||
one: Reversed a line.
|
||||
other: "Reversed {n} lines."
|
||||
feature:
|
||||
one: Reversed a feature.
|
||||
other: "Reversed {n} features."
|
||||
scale:
|
||||
annotation:
|
||||
down:
|
||||
|
||||
Vendored
+45
-21
@@ -131,8 +131,10 @@
|
||||
},
|
||||
"key": "O",
|
||||
"annotation": {
|
||||
"single": "Made a feature circular.",
|
||||
"multiple": "Made features circular."
|
||||
"feature": {
|
||||
"one": "Made a feature circular.",
|
||||
"other": "Made {n} features circular."
|
||||
}
|
||||
},
|
||||
"multiple_blockers": {
|
||||
"multiple": "These can't be made circular for multiple reasons."
|
||||
@@ -173,12 +175,12 @@
|
||||
"key": "Q",
|
||||
"annotation": {
|
||||
"corner": {
|
||||
"single": "Squared a corner.",
|
||||
"multiple": "Squared several corners."
|
||||
"one": "Squared a corner.",
|
||||
"other": "Squared {n} corners."
|
||||
},
|
||||
"feature": {
|
||||
"single": "Squared the corners of a feature.",
|
||||
"multiple": "Squared the corners of several features."
|
||||
"one": "Squared the corners of a feature.",
|
||||
"other": "Squared the corners of {n} features."
|
||||
}
|
||||
},
|
||||
"multiple_blockers": {
|
||||
@@ -218,9 +220,14 @@
|
||||
},
|
||||
"key": "S",
|
||||
"annotation": {
|
||||
"points": "Straightened several points.",
|
||||
"line": "Straightened a line.",
|
||||
"lines": "Straightened several lines."
|
||||
"point": {
|
||||
"one": "Straightened a point.",
|
||||
"other": "Straightened {n} points."
|
||||
},
|
||||
"line": {
|
||||
"one": "Straightened a line.",
|
||||
"other": "Straightened {n} lines."
|
||||
}
|
||||
},
|
||||
"too_bendy": {
|
||||
"single": "This can't be straightened because it bends too much.",
|
||||
@@ -414,7 +421,10 @@
|
||||
"line": "Moved a line.",
|
||||
"area": "Moved an area.",
|
||||
"relation": "Moved a relation.",
|
||||
"multiple": "Moved multiple features."
|
||||
"feature": {
|
||||
"one": "Moved a feature.",
|
||||
"other": "Moved {n} features."
|
||||
}
|
||||
},
|
||||
"incomplete_relation": {
|
||||
"single": "This feature can't be moved because it hasn't been fully downloaded.",
|
||||
@@ -454,12 +464,16 @@
|
||||
},
|
||||
"annotation": {
|
||||
"long": {
|
||||
"single": "Flipped a feature across its long axis.",
|
||||
"multiple": "Flipped multiple features across their long axis."
|
||||
"feature": {
|
||||
"one": "Flipped a feature across its long axis.",
|
||||
"other": "Flipped {n} features across their long axis."
|
||||
}
|
||||
},
|
||||
"short": {
|
||||
"single": "Flipped a feature across its short axis.",
|
||||
"multiple": "Flipped multiple features across their short axis."
|
||||
"feature": {
|
||||
"one": "Flipped a feature across its short axis.",
|
||||
"other": "Flipped {n} features across their short axis."
|
||||
}
|
||||
}
|
||||
},
|
||||
"incomplete_relation": {
|
||||
@@ -489,8 +503,11 @@
|
||||
"annotation": {
|
||||
"line": "Rotated a line.",
|
||||
"area": "Rotated an area.",
|
||||
"multiple": "Rotated multiple features.",
|
||||
"relation": "Rotated a relation."
|
||||
"relation": "Rotated a relation.",
|
||||
"feature": {
|
||||
"one": "Rotated a feature.",
|
||||
"other": "Rotated {n} features."
|
||||
}
|
||||
},
|
||||
"incomplete_relation": {
|
||||
"single": "This feature can't be rotated because it hasn't been fully downloaded.",
|
||||
@@ -520,11 +537,18 @@
|
||||
},
|
||||
"key": "V",
|
||||
"annotation": {
|
||||
"point": "Reversed a point.",
|
||||
"points": "Reversed multiple points.",
|
||||
"line": "Reversed a line.",
|
||||
"lines": "Reversed multiple lines.",
|
||||
"features": "Reversed multiple features."
|
||||
"point": {
|
||||
"one": "Reversed a point.",
|
||||
"other": "Reversed {n} points."
|
||||
},
|
||||
"line": {
|
||||
"one": "Reversed a line.",
|
||||
"other": "Reversed {n} lines."
|
||||
},
|
||||
"feature": {
|
||||
"one": "Reversed a feature.",
|
||||
"other": "Reversed {n} features."
|
||||
}
|
||||
}
|
||||
},
|
||||
"scale": {
|
||||
|
||||
@@ -39,7 +39,7 @@ export function modeMove(context, entityIDs, baseGraph) {
|
||||
];
|
||||
var annotation = entityIDs.length === 1 ?
|
||||
t('operations.move.annotation.' + context.graph().geometry(entityIDs[0])) :
|
||||
t('operations.move.annotation.multiple');
|
||||
t('operations.move.annotation.feature', { n: entityIDs.length });
|
||||
|
||||
var _prevGraph;
|
||||
var _cache;
|
||||
|
||||
@@ -43,7 +43,7 @@ export function modeRotate(context, entityIDs) {
|
||||
];
|
||||
var annotation = entityIDs.length === 1 ?
|
||||
t('operations.rotate.annotation.' + context.graph().geometry(entityIDs[0])) :
|
||||
t('operations.rotate.annotation.multiple');
|
||||
t('operations.rotate.annotation.feature', { n: entityIDs.length });
|
||||
|
||||
var _prevGraph;
|
||||
var _prevAngle;
|
||||
|
||||
@@ -102,7 +102,7 @@ export function operationCircularize(context, selectedIDs) {
|
||||
|
||||
|
||||
operation.annotation = function() {
|
||||
return t('operations.circularize.annotation.' + _amount);
|
||||
return t('operations.circularize.annotation.feature', { n: _actions.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export function operationMove(context, selectedIDs) {
|
||||
operation.annotation = function() {
|
||||
return selectedIDs.length === 1 ?
|
||||
t('operations.move.annotation.' + context.graph().geometry(selectedIDs[0])) :
|
||||
t('operations.move.annotation.multiple');
|
||||
t('operations.move.annotation.feature', { n: selectedIDs.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export function operationOrthogonalize(context, selectedIDs) {
|
||||
|
||||
|
||||
operation.annotation = function() {
|
||||
return t('operations.orthogonalize.annotation.' + _type + '.' + _amount);
|
||||
return t('operations.orthogonalize.annotation.' + _type, { n: _actions.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ export function operationReflect(context, selectedIDs, axis) {
|
||||
|
||||
|
||||
operation.annotation = function() {
|
||||
return t('operations.reflect.annotation.' + axis + '.' + multi);
|
||||
return t('operations.reflect.annotation.' + axis + '.feature', { n: selectedIDs.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ export function operationReverse(context, selectedIDs) {
|
||||
var entity = context.hasEntity(act.entityID());
|
||||
return entity && entity.type === 'node';
|
||||
}).length;
|
||||
var typeID = nodeActionCount === 0 ? 'line' : (nodeActionCount === acts.length ? 'point' : 'features');
|
||||
if (typeID !== 'features' && acts.length > 1) typeID += 's';
|
||||
return typeID;
|
||||
if (nodeActionCount === 0) return 'line';
|
||||
if (nodeActionCount === acts.length) return 'point';
|
||||
return 'feature';
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ export function operationReverse(context, selectedIDs) {
|
||||
|
||||
|
||||
operation.annotation = function() {
|
||||
return t('operations.reverse.annotation.' + reverseTypeID());
|
||||
var acts = actions();
|
||||
return t('operations.reverse.annotation.' + reverseTypeID(), { n: acts.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export function operationRotate(context, selectedIDs) {
|
||||
operation.annotation = function() {
|
||||
return selectedIDs.length === 1 ?
|
||||
t('operations.rotate.annotation.' + context.graph().geometry(selectedIDs[0])) :
|
||||
t('operations.rotate.annotation.multiple');
|
||||
t('operations.rotate.annotation.feature', { n: selectedIDs.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export function operationStraighten(context, selectedIDs) {
|
||||
function chooseAction() {
|
||||
// straighten selected nodes
|
||||
if (_wayIDs.length === 0 && _nodeIDs.length > 2) {
|
||||
_geometry = 'points';
|
||||
_geometry = 'point';
|
||||
return actionStraightenNodes(_nodeIDs, context.projection);
|
||||
|
||||
// straighten selected ways (possibly between range of 2 selected nodes)
|
||||
@@ -67,7 +67,7 @@ export function operationStraighten(context, selectedIDs) {
|
||||
_extent = utilTotalExtent(_nodeIDs, context.graph());
|
||||
}
|
||||
|
||||
_geometry = _wayIDs.length === 1 ? 'line' : 'lines';
|
||||
_geometry = 'line';
|
||||
return actionStraightenWay(selectedIDs, context.projection);
|
||||
}
|
||||
|
||||
@@ -125,12 +125,12 @@ export function operationStraighten(context, selectedIDs) {
|
||||
var disable = operation.disabled();
|
||||
return disable ?
|
||||
t('operations.straighten.' + disable + '.' + _amount) :
|
||||
t('operations.straighten.description.' + _geometry);
|
||||
t('operations.straighten.description.' + _geometry + (_wayIDs.length === 1 ? '' : 's'));
|
||||
};
|
||||
|
||||
|
||||
operation.annotation = function() {
|
||||
return t('operations.straighten.annotation.' + _geometry);
|
||||
return t('operations.straighten.annotation.' + _geometry, { n: _wayIDs.length ? _wayIDs.length : _nodeIDs.length });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ export function uiFieldCheck(field, context) {
|
||||
}
|
||||
return graph;
|
||||
},
|
||||
t('operations.reverse.annotation')
|
||||
t('operations.reverse.annotation.line', { n: 1 })
|
||||
);
|
||||
|
||||
// must manually revalidate since no 'change' event was called
|
||||
|
||||
@@ -391,7 +391,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
// Something changed. Wait for transition to complete and check undo annotation.
|
||||
timeout(function() {
|
||||
if (context.history().undoAnnotation() === t('operations.orthogonalize.annotation.feature.single')) {
|
||||
if (context.history().undoAnnotation() === t('operations.orthogonalize.annotation.feature', { n: 1 })) {
|
||||
continueTo(doneSquare);
|
||||
} else {
|
||||
continueTo(retryClickSquare);
|
||||
@@ -721,7 +721,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
// Something changed. Wait for transition to complete and check undo annotation.
|
||||
timeout(function() {
|
||||
if (context.history().undoAnnotation() === t('operations.circularize.annotation.single')) {
|
||||
if (context.history().undoAnnotation() === t('operations.circularize.annotation.feature', { n: 1 })) {
|
||||
continueTo(play);
|
||||
} else {
|
||||
continueTo(retryClickCircle);
|
||||
|
||||
@@ -180,7 +180,7 @@ export function validationImpossibleOneway() {
|
||||
entityIds: [way.id],
|
||||
onClick: function(context) {
|
||||
var id = this.issue.entityIds[0];
|
||||
context.perform(actionReverse(id), t('operations.reverse.annotation'));
|
||||
context.perform(actionReverse(id), t('operations.reverse.annotation.line', { n: 1 }));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export function validationUnsquareWay(context) {
|
||||
// use same degree threshold as for detection
|
||||
var autoAction = actionOrthogonalize(entity.id, context.projection, undefined, degreeThreshold);
|
||||
autoAction.transitionable = false; // when autofixing, do it instantly
|
||||
autoArgs = [autoAction, t('operations.orthogonalize.annotation.feature.single')];
|
||||
autoArgs = [autoAction, t('operations.orthogonalize.annotation.feature', { n: 1 })];
|
||||
}
|
||||
|
||||
return [new validationIssue({
|
||||
@@ -92,7 +92,7 @@ export function validationUnsquareWay(context) {
|
||||
// use same degree threshold as for detection
|
||||
context.perform(
|
||||
actionOrthogonalize(entityId, context.projection, undefined, degreeThreshold),
|
||||
t('operations.orthogonalize.annotation.feature.single')
|
||||
t('operations.orthogonalize.annotation.feature', { n: 1 })
|
||||
);
|
||||
// run after the squaring transition (currently 150ms)
|
||||
window.setTimeout(function() { completionHandler(); }, 175);
|
||||
|
||||
Reference in New Issue
Block a user