BasioMeusPuga / Lector

Qt based ebook reader
GNU General Public License v3.0
1.52k stars 209 forks source link

I can't get translations to work when building for RPM #117

Closed audreytoskin closed 4 years ago

audreytoskin commented 4 years ago

I'm a relatively novice RPM packager for the GNU/Linux distribution Fedora, but I like Lector and want to include it in the Fedora package repositories, to make it easier for other users to install. One issue I'm having is applying the localizations.

I can see basic documentation and issues/pull requests here about translating Lector's UI elements to different languages, but the fedpkg system doesn't seem to be correctly detecting your translations. And I'm also new enough to the Python ecosystem I'm not sure where to start troubleshooting this... What translation tools are you even using...?

BasioMeusPuga commented 4 years ago

Hello. I believe we already have a Fedora package. That said, I'm using Qt's included internationalization tools. For all intents and purposes, if the resources/resources.py file is included in the output package, the translations will be included as well. If you can see icons, the file is included. Maybe there's an issue with the locale on your system?

audreytoskin commented 4 years ago

Yeah, Copr repos like the one you linked do exist, but they are not on by default, and not every Fedora user will know to even look for them. My package will make Lector available "out of the box" to Fedora users, and will get semiautomatic updates whenever Lector or Fedora release new versions.

And, hmm, maybe the issue with the translations is just the rpmbuild system assuming it needs to do something, rather than translations "just working". I'll try building again, ignoring languages in the package spec, and then change my system language to test and see if it's working already.

audreytoskin commented 4 years ago

I tried setting my system language to Spanish (the language I'm most familiar with besides English) and Lector did indeed show UI labels in Spanish -- except for the hover text on the About button, and "Progress" in the Sort By drop-down menu. But maybe that's just the incompleteness of the translation, rather than an error in my build?

If so, then thanks again, you can close this ticket. But if those strings should already been translated then maybe I'll need to dig a little deeper after all.

BasioMeusPuga commented 4 years ago

That's exactly it. Spanish was the first language I received translations for, and the list of strings has grown since then.