mashpie/i18n-node — pull request #100 by peecky (2014-03-19 09:04:36+00:00)
Title: Add a post translator

I add an option to the configure function that cat set a post translator. The post translator is called after translating each locale. This is useful when translate Korean.

For example,

ko.json:

{
"I ate %s.": "나는 %s을(를) 먹었다.",
"banana": "바나나",
"watermelon": "수박"
}

eat.jade:

- var food1 = __('banana')
p= __('I ate %s.', food1)
- var food2 = __('watermelon')
p= __('I ate %s.', food2)

Each paragraph becomes '나는 바나나을(를) 먹었다.' and '나는 수박을(를) 먹었다.' respectively. However the correct sentences are '나는 바나나를 먹었다.' and '나는 수박을 먹었다.' Which of '을' or '를' should be used is determined by the word before of them.

This can be handled by a post translator. (One of a capable post translator is [Hangul Postposition](https://github.com/peecky/hangul-postposition)). That is why the post translator is needed.