Bug 477074 - kchmviewer: no .po file is built nor installed
Summary: kchmviewer: no .po file is built nor installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kchmviewer
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Robin Lee
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-18 23:12 UTC by Muayyad Alsadi
Modified: 2010-04-27 02:19 UTC (History)
8 users (show)

Fixed In Version: kchmviewer-5.1-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-27 02:19:31 UTC


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

Description Muayyad Alsadi 2008-12-18 23:12:54 UTC
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 23:37:55 UTC
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 12:26:58 UTC
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 17:07:14 UTC
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 17:42:32 UTC
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 17:46:01 UTC
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 17:46:48 UTC
Created attachment 327587 [details]
spec file for kchmviewer

Comment 7 Steven M. Parrish 2009-04-04 21:03:43 UTC
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 21:54:55 UTC
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 22:35:43 UTC
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 15:11:57 UTC
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 17:06:02 UTC
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 17:07:22 UTC
Created attachment 338247 [details]
.src.rpm with spec and patches to install locales

Comment 13 Patrice Dumas 2009-04-06 14:45:52 UTC
(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 15:14:41 UTC
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 15:15:53 UTC
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 16:37:04 UTC
The conflicts are now fixed,  Muayyad, mind integrating and/or testnig your translations fixes now?

Comment 17 Rex Dieter 2009-04-27 19:49:51 UTC
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 22:29:20 UTC
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-15 00:18:12 UTC
Rex, where do we stand on this.  Target F12 for this?

Comment 20 Bug Zapper 2009-06-09 10:18:44 UTC
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 14:25:23 UTC
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 18:22:35 UTC
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 22:18:59 UTC
works fine for me.
The .po released by upstream are included.

Comment 24 Fedora Update System 2010-04-20 13:32:57 UTC
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-27 02:19:24 UTC
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.