stations icon indicating copy to clipboard operation
stations copied to clipboard

Official station names vs. alternatives

Open jncn opened this issue 10 years ago • 5 comments

How do we handle official names and their alternatives? e.g. Brussel-Nationaal-Luchthaven vs. Brussels-Airport or Amsterdam CS (old name) vs. Amsterdam Centraal (official name).

jncn avatar Apr 05 '15 19:04 jncn

That's a good question. This is where our CSV model gets a bit too limited. If we add 1 alternative, the alternative should also be translated, right?

Should we change our repository to use JSON instead?

pietercolpaert avatar Apr 21 '15 07:04 pietercolpaert

As I've understood from our conversation at https://gitter.im/iRail/iRail, you're using this repo to load the stations inside SQLite. I think therefore keeping our CSV table as is is a good idea.

Another possible solution would be to add yet an extra column for autocomplete purposes: alternative-1 alternative-2 ...

What do you think?

pietercolpaert avatar May 08 '15 16:05 pietercolpaert

I don't think adding extra columns for alternatives is feasible.. See also: https://github.com/iRail/iRail/issues/68

brechtvdv avatar May 31 '15 11:05 brechtvdv

I suggest we add an extra csv-file with two columns: alternative-name and official name. Much easier to maintain

brechtvdv avatar Jun 03 '15 12:06 brechtvdv

Right now our kind of organically grown method is to hardcode them in our "autocomplete" code in PHP: https://github.com/iRail/stations/blob/master/src/irail/stations/Stations.php#L33

For instance, we could also add that everything that's "CS" is replaced with "centraal"?

Of course this doesn't help other programming languages...

pietercolpaert avatar Aug 14 '15 07:08 pietercolpaert