twitter/twitter-cldr-rb — pull request #125 by KL-7 (2014-07-29 01:50:12+00:00)
Title: Account for literal periods (and other special symbols) in number patterns

Some number patterns contain literal periods that are escaped using single quotes. E.g.:

```yaml
# from ru/numbers.yml
---
:ru:
:numbers:
:formats:
:decimal:
:short:
1000: "0 тыс'.'"
```
That results in an exception since our tokenizers/formatters do not expect this kind of syntax:

```ruby
1.9.3-p484 :001 > TwitterCldr.locale = :ru
=> :ru
1.9.3-p484 :002 > 1000.localize.to_short_decimal.to_s
ArgumentError: unexpected format string #
from /Users/klashuk/Coding/twitter-cldr-rb/lib/twitter_cldr/formatters/numbers/abbreviated/abbreviated_number_formatter.rb:20:in `truncate_number'
from /Users/klashuk/Coding/twitter-cldr-rb/lib/twitter_cldr/formatters/numbers/number_formatter.rb:28:in `format'
from /Users/klashuk/Coding/twitter-cldr-rb/lib/twitter_cldr/localized/localized_number.rb:42:in `to_s'
from (irb):2
from /opt/twitter/rvm/rubies/ruby-1.9.3-p484/bin/irb:12:in `

'
```

The simplest solution I came up with is replacing these escaped special symbols before tokenization with more distinct placeholders and replacing the placeholders with the symbols themselves afterwards.