From 96b13866faa7559233689ce73e9de8041859bc2f Mon Sep 17 00:00:00 2001 From: activityworkshop Date: Sat, 2 Jan 2016 19:27:10 +0100 Subject: [PATCH] Version 18.2, December 2015 --- README.md | 4 +-- tim/prune/GpsPrune.java | 4 +-- tim/prune/function/AboutScreen.java | 6 ++--- .../function/search/wikimedia_galleries.txt | 4 +-- tim/prune/lang/prune-texts_it.properties | 7 +++++ tim/prune/lang/prune-texts_nl.properties | 23 ++++++++-------- tim/prune/lang/prune-texts_pl.properties | 9 +++++++ tim/prune/readme.txt | 12 ++++++--- tim/prune/save/GpxExporter.java | 4 +-- tim/prune/save/KmlExporter.java | 4 +-- tim/prune/save/xml/XmlUtils.java | 26 ++++++++++++++++--- 11 files changed, 72 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 63fe4ab..373a992 100644 --- a/README.md +++ b/README.md @@ -3,5 +3,5 @@ GpsPrune is a map-based application for viewing, editing and converting coordina It's a cross-platform java application, and its home page is at http://gpsprune.activityworkshop.net . -Here on github you'll find all the sources from version 1 to the current version 18, and in the wiki at https://github.com/activityworkshop/GpsPrune/wiki there's the beginning of a translation effort for anyone to contribute. -Currently just the Spanish translations are online, to see whether it's a workable idea or not. +Here on github you'll find all the sources from version 1 to the current version 18.2, and in the wiki at https://github.com/activityworkshop/GpsPrune/wiki there's the beginning of a translation effort for anyone to contribute. +Currently just the Spanish translations are online, to see whether it's a workable idea or not. Please help with this if you can. diff --git a/tim/prune/GpsPrune.java b/tim/prune/GpsPrune.java index 303453a..3a112b5 100644 --- a/tim/prune/GpsPrune.java +++ b/tim/prune/GpsPrune.java @@ -36,9 +36,9 @@ import tim.prune.gui.profile.ProfileChart; public class GpsPrune { /** Version number of application, used in about screen and for version check */ - public static final String VERSION_NUMBER = "18.1"; + public static final String VERSION_NUMBER = "18.2"; /** Build number, just used for about screen */ - public static final String BUILD_NUMBER = "336"; + public static final String BUILD_NUMBER = "336a"; /** Static reference to App object */ private static App APP = null; diff --git a/tim/prune/function/AboutScreen.java b/tim/prune/function/AboutScreen.java index c3a9f5b..4c104a0 100644 --- a/tim/prune/function/AboutScreen.java +++ b/tim/prune/function/AboutScreen.java @@ -97,9 +97,9 @@ public class AboutScreen extends GenericFunction descBuffer.append("

").append(I18nManager.getText("dialog.about.summarytext2")).append("

"); descBuffer.append("

").append(I18nManager.getText("dialog.about.summarytext3")).append("

"); descBuffer.append("

").append(I18nManager.getText("dialog.about.languages")).append(" : ") - .append("\u010de\u0161tina, deutsch, english, espa\u00F1ol, fran\u00E7ais, italiano, magyar,
" + - " nederlands, polski, portugu\u00EAs, rom\u00E2n\u0103, \u0440\u0443\u0441\u0441\u043a\u0438\u0439 (russian), \u4e2d\u6587 (chinese),
" + - " \u65E5\u672C\u8A9E (japanese), \uD55C\uAD6D\uC5B4/\uC870\uC120\uB9D0 (korean), schwiizerd\u00FC\u00FCtsch, t\u00FCrk\u00E7e, afrikaans, ukrainian

"); + .append("afrikaans, \u010de\u0161tina, deutsch, english, espa\u00F1ol, fran\u00E7ais, italiano,
" + + " magyar,nederlands, polski, portugu\u00EAs, rom\u00E2n\u0103, \u0440\u0443\u0441\u0441\u043a\u0438\u0439 (russian), \u4e2d\u6587 (chinese),
" + + " \u65E5\u672C\u8A9E (japanese), \uD55C\uAD6D\uC5B4/\uC870\uC120\uB9D0 (korean), schwiizerd\u00FC\u00FCtsch, t\u00FCrk\u00E7e, ukrainian

