Localization
Closed this issue · 6 comments
Right now the code includes Portuguese language. This is probably not very good and we should think about how to localize it. Potfiles are probably the way to go!?
Right now the code includes Portuguese language.
Do you have an example?
The only thing I can think of at the moment is the name of stops that don't have a name and where no name can be found for. If it is not more than that, potfiles might be overkill at this stage.
Could you maybe add a list of strings you have in mind to the top post, so we have an overview of what really needs to be localized before making any architectural decisions?
I just noticed it by going over the code. I haven't dived into the it in order to understand why is actually in there. As far as I know the GTFS standard has no language specific information like this. Here are the examples I saw:
WEEKDAY = "Dias Úteis"
SATURDAY = "Sábado"
SUNDAY = "Domingo"
and
if sday.startswith(WEEKDAY):
weekday[sday.replace(WEEKDAY + ' - Saída ', '')] = route.horarios[day]
elif sday.startswith(SATURDAY):
saturday[sday.replace(SATURDAY + ' - Saída ', '')] = route.horarios[day]
elif sday.startswith(SUNDAY):
sunday[sday.replace(SUNDAY + ' - Saída ', '')] = route.horarios[day]
else:
raise RuntimeError("Unknown day in Fenix data: " + day)
No this is specific to my region and the json file that includes the schedule information. This code should eventually be moved into its own file and class, but that would be a new/different ticket and one of the last abstraction steps I guess.
ok. Then localization is not an issue here. Closing.
Indeed, the name of stops without name could be part of the config.json file.