Edgewall Software

Opened 11 years ago

Last modified 11 years ago

#580 assigned enhancement

Add msgctxt support to genshi i18n filters

Reported by: eric.oconnell@… Owned by: hodgestar
Priority: major Milestone: 0.8
Component: Internationalization Version: 0.6
Keywords: context, msgcontext Cc:

Description

It is often desirable to be able to translate the same source text into two or more translated texts, e.g. "volunteer" is both a noun and a verb in English. This patch adds an i18n:ctxt directive to genshi which uses the msgctxt/pgettext family of functions.

Attachments (3)

msgctxt.patch (33.9 KB) - added by eric.oconnell@… 11 years ago.
msgctxt patch
msgctxt.2.patch (41.6 KB) - added by eric.oconnell@… 11 years ago.
updated patch to include docs and change from review
msgctxt.3.patch (43.2 KB) - added by hodgestar 11 years ago.
Update of msgctxt.2.patch to work with trunk (i.e. 0.8.x).

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by eric.oconnell@…

msgctxt patch

comment:1 Changed 11 years ago by hodgestar

  • Owner changed from cmlenz to hodgestar
  • Status changed from new to assigned

Generally looks really good -- thanks!

Couple of comments (also mentioned on IRC):

  • The if func not in contexted.values(): should be if func is not None:.
  • We'll need a documentation update before landing this.

Changed 11 years ago by eric.oconnell@…

updated patch to include docs and change from review

comment:2 Changed 11 years ago by eric.oconnell@…

@hodgestar, I've added some documentation and fixed the other issue you mentioned, but I believe you meant if func is None: rather than if func is not None:

Changed 11 years ago by hodgestar

Update of msgctxt.2.patch to work with trunk (i.e. 0.8.x).

comment:3 Changed 11 years ago by hodgestar

  • Milestone changed from 0.7 to 0.8

I realized that since this adds a new feature it probably only makes sense for it to go into 0.8.x. Does that work for you?

comment:4 Changed 11 years ago by eric.oconnell@…

I have no objections.

Note: See TracTickets for help on using tickets.