[ python-Bugs-1451341 ] msgfmt.py: fuzzy messages not correctly found

SourceForge.net noreply at sourceforge.net
Thu Apr 6 08:44:56 CEST 2006


Bugs item #1451341, was opened at 2006-03-16 15:00
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1451341&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Demos and Tools
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Hanno Schlichting (hannosch)
Assigned to: Nobody/Anonymous (nobody)
Summary: msgfmt.py: fuzzy messages not correctly found

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-06 06:44

Message:
Logged In: YES 
user_id=849994

Fixed in rev. 43684, 43685.

----------------------------------------------------------------------

Comment By: Matt Fleming (splitscreen)
Date: 2006-04-01 15:16

Message:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1451341&group_id=5470


More information about the Python-bugs-list mailing list