Closed rezemika closed 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
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!
I tried it from there.
Oh ok, so I was wrong concerning the xgettext
command. Can you try a mkdir -p locales/de/LC_MESSAGES
?
@rezemika exactly what I had to do, the directory must exist first
Ahh. Works!
Could have figured it out for myself.
Okay, thank you! Sorry for the mistake.
No problem!
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:
AVAILABLE_LOCALES
inrendering.py
;humanized_opening_hours
folder;mkdir -p locales/<LOCALE>/LC_MESSAGES
(replace<LOCALE>
with the name of the locale);xgettext -o locales/<LOCALE>/LC_MESSAGES/hoh.pot temporal_objects.py rendering.py
;msgfmt -o locales/<LOCALE>/LC_MESSAGES/hoh.mo locales/fr_FR/LC_MESSAGES/hoh.pot
;Thank you!