michaldaniel / ebook-viewer

Modern GTK Python Ebook Reader app to easily read epub files
GNU General Public License v3.0
406 stars 47 forks source link

Internationalization support #8

Closed fitojb closed 7 years ago

fitojb commented 7 years ago

Currently, this application can’t be translated. Please consider using a framework like Gettext so that translators can provide localized UI files in the future :)

michaldaniel commented 7 years ago

Never done that before but it looks fairly straightforward, should be ready soon.

michaldaniel commented 7 years ago

Ready for translation (should be) and I also added Polish translation to start. Pot file can be generated using create_messages.pot.sh script I included. Relies on find, xargs and most importantly pygettext3.4. I'll update README soonish.

fitojb commented 7 years ago

Thanks, that was fast! I hereby attach an initial Spanish translation (.po and .mo), was going to attempt doing a pull request but figured out it’d be faster to just attach it here. :)

es.po.zip

michaldaniel commented 7 years ago

@fitojb Do it for some git fame. You just have to add those files in po/ directory and add a line to Makefile

Just like the last one here:

install-locale:
   install -d ${EBOOKVIEWER_DIR}/locale/pl
   install -d ${EBOOKVIEWER_DIR}/locale/pl/LC_MESSAGES
   install -m 644 po/pl.mo ${EBOOKVIEWER_DIR}/locale/pl/LC_MESSAGES/easy-ebook-viewer.mo

Just for es since it's first time this translation is introduced.

If you don't care just ignore me and I'll add them tomorrow evening. But in any case please mail me how to add you to about app dialog in translators credits.

joelobrecht commented 7 years ago

Nice. I've done is a French one as well :)

fr.po.zip

I let you see for credit options - do what is best for you - I do not care if I'm or not credited. You can request me whenever you need updates translated to french.

michaldaniel commented 7 years ago

I uploaded your translations @quatrecouleurs @fitojb but GtkAboutDialog translator credits allow me to only set one string for the "current translator" so now each translator can trasnlate "Anonymous Translator ([replace] translation)" to replace this with their own credit. I added instruction in non displayed translatable string since pygettext doesn't implement -c option for translation comments.