[xwiki-devs] document bundles "execution"?
Hello list, I just realized that there seems to be very little executable code interpreted in the document bundle documents. I was simply trying to make a document that is declared as document- bundle to be an include of another document and it did not work with any of the include methods I found at http://platform.xwiki.org/xwiki/bin/view/DevGuide/IncludeInVelocity should it work? But maybe no script is running in the programme that reads the document-bundle in which case this is easily understandable. Another reason for which it would be lovely to have scripting in document-bundles is in bundles that repeat a lot. In Curriki this is often the case because bundles come from different applications and may, indeed, in the very long run, become different (e.g. because we reach yet another language or...): here I would love that for English, at least, it is explicitly written key.name = $msg.get('other.key.name') is that thinkable? thanks in advance paul
Paul Libbrecht wrote:
Hello list,
I just realized that there seems to be very little executable code interpreted in the document bundle documents.
I was simply trying to make a document that is declared as document-bundle to be an include of another document and it did not work with any of the include methods I found at http://platform.xwiki.org/xwiki/bin/view/DevGuide/IncludeInVelocity should it work?
But maybe no script is running in the programme that reads the document-bundle in which case this is easily understandable.
Another reason for which it would be lovely to have scripting in document-bundles is in bundles that repeat a lot. In Curriki this is often the case because bundles come from different applications and may, indeed, in the very long run, become different (e.g. because we reach yet another language or...): here I would love that for English, at least, it is explicitly written
key.name = $msg.get('other.key.name')
is that thinkable?
Yes, it does make sense. Currently we're manually calling $xwiki.parseContent($msg.get("...")) in order to do this. I guess this is a viable feature for the localization component, feel free to create a Jira issue for this, so that we don't forget about it. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Le 14-janv.-09 à 03:52, Sergiu Dumitriu a écrit :
indeed, in the very long run, become different (e.g. because we reach yet another language or...): here I would love that for English, at least, it is explicitly written key.name = $msg.get('other.key.name') is that thinkable?
Yes, it does make sense. Currently we're manually calling $xwiki.parseContent($msg.get("...")) in order to do this. I guess this is a viable feature for the localization component, feel free to create a Jira issue for this, so that we don't forget about it.
Wouldn't an easier approach would be a translation committer, activated by a link or automatically thanks to the notification, which does the necessary execution and saves the result at the right place. What would the code look like to: - read source of the current - "execute it" (with current context) - save result to another page This may be very small if I think of it. paul
participants (2)
-
Paul Libbrecht -
Sergiu Dumitriu