twitter/twitter-cldr-rb — pull request #41 by gbadiali (2012-06-06 18:25:45+00:00)
Title: Adding ago

There are still a couple of issues with this, namely:

-When a resource is "prefix {{num}} suffix", the number is added in the middle, but whether the resource says "{{num}} suffix" or "prefix {{num}}", we always output "{{num}} suffix". This is because when we grab our tokens we don't pay attention to the location of the variable. The tokenizer should be keeping track of this.

-Similarly, sometimes (e.g. in Arabic), "{{num}} days ago" is actually a string that doesn't contain {{num}}. This case is not properly accounted for yet.

-Need to write some more tests.

-For some reason grabbing a resource like units.hours-ago.1 (where the path contains an int) doesn't work. Trying to fix this.

-Rounding and choosing a default unit (e.g. hour, sec) isn't very smart. Could be improved.

So -- still a bunch of things to be done, but wanted to get a review in!