https://bugzilla.wikimedia.org/show_bug.cgi?id=19190
Michael Dale <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Michael Dale <[email protected]> 2009-06-15 18:58:56 UTC --- As Trevor identifies we need to transition to less parsing in the msg text for javascript included msgs. Otherwise it becomes impossible to do localized interfaces in JavaScript without lots of external hits to the server for msg lookup. For example you have search results interface the result msg text: "{{PLURAL:$1|1 result|$1 results}} found". We presently can't use the mediawiki {{PLURAL}} since we have to do the $1 swap in JS. But it would not be hard to do basic parsing of "PLURAL" in the javascript. There are a few low hanging fruits that would cover a good percentage of the Language functions. But in general we will need to be aware of what msgs we include in the JS that have to use a specific subset of the Language helper functions. Likewise its not hard to parse [[link|linkName]] into <a href="'+wgArticlePath.replace($1, link)'">linkName</a>. I think we can do very decent coverage this way. I propose we do the following: 1) We port some of the simpler parser functions to JS and try and stick to that subset functionality for messages that are included in the JavaScript Interfaces. 2) We need to write some maintenance scripts so that we don't duplicate msg storage. ie we want to write the msg text once in the js file and have a script that copies that to the MessagesEn.php (with big comment headers that identify these msgs are copied from the js and to modify them in the js instead of here) -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
