Opened 14 years ago
Closed 14 years ago
#400 closed defect (fixed)
[patch] template translation non-functional with directive namespace copied from wiki
Reported by: | hasienda <hoff.st@…> | Owned by: | hodgestar |
---|---|---|---|
Priority: | critical | Milestone: | 0.6.1 |
Component: | Documentation | Version: | 0.6 |
Keywords: | i18n directive namespace | Cc: |
Description
I've done i18n work for some Trac plugins by now. All share a critical problem:
While message extraction from Genshi HTML templates worked for all of them, I've got no translated messages into plugin output. At the same time translation of Python code from the same message catalogs worked, even embedded Python inside these templates, that went through untranslated. i18n:msg directives where even put unchanged into the output.
Attachments (1)
Change History (15)
comment:1 Changed 14 years ago by hasienda <hoff.st@…>
comment:2 Changed 14 years ago by hasienda <hoff.st@…>
- Summary changed from template translation non-functional with directive namespace copied from wiki to [patch] template translation non-functional with directive namespace copied from wiki
Well as the solution is already there, let's make this just more visible.
comment:3 Changed 14 years ago by cboos
- Milestone changed from 0.7 to 0.6.1
The Genshi documentation is not a wiki, so there's actually a patch needed, against source:branches/stable/0.6.x/doc/i18n.txt.
comment:4 Changed 14 years ago by hasienda <hoff.st@…>
And now?
If you expect me to do a patch, what would be trivial by just following the lines of the already included patch in comment:1, why don't you tell me explicitly? It took us nearly a week full of restless evenings to spot this one, and you seem to not be able/willing to just go and remove that one offending slash? Be sure, you have my fullest respect for creating and maintaining such a highly complex and powerful piece of code, but I can't get this one, at least not very positively, sorry.
comment:5 Changed 14 years ago by cboos
Well, sorry, not my project ;-)
I was just trying to give you hints about how to get the Genshi maintainers to notice the patch and check it in, and I switched the milestone to 0.6.1 as I also really would like to see this fixed.
Christopher, can you please apply the patch from comment:1, the doc seems to be really misleading and this apparently results in an error which is really hard to track down.
comment:6 Changed 14 years ago by hasienda <hoff.st@…>
Sorry Christoph, actually I've not looked at who made the comment. Not meant to be rude anyway.
As you said, let's not stay worrying, but just do it. Required patch is attached now as well. Hope that helps. I'm looking forward to see this corrected anytime soon. With Trac 0.12 out many more Trac plugin maintainers might get trapped unnecessarily by such silly small documentations shortcomings/typos.
Only after looking at the page source again I notice, that correct wording of the required namespace declaration is in the paragraph, and it's just the following example that is wrong.
comment:7 Changed 14 years ago by hasienda <hoff.st@…>
Christoph Christian, sorry again, not my best day today. Should really get some (more) sleep.
comment:8 Changed 14 years ago by hasienda <hoff.st@…>
Ping!
Catched someone this evening on IRC #trac @freenode.net, who uses Genshi without Trac, but got trapped by this one-slash-too-much issue too.
Anyone able to fix the docs in a more timely manner, now after even the trivial patch as been provided for months?
comment:9 Changed 14 years ago by hodgestar
- Owner changed from cmlenz to hodgestar
I've applied the documentation patch to the py3k-compatibility branch in r1147. This won't fix the documentation on the website but at least the patch is now in svn somewhere (and will get merged if/when the py3k branch does).
Thanks for the patch. :)
comment:10 Changed 14 years ago by hasienda <hoff.st@…>
Thanks for taking care and for mentioning this here too.
I was about to do that too, since it makes tracking the changes in repo much easier.
comment:11 Changed 14 years ago by hodgestar
- Resolution set to fixed
- Status changed from new to closed
Patch committed to trunk by asmodai in r1150.
comment:12 Changed 14 years ago by hodgestar
- Resolution fixed deleted
- Status changed from closed to reopened
I guess this should also be backported to 0.6.x?
comment:13 Changed 14 years ago by hasienda <hoff.st@…>
Sure, this is a issue for oldstable/stable Genshi 0.5/0.6 too. Thanks for taking care.
comment:14 Changed 14 years ago by hodgestar
- Resolution set to fixed
- Status changed from reopened to closed
Fix committed to 0.6.x in r1153. Fix doesn't seem relevant to 0.5.x.
Thanks to Carsten Klein I've been able to find the root cause: bad declaration of i18n directive namespace, as already stated in the title.
The bummer is, I've not invented this but copied literally from Genshi wiki docu. While consequences are reportedly fatal, the error is actually hard to spot:
http://genshi.edgewall.org/wiki/Documentation/i18n.html#id1
/">Same applies for http://genshi.edgewall.org/wiki/Documentation/0.6.x/i18n.html#id1
This is even more relevant as reference documentation for Trac plugin i18n procedures is linked to that page.
Since wiki is locked for anonymous users, I've to ask kindly here to have this fixed ASAP. Thanks for taking care.