Hello community,

here is the log from the commit of package gnome-maps for openSUSE:Factory 
checked in at 2019-05-10 09:16:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-maps (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-maps.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-maps"

Fri May 10 09:16:34 2019 rev:45 rq:701607 version:3.32.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-maps/gnome-maps.changes    2019-05-03 
22:15:05.967825456 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-maps.new.5148/gnome-maps.changes  
2019-05-10 09:16:40.572175860 +0200
@@ -1,0 +2,8 @@
+Mon May  6 18:51:53 UTC 2019 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 3.32.2:
+  + Remove some unnessesary instructions in turn-by-turn route
+    searches.
+  + Updated translations.
+
+-------------------------------------------------------------------

Old:
----
  gnome-maps-3.32.1.tar.xz

New:
----
  gnome-maps-3.32.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-maps.spec ++++++
--- /var/tmp/diff_new_pack.Jqp3jm/_old  2019-05-10 09:16:41.188176813 +0200
+++ /var/tmp/diff_new_pack.Jqp3jm/_new  2019-05-10 09:16:41.188176813 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           gnome-maps
-Version:        3.32.1
+Version:        3.32.2
 Release:        0
 Summary:        Maps Application for GNOME
 License:        GPL-2.0-or-later

++++++ gnome-maps-3.32.1.tar.xz -> gnome-maps-3.32.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-maps-3.32.1/NEWS new/gnome-maps-3.32.2/NEWS
--- old/gnome-maps-3.32.1/NEWS  2019-03-31 21:23:14.000000000 +0200
+++ new/gnome-maps-3.32.2/NEWS  2019-05-06 20:48:27.000000000 +0200
@@ -1,3 +1,16 @@
+3.32.2 - May 6, 2019
+=========================
+
+Changes since 3.32.1
+ - Remove some unnessesary instructions in turn-by-turn route searches
+
+Added/updated/fixed translations
+ - Danish
+
+All contributors to this release
+Ask Hjorth Larsen <asklar...@gmail.com>
+Marcus Lundblad <m...@update.uu.se>
+
 3.32.1 - Mar 31, 2019
 =========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-maps-3.32.1/data/org.gnome.Maps.appdata.xml.in 
new/gnome-maps-3.32.2/data/org.gnome.Maps.appdata.xml.in
--- old/gnome-maps-3.32.1/data/org.gnome.Maps.appdata.xml.in    2019-03-31 
21:23:14.000000000 +0200
+++ new/gnome-maps-3.32.2/data/org.gnome.Maps.appdata.xml.in    2019-05-06 
20:48:27.000000000 +0200
@@ -39,6 +39,13 @@
     </screenshot>
   </screenshots>
   <releases>
+    <release date="2019-05-06" version="3.32.2">
+      <description>
+        <ul>
+          <li>Remove some unnessesary instructions in turn-by-turn route 
searches</li>
+        </ul>
+      </description>
+    </release>
     <release date="2019-03-31" version="3.32.1">
       <description>
         <ul>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-maps-3.32.1/meson.build 
new/gnome-maps-3.32.2/meson.build
--- old/gnome-maps-3.32.1/meson.build   2019-03-31 21:23:14.000000000 +0200
+++ new/gnome-maps-3.32.2/meson.build   2019-05-06 20:48:27.000000000 +0200
@@ -1,5 +1,5 @@
 project('gnome-maps', 'c',
-       version: '3.32.1',
+       version: '3.32.2',
        license: 'GPL2+'
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-maps-3.32.1/po/da.po 
new/gnome-maps-3.32.2/po/da.po
--- old/gnome-maps-3.32.1/po/da.po      2019-03-31 21:23:14.000000000 +0200
+++ new/gnome-maps-3.32.2/po/da.po      2019-05-06 20:48:27.000000000 +0200
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gnome-maps master\n"
 "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-maps/issues\n";
-"POT-Creation-Date: 2019-01-14 19:43+0000\n"
+"POT-Creation-Date: 2019-03-26 17:04+0000\n"
 "PO-Revision-Date: 2019-02-13 11:43+0100\n"
 "Last-Translator: Alan Mortensen <alanmortensen...@gmail.com>\n"
 "Language-Team: Danish <da...@dansk-gruppen.dk>\n"
@@ -61,8 +61,15 @@
 "understøttet)."
 
 #. Translators: This is the program name.
+#. for some reason, setting the title of the window through the .ui
+#. * template does not work anymore (maybe has something to do with
+#. * setting a custom title on the headerbar). Setting it programmatically
+#. * here works though. And yields a proper label in the gnome-shell
+#. * overview.
+#.
+#. Translators: This is the program name.
 #: data/org.gnome.Maps.desktop.in:4 data/ui/main-window.ui:26
-#: src/mainWindow.js:500
+#: src/application.js:83 src/mainWindow.js:138 src/mainWindow.js:508
 msgid "Maps"
 msgstr "Kort"
 
@@ -70,11 +77,6 @@
 msgid "A simple maps application"
 msgstr "Et simpelt kortprogram"
 
-#. Translators: Do NOT translate or transliterate this text (this is an icon 
file name)!
-#: data/org.gnome.Maps.desktop.in:8
-msgid "org.gnome.Maps"
-msgstr "org.gnome.Maps"
-
 #. Translators: Search terms to find this application. Do NOT translate or 
localize the semicolons! The list MUST also end with a semicolon!
 #: data/org.gnome.Maps.desktop.in:14
 msgid "Maps;"
@@ -174,8 +176,8 @@
 "Indicates if Foursquare should broadcast the check-in as a post in the "
 "Facebook account associated with the Foursquare account."
 msgstr ""
-"Angiver om Foursquare skal poste din indtjekning som opdatering på Facebook-"
-"kontoen, der er tilknyttet denne Foursquare-konto."
+"Angiver om Foursquare skal poste din indtjekning som opdatering på "
+"Facebook-kontoen, der er tilknyttet denne Foursquare-konto."
 
 #: data/org.gnome.Maps.gschema.xml:62
 msgid "Foursquare check-in Twitter broadcasting"
@@ -353,7 +355,7 @@
 msgstr "Åbn formlag"
 
 #. Translators: This string uses ellipsis character
-#: data/ui/layers-popover.ui:71
+#: data/ui/layers-popover.ui:69
 msgid "Open Shape Layer…"
 msgstr "Åbn formlag …"
 
@@ -490,12 +492,14 @@
 #: data/ui/osm-account-dialog.ui:159
 msgid ""
 "Sorry, that didn’t work. Please try again, or visit\n"
-"<a href=\"https://www.openstreetmap.org/user/forgot-password";
-"\">OpenStreetMap</a> to reset your password."
+"<a "
+"href=\"https://www.openstreetmap.org/user/forgot-password\";>OpenStreetMap</a> 
"
+"to reset your password."
 msgstr ""
 "Beklager - det fungerede ikke. Prøv venligst igen eller besøg\n"
-"<a href=\"https://www.openstreetmap.org/user/forgot-password";
-"\">OpenStreetMap</a> for at nulstille din adgangskode."
+"<a "
+"href=\"https://www.openstreetmap.org/user/forgot-password\";>OpenStreetMap</a> 
"
+"for at nulstille din adgangskode."
 
 #: data/ui/osm-account-dialog.ui:172
 msgid "The verification code didn’t match, please try again."
@@ -731,11 +735,11 @@
 msgid "Could not find OSM element"
 msgstr "Kunne ikke finde OSM-element"
 
-#: src/application.js:95
+#: src/application.js:96
 msgid "A path to a local tiles directory structure"
 msgstr "En sti til en lokal flisemappestruktur"
 
-#: src/application.js:99
+#: src/application.js:100
 msgid "Show the version of the program"
 msgstr "Vis programmets version"
 
@@ -886,11 +890,11 @@
 msgid "All Layer Files"
 msgstr "Alle lagfiler"
 
-#: src/mainWindow.js:433
+#: src/mainWindow.js:441
 msgid "Failed to connect to location service"
 msgstr "Kunne ikke forbinde til lokaliseringstjeneste"
 
-#: src/mainWindow.js:498
+#: src/mainWindow.js:506
 msgid "translator-credits"
 msgstr ""
 "Kris Thomsen\n"
@@ -898,18 +902,19 @@
 "scootergrisen\n"
 "Ask Hjorth Larsen\n"
 "\n"
-"Dansk-gruppen <da...@dansk-gruppen.dk>\n"
-"Mere info: http://www.dansk-gruppen.dk";
+"Dansk-gruppen\n"
+"Websted http://dansk-gruppen.dk\n";
+"E-mail <da...@dansk-gruppen.dk>"
 
-#: src/mainWindow.js:501
+#: src/mainWindow.js:509
 msgid "A map application for GNOME"
 msgstr "Et kortprogram til GNOME"
 
-#: src/mainWindow.js:512
+#: src/mainWindow.js:520
 msgid "Copyright © 2011 – 2019 Red Hat, Inc. and The GNOME Maps authors"
 msgstr "Ophavsret © 2011 – 2019 Red Hat, Inc. og udviklerne af GNOME Kort"
 
-#: src/mainWindow.js:531
+#: src/mainWindow.js:539
 #, javascript-format
 msgid "Map data by %s and contributors"
 msgstr "Kortdata af %s og bidragydere"
@@ -919,7 +924,7 @@
 #. * the bare name of the tile provider, or a linkified URL if one
 #. * is available
 #.
-#: src/mainWindow.js:547
+#: src/mainWindow.js:555
 #, javascript-format
 msgid "Map tiles provided by %s"
 msgstr "Kortfelter leveret af %s"
@@ -992,8 +997,8 @@
 
 #: src/osmEditDialog.js:122
 msgid ""
-"The official website. Try to use the most basic form of a URL i.e. http://";
-"example.com instead of http://example.com/index.html.";
+"The official website. Try to use the most basic form of a URL i.e. "
+"http://example.com instead of http://example.com/index.html.";
 msgstr ""
 "Den officielle webside. Prøv at bruge den mest grundlæggende form, dvs. "
 "http://eksempel.dk i stedet for http://eksempel.dk/index.html.";
@@ -1019,8 +1024,8 @@
 "The format used should include the language code and the article title like "
 "“en:Article title”."
 msgstr ""
-"Formatet bør inkludere sprogkoden og artiklens overskrift, f.eks. “da:"
-"Artikeloverskrift”"
+"Formatet bør inkludere sprogkoden og artiklens overskrift, f.eks. "
+"“da:Artikeloverskrift”"
 
 #: src/osmEditDialog.js:144
 msgid "Opening hours"
@@ -1653,6 +1658,9 @@
 msgid "%s ft"
 msgstr "%s fod"
 
+#~ msgid "org.gnome.Maps"
+#~ msgstr "org.gnome.Maps"
+
 #~ msgid "Quit"
 #~ msgstr "Afslut"
 
@@ -1682,3 +1690,4 @@
 
 #~ msgid "Country code: %s"
 #~ msgstr "Landekode: %s"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-maps-3.32.1/src/graphHopper.js 
new/gnome-maps-3.32.2/src/graphHopper.js
--- old/gnome-maps-3.32.1/src/graphHopper.js    2019-03-31 21:23:14.000000000 
+0200
+++ new/gnome-maps-3.32.2/src/graphHopper.js    2019-05-06 20:48:27.000000000 
+0200
@@ -30,6 +30,25 @@
 const RouteQuery = imports.routeQuery;
 const Utils = imports.utils;
 
+/**
+ * Directional sign from the GraphHopper API.
+ * https://github.com/graphhopper/graphhopper/blob/master/docs/web/api-doc.md
+ */
+var Sign = {
+    KEEP_LEFT: -7,
+    TURN_SHARP_LEFT: -3,
+    TURN_LEFT: -2,
+    TURN_SLIGHT_LEFT: -1,
+    CONTINUE_ON_STREET: 0,
+    TURN_SLIGHT_RIGHT: 1,
+    TURN_RIGHT: 2,
+    TURN_SHARP_RIGHT: 3,
+    FINISH: 4,
+    REACHED_VIA: 5,
+    USE_ROUNDABOUT: 6,
+    KEEP_RIGHT: 7
+}
+
 var GraphHopper = class GraphHopper {
 
     get route() {
@@ -85,7 +104,7 @@
         this._queryGraphHopper(points, transportationType,
                                (result, exception) => {
             if (exception) {
-                Utils.debug(e);
+                Utils.debug(exception);
                 if (this._query.latest)
                     this._query.latest.place = null;
                 else
@@ -189,7 +208,7 @@
             time:        0,
             turnAngle:   0
         });
-        let rest = instructions.map((instr) => {
+        let rest = this._foldInstructions(instructions).map((instr) => {
             let type = this._createTurnPointType(instr.sign);
             let text = instr.text;
             if (type === Route.TurnPointType.VIA) {
@@ -209,6 +228,35 @@
         return [startPoint].concat(rest);
     }
 
+    _foldInstructions(instructions) {
+        let currInstruction = instructions[0];
+        let res = [];
+
+        for (let i = 1; i < instructions.length; i++) {
+            let newInstruction = instructions[i];
+            let newSign = newInstruction.sign;
+            let newStreetname = newInstruction.street_name;
+
+            /* if the direction is to continue straight, or keep left or keep
+             * right on the same street/road number, fold the instruction into
+             * the previous one
+             */
+            if (newSign === Sign.CONTINUE_ON_STREET ||
+                ((newSign === Sign.KEEP_LEFT || newSign === Sign.KEEP_RIGHT) &&
+                 newStreetname === currInstruction.street_name)) {
+                currInstruction.distance += newInstruction.distance;
+            } else {
+                res.push(currInstruction);
+                currInstruction = instructions[i];
+            }
+        }
+
+        // push finish instruction
+        res.push(instructions[instructions.length - 1]);
+
+        return res;
+    }
+
     _createTurnPointType(sign) {
         let type = sign + 3;
         let min  = Route.TurnPointType.SHARP_LEFT;


Reply via email to