What does # fuzzy value at the top of the xgettext generated .pot file mean?

When using xgettext to create a .pot file at the top of the generated file, I get the following:

 # SOME DESCRIPTIVE TITLE. ... #, fuzzy ... 

What does #, fuzzy mean?

I know what this means if the translation is fuzzy (this is poor quality), but what does it mean in the top of the .pot file?

+4
source share
2 answers

From gettext to Fuzzy-Entries :

Fuzzy records, even if they account for translated records for most other purposes, usually require a review by the translator. They can be obtained by using the msgmerge program to update old translated PO files according to the new PO template file, when this tool assumes that some new version of the resource has been modified only slightly from the old one, and selects a couple that it thinks to be an old translation for new modified record. A small change in the source string (msgid string) often needs to be reflected in the line feed, and this requires the intervention of a translator. For this reason, msgmerge may mark some entries as fuzzy.

I saw that #, fuzzy appears when creating a message file (.po) using Django and where the source text ( msgid ) was changed, in which case the translator should know that the translated text should also be changed.

0
source

xgettext adds the #, fuzzy entry at the top when it automatically generates the project title in the message file. Commentary does not have much significance as such: it simply notices that a person needs to come and fill in the blanks.

Let me go a little deeper into the source.

When you first create a message file, xgettext appends project information to the top of the created message file (if you don't pass --omit-header ):

 $ cat hello.c int main() { printf(gettext("Hello World\n")); return 0; } $ xgettext -o- hello.c # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR < EMAIL@ADDRESS >, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-06-08 11:51-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME < EMAIL@ADDRESS >\n" "Language-Team: LANGUAGE < LL@li.org >\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: hello.c:3 #, c-format msgid "Hello World\n" msgstr "" 

The logical support for this is in xgettext.c:construct_header() . The way down at the bottom of this function, the newly created header information is marked fuzzy:

 mp->is_fuzzy = true; 

Since this text was marked as fuzzy, the comment tag #, fuzzy added to the text. The goal here is to raise awareness: a computer program has added text to the message file, and the person needs to take action. In particular, a person should come and fill in the gaps: date of review, name of translator, language, etc.

Using "#, fuzzy" annotations makes sense in this context, as per the docs:

[Fuzzy notes] usually require a review of the translator.

0
source

All Articles