Localization
Localization is supported differently from the release builds: the translations are installed per package. The kde-i18n ebuild will install just a few entry files, needed for successful switching of languages using the control center module; no translations come with it. To be able to switch via the control center, you would need to install kcontrol. These two ebuilds may eventually be merged into one for simplicity. Neither kde-i18n nor kcontrol are not needed if KDE is started with a LANG environment variable, nor if individual applications are launched with a KDE_LANG environment variable.
In order to have the translation for a certain language and a certain package installed, one needs to define the LINGUAS variable. It is typically done in /etc/make.conf. e.g. LINGUAS="de pt se ru en_GB". If you have used older versions of these ebuilds, it is likely that your kdelibs and other packages do not include support for translations. You would need to reinstall them.
But even if you do, at the current moment not all packages will be installed with all translations available for the requested languages, since this requires some manual work and your help is needed.
Here's how you can help: Translations to be installed are selected based on the KSCM_L10N_PO variable defined in the ebuild. If none is defined and the ebuild is not modular (i.e. arts, kdelibs, kdevelop) all translations belonging to it will be installed. If none is defined and the ebuild is modular, its name will be used for determination of translations to be installed, i.e. if the ebuild's name is kontact, kontact.po will be fetched and installed. If KSCM_L10N_PO is defined as a list of translation names to be installed, without the .po extension, the corresponding translations will be fetched and installed. Wildcards are supported. Here are examples of manually set KSCM_L10N_PO:
kcontrol: KSCM_L10N_PO="kcontrol kcm* filetypes kaccess"; this says that translation files named kcontrol.po, filetypes.po, kaccess.po, and all .po files starting with kcm will be installed
k3b: KSCM_L10N_PO="*k3b*"; this says that all translation files with k3b somewhere in their names will be installed. Now, this determination must be done manually (give suggestions if you know how to better automate it). There is a way to facilitate the process, however, but it requires that you have the packages in question installed already (untranslated versions will do). Here's how to do it:
Open http://websvn.kde.org/trunk/l10n/templates/ in a browser and decide on which directory to concentrate. For example, if you're concerned with kdebase ebuilds, choose kdebase, if you're concerned with extragear ebuilds, choose extragear-multimedia, or extragear-network, etc.
Say, you've chosen kdebase, you can now obtain the listing of all possible translations, and redirect it into a file as follows:
svn list svn://anonsvn.kde.org/home/kde/trunk/l10n/templates/kdebase > kdebaselist
You must have gentoolkit installed to perform this step. With the obtained file, perform the following:
for item in `cat kdebaselist`; do equery belongs `echo $item | sed -e "s/.pot//"`; done
Then review the output; if the matching file corresponds to a real executable or a shared library, then you should review whether the containing ebuild's definition of KSCM_L10N_PO handles it. Take in mind, however, that not all translations will be detected, as sometimes their names are not exactly corresponding to the name of the object they translate, but those are not that common (e.g. kcm*), which is one reason it is difficult to automate this process.
- Printer-friendly version
- Login or register to post comments