GNOME Bugzilla – Bug 393046
'make run' doesn't start banshee with the localized language
Last modified: 2008-10-24 23:56:49 UTC
It starts with English language, instead of the language configured in the system. If I 'sudo make install', it starts in the correct language. Other information:
If launched with the variables LC and LANG set, it gives the following warning: (banshee.exe:13823): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (Banshee:13823): Gdk-WARNING **: locale not supported by C library
Please specify the latest version of banshee you have been able to test this against or let us know that this is no longer a problem. Thank you for helping us keep track of your bug.
Thanks for your comment. Well, I think I tested it on 0.11(.?). Has arrived a fix for this? This is a common problem in most common Mono applications, for example MonoDevelop. The reason is that the program launched with "make run" runs configured as it was installed (however one could run the program without "make install"). We should copy the .bmo files in a temporary place for people that wants to run without installing.
This is related to: https://bugzilla.novell.com/show_bug.cgi?id=354399 In that bug, in comment#1 it's mentioned a commit number that I think it partially fixes this issue.
I am running the SVN version and reproducing this bug, either from MonoDevelop as from the console. Doing 'make install' and running does use the locale.
This happens because banshee only looks for the .mo files under <InstalledApplicationDataRoot>/locale. When installed, this is something like /usr/share/locale. When run with "make run" this is bin/share/locale. So I guess that by fiddling with Makefiles, one could have the .mo files copied to the proper place under bin/share/locale. MonoDevelop seems to be doing this here : http://anonsvn.mono-project.com/viewvc/trunk/monodevelop/main/po/Makefile.am?view=markup
After looking a bit into this, it seems that, if we fix this the way MonoDevelop does, it would mean replacing the default po/Makefile.in.in by our own Makefile.am. I don't think this would be a good idea. I'll attach a patch that tries another approach.
Created attachment 118792 [details] [review] Copy the .mo files on "make run" This patch modifies the "run" makefile rule so that the .mo files are copied to the proper location under "bin/share/locale/". With this patch, "LC_ALL=fr_FR make run" start banshee in french. I'm stretching the limits of my Makefile-fu here, and I'm not completely convinced this is a good way to do this... So comments welcome !
Bertrand - thanks for the patch, your make-fu is quite good :) The approach fine, considering the po directory is special in the build, and really if you are going to run uninstalled you should use the run target anyway, and not from the bin directory. Committed, thanks!