Bug 463887 - strip unused translations
Summary: strip unused translations
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matthew Barnes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-25 06:15 UTC by Matthias Clasen
Modified: 2008-09-25 16:00 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-09-25 16:00:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthias Clasen 2008-09-25 06:15:12 UTC
I propose to add the following at the end of %build in evolution.spec:

# strip unneeded translations from .mo files
cd po
grep -v ".*[.]desktop[.]in[.]in$\|.*[.]server[.]in[.]in$\|.*[.]schemas[.]in$" POTFILES.in > POTFILES.keep
mv POTFILES.keep POTFILES.in
intltool-update --pot
for p in *.po; do
  msgmerge $p evolution-2.24.pot > $p.out
  msgfmt -o `basename $p .po`.gmo $p.out
done


What this does is to remove the translations that intltool has already merged in the desktop files, server files and gconf schemas from the .mo files, since they are not needed there.

This brings the size of the evolution rpm from 41M down to 37M. It should also have some runtime benefit, since it shrinks the .mo files that get mmapped. 


We can use this same trick on other rpms that install big schemas or lots of desktop files.

Comment 1 Yanko Kaneti 2008-09-25 07:01:37 UTC
from the peanut gallery: This sounds like something that should be done on gnome build level. intltool or some such place....

Comment 2 Yanko Kaneti 2008-09-25 09:45:04 UTC
I see you already took the necessary steps. http://bugzilla.gnome.org/show_bug.cgi?id=474987
Sorry for the noise.

Comment 3 Matthew Barnes 2008-09-25 16:00:12 UTC
Fixed in evolution-2.24.0-2.fc10.

Changed the "evolution-2.24.pot" part to "evolution-%{evo_major}.pot" for easier maintenance.


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