Changeset 6507 in josm for trunk/src/org
- Timestamp:
- 2013-12-22T00:38:43+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r6453 r6507 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.trn; 5 6 6 7 import java.awt.event.ActionEvent; … … 85 86 86 87 public static boolean confirmLaunchMultiple(int numBrowsers) { 87 String msg = tr(88 String msg = /* for correct i18n of plural forms - see #9110 */ trn( 88 89 "You are about to launch {0} browser windows.<br>" 89 + "This may both clutter your screen with browser windows<br>" 90 + "and take some time to finish.", numBrowsers); 90 + "This may both clutter your screen with browser windows<br>" 91 + "and take some time to finish.", 92 "You are about to launch {0} browser windows.<br>" 93 + "This may both clutter your screen with browser windows<br>" 94 + "and take some time to finish.", numBrowsers, numBrowsers); 91 95 msg = "<html>" + msg + "</html>"; 92 96 ButtonSpec[] spec = new ButtonSpec[] { … … 94 98 tr("Continue"), 95 99 ImageProvider.get("ok"), 96 tr ("Click to continue and to open {0} browsers", numBrowsers),100 trn("Click to continue and to open {0} browsers", "Click to continue and to open {0} browsers", numBrowsers, numBrowsers), 97 101 null // no specific help topic 98 102 ), -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r6380 r6507 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trc; 7 import static org.openstreetmap.josm.tools.I18n.trn; 6 8 7 9 import java.awt.event.ActionEvent; … … 188 190 cmds.addAll(resolution); 189 191 cmds.add(new DeleteCommand(deletedWays)); 190 final SequenceCommand sequenceCommand = new SequenceCommand(tr("Combine {0} ways", ways.size()), cmds); 192 final SequenceCommand sequenceCommand = new SequenceCommand(/* for correct i18n of plural forms - see #9110 */ 193 trn("Combine {0} ways", "Combine {0} ways", ways.size(), ways.size()), cmds); 191 194 192 195 return new Pair<Way, Command>(targetWay, sequenceCommand); -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r6380 r6507 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trn; 6 7 7 8 import java.awt.event.ActionEvent; … … 354 355 cmds.add(new DeleteCommand(waysToDelete)); 355 356 } 356 Command cmd = new SequenceCommand(tr("Merge {0} nodes", nodes.size()), cmds);357 return cmd;357 return new SequenceCommand(/* for correct i18n of plural forms - see #9110 */ 358 trn("Merge {0} nodes", "Merge {0} nodes", nodes.size(), nodes.size()), cmds); 358 359 } catch (UserCancelException ex) { 359 360 return null; -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r6380 r6507 505 505 return new SplitWayResult( 506 506 new SequenceCommand( 507 tr("Split way {0} into {1} parts", way.getDisplayName(DefaultNameFormatter.getInstance()),wayChunks.size()), 507 /* for correct i18n of plural forms - see #9110 */ 508 trn("Split way {0} into {1} parts", "Split way {0} into {1} parts", wayChunks.size(), 509 way.getDisplayName(DefaultNameFormatter.getInstance()), wayChunks.size()), 508 510 commandList 509 511 ), -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r6380 r6507 379 379 fixRelations(selectedNode, cmds, newNodes); 380 380 381 Main.main.undoRedo.add(new SequenceCommand(tr("Dupe into {0} nodes", newNodes.size()+1), cmds)); 381 Main.main.undoRedo.add(new SequenceCommand(/* for correct i18n of plural forms - see #9110 */ 382 trn("Dupe into {0} nodes", "Dupe into {0} nodes", newNodes.size() + 1, newNodes.size() + 1), cmds)); 382 383 // select one of the new nodes 383 384 getCurrentDataSet().setSelected(newNodes.getFirst()); -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r6380 r6507 806 806 new String[]{tr("Move them"), tr("Undo move")}); 807 807 ed.setButtonIcons(new String[]{"reorder.png", "cancel.png"}); 808 ed.setContent(tr("You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?", max)); 808 ed.setContent( 809 /* for correct i18n of plural forms - see #9110 */ 810 trn( 811 "You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?", 812 "You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?", 813 max, max)); 809 814 ed.setCancelButton(2); 810 815 ed.toggleEnable("movedManyElements"); -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r6380 r6507 4 4 import static org.openstreetmap.josm.tools.I18n.marktr; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trn; 6 7 7 8 import java.util.AbstractMap; … … 165 166 } else if (objects.size() > 1 && tags.size() == 1) { 166 167 Map.Entry<String, String> entry = tags.entrySet().iterator().next(); 167 if (entry.getValue() == null) 168 text = tr("Remove \"{0}\" for {1} objects", entry.getKey(), objects.size()); 169 else 170 text = tr("Set {0}={1} for {2} objects", entry.getKey(), entry.getValue(), objects.size()); 168 if (entry.getValue() == null) { 169 /* for correct i18n of plural forms - see #9110 */ 170 text = trn("Remove \"{0}\" for {1} objects", "Remove \"{0}\" for {1} objects", objects.size(), entry.getKey(), objects.size()); 171 } else { 172 /* for correct i18n of plural forms - see #9110 */ 173 text = trn("Set {0}={1} for {2} objects", "Set {0}={1} for {2} objects", objects.size(), entry.getKey(), entry.getValue(), objects.size()); 174 } 171 175 } 172 176 else { … … 180 184 181 185 if (allnull) { 182 text = tr("Deleted {0} tags for {1} objects", tags.size(), objects.size()); 183 } else 184 text = tr("Set {0} tags for {1} objects", tags.size(), objects.size()); 186 /* for correct i18n of plural forms - see #9110 */ 187 text = trn("Deleted {0} tags for {1} objects", "Deleted {0} tags for {1} objects", objects.size(), tags.size(), objects.size()); 188 } else { 189 /* for correct i18n of plural forms - see #9110 */ 190 text = trn("Set {0} tags for {1} objects", "Set {0} tags for {1} objects", objects.size(), tags.size(), objects.size()); 191 } 185 192 } 186 193 return text; -
trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java
r5816 r6507 4 4 import static org.openstreetmap.josm.tools.I18n.marktr; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trn; 6 7 7 8 import java.util.Collection; … … 56 57 @Override 57 58 public String getDescriptionText() { 58 String msg = ""; 59 switch(OsmPrimitiveType.from(conflict.getMy())) { 60 case NODE: msg = marktr("Resolve {0} tag conflicts in node {1}"); break; 61 case WAY: msg = marktr("Resolve {0} tag conflicts in way {1}"); break; 62 case RELATION: msg = marktr("Resolve {0} tag conflicts in relation {1}"); break; 59 switch (OsmPrimitiveType.from(conflict.getMy())) { 60 case NODE: 61 /* for correct i18n of plural forms - see #9110 */ 62 return trn("Resolve {0} tag conflicts in node {1}", "Resolve {0} tag conflicts in node {1}", getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId()); 63 case WAY: 64 /* for correct i18n of plural forms - see #9110 */ 65 return trn("Resolve {0} tag conflicts in way {1}", "Resolve {0} tag conflicts in way {1}", getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId()); 66 case RELATION: 67 /* for correct i18n of plural forms - see #9110 */ 68 return trn("Resolve {0} tag conflicts in relation {1}", "Resolve {0} tag conflicts in relation {1}", getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId()); 63 69 } 64 return tr(msg,getNumDecidedConflicts(), conflict.getMy().getId());70 return ""; 65 71 } 66 72 -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r6093 r6507 596 596 } 597 597 })); 598 String msg = tr("You are about to combine {0} objects, " 598 String msg = /* for correct i18n of plural forms - see #9110 */ trn("You are about to combine {0} objects, " 599 + "but the following tags are used conflictingly:<br/>{1}" 600 + "If these objects are combined, the resulting object may have unwanted tags.<br/>" 601 + "If you want to continue, you are shown a dialog to fix the conflicting tags.<br/><br/>" 602 + "Do you want to continue?", "You are about to combine {0} objects, " 599 603 + "but the following tags are used conflictingly:<br/>{1}" 600 604 + "If these objects are combined, the resulting object may have unwanted tags.<br/>" 601 605 + "If you want to continue, you are shown a dialog to fix the conflicting tags.<br/><br/>" 602 606 + "Do you want to continue?", 603 primitives.size(), conflicts);607 primitives.size(), primitives.size(), conflicts); 604 608 605 609 if (!ConditionalOptionPaneUtil.showConfirmationDialog( -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
r6278 r6507 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 import static org.openstreetmap.josm.tools.I18n.trc; 6 import static org.openstreetmap.josm.tools.I18n.trn; 6 7 7 8 import java.awt.Color; … … 374 375 375 376 if (disabledAndHiddenCount != 0) { 376 message += tr("<p><b>{0}</b> objects hidden", disabledAndHiddenCount); 377 /* for correct i18n of plural forms - see #9110 */ 378 message += trn("<p><b>{0}</b> objects hidden", "<p><b>{0}</b> objects hidden", disabledAndHiddenCount, disabledAndHiddenCount); 377 379 } 378 380 … … 382 384 383 385 if (disabledCount != 0) { 384 message += tr("<b>{0}</b> objects disabled", disabledCount); 386 /* for correct i18n of plural forms - see #9110 */ 387 message += trn("<b>{0}</b> objects disabled", "<b>{0}</b> objects disabled", disabledCount, disabledCount); 385 388 } 386 389
Note:
See TracChangeset
for help on using the changeset viewer.