Only in Pootle-toolkit-1.2/Pootle/: ChangeLog.pre-0.8 Only in Pootle-toolkit-1.2/Pootle/: createpootlepot Only in Pootle-toolkit-1.2/Pootle/: CREDITS Only in Pootle-toolkit-1.2/Pootle/: .cvsignore diff -ru Pootle-1.2.1/Pootle/indexpage.py Pootle-toolkit-1.2/Pootle/indexpage.py --- Pootle-1.2.1/Pootle/indexpage.py 2008-09-22 10:45:47.000000000 -0600 +++ Pootle-toolkit-1.2/Pootle/indexpage.py 2009-03-09 09:51:27.000000000 -0600 @@ -441,7 +441,7 @@ self.project.uploadfile(self.session, self.dirname, uploadfile.filename, uploadfile.contents, overwrite) self.project.scanpofiles() elif uploadfile.filename.endswith(".zip"): - self.project.uploadarchive(self.session, self.dirname, uploadfile.contents) + self.project.uploadarchive(self.session, self.dirname, uploadfile.contents, overwrite) self.project.scanpofiles() else: raise ValueError(self.localize("Can only upload PO files and zips of PO files")) Only in Pootle-1.2.1/Pootle/: LICENSE Only in Pootle-toolkit-1.2/Pootle/po: terminology diff -ru Pootle-1.2.1/Pootle/pootlefile.py Pootle-toolkit-1.2/Pootle/pootlefile.py --- Pootle-1.2.1/Pootle/pootlefile.py 2008-12-02 07:09:32.000000000 -0700 +++ Pootle-toolkit-1.2/Pootle/pootlefile.py 2009-08-25 06:42:21.000000000 -0600 @@ -618,11 +618,9 @@ # We can't use the multistring, because it might contain more than two # entries in a PO xliff file. Rather use the singular. source = unicode(newpo.source) - if source in self.sourceindex: - oldpo = self.sourceindex[source] - matches.append((oldpo, newpo)) - else: - matches.append((None, newpo)) + oldpo = self.findunit(source) + matches.append((oldpo, newpo)) + # find items that have been removed matcheditems = set(oldpo for oldpo, newpo in matches if oldpo) for oldpo in self.units: Only in Pootle-toolkit-1.2/Pootle/: profiling diff -ru Pootle-1.2.1/Pootle/projects.py Pootle-toolkit-1.2/Pootle/projects.py --- Pootle-1.2.1/Pootle/projects.py 2008-12-03 08:22:18.000000000 -0700 +++ Pootle-toolkit-1.2/Pootle/projects.py 2009-08-25 06:42:21.000000000 -0600 @@ -643,7 +643,7 @@ archive.close() return archivecontents.getvalue() - def uploadarchive(self, session, dirname, archivecontents): + def uploadarchive(self, session, dirname, archivecontents, overwrite): """uploads the files inside the archive""" def unzip_external(archivecontents): @@ -667,7 +667,7 @@ print "error adding %s: not a %s file" % (fname, os.extsep + self.fileext) continue fcontents = open(os.path.join(path, fname), 'rb').read() - self.uploadfile(session, path[len(basedir)+1:], fname, fcontents) + self.uploadfile(session, path[len(basedir)+1:], fname, fcontents, overwrite) os.path.walk(tempdir, upload, tempdir) return finally: @@ -687,7 +687,7 @@ subdirname, pofilename = os.path.dirname(filename), os.path.basename(filename) try: # TODO: use zipfile info to set the time and date of the file - self.uploadfile(session, os.path.join(dirname, subdirname), pofilename, contents) + self.uploadfile(session, os.path.join(dirname, subdirname), pofilename, contents, overwrite) except ValueError, e: print "error adding %s" % filename, e continue @@ -1363,7 +1363,7 @@ pofile.makeindex() elif not hasattr(pofile, "sourceindex"): pofile.makeindex() - unit = pofile.sourceindex.get(message, None) + unit = pofile.findunit(message) if not unit or not unit.istranslated(): continue tmsg = unit.target @@ -1377,7 +1377,7 @@ try: if pofile.pofreshen() or not hasattr(pofile, "sourceindex"): pofile.makeindex() - unit = pofile.sourceindex.get(message, None) + unit = pofile.findunit(message) if not unit or not unit.istranslated(): continue tmsg = unit.target @@ -1402,7 +1402,7 @@ nplural, pluralequation = pofile.getheaderplural() if pluralequation: pluralfn = gettext.c2py(pluralequation) - unit = pofile.sourceindex.get(singular, None) + unit = pofile.findunit(singular) if not unit or not unit.istranslated(): continue tmsg = unit.target.strings[pluralfn(n)] diff -ru Pootle-1.2.1/Pootle/templates/login.html Pootle-toolkit-1.2/Pootle/templates/login.html --- Pootle-1.2.1/Pootle/templates/login.html 2008-10-01 04:21:10.000000000 -0600 +++ Pootle-toolkit-1.2/Pootle/templates/login.html 2008-12-15 07:49:52.000000000 -0700 @@ -11,9 +11,18 @@ + + diff -ru Pootle-1.2.1/Pootle/translatepage.py Pootle-toolkit-1.2/Pootle/translatepage.py --- Pootle-1.2.1/Pootle/translatepage.py 2008-09-30 01:55:22.000000000 -0600 +++ Pootle-toolkit-1.2/Pootle/translatepage.py 2009-06-05 13:07:01.000000000 -0600 @@ -576,6 +576,8 @@ def escapetext(self, text, fancyspaces=True, stripescapes=False): """Replace special characters &, <, >, add and handle escapes if asked.""" + if not text: + return u"" text = text.replace("&", "&") # Must be done first! text = text.replace("<", "<").replace(">", ">") @@ -615,6 +617,8 @@ return text def escapefortextarea(self, text): + if not text: + return u"" text = text.replace("&", "&") # Must be done first! text = text.replace("<", "<").replace(">", ">") text = text.replace("\r\n", '\\r\\n') @@ -745,6 +749,8 @@ diffs should be list of diff opcodes issrc specifies whether to use the src or destination positions in reconstructing the text this escapes the text on the fly to prevent confusion in escaping the highlighting""" + if not text: + return u"" if issrc: diffstart = [(i1, 'start', tag) for (tag, i1, i2, j1, j2) in diffs if tag != 'equal'] diffstop = [(i2, 'stop', tag) for (tag, i1, i2, j1, j2) in diffs if tag != 'equal']