Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
[media-sound/deadbeef] #35 #38 update l10n, add missing lv locale
Browse files Browse the repository at this point in the history
"lv" locale was missing
still stick to LINGUAS and l10n eclass
fix conditional checking for ru and pt_BR locales for removal
start removing unused locales from po/LINGUAS with l10n helper
  • Loading branch information
damex committed Jun 6, 2019
1 parent 3da0e88 commit 60b6948
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
15 changes: 11 additions & 4 deletions media-sound/deadbeef/deadbeef-0.7.2-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
EAPI="7"

PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg
lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"
lt lv nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"

PLOCALE_BACKUP="en_GB"

Expand Down Expand Up @@ -136,21 +136,28 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${P}"

src_prepare() {
if ! use_if_iuse linguas_pt_BR && use_if_iuse linguas_ru ; then
if [[ $(l10n_get_locales disabled) =~ "pt_BR" ]] && [[ $(l10n_get_locales) =~ "ru" ]] ; then
eapply "${FILESDIR}/${PN}-0.7.2-remove-pt_br-help-translation.patch"
rm -v "${S}/translation/help.pt_BR.txt" || die
fi

if ! use_if_iuse linguas_ru && use_if_iuse linguas_pt_BR ; then
if [[ $(l10n_get_locales disabled) =~ "ru" ]] && [[ $(l10n_get_locales) =~ "pt_BR" ]] ; then
eapply "${FILESDIR}/${PN}-0.7.2-remove-ru-help-translation.patch"
rm -v "${S}/translation/help.ru.txt" || die
fi

if ! use_if_iuse linguas_pt_BR && ! use_if_iuse linguas_ru ; then
if [[ $(l10n_get_locales disabled) =~ "pt_BR" ]] && [[ $(l10n_get_locales disabled) =~ "ru" ]] ; then
eapply "${FILESDIR}/${PN}-0.7.2-remove-pt_br-and-ru-help-translation.patch"
rm -v "${S}/translation/help.pt_BR.txt" "${S}/translation/help.ru.txt" || die
fi

remove_locale() {
sed -e "/${1}/d" \
-i "${S}/po/LINGUAS" || die
}

l10n_for_each_disabled_locale_do remove_locale

if use midi ; then
# set default gentoo path
sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \
Expand Down
11 changes: 9 additions & 2 deletions media-sound/deadbeef/deadbeef-1.8.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
EAPI="7"

PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg
lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"
lt lv nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"

PLOCALE_BACKUP="en_GB"

Expand Down Expand Up @@ -138,11 +138,18 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${P}"

src_prepare() {
if ! use_if_iuse linguas_ru ; then
if [[ "$(l10n_get_locales disabled)" =~ "ru" ]] ; then
eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch"
rm -v "${S}/translation/help.ru.txt" || die
fi

remove_locale() {
sed -e "/${1}/d" \
-i "${S}/po/LINGUAS" || die
}

l10n_for_each_disabled_locale_do remove_locale

if use midi ; then
# set default gentoo path
sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \
Expand Down
14 changes: 13 additions & 1 deletion media-sound/deadbeef/deadbeef-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
EAPI="7"

PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg
lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"
lt lv nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"

PLOCALE_BACKUP="en_GB"

Expand Down Expand Up @@ -137,6 +137,18 @@ DEPEND="${RDEPEND}
amd64? ( dev-lang/yasm:0 ) )"

src_prepare() {
if [[ $(l10n_get_locales disabled) =~ "ru" ]] ; then
eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch"
rm -v "${S}/translation/help.ru.txt" || die
fi

remove_locale() {
sed -e "/${1}/d" \
-i "${S}/po/LINGUAS" || die
}

l10n_for_each_disabled_locale_do remove_locale

if ! use_if_iuse linguas_ru ; then
eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch"
rm -v "${S}/translation/help.ru.txt" || die
Expand Down

0 comments on commit 60b6948

Please sign in to comment.