Frage

I found out that one of them you can get parsed with Poedit: Inserting translator notes/comments in PHP files

But is that for "Comment" or "Notes for translators"? And what's the difference between the two? And how can I get the other one parsed?

War es hilfreich?

Lösung

Notes for translators are comments for translators - i.e. written by source code author. "Extracted comments" is the official gettext name for this. Comments are comments by translators; notes to self. Consequently, only the latter is editable and it makes no sense to "get it parsed".

Rationale for them can be found in this unofficial, but much better than GNU's, documentation of the file format:

http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html#sec-pomancmnt http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html#sec-poautocmnt

Andere Tipps

In Poedit, you can extract the "notes for translators" by using the following format:

// TRANSLATORS: your notes for translators ... _('some text') ...

In Poedit, in the File/Preferences/Extractors menu, you can choose how each parsed language handles the comments. Select your language, then click Edit and change the following line

xgettext --language=PHP --add-comments=TRANSLATORS: --add-comments=translators: --force-po -o %o %C %K %F

if you wish to change // TRANSLATORS: to e.g. // MY-OWN-NOTES:

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top