You are not logged in.
To be clear, I am talking about the translations stored in /usr/share/locale/$LANG/LC_MESSAGES.
I am only using english, I am the only user on my system, so for me there is no need to keep hundreds of MB for translations around. One way to achieve this i found would be to simply add
rm -rf "$pkgdir"/usr/share/locale
to the package function in my PKGBUILDs. But this would require to modifing all PKGBUILDs (at least those from packages which ship with translations). So is there an easier, more generic solution, like a counterpart to makepkg's !docs option?
Also, instead of removing those unwanted files afterwards, is it possible to skip the translation process at compile time? I am afraid my knowledge of autotools and other build systems is not detailed enough. I regulary see makepkg invoking GEN or MSGFMT, which I think belongs to intltool/gettext. Depending on the package this phase can take a considerable time and if I would like to skip it if possible.
Last edited by FlowIt (2016-06-27 16:50:17)
Offline
Use the NoExtract feature in pacman.conf. Doesn't help with building them, but that's pretty minor overall.
Last edited by Scimmia (2016-06-27 16:33:51)
Offline
NoExtract was the perfect keyword. And with that knowledge I was able to discover a wiki section that exactly covers my needs: https://wiki.archlinux.org/index.php/Pa … _to_system
Offline
My pacman.conf has the following NoExtract lines:
NoExtract = usr/share/help/* !usr/share/help/en*
NoExtract = usr/share/gtk-doc/*
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/locales/* opt/google/chrome/locales/*
NoExtract = !*locale*/en* !usr/share/*locale*/locale.alias !usr/share/*locales/i18n !usr/share/*locales/iso* !usr/share/*locales/trans*
NoExtract = usr/share/qt4/translations/*
NoExtract = usr/share/man/* !usr/share/man/man*
NoExtract = usr/share/vim/vim74/lang/* usr/share/licenses*
You can also use PURGE_TARGETS to remove files during makepkg, but that doesn't apply to packages installed from the repos.
As for building them to start with, I think autotools systems willsimply skip msgfmt if the /usr/bin/msgfmt binary doesn't exist.
But other systems might error out, and e.g. Qt based applications will probably use lrelease to create the Qt-specific translations files.
So in order to reliably skip that you will need to modify each package to not build translations. It is easier to strip them afterwards.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline