Bug 477074 - kchmviewer: no .po file is built nor installed
kchmviewer: no .po file is built nor installed
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kchmviewer (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Robin Lee
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-18 18:12 EST by Muayyad Alsadi
Modified: 2010-04-26 22:19 EDT (History)
8 users (show)

See Also:
Fixed In Version: kchmviewer-5.1-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-26 22:19:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch -p1 to add l10n support (1.65 KB, patch)
2008-12-21 12:46 EST, Muayyad Alsadi
no flags Details | Diff
spec file for kchmviewer (5.72 KB, text/plain)
2008-12-21 12:46 EST, Muayyad Alsadi
no flags Details
.src.rpm with spec and patches to install locales (232.10 KB, application/octet-stream)
2009-04-05 13:07 EDT, Muayyad Alsadi
no flags Details

  None (edit)
Description Muayyad Alsadi 2008-12-18 18:12:54 EST
Description of problem:
the .src.rpm file contains some .po files
non of them get formatted into .mo nor installed

and even if one is installed by hand kchmviewer won't see it

Version-Release number of selected component (if applicable):
kchmviewer-4.0-0.4.beta3.fc10.1.i386.rpm

How reproducible:
always

Steps to Reproduce:
1. rpm -ql kchmviewer | grep \.mo

Actual results:
no mo files

Expected results:
some mo files
Comment 1 Rex Dieter 2008-12-18 18:37:55 EST
Looks like an upstream bug, not a packaging one (I couldn't get it to generate/install anything either).
Comment 2 Patrice Dumas 2008-12-20 07:26:58 EST
It stopped working some time ago. I haven't investigated it nor contacted upstream on that specific subject.
Comment 3 Muayyad Alsadi 2008-12-20 12:07:14 EST
in src/main.cpp of kchmviewer 3.x there used to be a call like this
KLocale::setMainCatalogue( "kchmviewer" );

just before KCmdLineArgs::init
Comment 4 Muayyad Alsadi 2008-12-21 12:42:32 EST
it was because we built it without kde support
but even if it's compiled with kde support the cmake won't install them
but if we install them by hand they work

while without kde support even if they are installed by hand they won't be recognized

so I made a patch that use QTranslator if compiled without kde support as we did in fedora

that patch will use translate-toolkit to convert .po files to .ts files

the patch and the spec files are attached

the difference between it and the fedora .src.rpm beside the new patch
is that I did not use a beta tarball, I gapped the final release <<EOQ

www.kchmviewer.net
Dec 01, 2008   Version 4.0 released.The major feature of this release is parsing binary table of concents and indexes, which speeds up loading CHM files up to five times. Two most annoying bugs were fixed as well. This release will only for Qt4 or KDE4.

EOQ

and I removed the patches that were already applied by the upstream
and I also attached ar.po file
and I make auto detection of encoding disabled by default because it's broken 

but when I type
 LC_ALL=fr_CA.UTF-8 kchmviewer
or
 LC_ALL=ar_JO.UTF-8 kchmviewer

I get the English version

[BTW: the upstream should use .ts not .po because the .ts have more strings]
Comment 5 Muayyad Alsadi 2008-12-21 12:46:01 EST
Created attachment 327586 [details]
patch -p1 to add l10n support

put some code below #else ie. when compiled without kde support
Comment 6 Muayyad Alsadi 2008-12-21 12:46:48 EST
Created attachment 327587 [details]
spec file for kchmviewer
Comment 7 Steven M. Parrish 2009-04-04 17:03:43 EDT
rdieter, have you had a chance to see if the patch and updated spec file will work for this issue.  Do you want to handle in Fedora or send upstream?
Comment 8 Rex Dieter 2009-04-04 17:54:55 EDT
I'm not really maintainer here (but help out from time to time)... I'll leave this for others to comment first.  Patrice?
Comment 9 Patrice Dumas 2009-04-04 18:35:43 EDT
It would be simpler if the reporter could redo something against the latest spec in devel that has kde support reenabled. And it looks like something for upstream more than for fedora (though maybe it wouldn't hurt in fedora).
Comment 10 Muayyad Alsadi 2009-04-05 11:11:57 EDT
I don't see any translation in

http://koji.fedoraproject.org/koji/rpminfo?rpmID=1044344

I'll try to fix the .spec and see
Comment 11 Muayyad Alsadi 2009-04-05 13:06:02 EDT
while trying to install it I got

	file /usr/lib/kde4/kio_msits.so from install of kchmviewer-4.0-4.oj2.i386 conflicts with file from package kdegraphics-7:4.2.1-3.fc10.i386
	file /usr/share/kde4/services/msits.protocol from install of kchmviewer-4.0-4.oj2.i386 conflicts with file from package kdegraphics-7:4.2.1-3.fc10.i3

I compiled the attached .src.rpm file using this
rpmbuild --with kde -ba kchmviewer.spec
Comment 12 Muayyad Alsadi 2009-04-05 13:07:22 EDT
Created attachment 338247 [details]
.src.rpm with spec and patches to install locales
Comment 13 Patrice Dumas 2009-04-06 10:45:52 EDT
(In reply to comment #11)
> while trying to install it I got
> 
>  file /usr/lib/kde4/kio_msits.so from install of kchmviewer-4.0-4.oj2.i386
> conflicts with file from package kdegraphics-7:4.2.1-3.fc10.i386
>  file /usr/share/kde4/services/msits.protocol from install of
> kchmviewer-4.0-4.oj2.i386 conflicts with file from package
> kdegraphics-7:4.2.1-3.fc10.i3


It has been reported in Bug 484861...
Comment 14 Fedora Admin XMLRPC Client 2009-04-27 11:14:41 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 15 Fedora Admin XMLRPC Client 2009-04-27 11:15:53 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 16 Rex Dieter 2009-04-27 12:37:04 EDT
The conflicts are now fixed,  Muayyad, mind integrating and/or testnig your translations fixes now?
Comment 17 Rex Dieter 2009-04-27 15:49:51 EDT
Lukáš, any advice here on translation issues?  In particular, there's interest in building this as a qt-only app, and that's what alsadi is having trouble getting to work.
Comment 18 Muayyad Alsadi 2009-04-27 18:29:20 EDT
this src:

http://www.ojuba.org/downloads/development/source/SRPMS/kchmviewer-4.0-5.oj2.src.rpm

contains the following:
  * macros to choose between with and without kde support
  * install translations (some are not updated since 2006, only few strings appear translated)
  * add Arabic translation (we in ojuba.org team have mailed it to the upstream but no response)
  * make auto encoding detection disabled by default because it always fail generating rubbish

the problem now if you 
%define withkde 0
or uncomment 
# %%define withkde %{?_with_kde:1} %{!?_with_kde:0}

only qt related strings will appear
other strings will not appear

the trick I used is in kchmviewer-4.0-QTranslator.patch which calls
lupdate to generate the template.ts and the spec file will use translate-toolkit to convert the po files into .ts files

notes: source code is not consistent, for example in kchmmainwindow.cpp:1056
		  						  tr("Cannot start external editor %1.\nMake sure the path is absolute!") .arg( appConfig.m_advExternalEditorPath ) );

while in 639: i18n("Contents")

and it seems that lupdate-qt4 does not support i18n() macro
Comment 19 Steven M. Parrish 2009-05-14 20:18:12 EDT
Rex, where do we stand on this.  Target F12 for this?
Comment 20 Bug Zapper 2009-06-09 06:18:44 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 21 Emilio Scalise 2010-03-22 10:25:23 EDT
See https://bugzilla.redhat.com/show_bug.cgi?id=575091
Updating the .spec for version 5.1 I've also fixed the inclusion of .po files.

I've built kchmviewer in kde mode, not in qt mode.

Translations in kchmviewer, at least for my language (italian), are not too much accurate. I've planned to fix them when I've some time..
Comment 22 Fedora Update System 2010-04-17 14:22:35 EDT
kchmviewer-5.1-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/kchmviewer-5.1-1.fc11
Comment 23 Emilio Scalise 2010-04-18 18:18:59 EDT
works fine for me.
The .po released by upstream are included.
Comment 24 Fedora Update System 2010-04-20 09:32:57 EDT
kchmviewer-5.1-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kchmviewer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/kchmviewer-5.1-1.fc11
Comment 25 Fedora Update System 2010-04-26 22:19:24 EDT
kchmviewer-5.1-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.