"Invite" StatusNet message

Jump to navigation Jump to search

And with Gettext it is common that one string is used in many places, if the developers don't use the context parameter often.

Nike19:41, 18 November 2009

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page.

Return to Thread:Support/"Invite" StatusNet message/Siebrand (2).

Ok, I've hacked in support for this, not yet used.

pgettext and npgettext are implemented as macros (wtf?!) in gettext.h and aren't provided in PHP's gettext module, but it was easy to add compatible wrappers and I've confirmed they actually seem to work. :)

Warning: xgettext by default doesn't recognize those as keywords for PHP source files, so these parameters must be added to the xgettext command-line when rebuilding the .po template:

   --keyword="pgettext:1c,2"
   --keyword="npgettext:1c,2,3"

Something like this, if consistently used, should do the trick: pgettext("tab", "Login") vs pgettext("button", "Login")

Anything else we should add to the list before we go contextualizing a bunch of messages?

brion23:09, 18 November 2009