[SOLVED] Gtkam: translations present in source code, but not showing
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Gtkam: translations present in source code, but not showing
Hi,
Last week, I installed Gtkam 0.2.0 from SBo. Previous versions of Gtkam didn't support my Nikon 3100 camera and simply crashed. This version at last seems to work, despite the odd crash.
After peeking in the source code's po/ directory, the french translation seems to be fairly complete. On the other hand, the whole application displays in english in my environment (Xfce 4.12 with LANG set to fr_FR.utf8).
I checked the SlackBuild to see if there's any --disable-nls or similar option, but there doesn't seem to be one.
Any idea how I can make my application work in French?
I am puzzled. I see a lot of translated messages in the PO file, the MO file is in its place, properly named and has the same size as the one I just rebuilt with msgfmt... Also, the genuine strings referenced in the PO file seem to be the ones found in the source files (actually I just checked one)... So sorry, no clue.
This doesn't make a difference and shouldn't as gtkam.mo for French is installed under /usr/share/locale/fr/ and anyway only the ISO 639 two-letter language code matters, unless there be several MO files with the same name in different locations.
PS In the locale name the codeset is only used to set the character encoding, and anyway that of the output of messages catalogs of gtkam is UTF-8 as shows this code snippet from main.c
Code:
main (int argc, char *argv[])
{
GtkWidget *m;
int x, log = -1;
char width[1024], height[1024];
gtk_set_locale ();
bindtextdomain (PACKAGE, LOCALEDIR);
bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
/* also set libgphoto2 codeset to utf-8 */
gp_message_codeset("UTF-8");
Last edited by Didier Spaier; 06-01-2015 at 02:51 PM.
Reason: PS added.
Are you sure you applied them correctly? And are you sure you have reinstalled the resulting package replacing the old one? And are you sure the whole application is in english (as you write in your first post)?
It definitely works here with LANG=fr_FR.utf8. But, the french translation is simply not complete. The "Help" menu is translated to "Aide" and Aide/About comes up in french, but other menus show up in english. That's because a lot of the strings in fr.po are marked as "fuzzy". I guess you'll have to complete the translation if you want to have everything in french.
If you try LANG=de_DE.utf8, you'll see that the whole application is in german, because the german translation is indeed complete. Without those patches it would still come up in english though.
Are you sure you applied them correctly? And are you sure you have reinstalled the resulting package replacing the old one? And are you sure the whole application is in english (as you write in your first post)?
Only the help menu looks translated, but everything else is in english. Which is strange, since there seems to be much more information in the po files.
If the help menu is translated, then the translation is used properly.
As I said, the french translation includes a lot of "fuzzy" strings. These are not used. You'll have to update the translation. Find each fuzzy string, see if the translation is correct and remove the fuzzy setting.
If the help menu is translated, then the translation is used properly.
As I said, the french translation includes a lot of "fuzzy" strings. These are not used. You'll have to update the translation. Find each fuzzy string, see if the translation is correct and remove the fuzzy setting.
OK, I'll look into that. Thanks a lot for your precious help, George.
You could rename /po/fr.po to /po/fr.po.orig before copying the completed fr.po to /po.
You'll need also to put fr.gmo in /po as the Makefile installs that (renamed fr.mo). But you can also rebuild it like this if you prefer not to take as is a binary file:
Code:
msgfmt -o fr.gmo fr.po
I have removed the file attached to my previous post that was not reviewed.
I have rebuilt the package with the genuine SlackBuild from http://slackbuilds.org, see attached pic.
Last edited by Didier Spaier; 06-03-2015 at 05:18 PM.
The translator to French David Prévot informed me that his translation was already complete more than two years ago.
It seems that this version just didn't make in the source package (yet) as it bears the date 2012-10-06, but the tarball date back 2012-07-10. Oh, well...
Last edited by Didier Spaier; 06-03-2015 at 07:26 PM.
Thu Jun 4 11:08:42 CEST 2015
gtkam-0.2.0-i486-2_microlinux.txz: Rebuilt.
Added complete French translation. Thanks to George Vlahavas and Didier
Spaier on LQ.
+--------------------------+
Thu Jun 4 11:08:42 CEST 2015
gtkam-0.2.0-x86_64-2_microlinux.txz: Rebuilt.
Added complete French translation. Thanks to George Vlahavas and Didier
Spaier on LQ.
+--------------------------+
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.