User:NeilK/Worklog/2011-01-18 to 2011-01-24: Difference between revisions

From Wikimedia Foundation Governance Wiki
Content deleted Content added
NeilK (talk | contribs)
20th
 
NeilK (talk | contribs)
redirecting
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
#REDIRECT [[mw:User:NeilK/Worklog/2011-01-18_to_2011-01-24]]
== January 18, 2010 ==

Attended Features meeting remotely, but still too sick to work.

== January 19, 2010 ==

Sick

== January 20, 2010 ==

Sick of being sick, came into work although not 100% ready yet.

Worked a lot on the language library. Mdale's test suite has a lot of infrastructure and really only two tests (applied to many languages). Will port to Jasmine, so it can be much, much lighterweight, all the test-running infrastructure won't be needed.

Also, did not like how it obtained parsing results so slowly. Made a test spec generator which generates tests from the existing PHP implementation of the parser, saves as static JS which should be committed to repo.

Made a lot of progress -- now is running 50+ tests (combinatoric, languages * msgKeys * parameters), only problem seems to be that damn procPLURAL - it does not seem to be picking up new rules when we switch langs. Have to somehow tell it to reset itself and get new plural rules when we switch languages. Unsure how mdale's test is swinging that.

And then, rewriting the underlying library should be much simpler. Have in mind something that could probably do it all in just a few lines.

Uncertain about mdale's jquery case.

Roan, Trevor and I think that jquery magic makes more sense after the fact, after the base HTML has been made. The problem there is identifying the buttons after you've made them, since you can't rely on the same order in all languages.

Mdale wants to pass in event-bound jquery objects to templates, when constructing links or buttons, and have the library do complex swapping about with HTML and contained text. This however, is slightly inaccurate since it is at least theoretically possible to want two different buttons, with different bindings, but keyed off the same parameter... Still perhaps that case is too pathological to consider.

Perhaps the really right thing would be this:

<pre>
{{PLURAL this:$1|foo|bar}} blah blah {{PLURAL that:$1|foo|bar}}
</pre>

Then later, 'this' and 'that' become ids in the generated HTML. Still unsure...

Latest revision as of 04:30, 26 February 2011