Changeset 9561 in osm for applications/editors/josm
- Timestamp:
- 2008-08-08T12:02:07+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/lang/de/de.po
r9521 r9561 11 11 "Project-Id-Version: de\n" 12 12 "Report-Msgid-Bugs-To: \n" 13 "POT-Creation-Date: 2008-08-0 7 10:17+0200\n"14 "PO-Revision-Date: 2008-08-0 7 10:35+0200\n"13 "POT-Creation-Date: 2008-08-08 09:46+0200\n" 14 "PO-Revision-Date: 2008-08-08 10:22+0200\n" 15 15 "Last-Translator: Dirk Stöcker <openstreetmap@dstoecker.de>\n" 16 16 "Language-Team: <de@li.org>\n" … … 551 551 #: ../colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java:79 552 552 #: ../wmsplugin/src/wmsplugin/WMSPreferenceEditor.java:55 553 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:4 04553 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:457 554 554 msgid "Add" 555 555 msgstr "Hinzufügen" … … 1404 1404 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java:566 1405 1405 #: ../grid/src/grid/GridPlugin.java:43 ../grid/src/grid/GridPlugin.java:49 1406 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:4 141406 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:467 1407 1407 msgid "Edit" 1408 1408 msgstr "Bearbeiten" … … 1435 1435 #: ../colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java:93 1436 1436 #: ../wmsplugin/src/wmsplugin/WMSPreferenceEditor.java:75 1437 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:4 451437 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:498 1438 1438 msgid "Delete" 1439 1439 msgstr "Löschen" … … 1483 1483 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java:247 1484 1484 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java:65 1485 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:7 81485 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:75 1486 1486 msgid "Select" 1487 1487 msgstr "Auswahl" … … 2846 2846 #: ../../core/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java:116 2847 2847 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java:552 2848 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:4 332848 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:486 2849 2849 msgid "Please select the row to edit." 2850 2850 msgstr "Bitte wählen sie eine Zeile zum Bearbeiten." … … 2854 2854 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java:557 2855 2855 #: ../wmsplugin/src/wmsplugin/WMSPreferenceEditor.java:80 2856 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4492856 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:502 2857 2857 msgid "Please select the row to delete." 2858 2858 msgstr "Bitte wählen Sie die zu löschende Zeile." … … 2871 2871 2872 2872 #: ../../core/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java:91 2873 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4602873 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:513 2874 2874 msgid "Delete the selected source from the list." 2875 2875 msgstr "Ausgewählte Quelle löschen." … … 3174 3174 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java:74 3175 3175 #: ../../core/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java:66 3176 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:7 93176 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:76 3177 3177 msgid "Set the selected elements on the map to the selected items in the list above." 3178 3178 msgstr "" … … 7108 7108 "talking to the plugin." 7109 7109 msgstr "" 7110 "Das Fernbedienungsplugin lauscht am Port 8111 des lokalen Rechners (localhost)."7111 "Dieser Port ist nicht konfigurierbar, weil er von externen Anwendungen adressiert"7112 "werden muss, welche das Plugin nutzen." 7110 "Das Fernbedienungsplugin lauscht am Port 8111 des lokalen Rechners " 7111 "(localhost). Dieser Port ist nicht konfigurierbar, weil er von externen " 7112 "Anwendungen adressiert werden muss, welche das Plugin nutzen." 7113 7113 7114 7114 #: ../remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol/RemoteControlPreferences.java:42 … … 7116 7116 msgstr "Erlaubte Aktionen" 7117 7117 7118 #: ../slippy_map_chooser/src/OsmMapControl.java:63 7119 msgid "left" 7120 msgstr "links" 7121 7122 #: ../slippy_map_chooser/src/SlippyMapChooser.java:83 7118 #: ../slippy_map_chooser/src/SlippyMapChooser.java:63 7123 7119 msgid "" 7124 7120 "Zoom: Mousewheel or double click. Move map: Hold right mousebutton and " … … 7128 7124 "Maus bewegen. Auswahl: Klick." 7129 7125 7130 #: ../slippy_map_chooser/src/SlippyMapChooser.java: 847126 #: ../slippy_map_chooser/src/SlippyMapChooser.java:66 7131 7127 msgid "Slippy map" 7132 7128 msgstr "Schnelle Karte" … … 7152 7148 msgstr "Raster Ebene:" 7153 7149 7154 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:6 67150 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:63 7155 7151 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java:36 7156 7152 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java:101 … … 7158 7154 msgstr "Ergebnisse der Datenprüfung" 7159 7155 7160 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:6 67156 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:63 7161 7157 msgid "Open the validation window." 7162 7158 msgstr "Fenster mit dem Ergebnis der Prüfung öffnen." 7163 7159 7164 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java: 827160 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:79 7165 7161 msgid "Validate" 7166 7162 msgstr "Prüfen" 7167 7163 7168 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java: 827164 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:79 7169 7165 msgid "Validate the data." 7170 7166 msgstr "Überprüfe die Daten." 7171 7167 7172 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:8 37168 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:80 7173 7169 msgid "Fix" 7174 7170 msgstr "Repariere" 7175 7171 7176 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:8 37172 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:80 7177 7173 msgid "Fix the selected errors." 7178 7174 msgstr "Korrigiere die Fehler in den Daten." 7179 7175 7180 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:8 87176 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:85 7181 7177 msgid "Ignore" 7182 7178 msgstr "Ignoriere" 7183 7179 7184 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:8 87180 #: ../validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:85 7185 7181 msgid "Ignore the selected errors next time." 7186 7182 msgstr "Ignoriere die Fehler beim nächsten Mal." … … 7340 7336 msgstr "Knoten ohne Zusatzinformation oder ohne Verbindung" 7341 7337 7342 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:1 137338 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:129 7343 7339 msgid "Properties checker :" 7344 7340 msgstr "Eigenschaftsprüfer:" 7345 7341 7346 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:1 147342 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:130 7347 7343 msgid "This plugin checks for errors in property keys and values." 7348 7344 msgstr "Dieses Plugin prüft auf Fehler in Schlüsseln und Werten" 7349 7345 7350 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 1927346 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:221 7351 7347 #, java-format 7352 7348 msgid "" … … 7357 7353 "{0}" 7358 7354 7359 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:246 7355 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:274 7356 msgid "Illegal tag/value combinations" 7357 msgstr "Ungültige Schlüssel/Wert-Kombinationen" 7358 7359 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:288 7360 7360 msgid "Tags with empty values" 7361 7361 msgstr "Tags mit leerem Wert" 7362 7362 7363 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:2 517363 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:293 7364 7364 #, java-format 7365 7365 msgid "Invalid property key ''{0}''" 7366 7366 msgstr "Ungültiger Schlüssel \"{0}\"" 7367 7367 7368 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:2 567368 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:298 7369 7369 #, java-format 7370 7370 msgid "Invalid white space in property key ''{0}''" 7371 7371 msgstr "Ungültiger Leerraum in Schlüssel \"{0}\"" 7372 7372 7373 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 2617373 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:303 7374 7374 msgid "Property values start or end with white space" 7375 7375 msgstr "Werte beginnen oder enden mit Leerraum" 7376 7376 7377 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 2697377 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:311 7378 7378 msgid "Unknown property values" 7379 7379 msgstr "Unbekannter Werte" 7380 7380 7381 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 2787381 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:320 7382 7382 msgid "FIXMES" 7383 7383 msgstr "FIXMEs" 7384 7384 7385 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 3897385 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:434 7386 7386 msgid "Check property keys." 7387 7387 msgstr "Schlüssel prüfen." 7388 7388 7389 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 3907389 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:435 7390 7390 msgid "Validate that property keys are valid checking against list of words." 7391 7391 msgstr "Überprüft Schlüssel auf Gültigkeit durch Abgleich mit einer Liste." 7392 7392 7393 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:407 7394 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:427 7395 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:437 7393 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:442 7394 msgid "Use complex property checker." 7395 msgstr "Nutze komplexen Eigenschaftsprüfer." 7396 7397 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:443 7398 msgid "Validate property values and tags using complex rules." 7399 msgstr "Prüft die Gültigkeit von Werten und Schlüsseln anhand von komplexen Regeln." 7400 7401 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:460 7402 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:480 7403 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:490 7396 7404 msgid "TagChecker source" 7397 7405 msgstr "Schlüsselprüferdatenquellen" 7398 7406 7399 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4577407 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:510 7400 7408 msgid "" 7401 7409 "The sources (url or filename) of spell check (see http://wiki.openstreetmap." … … 7405 7413 "openstreetmap.org/index.php/User:JLS/speller) oder Schlüsselprüfung." 7406 7414 7407 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4587415 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:511 7408 7416 msgid "Add a new source to the list." 7409 7417 msgstr "Eine neue Quelle zur Liste hinzufügen." 7410 7418 7411 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4597419 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:512 7412 7420 msgid "Edit the selected source." 7413 7421 msgstr "Ausgewählte Quelle bearbeiten." 7414 7422 7415 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4627423 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:515 7416 7424 msgid "Data sources" 7417 7425 msgstr "Datenquellen" 7418 7426 7419 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4867427 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:535 7420 7428 msgid "Check property values." 7421 7429 msgstr "Werte überprüfen." 7422 7430 7423 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4877431 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:536 7424 7432 msgid "Validate that property values are valid checking against presets." 7425 7433 msgstr "Prüft die Gültigkeit von Werten anhand von Presets." 7426 7434 7427 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4957435 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:543 7428 7436 msgid "Check for FIXMES." 7429 7437 msgstr "Prüfe auf FIXMEs" 7430 7438 7431 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 4967439 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:544 7432 7440 msgid "Looks for nodes or ways with FIXME in any property value." 7433 7441 msgstr "" … … 7435 7443 "haben." 7436 7444 7437 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:5 047445 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:551 7438 7446 msgid "Use default data file." 7439 7447 msgstr "Standarddatendatei nutzen." 7440 7448 7441 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:5 057449 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:552 7442 7450 msgid "Use the default data file (recommended)." 7443 7451 msgstr "Nutzung der Standarddatendatei (empfohlen)." 7444 7452 7445 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:5 097453 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:555 7446 7454 msgid "Use default spellcheck file." 7447 7455 msgstr "Standarddatei für Schreibprüfung nutzen." 7448 7456 7449 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:5 107457 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:556 7450 7458 msgid "Use the default spellcheck file (recommended)." 7451 7459 msgstr "Nutzung der Standarddatei für die Schreibfehlerprüfung (empfohlen)." 7452 7460 7453 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java: 5757461 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:633 7454 7462 msgid "Fix properties" 7455 7463 msgstr "Eigenschaften korrigieren" … … 7475 7483 msgstr "Verdrehtes Land: Land nicht auf der linken Seite" 7476 7484 7477 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:3 37485 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:34 7478 7486 msgid "Overlapping ways." 7479 7487 msgstr "Wege überlappen sich." 7480 7488 7481 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:3 47489 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:35 7482 7490 msgid "" 7483 7491 "This test checks that a connection between two nodes is not used by more " … … 7487 7495 "als einem Weg verwendet wird." 7488 7496 7489 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:9 67497 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:94 7490 7498 msgid "Overlapping areas" 7491 7499 msgstr "Überlappende Flächen" 7492 7500 7493 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:9 87501 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:96 7494 7502 msgid "Overlapping highways (with area)" 7495 7503 msgstr "Überlappende Straßen (mit Fläche)" 7496 7504 7497 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java: 1007505 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:98 7498 7506 msgid "Overlapping railways (with area)" 7499 7507 msgstr "Überlappende Schienen (mit Fläche)" 7500 7508 7501 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:10 27509 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:100 7502 7510 msgid "Overlapping ways (with area)" 7503 7511 msgstr "Überlappende Wege (mit Fläche)" 7504 7512 7505 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:10 57513 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:103 7506 7514 msgid "Overlapping highways" 7507 7515 msgstr "Überlappende Straßen" 7508 7516 7509 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:10 77517 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:105 7510 7518 msgid "Overlapping railways" 7511 7519 msgstr "Überlappende Schienen" 7512 7520 7513 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:10 97521 #: ../validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java:107 7514 7522 msgid "Overlapping ways" 7515 7523 msgstr "Überlappende Wege" -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
r9454 r9561 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 5 6 import java.awt.BorderLayout; … … 25 26 import org.openstreetmap.josm.data.osm.DataSet; 26 27 import org.openstreetmap.josm.data.osm.OsmPrimitive; 28 import org.openstreetmap.josm.gui.SideButton; 27 29 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 28 30 import org.openstreetmap.josm.plugins.validator.util.Bag; … … 48 50 public Collection<String> ignoredErrors = new TreeSet<String>(); 49 51 50 /** The fix button */ 51 private JButton fixButton; 52 53 /** The ignore button */ 54 private JButton ignoreButton; 55 56 /** The select button */ 57 private JButton selectButton; 52 private SideButton fixButton; /** The fix button */ 53 private SideButton ignoreButton; /** The ignore button */ 54 private SideButton selectButton; /** The select button */ 58 55 59 56 /** Last selected element */ … … 76 73 JPanel buttonPanel = new JPanel(new GridLayout(1,3)); 77 74 78 selectButton = Util.createButton(tr("Select"), "select", "mapmode/selection/select",75 selectButton = new SideButton(marktr("Select"), "select", "Validator", 79 76 tr("Set the selected elements on the map to the selected items in the list above."), this); 80 77 selectButton.setEnabled(false); 81 78 buttonPanel.add(selectButton); 82 buttonPanel.add( Util.createButton(tr("Validate"), "validate", "dialogs/refresh", tr("Validate the data."), this));83 fixButton = Util.createButton(tr("Fix"), "fix", "dialogs/fix", tr("Fix the selected errors."), this);79 buttonPanel.add(new SideButton(marktr("Validate"), "refresh", "Validator", tr("Validate the data."), this)); 80 fixButton = new SideButton(marktr("Fix"), "fix", "Validator", tr("Fix the selected errors."), this); 84 81 fixButton.setEnabled(false); 85 82 buttonPanel.add(fixButton); 86 83 if(Main.pref.getBoolean(PreferenceEditor.PREF_USE_IGNORE, true)) 87 84 { 88 ignoreButton = Util.createButton(tr("Ignore"), "ignore", "dialogs/delete", tr("Ignore the selected errors next time."), this);85 ignoreButton = new SideButton(marktr("Ignore"), "delete", "Validator", tr("Ignore the selected errors next time."), this); 89 86 ignoreButton.setEnabled(false); 90 87 buttonPanel.add(ignoreButton); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/OverlappingWays.java
r9021 r9561 7 7 import org.openstreetmap.josm.data.coor.LatLon; 8 8 import org.openstreetmap.josm.data.osm.OsmPrimitive; 9 import org.openstreetmap.josm.data.osm.OsmUtils; 9 10 import org.openstreetmap.josm.data.osm.Way; 10 11 import org.openstreetmap.josm.data.osm.WaySegment; … … 65 66 for (WaySegment ws : duplicated) 66 67 { 67 String ar;68 69 68 if (ws.way.get("highway") != null) 70 69 highway++; 71 70 else if (ws.way.get("railway") != null) 72 71 railway++; 73 ar = ws.way.get("area"); 74 if (ar != null && ("true".equalsIgnoreCase(ar) || "yes".equalsIgnoreCase(ar) || "1".equals(ar))) 72 if (OsmUtils.getOsmBoolean(ws.way.get("area"))) 75 73 area++; 76 74 if (ws.way.get("landuse") != null || ws.way.get("natural") != null -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java
r9279 r9561 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.GridBagLayout;6 5 import java.awt.event.ActionEvent; 7 6 import java.awt.event.ActionListener; 8 import java.io.*; 7 import java.awt.GridBagLayout; 8 import java.io.BufferedReader; 9 import java.io.File; 10 import java.io.FileInputStream; 11 import java.io.FileNotFoundException; 12 import java.io.FileReader; 13 import java.io.InputStream; 14 import java.io.InputStreamReader; 15 import java.io.IOException; 16 import java.io.UnsupportedEncodingException; 9 17 import java.net.URL; 10 import java.util.*; 18 import java.util.ArrayList; 19 import java.util.Collection; 20 import java.util.Collections; 21 import java.util.HashMap; 22 import java.util.List; 23 import java.util.Map; 11 24 import java.util.Map.Entry; 12 13 import javax.swing.*; 14 25 import java.util.StringTokenizer; 26 27 import javax.swing.DefaultListModel; 28 import javax.swing.JButton; 29 import javax.swing.JCheckBox; 30 import javax.swing.JLabel; 31 import javax.swing.JList; 32 import javax.swing.JOptionPane; 33 import javax.swing.JScrollPane; 34 import javax.swing.JPanel; 35 36 import org.openstreetmap.josm.command.ChangePropertyCommand; 37 import org.openstreetmap.josm.command.Command; 38 import org.openstreetmap.josm.command.SequenceCommand; 39 import org.openstreetmap.josm.data.osm.Node; 40 import org.openstreetmap.josm.data.osm.OsmPrimitive; 41 import org.openstreetmap.josm.data.osm.Way; 42 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference; 43 import org.openstreetmap.josm.gui.tagging.TaggingPreset; 15 44 import org.openstreetmap.josm.Main; 16 import org.openstreetmap.josm. command.*;17 import org.openstreetmap.josm. data.osm.*;18 import org.openstreetmap.josm. gui.tagging.TaggingPreset;19 import org.openstreetmap.josm. gui.tagging.TaggingPreset.*;20 import org.openstreetmap.josm. gui.preferences.TaggingPresetPreference;21 import org.openstreetmap.josm.plugins.validator. *;45 import org.openstreetmap.josm.plugins.validator.OSMValidatorPlugin; 46 import org.openstreetmap.josm.plugins.validator.PreferenceEditor; 47 import org.openstreetmap.josm.plugins.validator.Severity; 48 import org.openstreetmap.josm.plugins.validator.Test; 49 import org.openstreetmap.josm.plugins.validator.TestError; 50 import org.openstreetmap.josm.plugins.validator.tests.ChangePropertyKeyCommand; 22 51 import org.openstreetmap.josm.plugins.validator.util.Bag; 23 52 import org.openstreetmap.josm.plugins.validator.util.Util; … … 41 70 /** The spell check preset values */ 42 71 protected static Bag<String, String> presetsValueData; 72 /** The TagChecker data */ 73 protected static List<CheckerData> checkerData = new ArrayList<CheckerData>(); 43 74 44 75 /** The preferences prefix */ 45 76 protected static final String PREFIX = PreferenceEditor.PREFIX + "." + TagChecker.class.getSimpleName(); 46 77 47 /** Preference name for checking values */48 78 public static final String PREF_CHECK_VALUES = PREFIX + ".checkValues"; 49 /** Preference name for checking values */50 79 public static final String PREF_CHECK_KEYS = PREFIX + ".checkKeys"; 51 /** Preference name for checking FIXMES */80 public static final String PREF_CHECK_COMPLEX = PREFIX + ".checkComplex"; 52 81 public static final String PREF_CHECK_FIXMES = PREFIX + ".checkFixmes"; 53 /** Preference name for sources */ 82 54 83 public static final String PREF_SOURCES = PREFIX + ".sources"; 55 /** Preference name for sources */56 84 public static final String PREF_USE_DATA_FILE = PREFIX + ".usedatafile"; 57 /** Preference name for sources */58 85 public static final String PREF_USE_SPELL_FILE = PREFIX + ".usespellfile"; 59 /** Preference name for keys upload check */ 86 60 87 public static final String PREF_CHECK_KEYS_BEFORE_UPLOAD = PREFIX + ".checkKeysBeforeUpload"; 61 /** Preference name for values upload check */62 88 public static final String PREF_CHECK_VALUES_BEFORE_UPLOAD = PREFIX + ".checkValuesBeforeUpload"; 63 /** Preference name for fixmes upload check */89 public static final String PREF_CHECK_COMPLEX_BEFORE_UPLOAD = PREFIX + ".checkComplexBeforeUpload"; 64 90 public static final String PREF_CHECK_FIXMES_BEFORE_UPLOAD = PREFIX + ".checkFixmesBeforeUpload"; 65 91 66 /** Whether to check keys */67 92 protected boolean checkKeys = false; 68 /** Whether to check values */69 93 protected boolean checkValues = false; 70 /** Whether to check for fixmes in values */94 protected boolean checkComplex = false; 71 95 protected boolean checkFixmes = false; 72 96 73 /** Preferences checkbox for keys */74 97 protected JCheckBox prefCheckKeys; 75 /** Preferences checkbox for values */76 98 protected JCheckBox prefCheckValues; 77 /** Preferences checkbox for FIXMES */99 protected JCheckBox prefCheckComplex; 78 100 protected JCheckBox prefCheckFixmes; 79 /** The preferences checkbox for validation of keys on upload */ 101 80 102 protected JCheckBox prefCheckKeysBeforeUpload; 81 /** The preferences checkbox for validation of values on upload */82 103 protected JCheckBox prefCheckValuesBeforeUpload; 83 /** The preferences checkbox for validation of fixmes on upload */104 protected JCheckBox prefCheckComplexBeforeUpload; 84 105 protected JCheckBox prefCheckFixmesBeforeUpload; 85 /** The add button */ 106 107 protected JCheckBox prefUseDataFile; 108 protected JCheckBox prefUseSpellFile; 109 86 110 protected JButton addSrcButton; 87 /** The edit button */88 111 protected JButton editSrcButton; 89 /** The delete button */90 112 protected JButton deleteSrcButton; 91 113 92 protected static int EMPTY_VALUES = 0; /** Empty values error */ 93 protected static int INVALID_KEY = 1; /** Invalid key error */ 94 protected static int INVALID_VALUE = 2; /** Invalid value error */ 95 protected static int FIXME = 3; /** fixme error */ 96 protected static int INVALID_SPACE = 3; /** space in value (start/end) */ 114 protected static int EMPTY_VALUES = 0; 115 protected static int INVALID_KEY = 1; 116 protected static int INVALID_VALUE = 2; 117 protected static int FIXME = 3; 118 protected static int INVALID_SPACE = 3; 119 protected static int TAG_CHECK = 4; 97 120 98 121 /** List of sources for spellcheck data */ 99 122 protected JList Sources; 100 101 /** Whether this test must check the keys before upload. Used by peferences */102 protected boolean testKeysBeforeUpload;103 /** Whether this test must check the values before upload. Used by peferences */104 protected boolean testValuesBeforeUpload;105 /** Whether this test must check form fixmes in values before upload. Used by peferences */106 protected boolean testFixmesBeforeUpload;107 123 108 124 /** … … 165 181 166 182 String okValue = null; 183 Boolean tagcheckerfile = false; 167 184 do 168 185 { 169 186 String line = reader.readLine(); 170 if( line == null || line.length() == 0 ) 187 if( line == null || (!tagcheckerfile && line.length() == 0) ) 171 188 break; 172 189 if( line.startsWith("#") ) 173 continue; 174 175 if( line.charAt(0) == '+' ) 190 { 191 if(line.startsWith("# JOSM TagChecker")) 192 tagcheckerfile = true; 193 } 194 else if(tagcheckerfile) 195 { 196 CheckerData d = new CheckerData(); 197 String err = d.getData(line); 198 199 if(err == null) 200 checkerData.add(d); 201 else 202 System.err.println("Invalid tagchecker line - "+err+":" + line); 203 } 204 else if( line.charAt(0) == '+' ) 176 205 { 177 206 okValue = line.substring(1); … … 237 266 Bag<OsmPrimitive, String> withErrors = new Bag<OsmPrimitive, String>(); 238 267 268 if(checkComplex) 269 { 270 for(CheckerData d : checkerData) 271 { 272 if(d.match(p)) 273 { 274 errors.add( new TestError(this, Severity.WARNING, tr("Illegal tag/value combinations"), p, TAG_CHECK) ); 275 withErrors.add(p, "TC"); 276 break; 277 } 278 } 279 } 280 239 281 Map<String, String> props = (p.keys == null) ? Collections.<String, String>emptyMap() : p.keys; 240 282 for(Entry<String, String> prop: props.entrySet() ) … … 304 346 XmlObjectParser parser = new XmlObjectParser(); 305 347 parser.mapOnStart("item", TaggingPreset.class); 306 parser.map("text", Text.class); 307 parser.map("check", Check.class); 308 parser.map("combo", Combo.class); 309 parser.map("label", Label.class); 310 parser.map("key", Key.class); 348 parser.map("text", TaggingPreset.Text.class); 349 parser.map("check", TaggingPreset.Check.class); 350 parser.map("combo", TaggingPreset.Combo.class); 351 parser.map("label", TaggingPreset.Label.class); 352 parser.map("key", TaggingPreset.Key.class); 311 353 parser.start(in); 312 354 … … 314 356 { 315 357 Object obj = parser.next(); 316 if (obj instanceof Combo) { 317 Combo combo = (Combo)obj; 358 if (obj instanceof TaggingPreset.Combo) { 359 TaggingPreset.Combo combo = (TaggingPreset.Combo)obj; 318 360 for(String value : combo.values.split(",") ) 319 361 presetsValueData.add(combo.key, value); … … 366 408 checkValues = checkValues && Main.pref.getBoolean(PREF_CHECK_VALUES_BEFORE_UPLOAD, true); 367 409 410 checkComplex = Main.pref.getBoolean(PREF_CHECK_COMPLEX); 411 if( isBeforeUpload ) 412 checkComplex = checkValues && Main.pref.getBoolean(PREF_CHECK_COMPLEX_BEFORE_UPLOAD, true); 413 368 414 checkFixmes = Main.pref.getBoolean(PREF_CHECK_FIXMES); 369 415 if( isBeforeUpload ) … … 374 420 public void visit(Collection<OsmPrimitive> selection) 375 421 { 376 if( checkKeys || checkValues) 422 if( checkKeys || checkValues || checkComplex) 377 423 super.visit(selection); 378 424 } … … 385 431 386 432 testPanel.add( new JLabel(name), GBC.eol().insets(3,0,0,0) ); 387 388 boolean checkKeys = Main.pref.getBoolean(PREF_CHECK_KEYS, true); 389 prefCheckKeys = new JCheckBox(tr("Check property keys."), checkKeys); 433 434 prefCheckKeys = new JCheckBox(tr("Check property keys."), Main.pref.getBoolean(PREF_CHECK_KEYS, true)); 390 435 prefCheckKeys.setToolTipText(tr("Validate that property keys are valid checking against list of words.")); 391 436 testPanel.add(prefCheckKeys, GBC.std().insets(20,0,0,0)); … … 394 439 prefCheckKeysBeforeUpload.setSelected(Main.pref.getBoolean(PREF_CHECK_KEYS_BEFORE_UPLOAD, true)); 395 440 testPanel.add(prefCheckKeysBeforeUpload, a); 441 442 prefCheckComplex = new JCheckBox(tr("Use complex property checker."), Main.pref.getBoolean(PREF_CHECK_COMPLEX, true)); 443 prefCheckComplex.setToolTipText(tr("Validate property values and tags using complex rules.")); 444 testPanel.add(prefCheckComplex, GBC.std().insets(20,0,0,0)); 445 446 prefCheckComplexBeforeUpload = new JCheckBox(); 447 prefCheckComplexBeforeUpload.setSelected(Main.pref.getBoolean(PREF_CHECK_COMPLEX_BEFORE_UPLOAD, true)); 448 testPanel.add(prefCheckComplexBeforeUpload, a); 396 449 397 450 Sources = new JList(new DefaultListModel()); … … 468 521 buttonPanel.add(deleteSrcButton, GBC.std().insets(0,5,0,0)); 469 522 470 ActionListener disableCheck KeysActionListener = new ActionListener(){523 ActionListener disableCheckActionListener = new ActionListener(){ 471 524 public void actionPerformed(ActionEvent e) { 472 boolean selected = prefCheckKeys.isSelected() || prefCheckKeysBeforeUpload.isSelected(); 473 Sources.setEnabled( selected ); 474 addSrcButton.setEnabled(selected); 475 editSrcButton.setEnabled(selected); 476 deleteSrcButton.setEnabled(selected); 525 handlePrefEnable(); 477 526 } 478 527 }; 479 prefCheckKeys.addActionListener(disableCheck KeysActionListener);480 prefCheckKeysBeforeUpload.addActionListener(disableCheck KeysActionListener);481 482 Sources.setEnabled( checkKeys);483 buttonPanel.setEnabled( checkKeys ); 484 485 boolean checkValues = Main.pref.getBoolean(PREF_CHECK_VALUES, true); 486 prefCheckValues = new JCheckBox(tr("Check property values."), checkValues);528 prefCheckKeys.addActionListener(disableCheckActionListener); 529 prefCheckKeysBeforeUpload.addActionListener(disableCheckActionListener); 530 prefCheckComplex.addActionListener(disableCheckActionListener); 531 prefCheckComplexBeforeUpload.addActionListener(disableCheckActionListener); 532 533 handlePrefEnable(); 534 535 prefCheckValues = new JCheckBox(tr("Check property values."), Main.pref.getBoolean(PREF_CHECK_VALUES, true)); 487 536 prefCheckValues.setToolTipText(tr("Validate that property values are valid checking against presets.")); 488 537 testPanel.add(prefCheckValues, GBC.std().insets(20,0,0,0)); … … 492 541 testPanel.add(prefCheckValuesBeforeUpload, a); 493 542 494 boolean checkFixmes = Main.pref.getBoolean(PREF_CHECK_FIXMES, true); 495 prefCheckFixmes = new JCheckBox(tr("Check for FIXMES."), checkFixmes); 543 prefCheckFixmes = new JCheckBox(tr("Check for FIXMES."), Main.pref.getBoolean(PREF_CHECK_FIXMES, true)); 496 544 prefCheckFixmes.setToolTipText(tr("Looks for nodes or ways with FIXME in any property value.")); 497 545 testPanel.add(prefCheckFixmes, GBC.std().insets(20,0,0,0)); … … 501 549 testPanel.add(prefCheckFixmesBeforeUpload, a); 502 550 503 boolean useDataFile = Main.pref.getBoolean(PREF_USE_DATA_FILE, true); 504 JCheckBox prefUseDataFile = new JCheckBox(tr("Use default data file."), checkValues); 551 prefUseDataFile = new JCheckBox(tr("Use default data file."), Main.pref.getBoolean(PREF_USE_DATA_FILE, true)); 505 552 prefUseDataFile.setToolTipText(tr("Use the default data file (recommended).")); 506 553 testPanel.add(prefUseDataFile, GBC.eol().insets(20,0,0,0)); 507 554 508 boolean useSpellFile = Main.pref.getBoolean(PREF_USE_SPELL_FILE, true); 509 JCheckBox prefUseSpellFile = new JCheckBox(tr("Use default spellcheck file."), checkValues); 555 prefUseSpellFile = new JCheckBox(tr("Use default spellcheck file."), Main.pref.getBoolean(PREF_USE_SPELL_FILE, true)); 510 556 prefUseSpellFile.setToolTipText(tr("Use the default spellcheck file (recommended).")); 511 557 testPanel.add(prefUseSpellFile, GBC.eol().insets(20,0,0,0)); 512 558 } 513 559 560 public void handlePrefEnable() 561 { 562 boolean selected = prefCheckKeys.isSelected() || prefCheckKeysBeforeUpload.isSelected() 563 || prefCheckComplex.isSelected() || prefCheckComplexBeforeUpload.isSelected(); 564 Sources.setEnabled( selected ); 565 addSrcButton.setEnabled(selected); 566 editSrcButton.setEnabled(selected); 567 deleteSrcButton.setEnabled(selected); 568 } 569 514 570 @Override 515 571 public void ok() 516 572 { 517 enabled = prefCheckKeys.isSelected() || prefCheckValues.isSelected() || prefCheckFixmes.isSelected(); 518 testBeforeUpload = prefCheckKeysBeforeUpload.isSelected() || prefCheckValuesBeforeUpload.isSelected() || prefCheckFixmesBeforeUpload.isSelected(); 573 enabled = prefCheckKeys.isSelected() || prefCheckValues.isSelected() || prefCheckComplex.isSelected() || prefCheckFixmes.isSelected(); 574 testBeforeUpload = prefCheckKeysBeforeUpload.isSelected() || prefCheckValuesBeforeUpload.isSelected() || prefCheckFixmesBeforeUpload.isSelected() || prefCheckComplexBeforeUpload.isSelected(); 519 575 520 576 Main.pref.put(PREF_CHECK_VALUES, prefCheckValues.isSelected()); 577 Main.pref.put(PREF_CHECK_COMPLEX, prefCheckComplex.isSelected()); 521 578 Main.pref.put(PREF_CHECK_KEYS, prefCheckKeys.isSelected()); 522 579 Main.pref.put(PREF_CHECK_FIXMES, prefCheckFixmes.isSelected()); 523 580 Main.pref.put(PREF_CHECK_VALUES_BEFORE_UPLOAD, prefCheckValuesBeforeUpload.isSelected()); 581 Main.pref.put(PREF_CHECK_COMPLEX_BEFORE_UPLOAD, prefCheckComplexBeforeUpload.isSelected()); 524 582 Main.pref.put(PREF_CHECK_KEYS_BEFORE_UPLOAD, prefCheckKeysBeforeUpload.isSelected()); 525 583 Main.pref.put(PREF_CHECK_FIXMES_BEFORE_UPLOAD, prefCheckFixmesBeforeUpload.isSelected()); 526 Main.pref.put(PREF_USE_DATA_FILE, pref CheckFixmesBeforeUpload.isSelected());527 Main.pref.put(PREF_USE_SPELL_FILE, pref CheckFixmesBeforeUpload.isSelected());584 Main.pref.put(PREF_USE_DATA_FILE, prefUseDataFile.isSelected()); 585 Main.pref.put(PREF_USE_SPELL_FILE, prefUseSpellFile.isSelected()); 528 586 String sources = ""; 529 587 if( Sources.getModel().getSize() > 0 ) … … 587 645 return false; 588 646 } 647 648 private static class CheckerData { 649 public String getData(String data) 650 { 651 System.out.println(data); 652 return "not implemented yet"; 653 } 654 public Boolean match(OsmPrimitive osm) 655 { 656 return false; 657 } 658 } 589 659 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/Util.java
r9454 r9561 37 37 } 38 38 39 /**40 * Utility method for creating buttons41 * @param name The name of the button42 * @param icon Icon of the button43 * @param tooltip Tooltip44 * @param action The action performed when clicking the button45 * @return The created button46 */47 public static JButton createButton(String name, String actionname, String icon, String tooltip, ActionListener action)48 {49 JButton button = new JButton(name, ImageProvider.get(icon));50 button.setActionCommand(actionname);51 button.addActionListener(action);52 button.setToolTipText(tr(tooltip));53 button.setMargin(new Insets(1,1,1,1));54 button.setIconTextGap(2);55 button.putClientProperty("help", "Dialog/SelectionList/" + actionname);56 return button;57 }58 59 60 39 /** 61 40 * Returns the version
Note:
See TracChangeset
for help on using the changeset viewer.