Wednesday 15 April 2015

Identifying a standard gettext pot file -


Within my php framework (kcpHp), there is an i18n tool for creating pot files. The title of the file is generated in such a way:

  protected function _writeHeader () {$ output = "# LANGUAGE translation of KHHP application \ n"; $ Output = "# Copyright YEAR Name & lt; EMAIL @ ADDRESS & gt; \ n"; $ Output = "# \ N"; $ Output = "#, Fuzzy \ n"; $ Output = "" \ "\" \ N "; $ output. =" Msgstr \ "\" \ n "; $ output. =" \ "Project-id-version: project version \\ n \" \ n "; $ Output. = "\" POT-Creation-Date: ". Date: "YYYY-MM-DD HH: MM + ZZZ \\ n \" \\ n \ "\ n"; $ output. = " "$ Output. =" \ "Last-Translator: NAME & lt; EMAIL @ ADDRESS & gt; \\ n \" \ n "; $ Output. =" \ "Language-Team: LANGUAGE & lt; EMAIL @ ADDRESS & gt; \\ n \ "\ n"; $ output. = "\" Mime-version: 1.0 \\ n \ "\ n"; $ output. = "\" Content-type: text / plain ; Charset = utf-8 \\ n \ "\ n"; $ output. = "\" Content-transfer-encoding: 8 bit \\ n \ "\ n"; $ output. = "\" Plural-form: Nplurals = INTEGER; plural = EXPRESSION; \\ n \ "\ n \ n"; return $ output;}   

I'm curious to know what the following is:

  $ output. = "#, Fuzzy \ n"; $ output. = "" \ "\ "\ N"; $ Output = "Msgstr \" \ "\ n";   

Breaks certain types of gettext standards, if it does not, then I will have an explanation about why it should be placed in the header of the file.

I think this is 'fuzzy' because the headers are not full. That means the template entries will be filled when the PO files are generated from POT.

The official Gettext xgettext tool that generates POT files from the source code also adds the fuzzy flag. The header is definitely not against the standard by this token.

No comments:

Post a Comment