Opened 18 years ago
Closed 18 years ago
#89 closed enhancement (fixed)
Support Pre-Filters
Reported by: | Pedro Algarvio, aka, s0undt3ch <ufs@…> | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.4 |
Component: | Template processing | Version: | 0.3.5 |
Keywords: | gettext | Cc: |
Description
Support Pre-Filters so we can start using and possibly improving the Localization Recipe.
I'm adding this ticket because my current work is the actual l10n support of my i18n enabled app for which I'm using Genshi. I don't mind waiting yet a bit more than keep trying to hack up a way to do it.
I've tried xgettext which actually behaves better than I though but some strings are still not extracted, for example:
<input type="submit" title="${ _('Edit Account') }" value="${ _('Edit Account') }" class="input_button" onClick="location_href($('uidsearch'));"/>
Those _('Edit Account')'s aren't being fetched by xgettext.
Change History (3)
comment:1 Changed 18 years ago by cmlenz
- Milestone 0.4 deleted
comment:2 Changed 18 years ago by Pedro Algarvio, aka, s0undt3ch <ufs@…>
Well, this request was to make use of the idea showed on the Localization Recipe by David Fraser.
Currently I'm working on I18NTollBox which uses the gettext tools, and, with the help of Matt Good also grabs the strings to translate from Genshi templates(in the future, probably more templating engines as well using the entry point provided).
So, although I was the one opening the ticket, the conversation should be done with David Fraser which prefers to grab and fill-in the translated strings on the fly, which aparently needs to be done "before genshi takes over", hence, the "pre-filters".
I prefer to state what I want to be translated with gettext calls on the genshi expressions. So, if you cannot reach David Fraser, this could actually be closed, and reopened only by him, if he still feels like it.
comment:3 Changed 18 years ago by cmlenz
- Milestone set to 0.4
- Resolution set to fixed
- Status changed from new to closed
This should be possible since [531]. You need to register a callback function with the TemplateLoader, and then insert your pre-filter at the start of the filters list when the callback is invoked.
I'm confused. What exactly do you mean with “pre-filter”?