Ignore:
Timestamp:
2008-12-25T19:01:06+01:00 (16 years ago)
Author:
stoecker
Message:

updated a lot

Location:
applications/editors/josm/plugins/openstreetbugs
Files:
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs

    • Property svn:ignore set to
      build
  • applications/editors/josm/plugins/openstreetbugs/build.xml

    r11569 r12588  
    5050                                <attribute name="Plugin-Version" value="${version}" />
    5151                                <attribute name="Plugin-Date" value="${current.time}" />
     52                                <attribute name="Plugin-Mainversion" value="1180"/>
    5253                                <attribute name="Author" value="Henrik Niehaus" />
    5354                        </manifest>
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbDownloadLoop.java

    r12398 r12588  
    2828package org.openstreetmap.josm.plugins.osb;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.geom.Point2D;
    3133import java.util.concurrent.TimeUnit;
     
    4850       
    4951        public OsbDownloadLoop() {
    50             setName("OpenStreetBugs download loop");
     52            setName(tr("OpenStreetBugs download loop"));
    5153                start();
    5254        }
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java

    r12476 r12588  
    2828package org.openstreetmap.josm.plugins.osb;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.Component;
    3133import java.awt.Graphics;
     
    5759import org.openstreetmap.josm.plugins.osb.gui.action.OsbAction;
    5860import org.openstreetmap.josm.plugins.osb.gui.action.PopupFactory;
    59 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    6061import org.openstreetmap.josm.tools.ColorHelper;
    6162
     
    9899        @Override
    99100        public String getToolTipText() {
    100                 return Messages.translate(getClass(), "tooltip");
     101                return tr("Displays OpenStreetBugs issues");
    101102        }
    102103
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java

    r11569 r12588  
    2828package org.openstreetmap.josm.plugins.osb;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.event.ActionEvent;
    3133import java.awt.event.ActionListener;
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbUploadHook.java

    r11161 r12588  
    2828package org.openstreetmap.josm.plugins.osb;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.util.Collection;
    3133import java.util.Iterator;
     
    4749                if(containsOsbData) {
    4850                        JOptionPane.showMessageDialog(Main.parent,
    49                                 "<html>The selected data contains data from OpenStreetBugs.<br>" +
    50                                 "You cannot upload these data. Maybe you have selected the wrong layer?",
    51                                 "Warning", JOptionPane.WARNING_MESSAGE);
     51                                tr("<html>The selected data contains data from OpenStreetBugs.<br>" +
     52                                "You cannot upload these data. Maybe you have selected the wrong layer?"),
     53                                tr("Warning"), JOptionPane.WARNING_MESSAGE);
    5254                        return false;
    5355                } else {
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java

    r11157 r12588  
    2828package org.openstreetmap.josm.plugins.osb.api;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.io.IOException;
    3133
     
    3638import org.openstreetmap.josm.plugins.osb.ConfigKeys;
    3739import org.openstreetmap.josm.plugins.osb.api.util.HttpUtils;
    38 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    3940
    4041public class CloseAction {
     
    6162                } else {
    6263                        JOptionPane.showMessageDialog(Main.parent,
    63                                         Messages.translate(getClass(), "error_occured", new Object[] {result}),
    64                                         Messages.translate(getClass(), "error_occured_title"),
     64                                        tr("An error occured: {0}", new Object[] {result}),
     65                                        tr("Error"),
    6566                                        JOptionPane.ERROR_MESSAGE);
    6667                }
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java

    r11157 r12588  
    2828package org.openstreetmap.josm.plugins.osb.api;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.io.IOException;
    3133import java.net.URLEncoder;
     
    3739import org.openstreetmap.josm.plugins.osb.ConfigKeys;
    3840import org.openstreetmap.josm.plugins.osb.api.util.HttpUtils;
    39 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    4041
    4142public class EditAction {
     
    6667                } else {
    6768                        JOptionPane.showMessageDialog(Main.parent,
    68                                         Messages.translate(getClass(), "error_occured", new Object[] {result}),
    69                                         Messages.translate(getClass(), "error_occured_title"),
     69                                        tr("An error occured: {0}", new Object[] {result}),
     70                                        tr("Error"),
    7071                                        JOptionPane.ERROR_MESSAGE);
    7172                }
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java

    r11587 r12588  
    2727 */
    2828package org.openstreetmap.josm.plugins.osb.api;
     29
     30import static org.openstreetmap.josm.tools.I18n.tr;
    2931
    3032import java.awt.Point;
     
    7274                        id = m.group(1);
    7375                } else {
    74                         throw new RuntimeException("Couldn't create new bug. Result: " + result);
     76                        throw new RuntimeException(tr("Couldn't create new bug. Result: {0}" + result));
    7577                }
    7678               
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpUtils.java

    r11157 r12588  
    2727 */
    2828package org.openstreetmap.josm.plugins.osb.api.util;
     29
     30import static org.openstreetmap.josm.tools.I18n.tr;
    2931
    3032import java.io.ByteArrayOutputStream;
     
    165167            return value.get(0);
    166168        } else {
    167             throw new RuntimeException("Header contains several values and cannot be mapped to a single String");
     169            throw new RuntimeException(tr("Header contains several values and cannot be mapped to a single String"));
    168170        }
    169171    }
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java

    r11974 r12588  
    2828package org.openstreetmap.josm.plugins.osb.gui;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.BorderLayout;
    3133import java.awt.GridLayout;
     
    7274import org.openstreetmap.josm.plugins.osb.gui.action.OsbActionObserver;
    7375import org.openstreetmap.josm.plugins.osb.gui.action.PopupFactory;
    74 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    7576import org.openstreetmap.josm.tools.Shortcut;
    7677
     
    8990       
    9091        public OsbDialog(final OsbPlugin plugin) {
    91                 super("OpenStreetBugs", "icon_error22",
    92                                 Messages.translate(OsbDialog.class, "tooltip"),
     92                super(tr("Open OpenStreetBugs"), "icon_error22",
     93                                tr("Open the OpenStreetBugs window and activates the automatic download"),
    9394                                Shortcut.registerShortcut(
    94                                                 Messages.translate(OsbDialog.class, "shortcut"),
    95                                                 Messages.translate(OsbDialog.class, "shortcut"),
    96                                                 KeyEvent.VK_O, Shortcut.GROUP_MENU),
     95                                                "view:openstreetbugs",
     96                                                tr("Toggle: {0}", tr("Open OpenStreetBugs")),
     97                                                KeyEvent.VK_O, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT),
    9798                                150);
    9899               
     
    110111                JPanel buttonPanel = new JPanel(new GridLayout(2, 2));
    111112                add(buttonPanel, BorderLayout.SOUTH);
    112                 refresh = new JButton(Messages.translate(OsbDialog.class, "refresh"));
    113                 refresh.setToolTipText(Messages.translate(OsbDialog.class, "refresh"));
     113                refresh = new JButton(tr("Refresh"));
     114                refresh.setToolTipText(tr("Refresh"));
    114115                refresh.setIcon(OsbPlugin.loadIcon("view-refresh22.png"));
    115116                refresh.setHorizontalAlignment(SwingConstants.LEFT);
     
    120121                                if(Main.map.mapView.zoom() > 15 || Main.map.mapView.zoom() < 9) {
    121122                                        JOptionPane.showMessageDialog(Main.parent,
    122                                                         Messages.translate(OsbDialog.class, "out_of_bounds"),
    123                                                         Messages.translate(OsbDialog.class, "out_of_bounds_title"),
     123                                                        tr("The visible area is either too small or too big to download data from OpenStreetBugs"),
     124                                                        tr("Warning"),
    124125                                                        JOptionPane.INFORMATION_MESSAGE);
    125126                                        return;
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/AddCommentAction.java

    r11568 r12588  
    2828package org.openstreetmap.josm.plugins.osb.gui.action;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.event.ActionEvent;
    3133
     
    3537import org.openstreetmap.josm.plugins.osb.ConfigKeys;
    3638import org.openstreetmap.josm.plugins.osb.api.EditAction;
    37 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    3839
    3940public class AddCommentAction extends OsbAction {
     
    4445       
    4546        public AddCommentAction() {
    46                 super(Messages.translate(AddCommentAction.class, "name"));
     47                super(tr("Add a comment"));
    4748        }
    4849       
     
    5253                String nickname = Main.pref.get(ConfigKeys.OSB_NICKNAME);
    5354                if(nickname == null || nickname.length() == 0) {
    54                         nickname = JOptionPane.showInputDialog(Main.parent, Messages.translate(getClass(), "enter_nickname"));
     55                        nickname = JOptionPane.showInputDialog(Main.parent, tr("Please enter a user name"));
    5556                        if(nickname == null) {
    56                                 nickname = "NoName";
     57                                nickname = tr("NoName");
    5758                        } else {
    5859                                Main.pref.put(ConfigKeys.OSB_NICKNAME, nickname);
     
    6061                }
    6162               
    62                 String comment = JOptionPane.showInputDialog(Main.parent, Messages.translate(getClass(), "enter_comment"));
     63                String comment = JOptionPane.showInputDialog(Main.parent, tr("Enter your comment"));
    6364                if(comment != null) {
    6465                        comment = comment.concat(" [").concat(nickname).concat("]");
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/CloseIssueAction.java

    r11568 r12588  
    2828package org.openstreetmap.josm.plugins.osb.gui.action;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.event.ActionEvent;
    3133import java.io.IOException;
     
    3537import org.openstreetmap.josm.Main;
    3638import org.openstreetmap.josm.plugins.osb.api.CloseAction;
    37 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    3839
    3940public class CloseIssueAction extends OsbAction {
     
    4445       
    4546        public CloseIssueAction() {
    46                 super(Messages.translate(CloseIssueAction.class, "name"));
     47                super(tr("Mark as done"));
    4748        }
    4849       
     
    5051        protected void doActionPerformed(ActionEvent e) throws IOException {
    5152                int result = JOptionPane.showConfirmDialog(Main.parent,
    52                                 Messages.translate(getClass(), "question"),
    53                                 Messages.translate(getClass(), "title"),
     53                                tr("Really mark this issue as ''done''?"),
     54                                tr("Really close?"),
    5455                                JOptionPane.YES_NO_OPTION);
    5556               
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/NewIssueAction.java

    r11568 r12588  
    2828package org.openstreetmap.josm.plugins.osb.gui.action;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import java.awt.Cursor;
    3133import java.awt.event.ActionEvent;
     
    4244import org.openstreetmap.josm.plugins.osb.OsbPlugin;
    4345import org.openstreetmap.josm.plugins.osb.api.NewAction;
    44 import org.openstreetmap.josm.plugins.osb.i18n.Messages;
    4546
    4647public class NewIssueAction extends OsbAction implements MouseListener {
     
    5556       
    5657        public NewIssueAction(JToggleButton button, OsbPlugin plugin) {
    57                 super(Messages.translate(NewIssueAction.class, "name"));
     58                super(tr("New issue"));
    5859                this.button = button;
    5960                this.plugin = plugin;
     
    9293                String nickname = Main.pref.get(ConfigKeys.OSB_NICKNAME);
    9394                if(nickname == null || nickname.length() == 0) {
    94                         nickname = JOptionPane.showInputDialog(Main.parent, Messages.translate(AddCommentAction.class, "enter_nickname"));
     95                        nickname = JOptionPane.showInputDialog(Main.parent, tr("Please enter a user name"));
    9596                        if(nickname == null) {
    9697                                nickname = "NoName";
     
    102103                // get the comment
    103104                String result = JOptionPane.showInputDialog(Main.parent,
    104                                 Messages.translate(getClass(), "question"),
    105                                 Messages.translate(getClass(), "title"),
     105                                tr("Describe the problem precisely"),
     106                                tr("Create issue"),
    106107                                JOptionPane.QUESTION_MESSAGE);
    107108               
     
    119120                                e1.printStackTrace();
    120121                                JOptionPane.showMessageDialog(Main.parent,
    121                                                 Messages.translate(getClass(), "error_occured", new Object[] {result}),
    122                                                 Messages.translate(getClass(), "error_occured_title"),
     122                                                tr("An error occured: {0}", new Object[] {result}),
     123                                                tr("Error"),
    123124                                                JOptionPane.ERROR_MESSAGE);
    124125                        }
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/PopupFactory.java

    r11157 r12588  
    2828package org.openstreetmap.josm.plugins.osb.gui.action;
    2929
     30import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3032import javax.swing.JMenuItem;
    3133import javax.swing.JPopupMenu;
     
    4547                        return getFixedPopup();
    4648                } else {
    47                         throw new RuntimeException("Unknown issue state");
     49                        throw new RuntimeException(tr("Unknown issue state"));
    4850                }
    4951        }
Note: See TracChangeset for help on using the changeset viewer.