cfangmeier / tuijam

A fancy TUI client for Google Play Music
MIT License
129 stars 9 forks source link

Add i18n support #52

Closed t1meshift closed 4 years ago

t1meshift commented 4 years ago

Fixes #51

t1meshift commented 4 years ago

There is a lot of work to be done, though.

We actually need to move English locale from the code and put it into localization file (this is for cases when a typo has been done in strings). Moreover, it can only work with compiled translations for now.

cfangmeier commented 4 years ago

Hi @t1meshift. This is great! thanks for putting in the work to add this feature. Your comment makes it sound like there is more to be done before this can be merged. Is that correct?

t1meshift commented 4 years ago

Well, I still don't know how to install locale files correctly. The thing is, setup.py should run translations compilation (po -> mo) and their installation in system (or ~/.config/tuijam/lang, which is way better for easy_install cases) on post-install.

I could run python setup.py compile_catalog and move translation files to my package in, for example, AUR package. But, in my opinion, we should somehow install translation files for easy_install installations too.

I've written a fallback for this case, so if English locale is not present in system directories, the player tries to find it in config dir. The only thing remaining is somehow install it.

t1meshift commented 4 years ago

I think the pull request is ready. Could you check out the code, please? I have it tested with venv, had no issues with LC_ALL=ru_RU.UTF-8 as well as with en_US.UTF-8.

cfangmeier commented 4 years ago

Merged! Thanks again for adding this nice feature.