rpms/translate-toolkit/EL-5 translate-poterminology-stoplist.diff, NONE, 1.1 translate-toolkit-1.2.0-vobject.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 sources, 1.7, 1.8 translate-toolkit.spec, 1.11, 1.12

Dwayne Bailey dwayne at fedoraproject.org
Sun Nov 16 16:55:27 UTC 2008


Author: dwayne

Update of /cvs/pkgs/rpms/translate-toolkit/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv343

Modified Files:
	.cvsignore sources translate-toolkit.spec 
Added Files:
	translate-poterminology-stoplist.diff 
	translate-toolkit-1.2.0-vobject.patch 
Log Message:
* Sun Nov 16 2008 Dwayne Bailey <dwayne at translate.org.za> - 1.2.0-1
- Update to 1.2.0
- Patch poterminology to read stoplist-en from /usr/share/
- Add devel package to include generated Translate Toolkit API documentation
- Add dependencies: python-iniparse, python-Levenshtein, python-lxml,
- Drop iCal support


translate-poterminology-stoplist.diff:

--- NEW FILE translate-poterminology-stoplist.diff ---
diff -ur translate-toolkit-1.2.0.old/translate/tools/poterminology.py translate-toolkit-1.2.0/translate/tools/poterminology.py
--- translate-toolkit-1.2.0.old/translate/tools/poterminology.py	2008-09-30 11:43:44.000000000 +0200
+++ translate-toolkit-1.2.0/translate/tools/poterminology.py	2008-10-06 22:00:34.000000000 +0200
@@ -422,7 +422,7 @@
     parser.stoprelist = []
     parser.stopfoldtitle = True
     parser.stopignorecase = False
