babel icon indicating copy to clipboard operation
babel copied to clipboard

A .po file without header is fuzzy

Open waxisien opened this issue 5 years ago • 5 comments

A catalog updated with the option --omit-header cannot be compiled and we have this message:

catalog themes {my path here} is marked as fuzzy, skipping

This is a problem because those headerless catalogs can't be compiled unless I use the --use-fuzzy option. It seems to be because we instantiate the Catalog class property fuzzy default to False (https://github.com/python-babel/babel/blob/master/babel/messages/catalog.py#L249) and the fuzzy prop is set later using the header message (https://github.com/python-babel/babel/blob/master/babel/messages/catalog.py#L631) which does not exist.

Am I missing something?

waxisien avatar Jan 20 '20 16:01 waxisien

It's my first time using Babel (and .po files in general) and I ran into this issue thinking that the header could be omitted without affecting compilation.

The header should just be informational, right?

dcecile avatar Mar 20 '20 02:03 dcecile

I think that this is a bug.

I don't know why the catalog defaults the fuzzy to True .

https://github.com/python-babel/babel/blob/cc36c84a83dd447bf48a6af3eb03c97bf299e8cb/babel/messages/catalog.py#L233

i think it should be False by default

adiroiban avatar Oct 14 '21 00:10 adiroiban

Same problem here.

ruizlenato avatar May 16 '23 00:05 ruizlenato

I've just run into this too

99littlebugs avatar May 16 '24 20:05 99littlebugs

I have as well. This topic seems so simple, but has so many sharp edges.

robertlagrant avatar Aug 08 '24 20:08 robertlagrant