From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D51E3138A52 for ; Fri, 15 Feb 2013 11:55:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9779421C00F; Fri, 15 Feb 2013 11:55:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2862521C00F for ; Fri, 15 Feb 2013 11:55:21 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1369833E3CA for ; Fri, 15 Feb 2013 11:55:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 77E15E4073 for ; Fri, 15 Feb 2013 11:55:17 +0000 (UTC) From: "Agostino Sarubbo" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Agostino Sarubbo" Message-ID: <1360929294.38562c2051468b65cdd6378a2802fe98da9d1d30.ago@gentoo> Subject: [gentoo-commits] dev/ago:master commit in: media-video/smtube/ X-VCS-Repository: dev/ago X-VCS-Files: media-video/smtube/smtube-1.5.ebuild X-VCS-Directories: media-video/smtube/ X-VCS-Committer: ago X-VCS-Committer-Name: Agostino Sarubbo X-VCS-Revision: 38562c2051468b65cdd6378a2802fe98da9d1d30 X-VCS-Branch: master Date: Fri, 15 Feb 2013 11:55:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 66857629-086f-4aca-afcf-3bb8562381f3 X-Archives-Hash: f8688c5e426fa4d86a6f8a0e71a042b7 commit: 38562c2051468b65cdd6378a2802fe98da9d1d30 Author: Agostino Sarubbo gentoo org> AuthorDate: Fri Feb 15 11:54:54 2013 +0000 Commit: Agostino Sarubbo gentoo org> CommitDate: Fri Feb 15 11:54:54 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/ago.git;a=commit;h=38562c20 Handle translationsx --- media-video/smtube/smtube-1.5.ebuild | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/media-video/smtube/smtube-1.5.ebuild b/media-video/smtube/smtube-1.5.ebuild index 8d156ee..55c2734 100644 --- a/media-video/smtube/smtube-1.5.ebuild +++ b/media-video/smtube/smtube-1.5.ebuild @@ -1,17 +1,19 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ - +# EAPI=5 -inherit qt4-r2 +PLOCALES="el en es eu gl hu ja lt pl pt ru_RU zh_CN" +PLOCALE_BACKUP="en" + +inherit l10n qt4-r2 DESCRIPTION="YouTube Browser for SMPlayer" HOMEPAGE="http://smplayer.sourceforge.net/smtube" SRC_URI="mirror://sourceforge/smplayer/${P}.tar.bz2" - KEYWORDS="~amd64 ~x86" -LICENSE="GPL-2" +LICENSE="GPL-2+" SLOT="0" IUSE="" @@ -23,8 +25,30 @@ src_prepare() { eqmake4 src/${PN}.pro } +gen_translation() { + ebegin "Generating $1 translation" + lrelease ${PN}_${1}.ts + eend $? || die "failed to generate $1 translation" +} + +src_compile() { + emake + + cd "${S}"/src/translations + l10n_for_each_locale_do gen_translation +} + +install_locale() { + insinto /usr/share/${PN}/translations + doins "${S}"/src/translations/${PN}_${1}.qm + eend $? || die "failed to install $1 translation" +} + src_install() { dobin ${PN} domenu ${PN}.desktop newicon icons/${PN}_64.png ${PN}.png + dodoc Changelog + + l10n_for_each_locale_do install_locale }