Context support for gettext extension API

Bug #522405 reported by wouter bolsterlee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anewt
Fix Released
Wishlist
wouter bolsterlee

Bug Description

The gettext module extends the basic gettext functionality offered by PHP, but lacks the fairly recent context support API. In particular (pun intended), this includes dpgettext(), dnpgettext() and npgettext(). I think these can be implemented properly on top of the limited gettext support offered by PHP itself.

Tags: i18n
Revision history for this message
wouter bolsterlee (wbolster) wrote :

      [i18n] Implement contextual translation support

      Implemented the pgettext() function in PHP since it is not
      provided by the gettext bindings in PHP itself. The
      pgettext() function also has a C_() alias (inspired by the
      i18n support in GLib).

      The i18n.make script also correctly detects C_() when
      extracting translatable strings from source files.

      Part of bug #522405.

Changed in anewt:
assignee: nobody → Wouter Bolsterlee (uws) (uws)
status: Triaged → In Progress
Revision history for this message
wouter bolsterlee (wbolster) wrote :

 1765 Wouter Bolsterlee 2010-02-22
      [i18n] Implement dpgettext(), dnpgettext() and npgettext()

      Extended the pgettext() logic to support text domains and
      renamed it to dpgettext(); then pgettext() is just
      convenience API that invokes dpgettext() with the default
      text domain.

      Also added the dnpgettext() function for plurals with
      context, similar to the dpgettext() implementation. The
      npgettext() function is, just like pgettext(), just
      convenience API that invokes dnpgettext() with the default
      text domain.

      Also changed the i18n.make helper script so that it
      correctly extracts all strings from source files.

      Fixes bug #522405.

Changed in anewt:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.