10

Each time I added some strings to a Django project, I run "django-admin.py makemessages -all" to generate .PO files for all locales.

The problem is even I only added 5 news strings, the makemessages command will mark 50 strings as fuzzy in .PO files which brings a lot of extra work for our locale maintainers.

This also makes the entire i18n unusable before they manually revise those fuzzy strings.

jack
  • 17,261
  • 37
  • 100
  • 125
  • I second that this can be really frustrating considering Django telling me to reconsider translations that I've already manually written and verified just adds more work and doesn't seem helpful in any way. – MSB Jul 17 '18 at 08:26

2 Answers2

5

Removing fuzzy is exactly what I am doing... check this out.

http://code.djangoproject.com/ticket/10852

Sounds like we need extra sh script that automatically removes all the fuzzy from po.

chris
  • 128
  • 2
  • 10
2

You can use the gettext command line tools to do this now:

msgattrib --clear-fuzzy --empty -o /path/to/output.po /path/to/input.po

The Django management commands just call these tools directly, so you must have this installed. The makemessages uses msgattrib to clear the obsolete strings by setting the output to the same as the input, so I suspect you can do the same with the above to remove fuzzy strings.

From the msgattrib man page:

       --clear-fuzzy
              set all messages non-'fuzzy'

       --empty
              when removing 'fuzzy', also set msgstr empty
Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82