Changeset 8975 in josm
- Timestamp:
- 2015-11-02T09:40:18+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r8931 r8975 25 25 import org.openstreetmap.josm.data.osm.TagCollection; 26 26 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog; 27 import org.openstreetmap.josm.tools.I18n; 27 28 import org.openstreetmap.josm.tools.Shortcut; 28 29 import org.openstreetmap.josm.tools.TextTagParser; … … 302 303 String title1 = trn("Pasting {0} tag", "Pasting {0} tags", commands.size(), commands.size()); 303 304 String title2 = trn("to {0} object", "to {0} objects", selection.size(), selection.size()); 305 @I18n.QuirkyPluralString 306 final String title = title1 + ' ' + title2; 304 307 Main.main.undoRedo.add( 305 308 new SequenceCommand( 306 title 1 + ' ' + title2,309 title, 307 310 commands 308 311 )); -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r8961 r8975 21 21 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 22 22 import org.openstreetmap.josm.gui.DefaultNameFormatter; 23 import org.openstreetmap.josm.tools.I18n; 23 24 import org.openstreetmap.josm.tools.ImageProvider; 24 25 … … 148 149 @Override 149 150 public String getDescriptionText() { 150 String text; 151 @I18n.QuirkyPluralString 152 final String text; 151 153 if (objects.size() == 1 && tags.size() == 1) { 152 154 OsmPrimitive primitive = objects.get(0); -
trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java
r8836 r8975 42 42 import org.openstreetmap.josm.gui.help.HelpUtil; 43 43 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 44 import org.openstreetmap.josm.tools.I18n; 44 45 import org.openstreetmap.josm.tools.ImageProvider; 45 46 import org.openstreetmap.josm.tools.WindowGeometry; … … 106 107 int numObjectsToDelete = model.getNumObjectsToDelete(); 107 108 int numParentRelations = model.getNumParentRelations(); 108 String msg; 109 if (numObjectsToDelete == 1 && numParentRelations == 1) { 110 msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>1 relation</strong>.</html>"); 111 } else if (numObjectsToDelete == 1 && numParentRelations > 1) { 112 msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>{0} relations</strong>.</html>", 113 numParentRelations); 114 } else if (numObjectsToDelete > 1 && numParentRelations == 1) { 115 msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>{0} relations</strong>.</html>", 116 numParentRelations); 109 @I18n.QuirkyPluralString 110 final String msg; 111 if (numParentRelations == 1) { 112 msg = trn( 113 "<html>Please confirm to remove <strong>{0} object</strong> from <strong>1 relation</strong>.</html>", 114 "<html>Please confirm to remove <strong>{0} objects</strong> from <strong>1 relation</strong>.</html>", 115 numObjectsToDelete, numObjectsToDelete); 117 116 } else { 118 msg = tr("<html>Please confirm to remove <strong>{0} objects</strong> from <strong>{1} relations</strong>.</html>", 119 numObjectsToDelete, numParentRelations); 117 msg = trn( 118 "<html>Please confirm to remove <strong>{0} object</strong> from <strong>{1} relations</strong>.</html>", 119 "<html>Please confirm to remove <strong>{0} objects</strong> from <strong>{1} relations</strong>.</html>", 120 numObjectsToDelete, numObjectsToDelete, numParentRelations); 120 121 } 121 122 htmlPanel.getEditorPane().setText(msg); -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r8972 r8975 8 8 import java.io.IOException; 9 9 import java.io.InputStream; 10 import java.lang.annotation.Retention; 11 import java.lang.annotation.RetentionPolicy; 10 12 import java.net.URL; 11 13 import java.nio.charset.StandardCharsets; … … 36 38 */ 37 39 public final class I18n { 40 41 /** 42 * This annotates strings which do not permit a clean i18n. This is mostly due to strings 43 * containing two nouns which can occur in singular or plural form. 44 */ 45 @Retention(RetentionPolicy.SOURCE) 46 public @interface QuirkyPluralString { 47 } 38 48 39 49 private I18n() {
Note:
See TracChangeset
for help on using the changeset viewer.