From: Aarni Koskela Date: Wed, 23 Dec 2015 20:57:34 +0000 (+0200) Subject: pofile: always sort message locations X-Git-Tag: 2.3.1~23^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc59c9c64ed285888a1bd929d55abbb63212e95b;p=thirdparty%2Fbabel.git pofile: always sort message locations Fixes #77 --- diff --git a/babel/messages/pofile.py b/babel/messages/pofile.py index e4c00afd..dfc78fec 100644 --- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -453,7 +453,7 @@ def write_po(fileobj, catalog, width=76, no_location=False, omit_header=False, if not no_location: locs = [] - for filename, lineno in message.locations: + for filename, lineno in sorted(message.locations): if lineno: locs.append(u'%s:%d' % (filename.replace(os.sep, '/'), lineno)) else: