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
6ae5d7f2
Commit
6ae5d7f2
authored
Oct 31, 2007
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed gettext module for Windows. The metadata lines always end in \n and not in os.linesep
parent
c6ecfcd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
Lib/gettext.py
Lib/gettext.py
+1
-1
Lib/test/test_gettext.py
Lib/test/test_gettext.py
+1
-0
No files found.
Lib/gettext.py
View file @
6ae5d7f2
...
...
@@ -291,7 +291,7 @@ class GNUTranslations(NullTranslations):
if
mlen
==
0
:
# Catalog description
lastk
=
k
=
None
for
b_item
in
tmsg
.
split
(
os
.
linesep
.
encode
(
"ascii"
)):
for
b_item
in
tmsg
.
split
(
'
\
n
'
.
encode
(
"ascii"
)):
item
=
str
(
b_item
).
strip
()
if
not
item
:
continue
...
...
Lib/test/test_gettext.py
View file @
6ae5d7f2
...
...
@@ -332,6 +332,7 @@ class WeirdMetadataTest(GettextBaseTest):
def
test_weird_metadata
(
self
):
info
=
self
.
t
.
info
()
self
.
assertEqual
(
len
(
info
),
9
)
self
.
assertEqual
(
info
[
'last-translator'
],
'John Doe <jdoe@example.com>
\
n
Jane Foobar <jfoobar@example.com>'
)
...
...
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