Changeset 12588 in osm for applications/editors/josm/plugins/openstreetbugs
- Timestamp:
- 2008-12-25T19:01:06+01:00 (16 years ago)
- 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
-
Property svn:ignore
set to
-
applications/editors/josm/plugins/openstreetbugs/build.xml
r11569 r12588 50 50 <attribute name="Plugin-Version" value="${version}" /> 51 51 <attribute name="Plugin-Date" value="${current.time}" /> 52 <attribute name="Plugin-Mainversion" value="1180"/> 52 53 <attribute name="Author" value="Henrik Niehaus" /> 53 54 </manifest> -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbDownloadLoop.java
r12398 r12588 28 28 package org.openstreetmap.josm.plugins.osb; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.geom.Point2D; 31 33 import java.util.concurrent.TimeUnit; … … 48 50 49 51 public OsbDownloadLoop() { 50 setName("OpenStreetBugs download loop"); 52 setName(tr("OpenStreetBugs download loop")); 51 53 start(); 52 54 } -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java
r12476 r12588 28 28 package org.openstreetmap.josm.plugins.osb; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.Component; 31 33 import java.awt.Graphics; … … 57 59 import org.openstreetmap.josm.plugins.osb.gui.action.OsbAction; 58 60 import org.openstreetmap.josm.plugins.osb.gui.action.PopupFactory; 59 import org.openstreetmap.josm.plugins.osb.i18n.Messages;60 61 import org.openstreetmap.josm.tools.ColorHelper; 61 62 … … 98 99 @Override 99 100 public String getToolTipText() { 100 return Messages.translate(getClass(), "tooltip");101 return tr("Displays OpenStreetBugs issues"); 101 102 } 102 103 -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java
r11569 r12588 28 28 package org.openstreetmap.josm.plugins.osb; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.event.ActionEvent; 31 33 import java.awt.event.ActionListener; -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbUploadHook.java
r11161 r12588 28 28 package org.openstreetmap.josm.plugins.osb; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.util.Collection; 31 33 import java.util.Iterator; … … 47 49 if(containsOsbData) { 48 50 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); 52 54 return false; 53 55 } else { -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java
r11157 r12588 28 28 package org.openstreetmap.josm.plugins.osb.api; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.io.IOException; 31 33 … … 36 38 import org.openstreetmap.josm.plugins.osb.ConfigKeys; 37 39 import org.openstreetmap.josm.plugins.osb.api.util.HttpUtils; 38 import org.openstreetmap.josm.plugins.osb.i18n.Messages;39 40 40 41 public class CloseAction { … … 61 62 } else { 62 63 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"), 65 66 JOptionPane.ERROR_MESSAGE); 66 67 } -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java
r11157 r12588 28 28 package org.openstreetmap.josm.plugins.osb.api; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.io.IOException; 31 33 import java.net.URLEncoder; … … 37 39 import org.openstreetmap.josm.plugins.osb.ConfigKeys; 38 40 import org.openstreetmap.josm.plugins.osb.api.util.HttpUtils; 39 import org.openstreetmap.josm.plugins.osb.i18n.Messages;40 41 41 42 public class EditAction { … … 66 67 } else { 67 68 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"), 70 71 JOptionPane.ERROR_MESSAGE); 71 72 } -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java
r11587 r12588 27 27 */ 28 28 package org.openstreetmap.josm.plugins.osb.api; 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 29 31 30 32 import java.awt.Point; … … 72 74 id = m.group(1); 73 75 } 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)); 75 77 } 76 78 -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpUtils.java
r11157 r12588 27 27 */ 28 28 package org.openstreetmap.josm.plugins.osb.api.util; 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 29 31 30 32 import java.io.ByteArrayOutputStream; … … 165 167 return value.get(0); 166 168 } 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")); 168 170 } 169 171 } -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java
r11974 r12588 28 28 package org.openstreetmap.josm.plugins.osb.gui; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.BorderLayout; 31 33 import java.awt.GridLayout; … … 72 74 import org.openstreetmap.josm.plugins.osb.gui.action.OsbActionObserver; 73 75 import org.openstreetmap.josm.plugins.osb.gui.action.PopupFactory; 74 import org.openstreetmap.josm.plugins.osb.i18n.Messages;75 76 import org.openstreetmap.josm.tools.Shortcut; 76 77 … … 89 90 90 91 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"), 93 94 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), 97 98 150); 98 99 … … 110 111 JPanel buttonPanel = new JPanel(new GridLayout(2, 2)); 111 112 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")); 114 115 refresh.setIcon(OsbPlugin.loadIcon("view-refresh22.png")); 115 116 refresh.setHorizontalAlignment(SwingConstants.LEFT); … … 120 121 if(Main.map.mapView.zoom() > 15 || Main.map.mapView.zoom() < 9) { 121 122 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"), 124 125 JOptionPane.INFORMATION_MESSAGE); 125 126 return; -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/AddCommentAction.java
r11568 r12588 28 28 package org.openstreetmap.josm.plugins.osb.gui.action; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.event.ActionEvent; 31 33 … … 35 37 import org.openstreetmap.josm.plugins.osb.ConfigKeys; 36 38 import org.openstreetmap.josm.plugins.osb.api.EditAction; 37 import org.openstreetmap.josm.plugins.osb.i18n.Messages;38 39 39 40 public class AddCommentAction extends OsbAction { … … 44 45 45 46 public AddCommentAction() { 46 super( Messages.translate(AddCommentAction.class, "name"));47 super(tr("Add a comment")); 47 48 } 48 49 … … 52 53 String nickname = Main.pref.get(ConfigKeys.OSB_NICKNAME); 53 54 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")); 55 56 if(nickname == null) { 56 nickname = "NoName";57 nickname = tr("NoName"); 57 58 } else { 58 59 Main.pref.put(ConfigKeys.OSB_NICKNAME, nickname); … … 60 61 } 61 62 62 String comment = JOptionPane.showInputDialog(Main.parent, Messages.translate(getClass(), "enter_comment"));63 String comment = JOptionPane.showInputDialog(Main.parent, tr("Enter your comment")); 63 64 if(comment != null) { 64 65 comment = comment.concat(" [").concat(nickname).concat("]"); -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/CloseIssueAction.java
r11568 r12588 28 28 package org.openstreetmap.josm.plugins.osb.gui.action; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.event.ActionEvent; 31 33 import java.io.IOException; … … 35 37 import org.openstreetmap.josm.Main; 36 38 import org.openstreetmap.josm.plugins.osb.api.CloseAction; 37 import org.openstreetmap.josm.plugins.osb.i18n.Messages;38 39 39 40 public class CloseIssueAction extends OsbAction { … … 44 45 45 46 public CloseIssueAction() { 46 super( Messages.translate(CloseIssueAction.class, "name"));47 super(tr("Mark as done")); 47 48 } 48 49 … … 50 51 protected void doActionPerformed(ActionEvent e) throws IOException { 51 52 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?"), 54 55 JOptionPane.YES_NO_OPTION); 55 56 -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/NewIssueAction.java
r11568 r12588 28 28 package org.openstreetmap.josm.plugins.osb.gui.action; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.Cursor; 31 33 import java.awt.event.ActionEvent; … … 42 44 import org.openstreetmap.josm.plugins.osb.OsbPlugin; 43 45 import org.openstreetmap.josm.plugins.osb.api.NewAction; 44 import org.openstreetmap.josm.plugins.osb.i18n.Messages;45 46 46 47 public class NewIssueAction extends OsbAction implements MouseListener { … … 55 56 56 57 public NewIssueAction(JToggleButton button, OsbPlugin plugin) { 57 super( Messages.translate(NewIssueAction.class, "name"));58 super(tr("New issue")); 58 59 this.button = button; 59 60 this.plugin = plugin; … … 92 93 String nickname = Main.pref.get(ConfigKeys.OSB_NICKNAME); 93 94 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")); 95 96 if(nickname == null) { 96 97 nickname = "NoName"; … … 102 103 // get the comment 103 104 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"), 106 107 JOptionPane.QUESTION_MESSAGE); 107 108 … … 119 120 e1.printStackTrace(); 120 121 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"), 123 124 JOptionPane.ERROR_MESSAGE); 124 125 } -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/PopupFactory.java
r11157 r12588 28 28 package org.openstreetmap.josm.plugins.osb.gui.action; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import javax.swing.JMenuItem; 31 33 import javax.swing.JPopupMenu; … … 45 47 return getFixedPopup(); 46 48 } else { 47 throw new RuntimeException("Unknown issue state"); 49 throw new RuntimeException(tr("Unknown issue state")); 48 50 } 49 51 }
Note:
See TracChangeset
for help on using the changeset viewer.