-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: kde5.eclass
# Specifies the location of the KDE handbook if not the default.
: ${KDE_DOC_DIR:=doc}
+# @ECLASS-VARIABLE: KDE_PO_DIRS
+# @DESCRIPTION:
+# Specifies the possible locations of KDE l10n files if not the default.
+: ${KDE_PO_DIRS:="po poqm"}
+
# @ECLASS-VARIABLE: KDE_QTHELP
# @DESCRIPTION:
# If set to "false", do nothing.
# drop translations when nls is not wanted
if in_iuse nls && ! use nls ; then
- if [[ -d po ]] ; then
- rm -r po || die
- fi
- if [[ -d poqm ]] ; then
- rm -r poqm || die
- fi
+ local po
+ for po in ${KDE_PO_DIRS}; do
+ if [[ -d ${po} ]] ; then
+ rm -r ${po} || die
+ fi
+ done
fi
# enable only the requested translations when required
if [[ -v LINGUAS ]] ; then
local po
- for po in po poqm; do
+ for po in ${KDE_PO_DIRS}; do
if [[ -d ${po} ]] ; then
pushd ${po} > /dev/null || die
local lang