LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-01-2015, 10:48 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
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
 
Old 06-01-2015, 11:32 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
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.
 
Old 06-01-2015, 11:53 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
try using LANG=fr_FR instead of fr_FR.utf8
 
Old 06-01-2015, 12:38 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
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");

Last edited by Didier Spaier; 06-01-2015 at 02:51 PM. Reason: PS added.
 
Old 06-02-2015, 03:15 AM   #5
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
Use these patches from Arch AUR and it will work:
https://aur.archlinux.org/packages/gtkam/
(in the tarball)
 
1 members found this post helpful.
Old 06-03-2015, 12:52 AM   #6
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by gapan View Post
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).
 
Old 06-03-2015, 03:53 AM   #7
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
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
 
1 members found this post helpful.
Old 06-03-2015, 06:36 AM   #8
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by gapan View Post
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.
 
Old 06-03-2015, 07:04 AM   #9
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
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.
 
1 members found this post helpful.
Old 06-03-2015, 07:47 AM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
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.

Last edited by Didier Spaier; 06-03-2015 at 05:37 PM. Reason: PPS added.
 
1 members found this post helpful.
Old 06-03-2015, 10:28 AM   #11
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by gapan View Post
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.
 
Old 06-03-2015, 04:59 PM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
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.
Attached Thumbnails
Click image for larger version

Name:	gtkam.png
Views:	28
Size:	42.5 KB
ID:	18618  

Last edited by Didier Spaier; 06-03-2015 at 05:18 PM.
 
1 members found this post helpful.
Old 06-03-2015, 07:17 PM   #13
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 06-04-2015, 05:30 AM   #14
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: opentaps Open Source ERP + CRM Targets Europe, Latin America with VAT Support and Translations LXer Syndicated Linux News 0 07-27-2011 10:11 AM
Battery Showing as "Not Present" Matir Linux - Hardware 5 04-30-2007 08:09 PM
Code edits not showing in C++ Rojon Programming 3 06-02-2006 09:09 AM
Have installed PHP for Apache2 but source code showing Tomo3000 SUSE / openSUSE 4 08-04-2005 07:14 PM
Kernel source code not present cdot Linux - Wireless Networking 7 08-29-2004 12:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:51 AM.

Main Menu
Advertisement
My LQ
Write for 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.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration