Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f7bd964f
Commit
f7bd964f
authored
Jan 15, 2008
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1830 by Peter Harris, fix some 2.x-isms.
parent
386cd1e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
Tools/i18n/pygettext.py
Tools/i18n/pygettext.py
+3
-7
No files found.
Tools/i18n/pygettext.py
View file @
f7bd964f
...
...
@@ -453,11 +453,9 @@ class TokenEater:
# sort all the entries by their first item.
reverse
=
{}
for
k
,
v
in
self
.
__messages
.
items
():
keys
=
v
.
keys
()
keys
.
sort
()
keys
=
sorted
(
v
.
keys
())
reverse
.
setdefault
(
tuple
(
keys
),
[]).
append
((
k
,
v
))
rkeys
=
reverse
.
keys
()
rkeys
.
sort
()
rkeys
=
sorted
(
reverse
.
keys
())
for
rkey
in
rkeys
:
rentries
=
reverse
[
rkey
]
rentries
.
sort
()
...
...
@@ -469,8 +467,7 @@ class TokenEater:
# k is the message string, v is a dictionary-set of (filename,
# lineno) tuples. We want to sort the entries in v first by
# file name and then by line number.
v
=
v
.
keys
()
v
.
sort
()
v
=
sorted
(
v
.
keys
())
if
not
options
.
writelocations
:
pass
# location comments are different b/w Solaris and GNU:
...
...
@@ -662,7 +659,6 @@ def main():
if
__name__
==
'__main__'
:
main
()
# some more test strings
_
(
u'a unicode string'
)
# this one creates a warning
_
(
'*** Seen unexpected token "%(token)s"'
)
%
{
'token'
:
'test'
}
_
(
'more'
'than'
'one'
'string'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment