gettext_simple 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +16 -1
- data/VERSION +1 -1
- data/gettext_simple.gemspec +1 -1
- data/lib/gettext_simple.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a384e7b157443ea0777813008727f62246b5d596
|
4
|
+
data.tar.gz: 550b003e7b7bf80c8f50b204d2e8f53f1fdb33f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16164102cf9c4d8e282979153b81cf903d67ab49242052387f42c678a21d312d9cc9be481851aac7978fd0f7981c189c1917bfd628b9b63a98434e91dd4b577e
|
7
|
+
data.tar.gz: a7a6624968f33de23ae65962b808abd8ddc8f7d1afa2c964c2b99de33972c91dddfd91ab1b68db2b1b28e762b020716cdd32847e129898e2c7a3f1d11ca75185
|
data/README.rdoc
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
= gettext_simple
|
2
2
|
|
3
|
-
|
3
|
+
A very simple implementation of Gettext for Ruby.
|
4
|
+
|
5
|
+
This is how it could be initialized in Rails and take the locale from I18n.locale:
|
6
|
+
```ruby
|
7
|
+
require "gettext_simple"
|
8
|
+
gettext_simple = GettextSimple.new(:i18n => true)
|
9
|
+
gettext_simple.load_dir("#{__dir__}/../../locales_gettext")
|
10
|
+
gettext_simple.register_kernel_methods
|
11
|
+
|
12
|
+
echo _("Hello world")
|
13
|
+
```
|
14
|
+
|
15
|
+
Replacements are done this way:
|
16
|
+
```ruby
|
17
|
+
echo _("Hello %{name}", :name => "Kasper") #=> "Hello Kasper"
|
18
|
+
```
|
4
19
|
|
5
20
|
== Contributing to gettext_simple
|
6
21
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/gettext_simple.gemspec
CHANGED
data/lib/gettext_simple.rb
CHANGED