[Debian-l10n-commits] r1363 - in /translate-toolkit/trunk/debian: ./ patches/

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Sun Sep 28 18:13:59 UTC 2008


Author: nekral-guest
Date: Sun Sep 28 18:13:58 2008
New Revision: 1363

URL: http://svn.debian.org/wsvn/?sc=1&rev=1363
Log:
[svn-inject] Applying Debian modifications to trunk

Added:
    translate-toolkit/trunk/debian/
    translate-toolkit/trunk/debian/changelog
    translate-toolkit/trunk/debian/compat
    translate-toolkit/trunk/debian/control
    translate-toolkit/trunk/debian/copyright
    translate-toolkit/trunk/debian/msghack.1
    translate-toolkit/trunk/debian/msghack.py
    translate-toolkit/trunk/debian/patches/
    translate-toolkit/trunk/debian/patches/API-doc-in-separate-package
    translate-toolkit/trunk/debian/patches/cleanup_install
    translate-toolkit/trunk/debian/patches/series
    translate-toolkit/trunk/debian/patches/tools_manpages
    translate-toolkit/trunk/debian/rules   (with props)
    translate-toolkit/trunk/debian/translate-toolkit-dev-doc.dirs
    translate-toolkit/trunk/debian/translate-toolkit-dev-doc.doc-base
    translate-toolkit/trunk/debian/translate-toolkit.doc-base
    translate-toolkit/trunk/debian/translate-toolkit.examples
    translate-toolkit/trunk/debian/translate-toolkit.lintian
    translate-toolkit/trunk/debian/watch