-    parser.defaultstopfile = find_installed_file('stoplist-en')
+    parser.defaultstopfile = '/usr/share/translate-toolkit/stoplist-en'
     parser.add_option("-S", "--stopword-list", type="string", metavar="STOPFILE", 
         action="callback", callback=parse_stopword_file,
         help="read stopword (term exclusion) list from STOPFILE (default %s)" % parser.defaultstopfile,

translate-toolkit-1.2.0-vobject.patch:

--- NEW FILE translate-toolkit-1.2.0-vobject.patch ---
Don't install any ical related converters since there is no python-vobject support
in EL-5
diff -up translate-toolkit-1.2.0/setup.py.vobject translate-toolkit-1.2.0/setup.py
diff -up translate-toolkit-1.2.0/setup.py.vobject translate-toolkit-1.2.0/setup.py
--- translate-toolkit-1.2.0/setup.py.vobject	2008-10-06 16:25:51.000000000 +0200
+++ translate-toolkit-1.2.0/setup.py	2008-11-16 16:48:51.000000000 +0200
@@ -44,7 +44,6 @@ translatescripts = [apply(join, ('transl
                   ('convert', 'txt2po'), ('convert', 'po2txt'),
                   ('convert', 'ts2po'),  ('convert', 'po2ts'),
                   ('convert', 'html2po'), ('convert', 'po2html'),
-                  ('convert', 'ical2po'), ('convert', 'po2ical'),
                   ('convert', 'ini2po'), ('convert', 'po2ini'),
                   ('convert', 'php2po'), ('convert', 'po2php'),
                   ('convert', 'rc2po'), ('convert', 'po2rc'),
diff -Nur translate-toolkit-1.2.0.ical/translate/convert/ical2po translate-toolkit-1.2.0/translate/convert/ical2po
--- translate-toolkit-1.2.0.ical/translate/convert/ical2po	2008-09-24 16:27:39.000000000 +0200
+++ translate-toolkit-1.2.0/translate/convert/ical2po	1970-01-01 02:00:00.000000000 +0200
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-# 
-# Copyright 2008 Zuza Software Foundation
-# 
-# This file is part of translate.
-#
-# translate 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.
-# 
-# translate 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 translate; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-"""simple script to convert an iCal file to a gettext .po localization file"""
-
-from translate.convert import ical2po
-
-if __name__ == '__main__':
-  ical2po.main()
-
diff -Nur translate-toolkit-1.2.0.ical/translate/convert/ical2po.py translate-toolkit-1.2.0/translate/convert/ical2po.py
--- translate-toolkit-1.2.0.ical/translate/convert/ical2po.py	2008-09-24 16:27:39.000000000 +0200
+++ translate-toolkit-1.2.0/translate/convert/ical2po.py	1970-01-01 02:00:00.000000000 +0200
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# 
-# Copyright 2007 Zuza Software Foundation
-# 
-# This file is part of translate.
-#
-# translate 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.
-# 
-# translate 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 translate; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-"""convert iCal files to Gettext PO localization files"""
-
-import sys
-from translate.storage import po
-from translate.storage import xliff
-from translate.storage import ical
-
-class ical2po:
-    """convert a iCal file to a .po file for handling the translation..."""
-    def convertstore(self, theinifile, duplicatestyle="msgctxt"):
-        """converts a iCal file to a .po file..."""
-        thetargetfile = po.pofile()
-        targetheader = thetargetfile.makeheader(charset="UTF-8", encoding="8bit")
-        targetheader.addnote("extracted from %s" % theinifile.filename, "developer")
-        thetargetfile.addunit(targetheader)
-        for iniunit in theinifile.units:
-            pounit = self.convertunit(iniunit, "developer")
-            if pounit is not None:
-                thetargetfile.addunit(pounit)
-        thetargetfile.removeduplicates(duplicatestyle)
-        return thetargetfile
-
-    def mergestore(self, originifile, translatedinifile, blankmsgstr=False, duplicatestyle="msgctxt"):
-        """converts two iCal files to a .po file..."""
-        thetargetfile = po.pofile()
-        targetheader = thetargetfile.makeheader(charset="UTF-8", encoding="8bit")
-        targetheader.addnote("extracted from %s, %s" % (originifile.filename, translatedinifile.filename), "developer")
-        thetargetfile.addunit(targetheader)
-        translatedinifile.makeindex()
-        for origini in originifile.units:
-            origpo = self.convertunit(origini, "developer")
-            # try and find a translation of the same name...
-            origininame = "".join(origini.getlocations())
-            if origininame in translatedinifile.locationindex:
-                translatedini = translatedinifile.locationindex[origininame]
-                translatedpo = self.convertunit(translatedini, "translator")
-            else:
-                translatedpo = None
-            # if we have a valid po unit, get the translation and add it...
-            if origpo is not None:
-                if translatedpo is not None and not blankmsgstr:
-                    origpo.target = translatedpo.source
-                thetargetfile.addunit(origpo)
-            elif translatedpo is not None:
-                print >> sys.stderr, "error converting original iCal definition %s" % origini.name
-        thetargetfile.removeduplicates(duplicatestyle)
-        return thetargetfile
-
-    def convertunit(self, inputunit, commenttype):
-        """Converts a .ini unit to a .po unit. Returns None if empty
-        or not for translation."""
-        if inputunit is None:
-            return None
-        # escape unicode
-        pounit = po.pounit(encoding="UTF-8")
-        pounit.addlocation("".join(inputunit.getlocations()))
-        pounit.addnote(inputunit.getnotes("developer"), "developer")
-        pounit.source = inputunit.source
-        pounit.target = ""
-        return pounit
-
-def convertical(inputfile, outputfile, templatefile, pot=False, duplicatestyle="msgctxt"):
-    """reads in inputfile using iCal, converts using ical2po, writes to outputfile"""
-    inputstore = ical.icalfile(inputfile)
-    convertor = ical2po()
-    if templatefile is None:
-        outputstore = convertor.convertstore(inputstore, duplicatestyle=duplicatestyle)
-    else:
-        templatestore = ical.icalfile(templatefile)
-        outputstore = convertor.mergestore(templatestore, inputstore, blankmsgstr=pot, duplicatestyle=duplicatestyle)
-    if outputstore.isempty():
-        return 0
-    outputfile.write(str(outputstore))
-    return 1
-
-def main(argv=None):
-    from translate.convert import convert
-    formats = {"ics": ("po", convertical), ("ics", "ics"): ("po", convertical)}
-    parser = convert.ConvertOptionParser(formats, usetemplates=True, usepots=True, description=__doc__)
-    parser.add_duplicates_option()
-    parser.passthrough.append("pot")
-    parser.run(argv)
-
-if __name__ == '__main__':
-    main()
diff -Nur translate-toolkit-1.2.0.ical/translate/convert/po2ical translate-toolkit-1.2.0/translate/convert/po2ical
--- translate-toolkit-1.2.0.ical/translate/convert/po2ical	2008-09-24 16:27:39.000000000 +0200
+++ translate-toolkit-1.2.0/translate/convert/po2ical	1970-01-01 02:00:00.000000000 +0200
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-# 
-# Copyright 2008 Zuza Software Foundation
-# 
-# This file is part of translate.
-#
-# translate 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.
-# 
-# translate 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 translate; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-"""simple script to convert a gettext .po localization file to an iCal file"""
-
-from translate.convert import po2ical
-
-if __name__ == '__main__':
-  po2ical.main()
-
diff -Nur translate-toolkit-1.2.0.ical/translate/convert/po2ical.py translate-toolkit-1.2.0/translate/convert/po2ical.py
--- translate-toolkit-1.2.0.ical/translate/convert/po2ical.py	2008-09-24 16:27:39.000000000 +0200
+++ translate-toolkit-1.2.0/translate/convert/po2ical.py	1970-01-01 02:00:00.000000000 +0200
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# 
-# Copyright 2002-2006 Zuza Software Foundation
-# 
-# This file is part of translate.
-#
-# translate 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.
-# 
-# translate 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 translate; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-"""convert Gettext PO localization files to iCal files"""
-
-from translate.storage import factory
-from translate.storage import ical
-
-class reical:
-    def __init__(self, templatefile):
-        self.templatefile = templatefile
-        self.templatestore = ical.icalfile(templatefile)
-        self.inputdict = {}
-
-    def convertstore(self, inputstore, includefuzzy=False):
-        self.makestoredict(inputstore, includefuzzy)
-        for unit in self.templatestore.units:
-            for location in unit.getlocations():
-                unit.target = self.inputdict[location]
-        return str(self.templatestore)
-
-    def makestoredict(self, store, includefuzzy=False):
-        # make a dictionary of the translations
-        for unit in store.units:
-            if includefuzzy or not unit.isfuzzy():
-                # there may be more than one entity due to msguniq merge
-                for location in unit.getlocations():
-                    inistring = unit.target
-                    if len(inistring.strip()) == 0:
-                        inistring = unit.source
-                    self.inputdict[location] = inistring
-
-def convertical(inputfile, outputfile, templatefile, includefuzzy=False):
-    inputstore = factory.getobject(inputfile)
-    if templatefile is None:
-        raise ValueError("must have template file for iCal files")
-    else:
-        convertor = reical(templatefile)
-    outputstring = convertor.convertstore(inputstore, includefuzzy)
-    outputfile.write(outputstring)
-    return 1
-
-def main(argv=None):
-    # handle command line options
-    from translate.convert import convert
-    formats = {("po", "ics"): ("ics", convertical)}
-    parser = convert.ConvertOptionParser(formats, usetemplates=True, description=__doc__)
-    parser.add_fuzzy_option()
-    parser.run(argv)
-
-if __name__ == '__main__':
-    main()
-
diff -Nur translate-toolkit-1.2.0.ical/translate/doc/user/toolkit-ical2po.html translate-toolkit-1.2.0/translate/doc/user/toolkit-ical2po.html
--- translate-toolkit-1.2.0.ical/translate/doc/user/toolkit-ical2po.html	2008-10-06 18:24:52.000000000 +0200
+++ translate-toolkit-1.2.0/translate/doc/user/toolkit-ical2po.html	1970-01-01 02:00:00.000000000 +0200
@@ -1,214 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-  <title></title>
-  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
-  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
-  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />
-
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-</head>
-<body>
-<a href=.>start</a></br>
-
-
-
-<h1><a name="ical2po" id="ical2po">ical2po</a></h1>
-<div class="level1">
-
-<p>
-
-Converts iCalendar (*.ics) files to Gettext <acronym title="Gettext Portable Object">PO</acronym> format.
-</p>
-
-<p>
-<p><div class="noteclassic">New in v1.2
-</div></p>
-</p>
-
-</div>
-<!-- SECTION "ical2po" [1-105] -->
-<h2><a name="usage" id="usage">Usage</a></h2>
-<div class="level2">
-<pre class="code">ical2po [options] <ical> <po>
-po2ical [options] -t <ical> <po> <ical></pre>
-
-<p>
-
-Where:
-</p>
-<table class="inline">
-	<tr class="row0">
-		<td class="col0 leftalign"> <ical>   </td><td class="col1 leftalign"> is a valid .ics file or directory of those files  </td>
-	</tr>
-	<tr class="row1">
-		<td class="col0 leftalign"> <po>   </td><td class="col1 leftalign"> is a directory of <acronym title="Gettext Portable Object">PO</acronym> or <acronym title="Gettext Portable Object Template">POT</acronym> files  </td>
-	</tr>
-</table>
-
-<p>
-
-Options (ical2po):
-</p>
-<table class="inline">
-	<tr class="row0">
-		<td class="col0 leftalign"> --version           </td><td class="col1 leftalign"> show program's version number and exit  </td>
-	</tr>
-	<tr class="row1">
-		<td class="col0 leftalign"> -h, --help          </td><td class="col1 leftalign"> show this help message and exit  </td>
-	</tr>
-	<tr class="row2">
-		<td class="col0 leftalign"> --manpage           </td><td class="col1 leftalign"> output a manpage based on the help  </td>
-	</tr>
-	<tr class="row3">
-		<td class="col0 leftalign"> <a href="toolkit-progress_progress.html" class="wikilink1" title="toolkit-progress_progress.html">--progress=PROGRESS</a>  </td><td class="col1 leftalign"> show progress as: dots, none, bar, names, verbose  </td>
-	</tr>
-	<tr class="row4">
-		<td class="col0 leftalign"> <a href="toolkit-errorlevel_errorlevel.html" class="wikilink1" title="toolkit-errorlevel_errorlevel.html">--errorlevel=ERRORLEVEL</a>  </td><td class="col1 leftalign"> show errorlevel as: none, message, exception, traceback   </td>
-	</tr>
-	<tr class="row5">
-		<td class="col0 leftalign"> -i INPUT, --input=INPUT      </td><td class="col1 leftalign"> read from INPUT in php format  </td>
-	</tr>
-	<tr class="row6">
-		<td class="col0 leftalign"> -x EXCLUDE, --exclude=EXCLUDE  </td><td class="col1 leftalign"> exclude names matching EXCLUDE from input paths   </td>
-	</tr>
-	<tr class="row7">
-		<td class="col0 leftalign"> -o OUTPUT, --output=OUTPUT     </td><td class="col1 leftalign"> write to OUTPUT in po, pot formats  </td>
-	</tr>
-	<tr class="row8">
-		<td class="col0 leftalign"> -t TEMPLATE, --template=TEMPLATE  </td><td class="col1 leftalign"> read from TEMPLATE in php format  </td>
-	</tr>
-	<tr class="row9">
-		<td class="col0 leftalign"> <a href="toolkit-psyco_mode.html" class="wikilink1" title="toolkit-psyco_mode.html">--psyco=MODE</a>  </td><td class="col1 leftalign"> use psyco to speed up the operation, modes: none,                        full, profile  </td>
-	</tr>
-	<tr class="row10">
-		<td class="col0 leftalign"> -P, --pot    </td><td class="col1 leftalign"> output <acronym title="Gettext Portable Object">PO</acronym> Templates (.pot) rather than <acronym title="Gettext Portable Object">PO</acronym> files (.po)  </td>
-	</tr>
-	<tr class="row11">
-		<td class="col0 leftalign"> <a href="toolkit-duplicates_duplicatestyle.html" class="wikilink1" title="toolkit-duplicates_duplicatestyle.html">--duplicates=DUPLICATESTYLE</a>  </td><td class="col1 leftalign"> what to do with duplicate strings (identical source text): merge, msgid_comment, msgctxt, keep,                        msgid_comment_all (default: 'msgctxt')  </td>
-	</tr>
-</table>
-
-<p>
-
-Options (po2ical):
-</p>
-<table class="inline">
-	<tr class="row0">
-		<td class="col0 leftalign"> --version            </td><td class="col1 leftalign"> show program's version number and exit  </td>
-	</tr>
-	<tr class="row1">
-		<td class="col0 leftalign"> -h, --help           </td><td class="col1 leftalign"> show this help message and exit  </td>
-	</tr>
-	<tr class="row2">
-		<td class="col0 leftalign"> --manpage            </td><td class="col1 leftalign"> output a manpage based on the help  </td>
-	</tr>
-	<tr class="row3">
-		<td class="col0 leftalign"> <a href="toolkit-progress_progress.html" class="wikilink1" title="toolkit-progress_progress.html">--progress=PROGRESS</a>  </td><td class="col1 leftalign"> show progress as: dots, none, bar, names, verbose  </td>
-	</tr>
-	<tr class="row4">
-		<td class="col0 leftalign"> <a href="toolkit-errorlevel_errorlevel.html" class="wikilink1" title="toolkit-errorlevel_errorlevel.html">--errorlevel=ERRORLEVEL</a>    </td><td class="col1 leftalign"> show errorlevel as: none, message, exception, traceback  </td>
-	</tr>
-	<tr class="row5">
-		<td class="col0 leftalign"> -i INPUT, --input=INPUT  </td><td class="col1 leftalign"> read from INPUT in po, pot formats  </td>
-	</tr>
-	<tr class="row6">
-		<td class="col0 leftalign"> -x EXCLUDE, --exclude=EXCLUDE   </td><td class="col1 leftalign"> exclude names matching EXCLUDE from input paths  </td>
-	</tr>
-	<tr class="row7">
-		<td class="col0 leftalign"> -o OUTPUT, --output=OUTPUT      </td><td class="col1 leftalign"> write to OUTPUT in php format  </td>
-	</tr>
-	<tr class="row8">
-		<td class="col0 leftalign"> -t TEMPLATE, --template=TEMPLATE  </td><td class="col1 leftalign"> read from TEMPLATE in php format  </td>
-	</tr>
-	<tr class="row9">
-		<td class="col0 leftalign"> <a href="toolkit-psyco_mode.html" class="wikilink1" title="toolkit-psyco_mode.html">--psyco=MODE</a>         </td><td class="col1 leftalign"> use psyco to speed up the operation, modes: none, full, profile  </td>
-	</tr>
-	<tr class="row10">
-		<td class="col0 leftalign"> --fuzzy              </td><td class="col1 leftalign"> use translations marked fuzzy  </td>
-	</tr>
-	<tr class="row11">
-		<td class="col0 leftalign"> --nofuzzy            </td><td class="col1 leftalign"> don't use translations marked fuzzy (default)  </td>
-	</tr>
-</table>
-
-</div>
-<!-- SECTION "Usage" [106-2297] -->
-<h2><a name="examples" id="examples">Examples</a></h2>
-<div class="level2">
-
-<p>
-
-This example looks at roundtrip of iCalendar translations. While you can do recovery of translations, its unlikely that you will ever need to do that.
-</p>
-
-<p>
-First we need to create a set of <acronym title="Gettext Portable Object Template">POT</acronym> files.
-
-</p>
-<pre class="code">ical2po -P ical.ics ical.pot</pre>
-
-<p>
-
-The ical.ics file is converted to Gettext <acronym title="Gettext Portable Object Template">POT</acronym> files called ical.pot.  Directories of iCalendar files can also be processed.
-</p>
-
-<p>
-Begin translating the ical.pot file by first copying it to make a <acronym title="Gettext Portable Object">PO</acronym> file.
-
-</p>
-<pre class="code">cp ical.pot ical-af.po</pre>
-
-<p>
-
-You are now in a position to translate the file ical-af.po in your favourite translation tool.
-</p>
-
-<p>
-Once translated you can convert back as follows:
-
-</p>
-<pre class="code">po2ical -t ical.ics ical-af.po ical-af.ics</pre>
-
-<p>
-
-Your translations found in the Afrikaans <acronym title="Gettext Portable Object">PO</acronym> file, <code>ical-ad.po</code>, will be converted to .ics using the file <code>ical.ics</code> as a template and creating your newly translated .ics file <code>ical-af.ics</code>.
-</p>
-
-<p>
-To update your translations simply redo the <acronym title="Gettext Portable Object Template">POT</acronym> creation step and make use of <a href="toolkit-pot2po.html" class="wikilink1" title="toolkit-pot2po.html">pot2po</a> to bring your translation up-to-date.
-</p>
-
-</div>
-<!-- SECTION "Examples" [2298-3293] -->
-<h2><a name="notes" id="notes">Notes</a></h2>
-<div class="level2">
-
-<p>
-
-The converter will only process events in the calender file, the file itself can contain many other things that could be localisable.  Please raise a bug if you want to extract additional items.
-</p>
-
-<p>
-The converter does not make use of the LANGUAGE attribute which is permitted in the format.  The LANGUAGE attribute does not aid multilingualism in this context so is ignored.
-</p>
-
-<p>
-The converter could conceivably also process <a href="http://en.wikipedia.org/wiki/vCard" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/vCard">vCard</a> files, but this has not been implemented for lack of a clear need.  Please raise a bug with an example if you have such a file that could benefit from localisation.
-</p>
-
-</div>
-<!-- SECTION "Notes" [3294-3909] -->
-<h2><a name="bugs" id="bugs">Bugs</a></h2>
-<div class="level2">
-
-<p>
-
-None known
-
-</p>
-
-</div>
-<!-- SECTION "Bugs" [3910-] --></body>
-</html>
diff -Nur translate-toolkit-1.2.0.ical/translate/doc/user/toolkit-ical.html translate-toolkit-1.2.0/translate/doc/user/toolkit-ical.html
--- translate-toolkit-1.2.0.ical/translate/doc/user/toolkit-ical.html	2008-10-06 18:24:52.000000000 +0200
+++ translate-toolkit-1.2.0/translate/doc/user/toolkit-ical.html	1970-01-01 02:00:00.000000000 +0200
@@ -1,126 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
-  <title></title>
-  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
-  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
-  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />
-
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-</head>
-<body>
-<a href=.>start</a></br>
-
-
-
-<h1><a name="icalendar" id="icalendar">iCalendar</a></h1>
-<div class="level1">
-
-<p>
-
-Support for <a href="http://en.wikipedia.org/wiki/iCalendar" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/iCalendar">iCalendar</a> (*.ics) files.  This allows calendars to be localised.
-</p>
-
-<p>
-The format extracts certain properties from VEVENT objects.  The properties are limited to textual entries that would need to be localised, it does not include entries such as dates and durations that would indeed change for various locales.
-</p>
-
-</div>
-<!-- SECTION "iCalendar" [1-353] -->
-<h2><a name="resources" id="resources">Resources</a></h2>
-<div class="level2">
-<ul>
-<li class="level1"><div class="li"> <a href="http://tools.ietf.org/html/rfc2445" class="urlextern" title="http://tools.ietf.org/html/rfc2445">rfc2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar)</div>
-</li>
-<li class="level1"><div class="li"> iCal <a href="http://www.kanzaki.com/docs/ical/" class="urlextern" title="http://www.kanzaki.com/docs/ical/">spec</a> in a simple adaptation of the rfc that makes it easy to refer to all sections, items and attributes.</div>
-</li>
-<li class="level1"><div class="li"> <a href="http://vobject.skyhouseconsulting.com/" class="urlextern" title="http://vobject.skyhouseconsulting.com/">VObject</a> - the python library used to read the iCal file.</div>
-</li>
-<li class="level1"><div class="li"> <a href="http://severinghaus.org/projects/icv/" class="urlextern" title="http://severinghaus.org/projects/icv/">iCalender validator</a></div>
-</li>
-<li class="level1"><div class="li"> <a href="http://en.wikipedia.org/wiki/iCalendar" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/iCalendar">iCalendar</a></div>
-</li>
-<li class="level1"><div class="li"> <a href="http://upload.wikimedia.org/wikipedia/en/c/c0/ICalendarSpecification.png" class="urlextern" title="http://upload.wikimedia.org/wikipedia/en/c/c0/ICalendarSpecification.png">Components and their properties</a></div>
-</li>
-</ul>
-
-</div>
-<!-- SECTION "Resources" [354-961] -->
-<h2><a name="conformance" id="conformance">Conformance</a></h2>
-<div class="level2">
-
-<p>
-
-We are not creating iCal files, simply extracting localisable information and rebuilding the file.  We rely on VObject to ensure correctness.
-</p>
-
-<p>
-The following data is extracted:
-
-</p>
-<ul>
-<li class="level1"><div class="li"> VEVENT:</div>
-<ul>
-<li class="level2"><div class="li"> SUMMARY</div>
-</li>
-<li class="level2"><div class="li"> DESCRIPTION</div>
-</li>
-<li class="level2"><div class="li"> LOCATION</div>
-</li>
-<li class="level2"><div class="li"> COMMENTS</div>
-</li>
-</ul>
-</li>
-</ul>
-
-<p>
-
-No other sections are extracted.
-</p>
-
-</div>
-<!-- SECTION "Conformance" [962-1272] -->
-<h2><a name="notes" id="notes">Notes</a></h2>
-<div class="level2">
-
-</div>
-<!-- SECTION "Notes" [1273-1291] -->
-<h3><a name="languagenot_a_multilingual_solution" id="languagenot_a_multilingual_solution">LANGUAGE: not a multilingual solution</a></h3>
-<div class="level3">
-
-<p>
-
-It is possible to set the language attribute on an entry e.g.
-
-</p>
-<pre class="code">SUMMARY:LANGUAGE=af;New Year's Day</pre>
-
-<p>
-
-However since only one SUMMARY entry is allowed this does not allow you to specify multiple entries which would allow a single multilingual file.  With that in mind it is not clear why the LANGUAGE attribute is allowed, the examples they give are for LOCATION entries but that is still not clearly useful.
-</p>
-
-</div>
-<!-- SECTION "LANGUAGE: not a multilingual solution" [1292-1748] -->
-<h3><a name="broken_lotus_notes" id="broken_lotus_notes">Broken Lotus Notes</a></h3>
-<div class="level3">
-
-<p>
-
-Lotus notes creates broken iCalendar files.  They include _ (underscore) is some of the property names, [A-Z0-9\-] are the only valid chars.  Therefore, we require vobject >= v0.6.5 (but there is unfortunately no way to check for the version of vobject).  See vobject bug <a href="https://bugzilla.osafoundation.org/show_bug.cgi?id=12008" class="urlextern" title="https://bugzilla.osafoundation.org/show_bug.cgi?id=12008">#12008</a> for further details.
-</p>
-
-</div>
-<!-- SECTION "Broken Lotus Notes" [1749-2140] -->
-<h2><a name="development_notes" id="development_notes">Development Notes</a></h2>
-<div class="level2">
-
-<p>
-
-If we use LANGUAGE at all it will be to ensure that we specify that an entry is in a given language.
-</p>
-
-</div>
-<!-- SECTION "Development Notes" [2141-] --></body>
-</html>
diff -Nur translate-toolkit-1.2.0.ical/translate/storage/ical.py translate-toolkit-1.2.0/translate/storage/ical.py
--- translate-toolkit-1.2.0.ical/translate/storage/ical.py	2008-09-27 09:15:16.000000000 +0200
+++ translate-toolkit-1.2.0/translate/storage/ical.py	1970-01-01 02:00:00.000000000 +0200
@@ -1,130 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# 
-# Copyright 2007-2008 Zuza Software Foundation
-# 
-# This file is part of translate.
-#
-# translate 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.
-# 
-# translate 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 translate; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-"""Class that manages iCalender files for translation
-
-   Implementation
-   ==============
-   iCalendar files follow the U{RFC2445<http://tools.ietf.org/html/rfc2445>}
-   specification.
-
-   The iCalendar specification uses the following naming conventions:
-     - Component: an event, journal entry, timezone, etc
-     - Property: a property of a component: summary, description, start time, etc
-     - Attribute: an attribute of a property, e.g. language
-
-   The following are localisable in this implementation:
-     - VEVENT component: SUMMARY, DESCRIPTION, COMMENT and LOCATION properties
-
-   While other items could be localised this is not seen as important until use
-   cases arise.  In such a case simply adjusting the component.name and 
-   property.name lists to include these will allow expanded localisation.
-
-   LANGUAGE Attribute
-   ------------------
-   While the iCalendar format allows items to have a language attribute this is 
-   not used. The reason being that for most of the items that we localise they
-   are only allowed to occur zero or once.  Thus 'summary' would ideally
-   be present in multiple languages in one file, the format does not allow
-   such multiple entries.  This is unfortunate as it prevents the creation
-   of a single multilingual iCalendar file.
-
-   Future Format Support
-   ===================== 
-   As this format used U{vobject<http://vobject.skyhouseconsulting.com/>} which
-   supports various formats including U{vCard<http://en.wikipedia.org/wiki/VCard>}
-   it is possible to expand this format to understand those if needed.
-
-"""
-from translate.storage import base
-from StringIO import StringIO
-import re
-import vobject
-
-
-class icalunit(base.TranslationUnit):
-    """An ical entry that is translatable"""
-    def __init__(self, source=None, encoding="UTF-8"):
-        self.location = ""
-        if source:
-            self.source = source
-        super(icalunit, self).__init__(source)
-
-    def addlocation(self, location):
-        self.location = location
-
-    def getlocations(self):
-        return [self.location]
-
-class icalfile(base.TranslationStore):
-    """An ical file"""
-    UnitClass = icalunit
-    def __init__(self, inputfile=None, unitclass=icalunit):
-        """construct an ical file, optionally reading in from inputfile."""
-        self.UnitClass = unitclass
-        base.TranslationStore.__init__(self, unitclass=unitclass)
-        self.units = []
-        self.filename = ''
-        self._icalfile = None
-        if inputfile is not None:
-            self.parse(inputfile)
-
-    def __str__(self):
-        _outicalfile = self._icalfile
-        for unit in self.units:
-            for location in unit.getlocations():
-                match = re.match('\\[(?P<uid>.+)\\](?P<property>.+)', location)
-                for component in self._icalfile.components():
-                    if component.name != "VEVENT":
-                        continue
-                    if component.uid.value != match.groupdict()['uid']:
-                        continue
-                    for property in component.getChildren():
-                        if property.name == match.groupdict()['property']:
-                            property.value = unit.target
-                            
-        if _outicalfile:
-            return str(_outicalfile.serialize())
-        else:
-            return ""
-
-    def parse(self, input):
-        """parse the given file or file source string"""
-        if hasattr(input, 'name'):
-            self.filename = input.name
-        elif not getattr(self, 'filename', ''):
-            self.filename = ''
-        if hasattr(input, "read"):
-            inisrc = input.read()
-            input.close()
-            input = inisrc
-        if isinstance(input, str):
-            input = StringIO(input)
-            self._icalfile = vobject.readComponents(input).next()
-        else:
-            self._icalfile = vobject.readComponents(open(input)).next()
-        for component in self._icalfile.components():
-            if component.name == "VEVENT":
-                for property in component.getChildren():
-                    if property.name in ('SUMMARY', 'DESCRIPTION', 'COMMENT', 'LOCATION'):
-                        newunit = self.addsourceunit(property.value)
-                        newunit.addnote("Start date: %s" % component.dtstart.value)
-                        newunit.addlocation("[%s]%s" % (component.uid.value, property.name))


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/translate-toolkit/EL-5/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore	9 Nov 2006 14:18:58 -0000	1.6
+++ .cvsignore	16 Nov 2008 16:54:57 -0000	1.7
@@ -1 +1 @@
-translate-toolkit-0.10.1.tar.bz2
+translate-toolkit-1.2.0.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/translate-toolkit/EL-5/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources	9 Nov 2006 14:18:58 -0000	1.7
+++ sources	16 Nov 2008 16:54:57 -0000	1.8
@@ -1 +1 @@
-b9042e727f1dcd8b9427a7fb8127ba7e  translate-toolkit-0.10.1.tar.bz2
+f2e872c72898f1bc3afaa341affbfeb5  translate-toolkit-1.2.0.tar.bz2


Index: translate-toolkit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/translate-toolkit/EL-5/translate-toolkit.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- translate-toolkit.spec	9 Nov 2006 14:18:58 -0000	1.11
+++ translate-toolkit.spec	16 Nov 2008 16:54:57 -0000	1.12
@@ -1,30 +1,67 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           translate-toolkit
-Version:        0.10.1
+Version:        1.2.0
 Release:        1%{?dist}
-Summary:        A collection of tools to assist software localization
+Summary:        Tools to assist with translation and software localization
 
 Group:          Development/Tools
-License:        GPL
-URL:            http://translate.sourceforge.net/
-Source0:        http://dl.sourceforge.net/sourceforge/translate/translate-toolkit-%{version}.tar.bz2
+License:        GPLv2+
+URL:            http://translate.sourceforge.net/wiki/toolkit/index
+Source0:        http://downloads.sourceforge.net/translate/%{name}-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch0:         translate-poterminology-stoplist.diff
+Patch1:         translate-toolkit-1.2.0-vobject.patch
+
 BuildArch:      noarch
 BuildRequires:  python-devel
-Requires:       python-elementtree
+# EL-5 has gettext = 0.14.6
+Requires:       gettext
 Requires:       python-enchant
+Requires:       python-iniparse
+Requires:       python-Levenshtein
+Requires:       python-lxml
+# python-psyco not packaged for EL-5
+#Requires:       python-psyco
+# python-vobject not packaged for EL-5
+#Requires:       python-vobject
+
 
 %description
-The Translate Toolkit includes programs to convert various localization
-formats to the common gettext PO format and vice versa, and programs to
-check and manage PO files. Also part of the package are programs to create
-word counts, merge translations, and perform various checks on PO files.
+A set of tools for managing translation and software localization via 
+Gettext PO or XLIFF format files.
+
+Including:
+  * Convertors: convert from various formats to PO or XLIFF
+  * Formats:
+    * Core localization formats - XLIFF and Gettext PO
+    * Other localization formats - TMX, TBX, Qt Linguist (.ts), 
+           Java .properties, Wordfast TM
+    * Compiled formats: Gettext MO, Qt .qm
+    * Other formats - text, HTML, CSV, INI, wiki (MediaWiki, DokuWiki)
+    * Specialised - OpenOffice.org GSI/SDF, PHP,
+            Mozilla (.dtd, .properties, etc)
+  * Tools: count, search, debug, segment and extract terminology from
+            localization files.
+  * Checkers: validate translations with over 45 checks
+
+%package devel
+Summary:        Development API for %{name} applications
+Group:          Development/Tools
+License:        GPLv2+
+Requires:       %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains Translate Toolkit API 
+documentation for developers wishing to build new tools for the 
+toolkit or to use the libraries in other localization tools.
 
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1 -b .vobject
 
 
 %build
@@ -35,8 +72,29 @@
 rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
-# This removes the documentation files that were installed in site-packages
-find $RPM_BUILD_ROOT%{python_sitelib}/translate -type f -name "[[:upper:]]*" | xargs rm -fv
+# create manpages
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+for program in $RPM_BUILD_ROOT/%{_bindir}/*; do
+    case $(basename $program) in
+      pocompendium|poen|pomigrate2|popuretext|poreencode|posplit|pocount|poglossary|lookupclient.py)
+       ;;
+      *)
+        LC_ALL=C PYTHONPATH=. $program --manpage \
+          >  $RPM_BUILD_ROOT/%{_mandir}/man1/$(basename $program).1 \
+          || rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/$(basename $program).1
+          ;;
+    esac
+done
+
+# remove documentation files from site-packages
+rm -r $RPM_BUILD_ROOT/%{python_sitelib}/translate/doc
+rm $RPM_BUILD_ROOT/%{python_sitelib}/translate/{COPYING,ChangeLog,LICENSE,README}
+rm $RPM_BUILD_ROOT/%{python_sitelib}/translate/{convert,filters,tools}/TODO
+rm $RPM_BUILD_ROOT/%{python_sitelib}/translate/misc/README
+
+# Move data files to /usr/share
+mkdir  $RPM_BUILD_ROOT/%{_datadir}/translate-toolkit
+mv $RPM_BUILD_ROOT/%{python_sitelib}/translate/share/stoplist* $RPM_BUILD_ROOT/%{_datadir}/translate-toolkit
 
 
 %clean
@@ -46,20 +104,27 @@
 %files
 %defattr(-,root,root,-)
 %doc translate/ChangeLog translate/COPYING translate/README
-%dir %{python_sitelib}/translate
-%dir %{python_sitelib}/translate/tools
-%dir %{python_sitelib}/translate/filters
-%dir %{python_sitelib}/translate/storage
-%dir %{python_sitelib}/translate/misc
-%dir %{python_sitelib}/translate/convert
-%{python_sitelib}/translate/*.py*
-%{python_sitelib}/translate/*/*.py*
+%doc translate/doc/user/toolkit-[a-z]*
 %{_bindir}/*
+%{_mandir}/man1/*
+%{_datadir}/translate-toolkit
+%{python_sitelib}/translate*
 %exclude %{_bindir}/*.pyc
 %exclude %{_bindir}/*.pyo
 
+%files devel
+%defattr(-,root,root,-)
+%doc translate/doc/api/*
+
 
 %changelog
+* Sun Nov 16 2008 Dwayne Bailey <dwayne at translate.org.za> - 1.2.0-1
+- Update to 1.2.0
+- Patch poterminology to read stoplist-en from /usr/share/
+- Add devel package to include generated Translate Toolkit API documentation
+- Add dependencies: python-iniparse, python-Levenshtein, python-lxml,
+- Drop iCal support
+
 * Thu Nov 09 2006 Roozbeh Pournader <roozbeh at farsiweb.info> - 0.10.1-1
 - Update to upstream 0.10.1
 - Cleanup based on latest Python packaging guidelines




More information about the fedora-extras-commits mailing list