User:NeilK/Worklog/2011-01-18 to 2011-01-24

From Wikimedia Foundation Governance Wiki
Revision as of 04:27, 21 January 2011 by NeilK (talk | contribs) (20th)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:

  {{PLURAL this:$1|foo|bar}} blah blah {{PLURAL that:$1|foo|bar}}

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