Changeset 4023 in josm
- Timestamp:
- 2011-04-15T12:26:55+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java
r3745 r4023 21 21 import org.openstreetmap.josm.data.validation.TestError; 22 22 import org.openstreetmap.josm.data.validation.util.AgregatePrimitivesVisitor; 23 import org.openstreetmap.josm.gui.ExtendedDialog; 23 24 import org.openstreetmap.josm.gui.dialogs.validator.ValidatorTreePanel; 24 25 import org.openstreetmap.josm.gui.preferences.ValidatorPreference; 26 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 25 27 import org.openstreetmap.josm.tools.GBC; 26 28 … … 108 110 ValidatorTreePanel errorPanel = new ValidatorTreePanel(errors); 109 111 errorPanel.expandAll(); 110 p.add(new JScrollPane(errorPanel), GBC.eol()); 112 HtmlPanel pnlMessage = new HtmlPanel(); 113 pnlMessage.setText("<html><body>" 114 + tr("The following are results of automatic validation. Try fixing" 115 + " these, but be careful( don't destray valid data)." 116 + " When in doubt ignore them.<br>When you" 117 + " cancel this dialog, you can find the entries in the validator" 118 + " side panel to inspect them.") 119 + "<table align=\"center\">" 120 + "<tr><td align=\"left\"><b>"+tr("Errors") 121 + " </b></td><td align=\"left\">" 122 + tr("Usually this should be fixed.")+"</td></tr>" 123 + "<tr><td align=\"left\"><b>"+tr("Warnings") 124 + " </b></td><td align=\"left\">" 125 + tr("Fix these when possible.")+"</td></tr>" 126 + "<tr><td align=\"left\"><b>"+tr("Other") 127 + " </b></td><td align=\"left\">" 128 + tr("Informational warnings, expect many false entries.")+"</td></tr>" 129 + "</table>" 130 ); 131 p.add(pnlMessage, GBC.eol()); 132 p.add(new JScrollPane(errorPanel), GBC.eol().fill(GBC.BOTH)); 111 133 112 int res = JOptionPane.showConfirmDialog(Main.parent, p, 113 tr("Data with errors. Upload anyway?"), 114 JOptionPane.YES_NO_OPTION, 115 JOptionPane.QUESTION_MESSAGE); 116 if (res == JOptionPane.NO_OPTION) { 134 ExtendedDialog ed = new ExtendedDialog(Main.parent, 135 tr("Supicious data found. Upload anyway?"), 136 new String[] {tr("Continue upload"), tr("Cancel")}); 137 ed.setButtonIcons(new String[] {"ok.png", "cancel.png"}); 138 ed.setContent(p); 139 ed.showDialog(); 140 141 if(ed.getValue() != 1) { 117 142 OsmValidator.initializeErrorLayer(); 118 143 Main.map.validatorDialog.unfurlDialog(); 119 144 Main.map.validatorDialog.tree.setErrors(errors); 120 145 Main.main.getCurrentDataSet().fireSelectionChanged(); 146 return false; 121 147 } 122 return res == JOptionPane.YES_OPTION;148 return true; 123 149 } 124 150 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r3707 r4023 399 399 400 400 if (!ignore) { 401 errors.add( new TestError(this, Severity.ERROR, tr(" Illegaltag/value combinations"),402 tr(" Illegal tag/value combinations"), tr("Illegaltag/value combinations"), 1272, p) );401 errors.add( new TestError(this, Severity.ERROR, tr("Suspicious tag/value combinations"), 402 tr("Suspicious tag/value combinations"), tr("Suspicious tag/value combinations"), 1272, p) ); 403 403 withErrors.put(p, "TC"); 404 404 } … … 408 408 for (CheckerData d : checkerData) { 409 409 if (d.match(p, keys)) { 410 errors.add( new TestError(this, d.getSeverity(), tr(" Illegaltag/value combinations"),410 errors.add( new TestError(this, d.getSeverity(), tr("Suspicious tag/value combinations"), 411 411 d.getDescription(), d.getDescriptionOrig(), d.getCode(), p) ); 412 412 withErrors.put(p, "TC"); -
trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
r3745 r4023 236 236 msg = msgErrors.getKey() + " (" + errs.size() + ")"; 237 237 } else { 238 msg = bag.getKey() + " - " + msgErrors.getKey() + " (" + errs.size() + ")";238 msg = msgErrors.getKey() + " - " + bag.getKey() + " (" + errs.size() + ")"; 239 239 } 240 240 DefaultMutableTreeNode messageNode = new DefaultMutableTreeNode(msg);
Note:
See TracChangeset
for help on using the changeset viewer.