[Taginfo-dev] Questions for a new french instance of taginfo
Jochen Topf
jochen at remote.org
Mon Oct 10 09:44:54 BST 2011
On Sun, Oct 09, 2011 at 08:25:48PM +0200, Jocelyn Jaubert wrote:
> Frédéric and I are currently configuring a new instance of taginfo
> covering France only. It is now available at:
> http://taginfo.openstreetmap.fr/
>
> Firstly, thanks for this tool which should hopefully be useful for the
> french OSM community.
>
>
> I have a few questions on the configuration, as not everything works as
> expected - the main features are there, but there are some missing
> things. For information, you can find the modifications we did and the
> scripts to update everything at: http://osm4.crans.org/~jocelyn/taginfo/
>
> 1) the sources page at http://taginfo.openstreetmap.fr/sources
> doesn't show anything, even if the sqlite database taginfo-master.db
> seems to contain all necessary information:
>
> > SELECT * FROM sources ORDER BY no;
> 1|1|db|Database|2011-10-09 16:23:20|2011-10-09 16:27:52|2011-10-09 11:59:30
> 2|1|wiki|Wiki|2011-10-09 01:27:04|2011-10-09 01:36:36|2011-10-09 01:27:04
> 3|1|josm|JOSM|2011-10-09 01:26:54|2011-10-09 01:26:56|2011-10-09 01:26:54
> 4|0|potlatch|Potlatch|2011-10-09 01:26:58|2011-10-09 01:26:59|2011-10-09 01:26:58
> 5|0|merkaartor|Merkaartor|2011-10-09 01:27:00|2011-10-09 01:27:04|2011-10-09 01:27:00
>
> 2) something minor: on wiki pages, the list of object seems
> incorrect. This wiki information was downloaded from
> taginfo.openstreetmap.de. You can compare the two following pages:
>
> http://taginfo.openstreetmap.fr/keys/building#wiki
> http://taginfo.openstreetmap.org/keys/building#wiki
Both these examples might have in common that they have something to do with
pseudo-booleans (0 or 1 in the database). Sqlite doesn't support proper
booleans, so I rember there were some issues there. Maybe different sqlite
versions (or ruby sqlite adaptors) work differently there.
Try the following:
In lib/api/wiki.rb change
:on_area => row['on_area'] == '1' ? true : false,
to
:on_area => row['on_area'].to_i == 1 ? true : false,
And in taginfo.rb
Source.new source['id'], source['name'], source['data_until'], source['update_start'], source['update_end'], source['visible'] == '1'
to
Source.new source['id'], source['name'], source['data_until'], source['update_start'], source['update_end'], source['visible'].to_i == 1
If that helps we can change that everywhere.
> 3) to add a translation, do we need only to copy web/i18n/en.yml
> to web/i18n/fr.yml, or are there additional steps ?
If I remember correctly that should do it.
> 4) if you have any remarks on the update scripts or the modifications
> done on the git repository, please be free to comment !
I'll have a look at it.
Jochen
--
Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298
More information about the Taginfo-dev
mailing list