jekyll-gettext-plugin 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +30 -7
- data/lib/jekyll/gettext/plugin/version.rb +1 -1
- data/lib/jekyll/gettext/plugin.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 436e3fea5b855f2cafb0f0778615ac2c170c2d9c
|
4
|
+
data.tar.gz: 74d014ed8dd18dd4185315a3993f130e117f9dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb344e5fad00b7cbf7bc48721d294f54bc7a236b10d3edc706511af19f23ff29e8bacd942d91fb8e8a72ec86b32992c718cb3fc75ad48eb8424f8f1450bd17f6
|
7
|
+
data.tar.gz: 54897ef4de7ec1aa26a2c6e280ccb97632851d0b80b7d0e0b4dac7b4b2441103ea80a0cc54aaf8db3dc95240406c0979e967e14f4702647112f06e63829279a6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
#
|
1
|
+
#Jekyll gettext plugin
|
2
2
|
|
3
|
-
A quick and dirty i18n plugin for jekyll based on gettext and po files
|
3
|
+
A quick and dirty i18n plugin for jekyll based on gettext and po files.
|
4
4
|
|
5
|
-
|
5
|
+
|
6
|
+
|
7
|
+
A lot of inspiration taken from [jekyll-multiple-languages-plugin](https://github.com/screeninteraction/jekyll-multiple-languages-plugin), it was just a little overkill for my needs and I wasn't a fan of managing translations in yaml files.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -20,10 +22,31 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
|
26
|
+
###Configuration
|
27
|
+
Add the i18n configuration to your _config.yml:
|
28
|
+
|
29
|
+
```yaml
|
30
|
+
languages: ["ja", "en", "ja"]
|
31
|
+
```
|
32
|
+
|
33
|
+
The first language in the array will be the default language, Japanese and English will be added in to separate subfolders.
|
34
|
+
|
35
|
+
###i18n
|
36
|
+
Create this folder structure in your Jekyll project as an example:
|
37
|
+
|
38
|
+
- _i18n/ja/ja.po
|
39
|
+
- _i18n/en/en.po
|
40
|
+
|
41
|
+
To add a string to your site use one of these
|
42
|
+
|
43
|
+
```liquid
|
44
|
+
{% t key %}
|
45
|
+
or
|
46
|
+
{% translate key %}
|
47
|
+
```
|
48
|
+
|
49
|
+
Liquid tags. This will pick the correct string from the `language.po` file during compilation, or add it if no translation exists so you can fill it in later.
|
27
50
|
|
28
51
|
## Contributing
|
29
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-gettext-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Doyle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_gettext
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
119
|
+
rubygems_version: 2.5.1
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: A quick and dirty i18n plugin for jekyll based on gettext and po files
|