rezemika / humanized_opening_hours

A parser for the opening_hours fields from OpenStreetMap
GNU Affero General Public License v3.0
26 stars 20 forks source link

Add translations for other languages #13

Closed rezemika closed 5 years ago

rezemika commented 5 years ago

Currently, only english and french are supported for rendering. It would be great if HOH support other languages. So, if there's any language that you would like to see HOH work with, please don't hesitate to create a pull request! :)

To add a new translation:

Thank you!

fklement commented 5 years ago

Hello, wanted to add a new translation for german.
Only got one problem: When i execute xgettext -o locales/de/LC_MESSAGES/hoh.pot temporal_objects.py rendering.py i'm getting this error:
xgettext: Ausgabedatei »locales/de/LC_MESSAGES/hoh.pot« kann nicht erstellt werden: No such file or directory

rezemika commented 5 years ago

Oh, you're right, there's a mistake in my explanations. Can you try the same command from the humanized_opening_hours/humanized_opening_hours folder (the folder which actually contains the Python code)?

Thank you!

fklement commented 5 years ago

I tried it from there.

rezemika commented 5 years ago

Oh ok, so I was wrong concerning the xgettext command. Can you try a mkdir -p locales/de/LC_MESSAGES?

sashman commented 5 years ago

@rezemika exactly what I had to do, the directory must exist first

fklement commented 5 years ago

Ahh. Works!
Could have figured it out for myself.

rezemika commented 5 years ago

Okay, thank you! Sorry for the mistake.

fklement commented 5 years ago

No problem!