menu

Questions & Answers

remove fuzzy entries from django.po file?

How to remove all fuzzy entries from django.po files? When i run makemessage command it created lot of fuzzy files. Any solution?

Answers(3) :

Have your translators verify that the translations for those entries are still correct and remove the fuzzy flag.

Comments:
2023-01-20 00:55:11
why fuzzy flag created in django.po file?
2023-01-20 00:55:11
The I18N'ed string no longer matches exactly.

Gettext msgattrib is your friend.

Comments:
2023-01-20 00:55:11
ls **/*.po | xargs -n 1 -I @ msgattrib @ -o @ does work well. (ls **/*.po is a function in zsh)

You can search and replace using this regex ^#(\||,).*$ replace row found by empty. Then rerun the django-admin makemessages command.