This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: msgfmt.py: fuzzy messages not correctly found
Type: Stage:
Components: Demos and Tools Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, hannosch, splitscreen
Priority: normal Keywords:

Created on 2006-03-16 15:00 by hannosch, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg27789 - (view) Author: Hanno Schlichting (hannosch) Date: 2006-03-16 15:00
In the msgfmt.py script which is installed in
%PYTHON_HOME%\Tools\i18n (on Windows) on line 129 to
131 it says:

# Record a fuzzy mark
if l[:2] == '#,' and l.find('fuzzy'):
    fuzzy = 1

this should be:

# Record a fuzzy mark
if l[:2] == '#,' and l.find('fuzzy') > -1:
    fuzzy = 1

or all lines beginning with '#,' will be treated as
fuzzy. Only change is the "> -1".

This applies to all versions of Python. It has been
brought to my attention by Andrey Lebedev who found
this in a product which uses a slightly modified msgfmt.py.
msg27790 - (view) Author: Matt Fleming (splitscreen) Date: 2006-04-01 15:16
Logged In: YES 
user_id=1126061

Yup, the bug is in trunk.

Although I suggest

# Record a fuzzy mark
if l[:2] == '#,' and 'fuzzy' in l:

as it's more readable (and I got shouted at by Tim the other
day for using s.find() when 'in' would have done).

Matt
msg27791 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-04-06 06:44
Logged In: YES 
user_id=849994

Fixed in rev. 43684, 43685.
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 43039
2006-03-16 15:00:43hannoschcreate