[SCM] GUI front-end for Debian Live. branch, master, updated. 1b2df921d9939979c86cae27591e2ec17058da3e
Chris Lamb
chris at chris-lamb.co.uk
Tue Aug 12 21:24:26 UTC 2008
The following commit has been merged in the master branch:
commit 1b2df921d9939979c86cae27591e2ec17058da3e
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Tue Aug 12 22:20:52 2008 +0100
Generate and display translator credits.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/.gitignore b/.gitignore
index df8f767..8b2cc39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.pyc
.coverage
mo/
+misc/translator-credits.txt
diff --git a/LiveMagic/views/wizard.py b/LiveMagic/views/wizard.py
index c6c64e6..62e7a71 100644
--- a/LiveMagic/views/wizard.py
+++ b/LiveMagic/views/wizard.py
@@ -237,6 +237,11 @@ class WizardView(object):
about.set_website("http://debian-live.alioth.debian.org/")
about.set_website_label(_("Debian Live homepage"))
about.set_license(file(find_resource('GPL-3')).read())
+ try:
+ credits = file(find_resource('translator-credits.txt')).read()
+ about.set_translator_credits(credits)
+ except ValueError:
+ pass
logo = gtk.gdk.pixbuf_new_from_file(find_resource('debian_openlogo-nd-100.png'))
about.set_logo(logo)
diff --git a/setup.py b/setup.py
index 6123208..6492561 100755
--- a/setup.py
+++ b/setup.py
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
+import re
from distutils.core import setup
from distutils.file_util import copy_file
@@ -37,6 +38,22 @@ class my_install(install_data):
dst = os.path.join('share', 'locale', lang, 'LC_MESSAGES')
self.data_files.append((dst, [src]))
+ try:
+ credits = file('misc/translator-credits.txt', 'w')
+ for po in glob('po/*.po'):
+ f = file(po)
+ try:
+ lang = os.path.basename(po).split('.')[0]
+ for line in f:
+ m = re.match(r'"Last-Translator: ([^\\]*)', line)
+ if m:
+ print >>credits, m.group(1), '(%s)' % lang
+ break
+ finally:
+ f.close()
+ finally:
+ credits.close()
+
install_data.run(self)
setup(
@@ -68,6 +85,7 @@ setup(
'misc/kde.png',
'misc/xfce.png',
'misc/keyboard-layouts.txt',
+ 'misc/translator-credits.txt',
]),
('share/applications', [
'misc/live-magic.desktop'
--
GUI front-end for Debian Live.
More information about the debian-live-changes
mailing list