diff options
author | José Carlos Nieto <xiam@menteslibres.org> | 2013-02-21 06:21:43 -0500 |
---|---|---|
committer | José Carlos Nieto <xiam@menteslibres.org> | 2013-02-21 06:21:43 -0500 |
commit | 98b7b91596d20b96909e6b60d57411547dd9959c (patch) | |
tree | 3ddf584364c4fe156042b188b5d03acf03510b83 /README.md | |
parent | Typo (diff) | |
download | gotext-98b7b91596d20b96909e6b60d57411547dd9959c.tar.gz gotext-98b7b91596d20b96909e6b60d57411547dd9959c.tar.xz |
Styling typos.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -13,7 +13,7 @@ have it. Use `go get` to download and install the binding: ```sh -% go get github.com/gosexy/gettext +go get github.com/gosexy/gettext ``` ## Usage @@ -43,8 +43,8 @@ You can use `os.Setenv` to set the `LANGUAGE` environment variable or set it on a terminal: ```sh -% export LANGUAGE="es_MX.utf8" -% ./gettext-program +export LANGUAGE="es_MX.utf8" +./gettext-program ``` Note that `xgettext` does not officially support Go syntax yet, however, you @@ -52,7 +52,8 @@ can generate a valid `.pot` file by forcing `xgettest` to use the C++ syntax: ```sh -% xgettext -d example -s gettext_test.go -o example.pot -L c++ -i --keyword=NGettext:1,2 --keyword=Gettext +xgettext -d example -s gettext_test.go -o example.pot -L c++ -i \ +--keyword=NGettext:1,2 --keyword=Gettext ``` This will generate a `example.pot` file. @@ -61,30 +62,30 @@ After translating the `.pot` file, you must generate `.po` and `.mo` files and remember to set the UTF-8 charset. ```sh -% msginit -l es_MX -o example.po -i example.pot -% msgfmt -c -v -o example.mo example.po +msginit -l es_MX -o example.po -i example.pot +msgfmt -c -v -o example.mo example.po ``` Finally, move the `.mo` file to an appropriate location. ```sh -% mv example.mo examples/es_MX.utf8/LC_MESSAGES/example.mo +mv example.mo examples/es_MX.utf8/LC_MESSAGES/example.mo ``` ## Documentation You can read `gosexy/gettext` documentation from a terminal -```go -% go doc github.com/gosexy/gettext +```sh +go doc github.com/gosexy/gettext ``` Or you can [browse it](http://godoc.org/github.com/gosexy/gettext) online. The original gettext documentation could be very useful as well: -```go -% man 3 gettext +```sh +man 3 gettext ``` Here's another [good tutorial][2] on using gettext. |