[wp-trac] Re: [WordPress Trac] #3687: translatable strings
descriptions
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 26 12:23:22 GMT 2007
#3687: translatable strings descriptions
----------------------------+-----------------------------------------------
Reporter: nbachiyski | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.2
Component: General | Version:
Severity: normal | Resolution:
Keywords: i18n has-patch |
----------------------------+-----------------------------------------------
Comment (by yskin):
{{{
-c, --add-comments[=TAG]
place comment block with TAG (or those preceding keyword lines) in output
file
}}}
I found it in the output of "xgettext --help".
Use this code:
{{{
/*auto comment*/
__('test');
}}}
Will get this in .pot file:
{{{
#. auto comment
msgid "test"
msgstr ""
}}}
The comment begin with “#.” is xgettext automatic comment. poEdit show it
in the top right box.
But I don't know how to use the "TAG". Maybe we can use a special tag for
translate description.
Update:
I have known how to use "TAG".
Code:
{{{
/*desc: auto comment */
__('test');
}}}
xgettext:
{{{
--add-comments=desc
}}}
.pot file:
{{{
#. desc: auto comment
msgid "test"
msgstr ""
}}}
“desc: auto comment” will be shown in the top right box in poEdit.
Sorry for my poor english. What about this method?
--
Ticket URL: <http://trac.wordpress.org/ticket/3687#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list