Changeset 2544 in josm


Ignore:
Timestamp:
2009-11-29T13:09:43+01:00 (14 years ago)
Author:
stoecker
Message:

fix #4035 - patch by avar - directly fill bug report request

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r2017 r2544  
    2222import org.openstreetmap.josm.actions.ShowStatusReportAction;
    2323import org.openstreetmap.josm.plugins.PluginHandler;
     24import org.openstreetmap.josm.tools.Base64;
     25
     26import java.net.URL;
     27import java.net.URLEncoder;
     28import org.openstreetmap.josm.tools.UrlLabel;
    2429
    2530/**
     
    6570                    + stack.getBuffer().toString();
    6671
     72                    URL url = new URL("http://josm.openstreetmap.de/josmticket?" +
     73                                      "data="+
     74                                      Base64.encode(
     75                                      // To note that it came from this code
     76                                      "keywords=template_report&" +
     77                                      "description=" + java.net.URLEncoder.encode(
     78                                                         // Note: This doesn't use tr() intentionally, we want bug reports in English
     79                                                         "What steps will reproduce the problem?\n"
     80                                                            + " 1. \n"
     81                                                            + " 2. \n"
     82                                                            + " 3. \n"
     83                                                            + "\n"
     84                                                            + "What is the expected result?\n\n"
     85                                                            + "What happens instead?\n\n"
     86                                                            + "Please provide any additional information below. Attach a screenshot if\n"
     87                                                            + "possible.\n\n"
     88                                                            + "{{{\n" + text + "\n}}}\n",
     89                                                         "UTF-8")));
     90
    6791                    JPanel p = new JPanel(new GridBagLayout());
    68                     p.add(new JLabel("<html>" + tr("Please report a ticket at {0}","http://josm.openstreetmap.de/newticket") +
    69                             "<br>" + tr("Include your steps to get to the error (as detailed as possible)!") +
    70                             "<br>" + tr("Try updating to the newest version of JOSM and all plugins before reporting a bug.") +
    71                             "<br>" + tr("Be sure to include the following information:") + "</html>"), GBC.eol());
     92                    p.add(new JLabel(tr("<html>" +
     93                                        "<p>You've encountered an error in JOSM. Before you file a bug<br>" +
     94                                        "make sure you've updated to the latest version of JOSM here:</p></html>")), GBC.eol());
     95                    p.add(new UrlLabel("http://josm.openstreetmap.de/#Download"), GBC.eop().insets(8,0,0,0));
     96                    p.add(new JLabel(tr("<html>You should also update your plugins. If neither of those help please<br>" +
     97                                        "file a bug in our bugtracker using this link:</p></html>")), GBC.eol());
     98                    p.add(new UrlLabel(url.toString(), "http://josm.openstreetmap.de/josmticket?..."), GBC.eop().insets(8,0,0,0));
     99                    p.add(new JLabel(tr("<html><p>" +
     100                                        "There the the error information provided below should already be<br>" +
     101                                        "filled out for you. Please include information on how to reproduce<br>" +
     102                                        "the error and try to supply as much detail as possible.</p></html>")), GBC.eop());
     103                    p.add(new JLabel(tr("<html><p>" +
     104                                        "Alternatively if that doesn't work you can manually fill in the information<br>" +
     105                                        "below at this URL:</p></html>")), GBC.eol());
     106                    p.add(new UrlLabel("http://josm.openstreetmap.de/newticket"), GBC.eop().insets(8,0,0,0));
    72107                    try {
    73108                        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(text), new ClipboardOwner(){
     
    83118                    p.add(new JScrollPane(info), GBC.eop());
    84119
    85                     JOptionPane.showMessageDialog(Main.parent, p, tr("Warning"), JOptionPane.WARNING_MESSAGE);
     120                    JOptionPane.showMessageDialog(Main.parent, p, tr("You've encountered a bug in JOSM"), JOptionPane.ERROR_MESSAGE);
    86121                } catch (Exception e1) {
    87122                    e1.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.