Bug 463887 - strip unused translations
strip unused translations
Product: Fedora
Classification: Fedora
Component: evolution (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthew Barnes
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-25 02:15 EDT by Matthias Clasen
Modified: 2008-09-25 12:00 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-09-25 12:00:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2008-09-25 02:15:12 EDT
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
intltool-update --pot
for p in *.po; do
  msgmerge $p evolution-2.24.pot > $p.out
  msgfmt -o `basename $p .po`.gmo $p.out

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 03:01:37 EDT
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 05:45:04 EDT
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 12:00:12 EDT
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.