Ignore:
Timestamp:
2013-12-22T00:38:43+01:00 (6 years ago)
Author:
simon04
Message:

fix #9110 - i18n: fix errors in usage of plural forms

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java

    r6453 r6507  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.tools.I18n.trn;
    56
    67import java.awt.event.ActionEvent;
     
    8586
    8687    public static boolean confirmLaunchMultiple(int numBrowsers) {
    87         String msg  = tr(
     88        String msg  = /* for correct i18n of plural forms - see #9110 */ trn(
    8889                "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);
    9195        msg = "<html>" + msg + "</html>";
    9296        ButtonSpec[] spec = new ButtonSpec[] {
     
    9498                        tr("Continue"),
    9599                        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),
    97101                        null // no specific help topic
    98102                ),
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r6380 r6507  
    44import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.tools.I18n.trc;
     7import static org.openstreetmap.josm.tools.I18n.trn;
    68
    79import java.awt.event.ActionEvent;
     
    188190        cmds.addAll(resolution);
    189191        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);
    191194
    192195        return new Pair<Way, Command>(targetWay, sequenceCommand);
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r6380 r6507  
    44import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.tools.I18n.trn;
    67
    78import java.awt.event.ActionEvent;
     
    354355                cmds.add(new DeleteCommand(waysToDelete));
    355356            }
    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);
    358359        } catch (UserCancelException ex) {
    359360            return null;
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r6380 r6507  
    505505        return new SplitWayResult(
    506506                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()),
    508510                        commandList
    509511                        ),
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r6380 r6507  
    379379        fixRelations(selectedNode, cmds, newNodes);
    380380
    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));
    382383        // select one of the new nodes
    383384        getCurrentDataSet().setSelected(newNodes.getFirst());
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r6380 r6507  
    806806                    new String[]{tr("Move them"), tr("Undo move")});
    807807            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));
    809814            ed.setCancelButton(2);
    810815            ed.toggleEnable("movedManyElements");
Note: See TracChangeset for help on using the changeset viewer.