Template talk:Species id
Translating the templates themselves would seem the easiest route to go and make them very usable. An unfortunate side effect is the translate tags appear in the text. Would the Translatable Templates (TNT) somehow circumvent this? Or is there another solution that might occlude the translate tags?
- I don't think we will be able to use TNT with our current service provider. It requires the "Scribunto" extension which allows us to run Lua scripts directly from the Wiki, but that requires that they allow us to run PHP's proc_open() function, which would allow us to execute arbitrary binaries on their server. They are understandably averse to that, so it is highly unlikely that they will grant that privilege. I am looking into the translate tag side effect. Have you run across any documentation that explains what's going on with it? --Jomegat (talk) 07:04, 8 October 2014 (EDT)
It occurs to me that perhaps the <translate> tags are not nestable. In other words, it's not "legal" to do this:
<translate>
blah blah blah
<translate>
blah blah
</translate>
</translate>
</nowiki>
This is in effect what happens when we transclude a template that has a translate tag. I think to fix it, we would have to close the translate tags before including the templates, and then open a new translate tag afterwards:
</translate>
{{template}}
<translate>
It might be possible to slap that in the template itself a la:
</translate> // close the parent's tag
<translate> // open the template's tag
template code here
</translate> // close the template's tag
<translate> // re-open the parent's tag
However, that would happen even on pages that include the template, but do not have an open translate tag. For now, I think we should surround template transclusions with close/open tags. If there were a way to tell we had an open translate tag, the template could close/open itself, but... I don't know if that's possible. --Jomegat (talk) 12:07, 8 October 2014 (EDT)
- Unfortunately, if we close the translate tag, then include the template, then re-open a translate tag, the template's arguments will not get translated. I will try to find out if I can detect an open tag, and then close/re-open it in the template. --Jomegat (talk) 12:17, 8 October 2014 (EDT)
I see what you're saying. I'm still racking my brain just trying to figure out how to translate the AY Master template and other transcluded templates. --w126jep (talk) 23:49, 8 October 2014 (EDT)