Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2012 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

[PATCH] tg-I18n and string collection

Reported by: cgabriel Owned by: Chris Arndt
Priority: normal Milestone: 1.1b2
Component: I18n Version: 1.0.7
Severity: major Keywords: needs tests, needs review
Cc:

Description

I found a problem in the i18n string collection in TG 1.0.x using the pygettext module.

Basically, it won't collect strings marked for translation using the tg_i18n model, so strings like

_("Hello", lang)

won't be collected. I've patched the pygettext to get it work, attached to this ticket.

Attachments

pygettext_tg.patch Download (800 bytes) - added by cgabriel 8 years ago.
patch for pygettext distributed with TG 1.0.x to collect _("String", lang) marked strings.

Change History

Changed 8 years ago by cgabriel

patch for pygettext distributed with TG 1.0.x to collect _("String", lang) marked strings.

comment:1 Changed 8 years ago by Chris Arndt

  • Owner changed from anonymous to Chris Arndt
  • Status changed from new to assigned
  • Milestone changed from 1.1 to 1.1 beta 2
  • Component changed from Toolbox.admi18n to I18n
  • Summary changed from tg-I18n and string collection to [PATCH] tg-I18n and string collection

Look good, will apply this asap.

Next time, please create patches form the root of your checkout of the TurboGears branch. See also  http://docs.turbogears.org/patching_guidelines.

comment:2 Changed 8 years ago by Chris Arndt

  • Keywords needs tests, needs review added

comment:3 Changed 8 years ago by cgabriel

Sure, sorry. I was in hurry working on a production machine that day :) I've tested it a bit, seems good.

comment:4 Changed 8 years ago by faide

+1

comment:5 Changed 8 years ago by Chris Arndt

@cgabriel: Can you provide a test, so we can include this patch in the upcoming 1.1b2 release this weekend? I currently do not have the time to do this, so I fear it will not make it in to the release unless you provide a test.

You can add a test module to turbogears.i18n.tests. See  http://docs.turbogears.org/1.1/Testing on how to write tests. You onyl need to test the TokenEater class here, though, no need to create a TurboGears app for testing here.

comment:6 Changed 8 years ago by faide

applied in 1.0 branch (r5677) and 1.1 branch (r5678)

comment:7 Changed 8 years ago by faide

applied in 1.5 branch (r5679)

comment:8 Changed 8 years ago by faide

  • Status changed from assigned to closed
  • Resolution set to fixed

applied after adding some tests.(basic tests)

Note: See TracTickets for help on using tickets.