declension / squeeze-alexa

Squeezebox integration for Amazon Alexa
GNU General Public License v3.0
59 stars 20 forks source link

No translation file found for domain: 'squeeze-alexa' #46

Closed bgeneto closed 6 years ago

bgeneto commented 6 years ago

I'm getting the following error from 'gettext.py' while running bin/local_test.py:

IOError: [Errno 2] No translation file found for domain: 'squeeze-alexa' 

I'm using LOCALE = 'en_US' in 'settings.py' because I've configured my Alexa Skill to English (us) in AWS. But also tried 'en_GB' without success. My 'locale' directory contains only one file:

ls locale/en_GB/LC_MESSAGES/
squeeze-alexa.po

Any help is welcome.

declension commented 6 years ago

Hi. I guess you're using latest from Git master. That's recently been internationalised, and I guess I haven't finished all the documentation / scripting that results in this. If you'd prefer, try the 1.1 release version which predates all this.

That message means gettext can't find compiled translations (.mo files) for your locale and 'domain', here squeeze-alexa).

To fix it you can run the script included:

bin/compile-translations

for which you'll need gettext tools installed on your OS if you haven't got it (e.g. sudo apt install gettext on Ubuntu)

I'll try to document this better

declension commented 6 years ago

If you want to "translate" squeeze-alexa to en_US then that's a bit harder, but I've added scripting to help with this too. And there is some documentation for that... under the translation section

Edit: no, I think I'm wrong, and it defaults to en_US anyway. Will check. Try plain en before bothering to do the above, but the documentation there should still be helpful

declension commented 6 years ago

(Added a fallback to allow en_US by default as a fix for #49 )