After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705518 - lib: Better name/description for street numbers
lib: Better name/description for street numbers
Status: RESOLVED FIXED
Product: geocode-glib
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: geocode-glib maintainer(s)
geocode-glib maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-08-05 14:29 UTC by Zeeshan Ali
Modified: 2013-08-07 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lib: Better name/description for street numbers (2.79 KB, patch)
2013-08-05 14:29 UTC, Zeeshan Ali
needs-work Details | Review
lib: Better name/description for street numbers (2.82 KB, patch)
2013-08-06 10:17 UTC, Zeeshan Ali
needs-work Details | Review
lib: Better name/description for street numbers (3.82 KB, patch)
2013-08-06 15:17 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-08-05 14:29:22 UTC
See patch
Comment 1 Zeeshan Ali 2013-08-05 14:29:25 UTC
Created attachment 250883 [details] [review]
lib: Better name/description for street numbers

Currently we'd just show the house number in results for street number
searches, e.g Search for "Otavantie 2" would result in places named "2".
This patch fixes this issue by combining street name and house number.

Since format is not the same in all locales, we allow the translators to
format the string.
Comment 2 Bastien Nocera 2013-08-06 10:05:44 UTC
Review of attachment 250883 [details] [review]:

::: geocode-glib/geocode-reverse.c
@@ +140,3 @@
+                                        house_number = value;
+                        } else if (house_number != NULL && g_strcmp0 (members[i], "road") == 0) {
+                                /* street + number (e.g Baker Street 221) */

Prefix with "translators comment".
House numbers come first in England ;)

221 Baker Street, not Baker Street 221. It's also the case in en_US (our "untranslated" language).
Comment 3 Zeeshan Ali 2013-08-06 10:15:19 UTC
Review of attachment 250883 [details] [review]:

::: geocode-glib/geocode-reverse.c
@@ +140,3 @@
+                                        house_number = value;
+                        } else if (house_number != NULL && g_strcmp0 (members[i], "road") == 0) {
+                                /* street + number (e.g Baker Street 221) */

Ah, I thought that is American way. :) Lunch?
Comment 4 Zeeshan Ali 2013-08-06 10:17:10 UTC
Created attachment 250954 [details] [review]
lib: Better name/description for street numbers

Updated the comment as per review.
Comment 5 Bastien Nocera 2013-08-06 14:32:08 UTC
Review of attachment 250954 [details] [review]:

::: geocode-glib/geocode-reverse.c
@@ +28,3 @@
 #include <libsoup/soup.h>
+#include <config.h>
+#include <glib/gi18n-lib.h>

You don't have anything actually initialising the text domain, etc.

See: https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-wall-clock.c#n181
Comment 6 Zeeshan Ali 2013-08-06 14:58:01 UTC
Review of attachment 250954 [details] [review]:

::: geocode-glib/geocode-reverse.c
@@ +28,3 @@
 #include <libsoup/soup.h>
+#include <config.h>
+#include <glib/gi18n-lib.h>

hmm.. so we do that in all class_init's separately? For now we are only adding translated string in the module but later we're likely to add a few to other modules.
Comment 7 Zeeshan Ali 2013-08-06 15:17:36 UTC
Created attachment 250983 [details] [review]
lib: Better name/description for street numbers

* Initialize text domain from class_init.
* Actually format the address in default locale: house number + street.
Comment 8 Bastien Nocera 2013-08-07 08:53:34 UTC
Review of attachment 250983 [details] [review]:

Looks good.
Comment 9 Zeeshan Ali 2013-08-07 10:10:20 UTC
Attachment 250983 [details] pushed as 0a4b035 - lib: Better name/description for street numbers