LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Gtkam: translations present in source code, but not showing (https://www.linuxquestions.org/questions/slackware-14/gtkam-translations-present-in-source-code-but-not-showing-4175544176/)

kikinovak 06-01-2015 10:48 AM

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?

Cheers,

Niki

Didier Spaier 06-01-2015 11:32 AM

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.

Keith Hedger 06-01-2015 11:53 AM

try using LANG=fr_FR instead of fr_FR.utf8

Didier Spaier 06-01-2015 12:38 PM

Quote:

Originally Posted by Keith Hedger (Post 5370620)
try using LANG=fr_FR instead of fr_FR.utf8

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");


gapan 06-02-2015 03:15 AM

Use these patches from Arch AUR and it will work:
https://aur.archlinux.org/packages/gtkam/
(in the tarball)

kikinovak 06-03-2015 12:52 AM

Quote:

Originally Posted by gapan (Post 5370916)
Use these patches from Arch AUR and it will work:
https://aur.archlinux.org/packages/gtkam/
(in the tarball)

I applied all four patches, but the application still shows up in english, and not in French (as all other applications).

gapan 06-03-2015 03:53 AM

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.

Here's my package if you want to try it:
http://pnboy.pinguix.com/gapan/salix...6_64-1_SBo.tgz

kikinovak 06-03-2015 06:36 AM

Quote:

Originally Posted by gapan (Post 5371387)
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)?

Here's my package source.

http://www.microlinux.fr/microlinux/...-source/gtkam/

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.

gapan 06-03-2015 07:04 AM

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.

Didier Spaier 06-03-2015 07:47 AM

Edited PO file
 
HTH, but to be reviewed (and I didn't check the source files). If OK I'll propose that to the translation team.

PS I have removed the attached file that has been corrected and uploaded elsewhere, see post #12.
PPS I have sent a mail to the translator.

kikinovak 06-03-2015 10:28 AM

Quote:

Originally Posted by gapan (Post 5371444)
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.

Didier Spaier 06-03-2015 04:59 PM

1 Attachment(s)
I have corrected a few messages and uploaded the files here:
http://slint.fr/misc/gtkam/

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.

Didier Spaier 06-03-2015 07:17 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...

kikinovak 06-04-2015 05:30 AM

Right, here goes.

Code:

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.
+--------------------------+

Cheers!

Niki


All times are GMT -5. The time now is 11:23 AM.