metamorphose / metamorphose2

Métamorphose Renamer v2
http://file-folder-ren.sourceforge.net
146 stars 33 forks source link

No translation file found #4

Closed javierpra closed 9 years ago

javierpra commented 9 years ago

In FreeBSD10 receiving the following error.

File /usr/local/lib/python2.7/gettext.py line 469, in translation raise IOError(ENOENT, 'No Translation file found for domain', domain) IOError: [Error 2] No Translation file found for domain: u'metamorphose2'

javierpra commented 9 years ago

Looks like FreeBSD does not come with locale set. The solution should be one of the methods described here https://www.freebsd.org/doc/handbook/using-localization.html . Will close pending more testing.

javierpra commented 9 years ago

Possible related error in Debian. Locale is set but recieving the following error.

cp: cannot stat messages/en_US/LC_MESSAGES/metamorphose2.mo': No such file or directory cp: cannot statmessages/es/LC_MESSAGES/metamorphose2.mo': No such file or directory cp: cannot stat `messages/fr/LC_MESSAGES/metamorphose2.mo': No such file or directory

There is a messages/update_langs.sh script. Maybe it's not being run.

javierpra commented 9 years ago

On FreeBSD set locale to en_US.UTF-8 globally in /etc/login.conf. Updated the db with:

# cap_mkdb /etc/login.conf

Verified the changes took effect with

$locale

Same results. Will check pkg to make sure I'm not missing some UTF package or the expected version of gettext (may not be GNU gettext) tomorrow.

careca1970 commented 9 years ago

Hi javierpra! Sorry for inserting this comment into your thread, but I couldn't find a way to hit you directly through Github. We can delete this message afterwards...

Good to see that someone gets active in this project!

As you may have noticed, this project hasn't been updated since some years yet, and it is quite boring. Please, notice that "ianare", the main maintainer does not seem to be active anymore.

Metamorphose2 is a nice peace of SW, and just needs some maintenance. Unfortunately, I am no programmer, so I can input any issues, and maybe try to help testing...

It would be very nice, if you would like to contribute here, and take a look in the few issues already reported, but never updated...

Many greetings, careca

javierpra commented 9 years ago

Hello Careca,

I've been in contact with Ianare. He's got a lot on his plate I believe. I will do what I can. I'm not technically a programmer either, but with Google and a little time I should be able to get things going. I'll address the other issues listed as well. If you come across anything definitely post so we know about it and I'll do what I can. The more the merrier!!! If you need something similar in the meantime, Metamorphose 1 is functional and still available here.

Posting here is not a problem, especially since I just realised my profile is quite empty. I updated my profile if you would rather email. It probably is best to stick to GitHub for bugs and commits only.

What OS are you trying to run it on? Currently I'm testing on Linux and FreeBSD. If you're on something different I'll try to get a relevant VM. Hope this helps.

Cheers, Javier Prats

javierpra commented 9 years ago

On Fedora 21 [jprats@localhost metamorphose2]$ ./metamorphose2 Traceback (most recent call last): File "/usr/share/metamorphose2/metamorphose2.py", line 85, in main() File "/usr/share/metamorphose2/metamorphose2.py", line 76, in main application = BoaApp(0) File "/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in init self._BootstrapApp() File "/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp return core.PyApp__BootstrapApp(_args, *_kwargs) File "/usr/share/metamorphose2/metamorphose2.py", line 61, in OnInit self.main = MainWindow.create(None) File "/usr/share/metamorphose2/MainWindow/init.py", line 45, in create return MainWindow(parent) File "/usr/share/metamorphose2/MainWindow/init.py", line 622, in init self.set_language() File "/usr/share/metamorphose2/MainWindow/init.py", line 585, in set_language languages=[locales[language][1]]) File "/usr/lib64/python2.7/gettext.py", line 471, in translation raise IOError(ENOENT, 'No translation file found for domain', domain) IOError: [Errno 2] No translation file found for domain: u'metamorphose2' [jprats@localhost metamorphose2]$

pypingou commented 9 years ago

Metamorphose2 is already packaged in Fedora, just yum it! ;-)

javierpra commented 9 years ago

@pypingou If you don't mind, could you answer two questions for me? I don't have a Fedora VM at the moment. It will be a couple of days before I have one again. Does it run? If so can you tell me what version of Metamorphose it is? Thanks in advance for any info.

javierpra commented 9 years ago

The issue is now known. There is no metamorphose2.mo file present in the Git tree and there needs to be one copied to /usr/share/locale/$LANGUAGE/LC_MESSAGES/ . Copying the Metamorphose 1 metamorphose.mo file to /usr/share/local/en_US/LC_MESSAGES/metamorphose2.mo worked for me.

pypingou commented 9 years ago

Ah looking back on the first messages in the thread, you are not running Fedora but BSD.

Looking at the make file I also see that if the .mo files are being installed, they are not being compiled first. So there is likely a step missing in the makefile to do something along the lines of: msgfmt -o outfile.mo -v infile.po

Actually, that's what is done by https://github.com/ianare/metamorphose2/blob/master/messages/update_langs.sh so we should just invoke it in the make, before installing the .po files

javierpra commented 9 years ago

@pypingou That's exactly where I was at in trying to resolve this. Finding where it takes place. You may have just saved me a few hours. THANKS!!!

pypingou commented 9 years ago

We could also just update the instruction saying that you should run this script before calling make ;-)

ianare commented 9 years ago

The above fixes should take care of the confusion when running Métamorphose in dev mode.

Please re-open if there is something missing.

Thanks a bunch,

ianaré