There is a first implementation of this in the Wikibase extension now: https://gerrit.wikimedia.org/r/#/c/28680/
This implements the html snippet functionality in PHP. The JS side will be next. 2012/10/18 Daniel Werner <[email protected]>: > Right now we are about to implement some kind of basic template Engine > to share HTML on the server side as well as on the client side in > JavaScript. Basically this will be a bunch of HTML snippets which we > will put into a resource loader module and send to the client. The > snippets will need some kind of placeholder which can then be replaced > with different content. The replacement would be done by some basic > parser which had to be implemented in PHP as well as JS. > > One thought was to simply use the MW message system for this. The > templates would of course get their own store, but the message parser > could perhaps be reused. $1 etc. could be used as placeholders and > even nice-to-haves such as PLURAL or {{int:}} would work out of the > box. > From a first look, it could be as easy as overwriting > Message::fetchMessage in as subclass. > Off course it had to be taken care of the JavaScript side as well. > Doesn't seem like mw.Message would be a problem. > > Any thoughts on this or does anyone know about some similar > implementation in any extensions? > > Cheers, > Daniel > > -- > Daniel Werner > Software Engineer > > Wikimedia Deutschland e.V. | Obentrautstr. 72 | 10963 Berlin > Tel. (030) 219 158 26-0 > > http://wikimedia.de > > Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V. > Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg > unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das > Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985. -- Daniel Werner Software Engineer Wikimedia Deutschland e.V. | Obentrautstr. 72 | 10963 Berlin Tel. (030) 219 158 26-0 http://wikimedia.de Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985. _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