"); descBuffer.append("

").append(I18nManager.getText("dialog.about.translatedby")).append("

"); JEditorPane descPane = new JEditorPane("text/html", descBuffer.toString()); descPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); diff --git a/tim/prune/function/search/wikimedia_galleries.txt b/tim/prune/function/search/wikimedia_galleries.txt index f8514f5..9bb446f 100644 --- a/tim/prune/function/search/wikimedia_galleries.txt +++ b/tim/prune/function/search/wikimedia_galleries.txt @@ -67,7 +67,7 @@ Boccadasse Boccadasse è un antico borgo marinaro situato nel levante di Genova. Boettcherstrasse 53 04 30 N 8 48 21 E Boiro 42 38 13.16 N 8 52 12.31 W Boke Boke is a small village in the German district Paderborn; it belongs to the city of Delbrück. 51 43 48 N 8 33 43.56 E -Bolongaropalast The Bolongaro Palace ist a baroque building in Frankfurt-Höchst. 50 06 04 N 8 33 08 E +Bolongaropalast The Bolongaro Palace is a baroque building in Frankfurt-Höchst. 50 06 04 N 8 33 08 E Borne des Trois Puissances Dreiländerstein 47 30 10.58 N 7 07 48.76 E Borovsk Эта страница на русском: Боровск 55 12 27.19 N 36 29 05.05 E Bosco delle Querce The Regional Natural Park Bosco delle Querce (Oaks' Wood), built after the Seveso Disaster on the "A" zone. 45 38 55 N 9 09 10 E @@ -149,7 +149,7 @@ Château de Couiza 42 56 42.68 N 2 15 14.11 E Chiesa di Sant'Antonio in Caggiano Church of Saint Anthony in Caggiano. 40 34 04.13 N 15 29 39.47 E Chioggia Chioggia is a town in Veneto in Italy. 45 13 04.23 N 12 16 36.76 E Chroniques de Jérusalem Jerusalem Mount of Olives Santa Marta Passionists church. 31 46 15.83 N 35 15 08.48 E -Church of Adelboden The gothic village church Adelboden was built in the 15th century 46 29 34.1 N 7 33 32.4 E +Church of Adelboden The gothic village church of Adelboden was built in the 15th century 46 29 34.1 N 7 33 32.4 E Church of Saints Apostles Peter and Paul in Vilnius 54 41 38.82 N 25 18 22.69 E Church of St. Johns in Vilnius Organ 54 40 57.5 N 25 17 19.22 E Church of São Vítor (Braga) Igreja de São Victor em Braga 41 33 09.95 N 8 24 47.49 W diff --git a/tim/prune/lang/prune-texts_it.properties b/tim/prune/lang/prune-texts_it.properties index 69a9c83..f8fe203 100644 --- a/tim/prune/lang/prune-texts_it.properties +++ b/tim/prune/lang/prune-texts_it.properties @@ -103,6 +103,7 @@ function.distances=Mostra distanze function.fullrangedetails=Mostra dettagli function.estimatetime=Stima durata function.learnestimationparams=Apprendi parametri di stima +function.autoplay=Riproduci traccia function.setmapbg=Configura sfondo mappa function.setpaths=Configura percorsi programmi function.selectsegment=Seleziona segmento corrente @@ -380,6 +381,7 @@ dialog.gpsies.activity.motorbiking=Motocicletta dialog.gpsies.activity.snowshoe=Trekking sulla neve dialog.gpsies.activity.sailing=Navigazione dialog.gpsies.activity.skating=Pattinaggio +dialog.mapillary.nonefound=Nessuna foto trovata dialog.wikipedia.column.name=Titolo articolo dialog.wikipedia.column.distance=Distanza dialog.wikipedia.nonefound=Nessuna punti trovata @@ -591,6 +593,11 @@ dialog.deletebydate.column.keep=Tieni dialog.deletebydate.column.delete=Cancella dialog.setaltitudetolerance.text.metres=Tolleranza di altitudini (metri) dialog.setaltitudetolerance.text.feet=Tolleranza di altitudini (feet) +dialog.autoplay.duration=Durata (sec) +dialog.autoplay.usetimestamps=Usa dati temporali +dialog.autoplay.rewind=Riavvolga +dialog.autoplay.pause=Pausa +dialog.autoplay.play=Riproduci # 3d window dialog.3d.title=Visione GpsPrune in 3D diff --git a/tim/prune/lang/prune-texts_nl.properties b/tim/prune/lang/prune-texts_nl.properties index 428913f..a9d4bc3 100644 --- a/tim/prune/lang/prune-texts_nl.properties +++ b/tim/prune/lang/prune-texts_nl.properties @@ -38,7 +38,7 @@ menu.view.browser.yahoo=Yahoo maps menu.view.browser.bing=Bing maps menu.settings=Instellingen menu.settings.onlinemode=Kaarten van internet ophalen -menu.settings.antialias=Anti-kartelvorming +menu.settings.antialias=Gebruik anti-aliasering menu.settings.autosave=Automatisch opslaan bij afsluiten menu.help=Help # Popup menu for map @@ -86,7 +86,7 @@ function.exportsvg=Export SVG function.exportimage=Bestand exporteren function.editwaypointname=Hernoem waypoint function.compress=Route comprimeren -function.marklifts=Makeer skiliften +function.marklifts=Markeer opgaande liften function.deleterange=Verwijder reeks function.croptrack=Route bijknippen function.interpolate=Interpoleer punten @@ -104,7 +104,7 @@ function.distances=Afstanden function.fullrangedetails=Reeks details function.estimatetime=Geschatte tijd function.learnestimationparams=Parameters voor geschatte tijd -function.autoplay=Route afspelen +function.autoplay=Route automatisch afspelen function.setmapbg=Instellen kaart achtergrond function.setpaths=Instellen programmapaden function.selectsegment=Selecteer huidige segment @@ -116,8 +116,8 @@ function.lookupsrtm=Hoogtes van SRTM ophalen function.downloadsrtm=Downloaden SRTM tegels function.getwikipedia=Wikipedia artikelen uit de buurt ophalen function.searchwikipedianames=Wikipedia zoeken op naam -function.searchopencachingde=OpenCaching.de zoeken -function.mapillary=Mapillary.com zoeken +function.searchopencachingde=Doorzoek OpenCaching.de +function.mapillary=Zoek naar foto's op Mapillary function.downloadosm=Downloaden OSM data voor gebied function.duplicatepoint=Dupliceer punt function.setcolours=Instellen kleuren @@ -596,12 +596,11 @@ dialog.deletebydate.column.keep=Behouden dialog.deletebydate.column.delete=Verwijderen dialog.setaltitudetolerance.text.metres=Grens (in meters) waaronder kleine klimmen en afdalingen worden genegeerd dialog.setaltitudetolerance.text.feet=Grens (in feet) waaronder kleine klimmen en afdalingen worden genegeerd -dialog.autoplay.duration=Duur (sec) -dialog.autoplay.usetimestamps=Gebruik tijdinformatie -dialog.autoplay.rewind=Terugspoelen -dialog.autoplay.pause=Pauzeren +dialog.autoplay.duration=Duur (sec.) +dialog.autoplay.usetimestamps=Gebruik tijdinfo van punt +dialog.autoplay.rewind=Terug naar begin +dialog.autoplay.pause=Pauze dialog.autoplay.play=Afspelen - # 3d window dialog.3d.title=GpsPrune in 3D dialog.3d.altitudefactor=Hoogte overdrijvingsfactor @@ -811,8 +810,8 @@ url.googlemaps=maps.google.nl wikipedia.lang=nl openweathermap.lang=nl webservice.peakfinder=Open Peakfinder.org -webservice.geohack=Open Geohack webpagina -webservice.panoramio=Open Panoramio map +webservice.geohack=Open Geohack pagina +webservice.panoramio=Open Panoramio kaart webservice.opencachingcom=Open Opencaching.com webservice.opencachingcom.lang=nl diff --git a/tim/prune/lang/prune-texts_pl.properties b/tim/prune/lang/prune-texts_pl.properties index a2302fe..a3d0662 100644 --- a/tim/prune/lang/prune-texts_pl.properties +++ b/tim/prune/lang/prune-texts_pl.properties @@ -113,6 +113,8 @@ function.lookupsrtm=Pobierz wysoko\u015bci z SRTM function.downloadsrtm=Zapisz dane z SRTM function.getwikipedia=Szukaj w Wikipedii o okolicy function.searchwikipedianames=Szukaj nazwy w Wikipedii +function.searchopencachingde=Szukaj w OpenCaching.de +function.mapillary=Szukaj zdj\u0119cia w Mapillary function.downloadosm=Za\u0142aduj dane obszaru z OSM function.duplicatepoint=Duplikuj plik function.setcolours=Ustaw kolory @@ -380,6 +382,7 @@ dialog.gpsies.activity.skating=Wrotki/rolki dialog.wikipedia.column.name=Tytu\u0142 artyku\u0142u dialog.wikipedia.column.distance=Odleg\u0142o\u015b\u0107 dialog.wikipedia.nonefound=Brak wpis\u00f3w w wikipedii +dialog.wikipedia.gallery=Galeria dialog.correlate.notimestamps=Punkty nie maj\u0105 znacznik\u00f3w czasu, nie mo\u017cna ich powi\u0105za\u0107 ze zdj\u0119ciami. dialog.correlate.nouncorrelatedphotos=Nie ma nie powi\u0105zanych zdj\u0119\u0107.\nCzy na pewno chcesz kontynuowa\u0107? dialog.correlate.nouncorrelatedaudios=Nie ma nie powi\u0105zanych plik\u00f3w audio.\nCzy na pewno chcesz kontynuowa\u0107? @@ -589,6 +592,8 @@ dialog.deletebydate.column.delete=Usu\u0144 dialog.setaltitudetolerance.text.metres=Limit (w metrach) poni\u017cej kt\u00f3rego, ma\u0142e spadki wzniosy b\u0119d\u0105 ignorowane dialog.setaltitudetolerance.text.feet=Limit (w stopach) poni\u017cej kt\u00f3rego, ma\u0142e spadki wzniosy b\u0119d\u0105 ignorowane dialog.autoplay.duration=Czas trwania (sek) +dialog.autoplay.pause=Pauza +dialog.autoplay.play=Graj # 3d window dialog.3d.title=GpsPrune widok tr\u00f3jwymiarowy @@ -798,6 +803,10 @@ logic.or=lub url.googlemaps=maps.google.pl wikipedia.lang=pl openweathermap.lang=pl +webservice.peakfinder=Otw\u00f3rz w Peakfinder.org +webservice.geohack=Otw\u00f3rz w Geohack +webservice.panoramio=Otw\u00f3rz w Panoramio.com +webservice.opencachingcom=Otw\u00f3rz w Opencaching.com webservice.opencachingcom.lang=pl # Cardinals for 3d plots diff --git a/tim/prune/readme.txt b/tim/prune/readme.txt index 8fe5393..d9ff49f 100644 --- a/tim/prune/readme.txt +++ b/tim/prune/readme.txt @@ -1,4 +1,4 @@ -GpsPrune version 18.1 +GpsPrune version 18.2 ===================== GpsPrune is an application for viewing, editing and managing coordinate data from GPS systems, @@ -17,7 +17,7 @@ Running ======= To run GpsPrune from the jar file, simply call it from a command prompt or shell: - java -jar gpsprune_18.1.jar + java -jar gpsprune_18.2.jar If the jar file is saved in a different directory, you will need to include the path. Depending on your system settings, you may be able to click or double-click on the jar file @@ -25,9 +25,15 @@ in a file manager window to execute it. A shortcut, menu item, alias, desktop i or other link can of course be made should you wish. To specify a language other than the default, use an additional parameter, eg: - java -jar gpsprune_18.1.jar --lang=DE + java -jar gpsprune_18.2.jar --lang=DE +New with version 18.2 +===================== +The following fixes and additions were made since version 18.1: + - Fix for saving point names containing ampersands in gpx, kml, kmz formats (thanks, Joe!) + - Minor translation updates to nl, it, pl + New with version 18.1 ===================== The following fixes and additions were made since version 18: diff --git a/tim/prune/save/GpxExporter.java b/tim/prune/save/GpxExporter.java index 584d9ba..ff2c98f 100644 --- a/tim/prune/save/GpxExporter.java +++ b/tim/prune/save/GpxExporter.java @@ -538,7 +538,7 @@ public class GpxExporter extends GenericFunction implements Runnable source = replaceGpxTags(source, "", inPoint.getTimestamp().getText(Timestamp.Format.ISO8601)); if (inPoint.isWaypoint()) { - source = replaceGpxTags(source, "", "", inPoint.getWaypointName()); + source = replaceGpxTags(source, "", "", XmlUtils.fixCdata(inPoint.getWaypointName())); if (source != null) { source = source.replaceAll("", "").replaceAll("", ""); @@ -694,7 +694,7 @@ public class GpxExporter extends GenericFunction implements Runnable } // write waypoint name after elevation and time inWriter.write("\t\t"); - inWriter.write(inPoint.getWaypointName().trim()); + inWriter.write(XmlUtils.fixCdata(inPoint.getWaypointName().trim())); inWriter.write("\n"); // description, if any String desc = XmlUtils.fixCdata(inPoint.getFieldValue(Field.DESCRIPTION)); diff --git a/tim/prune/save/KmlExporter.java b/tim/prune/save/KmlExporter.java index 50386cc..1de5fad 100644 --- a/tim/prune/save/KmlExporter.java +++ b/tim/prune/save/KmlExporter.java @@ -562,7 +562,7 @@ public class KmlExporter extends GenericFunction implements Runnable numSaved += writeStandardTrack(inWriter, absoluteAltitudes, selStart, selEnd); } } - inWriter.write("\n"); + inWriter.write("\n\n"); return numSaved; } @@ -799,7 +799,7 @@ public class KmlExporter extends GenericFunction implements Runnable throws IOException { inWriter.write("\t\n\t\t"); - inWriter.write(inName); + inWriter.write(XmlUtils.fixCdata(inName)); inWriter.write("\n"); if (inDesc != null) { diff --git a/tim/prune/save/xml/XmlUtils.java b/tim/prune/save/xml/XmlUtils.java index dc8284c..3943d07 100644 --- a/tim/prune/save/xml/XmlUtils.java +++ b/tim/prune/save/xml/XmlUtils.java @@ -25,8 +25,8 @@ public abstract class XmlUtils */ public static String fixCdata(String inString) { - if (inString == null) return ""; - if (inString.indexOf('<') < 0 && inString.indexOf('>') < 0) { + if (inString == null || inString.isEmpty()) return ""; + if (!hasIllegalCharacter(inString)) { return inString; } String result = inString; @@ -37,12 +37,32 @@ public abstract class XmlUtils // Remove all instances of end block result = result.replaceAll(CDATA_END, ""); // Now check whether cdata block is required - if (result.indexOf('<') < 0 && result.indexOf('>') < 0) { + if (!XmlUtils.hasIllegalCharacter(result)) { return result; } return CDATA_START + result + CDATA_END; } + /** + * Checks the input string for the three illegal characters, + * but only looping through the string once instead of three times + * @param inValue string to check + * @return true if at least one of the illegal characters is found + */ + public static boolean hasIllegalCharacter(String inValue) + { + if (inValue == null) return false; + final int numChars = inValue.length(); + for (int i=0; i' || c == '&') + { + return true; + } + } + return false; + } /** * @return true if system uses UTF-8 by default -- 2.43.0