Added: translate-toolkit/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/changelog?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/changelog (added)
+++ translate-toolkit/trunk/debian/changelog Sun Sep 28 18:13:58 2008
@@ -1,0 +1,216 @@
+translate-toolkit (1.1.1-3) unstable; urgency=low
+
+  * debian/control: Remove alternatives in Build-Depends-Indep. sbuild do not
+    support them. For backports, the python (>= 2.5) dependency can be
+    replaced by python-elementtree if python 2.5 is not available.
+    Closes: #473950
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Sat, 19 Apr 2008 16:24:17 +0200
+
+translate-toolkit (1.1.1-2) unstable; urgency=low
+
+  * Split the package in translate-toolkit and translate-toolkit-dev-doc to
+    distribute the API documentation separately.  Closes: #472954
+  * debian/control: Update the translate-toolkit's Description to mention new
+    supported storage formats.
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Thu, 27 Mar 2008 23:04:58 +0100
+
+translate-toolkit (1.1.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/translate-toolkit.doc-base: Fix the section to Text.
+  * debian/patches/cleanup_install: po2ini and ini2po not packaged because
+    iniparse is not in Debian.
+  * debian/patches/tools_manpages: Added manpage for pocommentclean.
+  * debian/patches/series, debian/patches/manpages_typo_comment. Remove
+    patch applied upstream.
+  * debian/control: Fix the Build-Depends, Build-Depends-Indep, and Depends.
+    python-elementtree and python-pysqlite2 are included in python (>= 2.5).
+    Thanks to Matthias Klose.
+  * debian/control: Added Homepage field.
+  * debian/rules: Remove the call to dh_python.
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Tue, 18 Mar 2008 23:19:45 +0100
+
+translate-toolkit (1.1.0-1) unstable; urgency=low
+
+  * New upstream release. 
+  * debian/control:
+    + Added build dependency on python-lxml and python-elementtree for
+      manpage generation
+    + Added dependency on python-pysqlite2 (needed for the new cache)
+    + Added recommendation for python-lxml (needed for XML processing)
+    + Added recommendation for python-utidylib (needed for po2html)
+    + Added recommendation for python-enchant (needed for pofilter
+      -tspellcheck).  Closes: #451262
+    + Added recommendation for python-elementtree (needed for odf2po)
+    + Bump Standards-Version to 3.7.3. No changes.
+  * debian/copyright:
+    + Added copyright notice.
+    + Added copyright information for msghack
+    + Change license link to GPL-2 (valid both for the toolkit and msghack)
+  * debian/msghack.py: Added msghack (needed by pocompendium).
+  * debian/msghack.1: Added msghack manpage.
+  * debian/rules: install msghack (needed by pocompendium).  Closes: #432099
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Fri, 22 Feb 2008 23:00:48 +0100
+
+translate-toolkit (1.0.1-1) unstable; urgency=low
+
+  * New upstream release. 
+  * Remove patches applied upstream: manpages_missing_descriptions and
+    manpages_groff_formatting.
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Tue, 19 Jun 2007 14:59:06 +0100
+
+translate-toolkit (1.0-1) unstable; urgency=low
+
+  * New upstream version. Closes: #426088
+  * Set myself as Maintainer and Matthias as Uploader.
+  * debian/watch: use the sf.net redirector and recognize bz2 archive.
+  * Do not mention the documentation in the package description. The
+    documentation provided by the upstream archive (localisation guide, etc.)
+    is licensed under the Creative Commons Attribution-ShareAlike license, and
+    has been removed from the package. Closes: #377407
+  * debian/copyright: Indicate that the CC by-sa documentation has been
+    stripped out.
+  * debian/copyright.ccasl: No more needed. Removed.
+  * Reactivate the doc-base registration, for the toolkit HTML documentation.
+  * Add a check in the debian/rules clean target to make sure that only the
+    translate toolkit documentation is distributed.
+  * Add patch for a better groff formatting of the manpages (when the pages
+    are generated with the --manpage option). The build system now depends on
+    quilt (0.40, since I use the Makefile provided by quilt).
+  * Generate the manpages at build time, and add manpages for the tools which
+    do not support the --manpage option. Closes: #376279
+  * Move debhelper from Build-Depends-Indep to Build-Depends. It is used in
+    the clean rule.
+  * Do not distribute lookupclient.py as a script, it is just an example.
+  * Add a lintian override file for the script-not-executable issues (caused
+    by the python shebang).
+  * Add a dependency on gettext. The shell tools (in the tools directory)
+    require the gettext tools.
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Thu, 07 Jun 2007 21:25:34 +0200
+
+translate-toolkit (0.10.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko at debian.org>  Fri, 20 Oct 2006 01:02:07 +0200
+
+translate-toolkit (0.10-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko at debian.org>  Sun,  3 Sep 2006 23:57:11 +0200
+
+translate-toolkit (0.9.2-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko at debian.org>  Sat, 19 Aug 2006 21:12:52 +0000
+
+translate-toolkit (0.9.1-1) unstable; urgency=low
+
+  * Upload to unstable.
+
+ -- Matthias Klose <doko at debian.org>  Wed, 26 Jul 2006 17:51:38 +0200
+
+translate-toolkit (0.9.1-0ubuntu1) edgy; urgency=low
+
+  * New upstream version (bug fix release).
+  * Fix PR 177, type error while merging translations.
+
+ -- Matthias Klose <doko at ubuntu.com>  Wed, 26 Jul 2006 12:07:44 +0000
+
+translate-toolkit (0.9-1) unstable; urgency=low
+
+  * New upstream version.
+  * Convert to updated Python policy.
+
+ -- Matthias Klose <doko at debian.org>  Wed, 28 Jun 2006 23:39:47 +0000
+
+translate-toolkit (0.8.rel-0ubuntu2) dapper-updates; urgency=low
+
+  * Fix error escaping \r in po2oo conversion.
+
+ -- Matthias Klose <doko at ubuntu.com>  Wed, 31 May 2006 21:07:50 +0200
+
+translate-toolkit (0.8.rel-0ubuntu1) dapper; urgency=low
+
+  * Final release (0.8).
+
+ -- Matthias Klose <doko at ubuntu.com>  Wed, 29 Mar 2006 15:51:44 +0000
+
+translate-toolkit (0.8.rc6-1ubuntu1) dapper; urgency=low
+
+  * Don't install the oo2rpo rpo2oo scripts anymore.
+
+ -- Matthias Klose <doko at ubuntu.com>  Wed, 22 Feb 2006 12:39:41 +0000
+
+translate-toolkit (0.8.rc6-1) unstable; urgency=low
+
+  * New upstream version 0.8rc6.
+  * Rename source to translate-toolkit.
+
+ -- Matthias Klose <doko at debian.org>  Mon, 13 Feb 2006 22:41:18 +0100
+
+pootle (0.8.2005.0217-3ubuntu1) breezy; urgency=low
+
+  * Remove the text of the Creative Commons Attribution-ShareAlike license
+    from the copyright file. The docs are not included anymore.
+
+ -- Matthias Klose <doko at ubuntu.com>  Mon, 12 Sep 2005 16:12:59 +0000
+
+pootle (0.8.2005.0217-3) unstable; urgency=low
+
+  * Rename the doc-base file, which is currently not used, so that it's
+    not recognized by debhelper. Closes: #327289, #327384.
+
+ -- Matthias Klose <doko at debian.org>  Fri,  9 Sep 2005 23:32:58 +0200
+
+pootle (0.8.2005.0217-2) unstable; urgency=low
+
+  * Rename the binary package to translate-toolkit and remove the pootle
+    scripts from it. Pootle itself needs other software to be packaged
+    to work properly. Closes: #324597, #317605.
+  * Synchronize with Ubuntu.
+
+ -- Matthias Klose <doko at debian.org>  Tue,  6 Sep 2005 22:40:05 +0200
+
+pootle (0.8.2005.0217-0ubuntu3) breezy; urgency=low
+
+  * Further modify oo2rpo and rpo2oo to write into one  / read from one file.
+
+ -- Matthias Klose <doko at ubuntu.com>  Tue,  6 Sep 2005 18:57:53 +0200
+
+pootle (0.8.2005.0217-0ubuntu2) breezy; urgency=low
+
+  * Add scripts oo2rpo and rpo2oo to work with one po/pot file per oo module
+    instead of one po/pot file per oo file.
+
+ -- Matthias Klose <doko at ubuntu.com>  Sun,  7 Aug 2005 15:10:34 +0200
+
+pootle (0.8.2005.0217-0ubuntu1) breezy; urgency=low
+
+  * Initial upload for breezy.
+
+ -- Matthias Klose <doko at ubuntu.com>  Wed, 29 Jun 2005 20:04:56 +0000
+
+pootle (0.8.2005.0217-1) unstable; urgency=low
+
+  * Package was renamed upstream.
+  * Version number is 0.8rc3.
+  * Remove the documentation from the source, licensed under the
+    Creative Commons ShareAlike License, considered to be non-free.
+
+ -- Matthias Klose <doko at ubuntu.com>  Wed, 29 Jun 2005 21:20:51 +0200
+
+translate-toolkit (0.7.92-1) unstable; urgency=low
+
+  * Initial Release (0.8 release candidate 2).
+
+ -- Matthias Klose <doko at ubuntu.com>  Mon, 21 Mar 2005 17:21:27 +0100
+

Added: translate-toolkit/trunk/debian/compat
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/compat?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/compat (added)
+++ translate-toolkit/trunk/debian/compat Sun Sep 28 18:13:58 2008
@@ -1,0 +1,1 @@
+5

Added: translate-toolkit/trunk/debian/control
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/control?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/control (added)
+++ translate-toolkit/trunk/debian/control Sun Sep 28 18:13:58 2008
@@ -1,0 +1,47 @@
+Source: translate-toolkit
+Section: python
+Priority: optional
+Maintainer: Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>
+Uploaders: Matthias Klose <doko at debian.org>
+Build-Depends-Indep: python-all-dev (>= 2.3.5-11), python-central (>= 0.5), python-lxml, python (>= 2.5)
+Build-Depends: debhelper (>= 5.0.37.2), quilt (>= 0.40)
+XS-Python-Version: all
+Standards-Version: 3.7.3
+
+Package: translate-toolkit
+Architecture: all
+Depends: ${python:Depends}, gettext, python (>= 2.5) | python-pysqlite2
+Recommends: python-lxml, python (>= 2.5) | python-elementtree, python-enchant, python-utidylib
+Suggests: translate-toolkit-dev-doc
+Replaces: pootle (<< 0.8.2005.0217-2)
+XB-Python-Version: ${python:Versions}
+Description: Toolkit assisting in the localization of software
+ The Translate Toolkit is a Python library and a set of software designed
+ to help make the lives of localizers both more productive and less
+ frustrating.
+ .
+ The software includes programs to convert localization formats to the
+ common PO format and programs to check and manage PO files and
+ utilities to create word counts, merge translations and perform
+ various checks on PO files.
+ .
+ Supported localization storage formats are: DTD, properties,
+ OpenOffice.org GSI/SDF, CSV, MO, Qt .ts and of course PO and XLIFF.
+ .
+ The documentation of the Translate Toolkit API is packaged in
+ translate-toolkit-dev-doc.
+Homepage: http://translate.sourceforge.net/
+
+Package: translate-toolkit-dev-doc
+Architecture: all
+Section: doc
+Suggests: translate-toolkit
+Description: documentation of the translate-toolkit API
+ The Translate Toolkit is a set of software designed
+ to help make the lives of localizers both more productive and less
+ frustrating.
+ .
+ This package provides the documentation of the Translate Toolkit API, which
+ will be useful is useful to develop applications using the APIs provided by
+ the Translate Toolkit.
+Homepage: http://translate.sourceforge.net/

Added: translate-toolkit/trunk/debian/copyright
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/copyright?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/copyright (added)
+++ translate-toolkit/trunk/debian/copyright Sun Sep 28 18:13:58 2008
@@ -1,0 +1,40 @@
+This package was debianized by Matthias Klose <doko at ubuntu.com>
+on Mon, 21 Mar 2005 17:21:27 +0100.
+
+It was downloaded from http://prdownloads.sourceforge.net/translate
+
+msghack.py was downloaded from the fedora gettext source package.
+
+Copyright:
+	Copyright (C) 2002-2008 Zuza Software Foundation
+
+	msghack is Copyright (C) 2001 Red Hat, Inc.
+	           Copyright (C) 2001 Trond Eivind Glomsrød <teg at redhat.com>
+
+Upstream Authors:
+
+	Zuza Software Foundation (Translate.org.za), and
+	St James Software
+
+	msghack's Author is Trond Eivind Glomsrød <teg at redhat.com>
+
+License:
+
+	Released under the GPL license.
+
+Documentation:
+
+	The package only contains the toolkit documentation.
+
+	The localisation guide and other documentation resources from the
+	original upstream archive is licensed under the Creative Commons
+	Attribution-ShareAlike license and has been removed from the
+	package.
+
+	The translate toolkit documentation is licensed under the GPL
+
+GPL:
+----
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.

Added: translate-toolkit/trunk/debian/msghack.1
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/msghack.1?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/msghack.1 (added)
+++ translate-toolkit/trunk/debian/msghack.1 Sun Sep 28 18:13:58 2008
@@ -1,0 +1,34 @@
+.\" This manual page was written based on msghack --help
+.\" by Nicolas François in 2007.
+.\" It is distributed under the same license as msghack.py
+.TH MSGHACK 1
+.SH NAME
+msghack \- Alter .po files in ways no sane mind would think about
+.SH SYNOPSIS
+.B msghack
+[OPTION]
+.I file.po
+.RI [ ref.po ]
+.SH DESCRIPTION
+\fBmsghack\fP can be used to alter .po files in ways no sane mind would
+think about.
+.P
+It  can swap msgid and msgstr in a PO file, remove all translations in
+order to convert a translation file into a template file, and can also
+append the contents of one PO file to another.
+.SH OPTIONS
+.TP
+.BI "\-o " FILE
+Write the result to \fIFILE\fP.
+.TP
+.B \-\-invert
+Invert a po file by switching msgid and msgstr.
+.TP
+.B \-\-master
+Join any number of files in a master-formatted catalog
+.TP
+.B \-\-empty
+Empty the contents of the .po file, creating a .pot.
+.TP
+.B \-\-append
+Append entries from \fIref.po\fP that don't exist in \fIfile.po\fP.

Added: translate-toolkit/trunk/debian/msghack.py
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/msghack.py?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/msghack.py (added)
+++ translate-toolkit/trunk/debian/msghack.py Sun Sep 28 18:13:58 2008
@@ -1,0 +1,399 @@
+#!/usr/bin/python
+## -*- coding: utf-8 -*-
+## Copyright (C) 2001 Red Hat, Inc.
+## Copyright (C) 2001 Trond Eivind Glomsrød <teg at redhat.com>
+
+## v0.2 - 2001-08-21
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+"""
+A msghack replacement
+"""
+
+import string
+import sys
+
+class GTMessage:
+    """
+    A class containing a message, its msgid and various references pointing at it
+    """
+
+    def __init__(self,id=None,message=None,refs=[]):
+        """
+        The constructor for the GTMessage class
+        @self The object instance
+        @message The message
+        @id The messageid associated with the object
+        """
+        self._message=string.strip(message)
+        self._id=string.strip(id)
+        self._refs=[]
+        for ref in refs:
+            self._refs.append(ref)
+
+    def __str__(self):
+        """
+        Return a string representation of the object
+        @self The object instance
+        """
+        res=""
+        for ref in self._refs:
+            res=res+ref+"\n"
+        res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message)
+        return res
+
+    def invertedStrings(self):
+        """
+        Returns a string representation, but with msgid and msgstr inverted.
+        Note: Don't invert the "" string
+        @self The object instance
+        """
+        res=""
+        for ref in self._refs:
+            res=res+ref+"\n"
+        if not self._id=="\"\"":
+            res=res+"msgid %s\nmsgstr %s\n" % (self._message,self._id)
+        else:
+            res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message)
+        return res
+
+    def emptyMsgStrings(self):
+        """
+        Return a string representation of the object, but leave the msgstr
+        empty - create a pot file from a po file
+        Note: Won't remove the "" string
+        @self The object instance
+        """
+        res=""
+        for ref in self._refs:
+            res=res+ref+"\n"
+        if not self._id=="\"\"":
+            res=res+"msgid %s\nmsgstr \"\"\n" % (self._id)
+        else:
+            res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message)
+        return res
+        
+    def compareMessage(self,msg):
+        """
+        Return  if the messages have identical msgids, 0 otherwise
+        @self The object instance
+        @msg The message to compare to
+        """
+
+        if self._id == msg._id:
+            return 1
+        return 0
+        
+
+class GTMasterMessage:
+    """
+    A class containing a message, its msgid and various references pointing at it
+    The difference between GTMessage and GTMasterMessage is that this class
+    can do less operations, but is able to store multiple msgstrs with identifiers
+    (usually language, like 'msgst(no)'
+    """
+
+    def __init__(self,id=None,refs=[]):
+        """
+        The constructor for the GTMessage class
+        @self The object instance
+        @id The messageid associated with the object
+        """
+        self._id=id
+        self._refs=[]
+        self._messages=[]
+        for ref in refs:
+            self._refs.append(ref)
+
+    def addMessage(self,message,identifier):
+        """
+        Add a new message and identifier to the GTMasterMessage object
+        @self The object instance
+        @message The message to append
+        @identifier The identifier of the message
+        """
+        self._messages.append((identifier,message))
+
+    def __str__(self):
+        """
+        Return a string representation of the object
+        @self The object instance
+        """
+        res=""
+        for ref in self._refs:
+            res=res+ref+"\n"
+        res=res+"msgid %s\n" % self._id
+        for message in self._messages:
+            res=res+"msgstr(%s) %s\n" %(message[0],message[1])
+        res=res+"\n"
+        return res
+
+class GTFile:
+    """
+    A class containing the GTMessages contained in a file
+    """
+
+    def __init__(self,filename):
+        """
+        The constructor of the GTMFile class
+        @self The object instance
+        @filename The  file to initialize from
+        """
+        self._filename=filename
+        self._messages=[]
+        self.readFile(filename)
+
+    def __str__(self):
+        """
+        Return a string representation of the object
+        @self The object instance
+        """
+        res=""
+        for message in self._messages:
+            res=res+str(message)+"\n"
+        return res
+
+    def invertedStrings(self):
+        """
+        Return a string representation of the object, with msgid and msgstr
+        swapped. Will remove duplicates...
+        @self The object instance
+        """
+
+        msght={}
+        msgar=[]
+
+        for message in self._messages:
+            if message._id=='""' and len(msgar)==0:
+                msgar.append(GTMessage(message._id,message._message,message._refs))
+                continue
+            msg=GTMessage(message._message,message._id,message._refs)
+            if not msght.has_key(msg._id):
+                msght[msg._id]=msg
+                msgar.append(msg)
+            else:
+                msg2=msght[msg._id]
+                for ref in msg._refs:
+                    msg2._refs.append(ref)
+        res=""
+        for message in msgar:
+            res=res+str(message)+"\n"
+        return res
+
+    def msgidDupes(self):
+        """
+        Search for duplicates in the msgids.
+        @self The object instance
+        """
+        msgids={}
+        res=""
+        for message in self._messages:
+            msgid=message._id
+            if msgids.has_key(msgid):
+                res=res+"Duplicate: %s\n" % (msgid)
+            else:
+                msgids[msgid]=1
+        return res
+
+    def getMsgstr(self,msgid):
+        """
+        Return the msgstr matching the given id. 'None' if missing
+        @self The object instance
+        @msgid The msgid key
+        """
+
+        for message in self._messages:
+            if msgid == message._id:
+                return message._message
+        return None
+
+    def emptyMsgStrings(self):
+        """
+        Return a string representation of the object, but leave the msgstr
+        empty - create a pot file from a po file
+        @self The object instance
+        """
+        
+        res=""
+        for message in self._messages:
+            res=res+message.emptyMsgStrings()+"\n"
+        return res
+
+            
+    def append(self,B):
+        """
+        Append entries from dictionary B which aren't
+        already present in this dictionary
+        @self The object instance
+        @B the dictionary to append messages from
+        """
+
+        for message in B._messages:
+            if not self.getMsgstr(message._id):
+                self._messages.append(message)
+                
+
+    def readFile(self,filename):
+        """
+        Read the contents of a file into the GTFile object
+        @self The object instance
+        @filename The name of the file to read
+        """
+        
+        file=open(filename,"r")
+        msgid=""
+        msgstr=""
+        refs=[]
+        lines=[]
+        inmsgid=0
+        inmsgstr=0
+        templines=file.readlines()
+        for line in templines:
+            lines.append(string.strip(line))
+        for line in lines:
+            pos=string.find(line,'"')
+            pos2=string.rfind(line,'"')
+            if line and line[0]=="#":
+                refs.append(string.strip(line))
+            if inmsgstr==0 and line[:6]=="msgstr":
+                msgstr=""
+                inmsgstr=1
+                inmsgid=0
+            if inmsgstr==1:
+                if pos==-1:
+                    inmsgstr=0
+                    #Handle entries with and without "" consistently
+                    if msgid[:2]=='""' and len(msgid)>4: 
+                        msgid=msgid[2:]
+                    if msgstr[:2]=='""' and len(msgstr)>4: 
+                        msgstr=msgstr[2:]
+                    message=GTMessage(msgid,msgstr,refs)
+                    self._messages.append(message)
+                    msgstr=""
+                    msgid=""
+                    refs=[]
+                else:
+                    msgstr=msgstr+line[pos:pos2+1]+"\n"
+            if inmsgid==0 and line[:5]=="msgid":
+                msgid=""
+                inmsgid=1
+            if inmsgid==1:
+                if pos==-1:
+                    inmsgid=0
+                else:
+                    msgid=msgid+line[pos:pos2+1]+"\n"
+        if msgstr and msgid:
+            message=GTMessage(msgid,msgstr,refs)
+            self._messages.append(message)
+
+
+class GTMaster:
+    """
+    A class containing a master catalogue of gettext dictionaries
+    """
+
+    def __init__(self,dicts):
+        """
+        The constructor for the GTMaster class
+        @self The object instance
+        @dicts An array of dictionaries to merge
+        """
+        self._messages=[]
+        self.createMaster(dicts)
+
+    def createMaster(self,dicts):
+        """
+        Create the master catalogue
+        @self The object instance
+        @dicts An array of dictionaries to merge
+        """
+
+        self._master=dicts[0]
+        self._dicts=dicts[1:]
+
+        for message in self._master._messages:
+            gtm=GTMasterMessage(message._id,message._refs)
+            gtm.addMessage(message._message,self._master._filename[:-3])
+            for dict in self._dicts:
+                res=dict.getMsgstr(message._id)
+                if(res):
+                    gtm.addMessage(res,dict._filename[:-3])
+            self._messages.append(gtm)
+
+    def __str__(self):
+        """
+        Return a string representation of the object
+        @self The object instance
+        """
+        res=""
+        for message in self._messages:
+            res=res+str(message)+"\n"
+        return res
+
+
+if __name__=="__main__":
+    output=None
+    res=None
+    if("-o") in sys.argv:
+        output=sys.argv[sys.argv.index("-o")+1]
+        sys.argv.remove("-o")
+        sys.argv.remove(output)
+    if("--invert") in sys.argv:
+        file=sys.argv[sys.argv.index("--invert")+1]
+        gtf=GTFile(file)
+        res1=gtf.msgidDupes()
+        if res1:
+            sys.stderr.write(res1)
+            sys.exit(1)
+        res=str(gtf.invertedStrings())
+    elif("--empty") in sys.argv:
+        file=sys.argv[sys.argv.index("--empty")+1]
+        gtf=GTFile(file)
+        res=str(gtf.emptyMsgStrings())
+    elif("--master") in sys.argv:
+        loc=sys.argv.index("--master")+1
+        gtfs=[]
+        for file in sys.argv[loc:]:
+            gtfs.append(GTFile(file))
+        master=GTMaster(gtfs)
+        res=str(master)
+    elif("--append") in sys.argv:
+        file=sys.argv[sys.argv.index("--append")+1]
+        file2=sys.argv[sys.argv.index("--append")+2]
+        gtf=GTFile(file)
+        gtf2=GTFile(file2)
+        gtf.append(gtf2)
+        res=str(gtf)
+    else:
+        #print "Not implemented: "+str(sys.argv)
+        print "\
+Usage: ", str(sys.argv[0])," [OPTION] file.po [ref.po]\n\
+This program can be used to alter .po files in ways no sane mind would think about.\n\
+      -o                result will be written to FILE\n\
+      --invert          invert a po file by switching msgid and msgstr\n\
+      --master          join any number of files in a master-formatted catalog\n\
+      --empty           empty the contents of the .po file, creating a .pot\n\
+      --append          append entries from ref.po that don't exist in file.po\n\
+\n\
+Note: It is just a replacement of msghack for backward support.\n\
+"
+        sys.exit(1)
+    if not output:
+        print res
+    else:
+        file=open(output,"w")
+        file.write(res)
+    sys.exit(0)

Added: translate-toolkit/trunk/debian/patches/API-doc-in-separate-package
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/API-doc-in-separate-package?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/patches/API-doc-in-separate-package (added)
+++ translate-toolkit/trunk/debian/patches/API-doc-in-separate-package Sun Sep 28 18:13:58 2008
@@ -1,0 +1,11 @@
+--- translate-toolkit-1.1.1.orig/translate/doc/index.html
++++ translate-toolkit-1.1.1/translate/doc/index.html
+@@ -23,7 +23,7 @@
+         </p>
+         <ul>
+             <li><a href="user/toolkit-index.html">User documentation</a></li>
+-            <li><a href="api/index.html">API documentation</a> (for programmers)</li>
++            <li><a href="../../translate-toolkit-dev-doc/html/api/index.html">API documentation</a> (for programmers; need the translate-toolkit-dev-doc package)</li>
+         </ul>
+ 
+         The most up-to-date documentation about the Translate Toolkit is 

Added: translate-toolkit/trunk/debian/patches/cleanup_install
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/cleanup_install?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/patches/cleanup_install (added)
+++ translate-toolkit/trunk/debian/patches/cleanup_install Sun Sep 28 18:13:58 2008
@@ -1,0 +1,26 @@
+Goal: Do not include lookupclient.py as a script. It is a example.
+      Do not include po2ini and ini2po. iniparse is currently not
+      packaged in Debian.
+
+Status wrt upstream: Debian specific.
+
+Index: translate-toolkit-1.1.1/setup.py
+===================================================================
+--- translate-toolkit-1.1.1.orig/setup.py	2008-03-18 22:52:04.356001162 +0100
++++ translate-toolkit-1.1.1/setup.py	2008-03-18 22:52:42.212230496 +0100
+@@ -43,7 +43,6 @@
+                   ('convert', 'txt2po'), ('convert', 'po2txt'),
+                   ('convert', 'ts2po'),  ('convert', 'po2ts'),
+                   ('convert', 'html2po'), ('convert', 'po2html'),
+-                  ('convert', 'ini2po'), ('convert', 'po2ini'),
+                   ('convert', 'php2po'), ('convert', 'po2php'),
+                   ('convert', 'xliff2po'), ('convert', 'po2xliff'),
+                   ('convert', 'odf2po'),
+@@ -61,7 +60,6 @@
+                   ('tools', 'posegment'),
+                   ('tools', 'poswap'),
+                   ('tools', 'poclean'),
+-                  ('services', 'lookupclient.py'),
+                   ('services', 'lookupservice')]
+ 
+ translatebashscripts = [apply(join, ('tools', ) + (script, )) for script in [

Added: translate-toolkit/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/series?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/patches/series (added)
+++ translate-toolkit/trunk/debian/patches/series Sun Sep 28 18:13:58 2008
@@ -1,0 +1,3 @@
+cleanup_install
+tools_manpages
+API-doc-in-separate-package

Added: translate-toolkit/trunk/debian/patches/tools_manpages
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/tools_manpages?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/patches/tools_manpages (added)
+++ translate-toolkit/trunk/debian/patches/tools_manpages Sun Sep 28 18:13:58 2008
@@ -1,0 +1,327 @@
+Index: translate-toolkit-1.0.1/man/pocompendium.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/pocompendium.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,63 @@
++.TH pocompendium 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++pocompendium \- Create a PO compendium from a directory of PO files.
++.SH SYNOPSIS
++\fBpocompendium\fR [options] \fIoutput.po\fR <\fB\-d\fR
++\fIpo-directory(ies)\fR|\fIpo-file(s)\fR>
++.SH DESCRIPTION
++Takes a directory of translated PO files and creates a single PO files
++called a PO compendium. This compendium can be used to review word choice
++conflicts or as input during a merge using \fBpomigrate\fR(1).
++.SH OPTIONS
++.TP
++\fB\-v\fR, \fB\-\-invert\fR
++swap the msgid and msgstr in the input PO files.
++This option requires \fBmsghack\fR, which is not distributed in the Debian gettext
++package.
++.TP
++\fB\-e\fR, \fB\-\-errors\fR
++only return those message blocks that have conflicts
++.TP
++\fB\-i\fR, \fB\-\-ignore-case\fR
++drops all msgstr's to lowercase
++.TP
++\fB\-st\fR, \fB\-tilde\fR, \fB\-\-strip\-accel\-amp\fR
++remove all & style accelerator markers
++.TP
++\fB\-sa\fR, \fB\-amp\fR, \fB\-\-strip\-accel\-tilde\fR
++remove all ~ style accelerator markers
++.TP
++\fB\-su\fR, \fB\-\-strip\-accel\-under\fR
++remove all _ style accelerator markers
++.SH EXAMPLES
++.SS Compendium creation
++create a compendium with all your translations to use as input during a
++message merge either when migrating an existing project or starting a new
++one.
++.SS Conflicting translations
++use \fB\-\-errors\fR to find where you have translated an English string
++differently. Many times this is OK but often it will pick up subtle
++spelling mistakes or help you to migrate older translations to a newer
++choice of words.
++.SS Conflicting word choice
++use \fB\-\-invert\fR and \fB\-\-errors\fR to get a compendium file that
++show how you have used a translated word for different English words. You
++might have chosen a word that is valid for both of the English expressions
++but that in the context of computers would cause confusion for the user.
++You can now easily identify these words and make changes in the underlying
++translations.
++.SH Narrowing Results
++PO files treat slight changes in capitalisation, accelerator, punctuation
++and whitespace as different translations. In cases 2) and 3) above it is
++sometimes useful to remove the inconsistencies so that you can focus on
++the errors in translation not on shifts in capitals. To this end you can
++use the following: \fB\-\-ignore\-case\fR, \fB\-\-strip\-accel\-amp\fR,
++\fB\-\-strip\-accel\-tilde\fR, \fB\-\-strip\-accel\-under\fR.
++.SH OPERATION
++\fBpocompendium\fR makes use of the Gettext tool \fBmsgcat\fR(1) to
++perform its task. It traverses the PO directories and cat's all found PO
++files into the single compendium output file. It then uses
++\fBmsgattrib\fR(1) to extract only certain messages, \fBmsghack\fR to
++invert messages and \fBmsgfilter\fR(1) to convert messages to lowercase.
++.SH BUGS
++There are some absolute/relative path name issues.
+Index: translate-toolkit-1.0.1/man/poen.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/poen.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,27 @@
++.TH poen 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++poen \- Initialises a directory English PO files by taking POT files and
++copying the msgid to the msgstr.
++.SH SYNOPSIS
++\fBpoen\fR [options] \fI<pot>\fR \fI<en>\fR
++.P
++Where \fI<pot>\fR is a directory of POT files and \fI<en>\fR is a new
++directory that contains PO files with English translations
++.SH DESCRIPTION
++Initialises a directory English PO files by taking POT files and copying
++the msgid to the msgstr.
++
++This is useful for translators who use CAT tools that override existing
++text. They can setup their tool to overwrite msgstr entries which will now
++be in English.
++
++.SH OPTIONS
++.TP
++\fB\-\-no\-wrap\fR
++Do not break long message lines, longer than the output
++page width, into several lines.
++.TP
++\fB\-\-po\fR
++Process .po files instead of the default .pot files
++.SH BUGS
++None known.
+Index: translate-toolkit-1.0.1/man/pomigrate2.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/pomigrate2.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,57 @@
++.TH pomigrate2 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++pomigrate2 \- Migrates PO files from an old version using new POT files.
++.SH SYNOPSIS
++\fBpomigrate\fR [options] \fIfrom\fR \fIto\fR \fInew-templates\fR
++.P
++Where \fIfrom\fR is a directory of existing PO files, \fIto\fR is the
++directory where the migrated PO files will be stored, and
++\fInew-templates\fR is the directory that contains the PO Template files.
++.SH DESCRIPTION
++\fBpomigrate2\fR aims to move an existing translation to a new version based on
++updated PO Template files automatically without user intervention.
++Therefore it is ideal for when you are migrating many languages or
++migrating from related but divergent products eg Mozilla to Firefox.
++.SH OPTIONS
++.TP
++\fB\-F\fR, \fB\-\-use\-fuzzy\-matching\fR
++use fuzzy algorithms when merging to attempt to match strings
++.TP
++\fB\-C\fR, \fB\-\-use\-compendium\fR
++create and use a compendium built from the migrating files
++.TP
++\fB\-C\fR, \fB\-\-use\-compendium\fR=\fIsome-compendium.po\fR
++use an external compendium during the migration
++.TP
++\fB\-\-no\-wrap\fR
++do not wrap long lines
++.TP
++\fB\-\-locale\fR
++set locale for newly born files
++.TP
++\fB\-q\fR, \fB\-\-quiet\fR
++suppress most output
++.TP
++\fB\-p\fR, \fB\-\-pot2po\fR
++use \fBpot2po\fR(1) instead of \fBmsgmerge\fR(1) to migrate (you cannot use
++compendia)
++.SH OPERATION
++\fBpomigrate2\fR makes use of the Gettext tools \fBmsgmerge\fR or Translate Toolkits
++\fBpot2po\fR to perform its merging tasks.
++
++It firstly finds all files with the same name and location in the \fIfrom\fR
++directory as in the \fInew-template\fR directory and copies these to the \fIto\fR
++directory. If there is no file in the \fIfrom\fR directory to match one
++needed by the \fInew-template\fR directory then it will \fBmsgcat\fR(1) all files in the
++\fIfrom\fR directory with the same name and copy them to the correct
++destination in the \fIto\fR directory. If all of that fails then
++\fBmsginit\fR(1) is
++used to initialise any missing PO files.
++
++Lastly all the files in <to> are merged using \fBmsgmerge\fR(1) or \fBpot2po\fR(1). This
++process updates the files to match the layout and messages in
++\fInew-templates\fR. Optionally, by using \fB\-\-use\-compendium\fR, a compendium of all
++the translations in \fIfrom\fR can be created to be used in the final merge
++process.
++.SH BUGS
++None known
+Index: translate-toolkit-1.0.1/man/popuretext.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/popuretext.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,19 @@
++.TH popuretext 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++popuretext \- Extracts all the source text from a directory of POT files,
++removes po headers and optionally the accelerator keys.
++.SH SYNOPSIS
++\fBpopuretext\fR \fIpot-dir\fR \fIfile.txt\fR [\fIaccelerator\fR]
++.P
++Where \fIpot-dir\fR is a directory containing POT files,
++\fIfile.txt\fR is a file that contains the output text, and the optional
++\fIaccelerator\fR is an accelerator marker to be removed from the text.
++.SH DESCRIPTION
++Extracts all the source text from a directory of POT files, removing PO
++headers and optionally the accelerator keys.
++
++If you want to use other tools to analyse the text within a translation
++project to for instance use word frequency to create an initial glossary
++then this tool is the starting point to get hold of the pure text.
++.SH BUGS
++None known
+Index: translate-toolkit-1.0.1/man/poreencode.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/poreencode.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,22 @@
++.TH poreencode 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++poreencode \- Reencode all files of a PO directory to the specified encoding.
++.SH SYNOPSIS
++\fBporeencode\fR \fIencoding\fR \fIPO-directory\fR
++.P
++Where \fIencoding\fR is the encoding you would like to convert to eg.
++UTF-8, and \fIPO-directory\fR is a directory of existing PO files.
++.SH DESCRIPTION
++Takes a directory of existing PO files and converts them to a given
++encoding.
++.SH OPERATION
++\fBporeencode\fR makes use of the Gettext tool \fBmsgconv\fR(1) to perform
++its task. It traverses the PO directory and finds all PO file. It uses
++\fBmsgconv\fR(1) to convert the PO file from its existing encoding to the
++new encoding.
++.SH BUGS
++Like most Gettext tools they do a little bit more than documented,
++\fBmsgconv\fR(1) will decide which strings are in fact fuzzy and delete
++fuzzy marking - not a lot but you do need to diff (this probably related
++to #, fuzzy entries that are not placed in the place Gettext expects
++them).
+Index: translate-toolkit-1.0.1/man/posplit.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/posplit.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,14 @@
++.TH posplit 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++posplit \- Split a PO file into a translated, fuzzy, and untranslated PO
++file.
++.SH SYNOPSIS
++\fBposplit\fR \fI./file.po\fR
++.P
++Where \fIfile.po\fR is an existing PO file or PO compendium.
++.SH DESCRIPTION
++Takes an existing PO file and splits it into three components: translated,
++untranslated and fuzzy. This is useful for reviewing translations or for
++extracting good translations from a compendium file.
++.SH BUGS
++Some relative path bugs thus the need for ./ before file.po
+Index: translate-toolkit-1.0.1/man/pocount.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/pocount.1	2007-06-23 16:53:43.000000000 +0100
+@@ -0,0 +1,37 @@
++.TH pocount 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++pocount \- Produces word counts and other statistics from a PO file.
++.SH SYNOPSIS
++\fBpocount\fR [\fB\-\-csv\fR] [\fIdirectory\fR|\fIfile(s)\fR]
++.SH DESCRIPTION
++\fBpocount\fR will count the number of strings and words in a PO file.
++.P
++If no files or directories argument are provided, \fBpocount\fR will
++recurse through all files from the current directory.
++Otherwise, it will recurse and count all files in the specified directory
++or in the specified PO files.
++.SH OPTIONS
++.TP
++\fB\-\-csv\fR
++changes the output format to CSV (Comma Seperated Values) for import into
++a spreadsheet.
++.SH OUTPUT
++In normal mode the following output is given:
++
++ avmedia/source/viewer.po
++ type           strings words (source) words (translation)
++ translated:       1          3               3
++ fuzzy:            0          0             n/a
++ untranslated:     4         22             n/a
++ Total:            5         25               3
++ review            1          3             n/a
++
++In CSV mode the following outut is shown:
++
++ Filename, Translated Messages, Translated Source Words, Translated Target Words, Fuzzy Messages, Fuzzy Source Words, Untranslated Messages, Untranslated Source Words, Review Messages, Review Source Words
++ avmedia/source/viewer.po,  1, 3, 3, 0, 0, 4, 22, 1, 3
++
++Totals are not provided in CSV mode. In normal mode a grand total and
++file count is provided if the number of files is greater than one.
++.SH BUGS
++There are some miscounts related to word breaks.
+Index: translate-toolkit-1.0.1/man/poglossary.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.0.1/man/poglossary.1	2007-06-23 17:11:44.000000000 +0100
+@@ -0,0 +1,20 @@
++.TH poglossary 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++poglossary \- Creates a PO file containing terms and / or phrases that can be used as a glossary.
++.SH SYNOPSIS
++\fBpoglossary\fR \fIlanguage-iso-code\fR \fIinput-dir\fR \fIproject-name\fR
++.P
++Where \fIlanguage-iso-code\fR is the ISO 6399 code for your language,
++\fIinput-dir\fR is the directory with PO files from which you want to extract
++terms, and \fIproject-name\fR the name of the project or domain from which you
++are extract terms.
++.SH DESCRIPTION
++This tool takes a directory of translated PO files and creates a single PO file
++containing terms and / or phrases that can be used as a glossary. This
++compendium can be used to review word choice of a subset of words, and can be a
++useful start for a your terminology in Pootle or Pootling.
++.SH OPERATION
++\fBpoglossary\fR makes use of \fBpocompendium\fR(1) and some tools of the
++translate toolkit. It searches for all short terms and phrases in the PO files
++from the input directory and combines it into one file. Output is given in PO,
++CSV and TBX formats.
+Index: translate-toolkit-1.1.1/man/pocommentclean.1
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ translate-toolkit-1.1.1/man/pocommentclean.1	2008-03-18 22:59:21.813010480 +0100
+@@ -0,0 +1,23 @@
++.TH pocommentclean 1 "Translate Toolkit 1.1.1" "" "Translate Toolkit 1.1.1"
++.SH NAME
++pocommentclean \- Remove all translator comments from PO files.
++.SH SYNOPSIS
++\fBpocommentclean\fR [\fB\-\-backup\fR] \fIpo-dir\fR
++
++where \fIpo-dir\fR is a directory of existing PO files that you want to
++clean.
++.SH DESCRIPTION
++pocommentclean will remove all translator comments from a directory of PO
++files.
++.SH OPTIONS
++.TP
++\fB\-\-backup\fR
++Create a backup file for each PO file converted, with the \fI.po.bak\fR
++extension.
++.SH OPERATION
++Using sed \fBpocommentclean\fR will delete all lines starting with # but which
++are not standard Gettext PO format lines. So it won't delete developer
++comments (#.), obsolete messages (#~), flags (#,) or locations (#:).
++.SH BUGS
++\fBpocommentclean\fR cannot clean individual PO files, it only cleans
++directories.

Added: translate-toolkit/trunk/debian/rules
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/rules?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/rules (added)
+++ translate-toolkit/trunk/debian/rules Sun Sep 28 18:13:58 2008
@@ -1,0 +1,105 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+p	= translate-toolkit
+d	= debian/$(p)
+pv	= $(shell python -c 'import sys; print sys.version[:3]')
+
+include /usr/share/quilt/quilt.make
+
+build: build-stamp
+build-stamp: patch
+	dh_testdir
+	python setup.py build
+	mkdir -p man
+	for script in build/scripts-*/*; do \
+	  case $$(basename $$script) in \
+	  pocompendium|poen|pomigrate2|popuretext|poreencode|posplit|pocount|poglossary|pocommentclean) \
+	    ;; \
+	  *) \
+	    LC_ALL=C PYTHONPATH=. ./$$script --manpage \
+	      > man/$$(basename $$script).1 \
+	      || rm -f man/$(basename $i).1; \
+	    ;; \
+	  esac; \
+	done
+	cp debian/msghack.1 man/msghack.1
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	rm -rf build
+	rm -rf man
+	rm -f MANIFEST.in
+	-find -name '*.py[co]' | xargs rm -f
+	# Make sure the build fails if we distribute the CC by-sa
+	# documentation (only the toolkit-* documents are GPLed)
+	test -z "$$(find translate/doc/user -name "toolkit-*" -o -name style.css -o -name design.css -o -name print.css -o -wholename "translate/doc/user/images/*" -o -type f -print -quit 2>/dev/null)"
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs \
+		usr/share/doc/$(p)
+	python setup.py install --prefix=`pwd`/$(d)/usr
+	mv $(d)/usr/lib/python$(pv)/site-packages/translate/doc \
+		$(d)/usr/share/doc/$(p)/html
+	rm -f $(d)/usr/lib/python$(pv)/site-packages/translate/ChangeLog
+	rm -f $(d)/usr/lib/python$(pv)/site-packages/translate/COPYING
+	rm -f $(d)/usr/lib/python$(pv)/site-packages/translate/LICENSE
+	rm -f $(d)/usr/lib/python$(pv)/site-packages/translate/README
+	mv $(d)/usr/share/doc/$(p)/html/api \
+		$(d)-dev-doc/usr/share/doc/$(p)-dev-doc/html
+
+	dh_link \
+		/usr/share/doc/$(p)/html \
+		/usr/lib/python$(pv)/site-packages/translate/doc
+
+#	sed 's/oo2po\.main/oo2po.main2/g' $(d)/usr/bin/oo2po \
+#		> $(d)/usr/bin/oo2rpo
+#	chmod 755 $(d)/usr/bin/oo2rpo
+#	sed 's/po2oo\.main/po2oo.main2/g' $(d)/usr/bin/po2oo \
+#		> $(d)/usr/bin/rpo2oo
+#	chmod 755 $(d)/usr/bin/rpo2oo
+
+	rm -rf $(d)/usr/lib/python$(pv)/site-packages/translate/pootle
+	rm -f $(d)/usr/bin/pootle.py
+
+	# Install an overrides for the script-not-executable warnings
+	# (python modules with a shebang).
+	install -p -D -m644 debian/$(p).lintian \
+	                    $(d)/usr/share/lintian/overrides/$(p)
+
+	# Install msghack
+	install -p -D -m644 debian/msghack.py \
+	                    $(d)/usr/bin/msghack
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs translate/ChangeLog
+	dh_installdocs translate/README
+	dh_installexamples
+	dh_installman man/*
+	dh_compress
+	dh_fixperms
+	dh_pycentral
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure

Propchange: translate-toolkit/trunk/debian/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: translate-toolkit/trunk/debian/translate-toolkit-dev-doc.dirs
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/translate-toolkit-dev-doc.dirs?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/translate-toolkit-dev-doc.dirs (added)
+++ translate-toolkit/trunk/debian/translate-toolkit-dev-doc.dirs Sun Sep 28 18:13:58 2008
@@ -1,0 +1,1 @@
+usr/share/doc/translate-toolkit-dev-doc/html

Added: translate-toolkit/trunk/debian/translate-toolkit-dev-doc.doc-base
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/translate-toolkit-dev-doc.doc-base?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/translate-toolkit-dev-doc.doc-base (added)
+++ translate-toolkit/trunk/debian/translate-toolkit-dev-doc.doc-base Sun Sep 28 18:13:58 2008
@@ -1,0 +1,10 @@
+Document: translate-toolkit-dev-doc
+Title: The Translate Toolkit API documentation
+Author: Zuza Software Foundation
+Abstract: The Translate Toolkit is a Python package that assists in
+ localization of software.
+Section: Text
+
+Format: HTML
+Index: /usr/share/doc/translate-toolkit-dev-doc/html/api/index.html
+Files: /usr/share/doc/translate-toolkit-dev-doc/html/api/*.html

Added: translate-toolkit/trunk/debian/translate-toolkit.doc-base
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/translate-toolkit.doc-base?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/translate-toolkit.doc-base (added)
+++ translate-toolkit/trunk/debian/translate-toolkit.doc-base Sun Sep 28 18:13:58 2008
@@ -1,0 +1,10 @@
+Document: translate-toolkit
+Title: The Translate Toolkit Manual
+Author: Dwayne Bailey
+Abstract: The Translate Toolkit is a Python package that assists in
+ localization of software.
+Section: Text
+
+Format: HTML
+Index: /usr/share/doc/translate-toolkit/html/index.html
+Files: /usr/share/doc/translate-toolkit/html/*.html

Added: translate-toolkit/trunk/debian/translate-toolkit.examples
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/translate-toolkit.examples?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/translate-toolkit.examples (added)
+++ translate-toolkit/trunk/debian/translate-toolkit.examples Sun Sep 28 18:13:58 2008
@@ -1,0 +1,1 @@
+translate/services/lookupclient.py

Added: translate-toolkit/trunk/debian/translate-toolkit.lintian
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/translate-toolkit.lintian?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/translate-toolkit.lintian (added)
+++ translate-toolkit/trunk/debian/translate-toolkit.lintian Sun Sep 28 18:13:58 2008
@@ -1,0 +1,1 @@
+translate-toolkit: script-not-executable

Added: translate-toolkit/trunk/debian/watch
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/watch?rev=1363&op=file
==============================================================================
--- translate-toolkit/trunk/debian/watch (added)
+++ translate-toolkit/trunk/debian/watch Sun Sep 28 18:13:58 2008
@@ -1,0 +1,6 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site		Directory		Pattern			Version	Script
+version=2
+http://sf.net/translate/translate-toolkit-(.*).tar.(?:gz|bz2)




More information about the Debian-l10n-commits mailing list