Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocdaothanh committed Aug 12, 2015
1 parent 8f754bf commit b692150
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ Context
"""

val po = Parser.parsePo(string).right.get
po.t("Casual", "Hello") // => "Salut"
po.tc("Casual", "Hello") // => "Salut"

If there's no translation for the context, the translation without context is tried:

::

po.t("Missing context", "Hello") // => "Bonjour"
po.tc("Missing context", "Hello") // => "Bonjour"


Plural-Forms
Expand Down Expand Up @@ -89,9 +89,9 @@ It just removes spaces in the expression and performs string comparison. See
"""

val po = Parser.parsePo(string).right.get
po.t("I have one apple", "I have %d apples", 1)
po.t("I have one apple", "I have %d apples", 2)
po.t("A context", "I have one apple", "I have %d apples", 3)
po.tn("I have one apple", "I have %d apples", 1)
po.tn("I have one apple", "I have %d apples", 2)
po.tcn("A context", "I have one apple", "I have %d apples", 3)

Merge Po objects
----------------
Expand Down

0 comments on commit b692150

Please sign in to comment.