Open jncn opened 9 years ago
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?
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?
I don't think adding extra columns for alternatives is feasible.. See also: https://github.com/iRail/iRail/issues/68
I suggest we add an extra csv-file with two columns: alternative-name and official name. Much easier to maintain
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...
How do we handle official names and their alternatives? e.g.
Brussel-Nationaal-Luchthaven
vs.Brussels-Airport
orAmsterdam CS
(old name) vs.Amsterdam Centraal
(official name).