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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d29b23ce321d711410516a1d392614b4817841a3
4
- data.tar.gz: 3d375ae59fa9a03015f872a2ff9234622951304b
3
+ metadata.gz: 436e3fea5b855f2cafb0f0778615ac2c170c2d9c
4
+ data.tar.gz: 74d014ed8dd18dd4185315a3993f130e117f9dfe
5
5
  SHA512:
6
- metadata.gz: 89a880a095db37a739493400ef55abb5ee38f532da4438eeadefef0494835eaf6a66a53649ddb65bb8f3395f7e79e837651d5dab3c3b5997a171ea1adcbf9a25
7
- data.tar.gz: 3dd62bf516e3ed2c4881325a8f62747631123a18ea955b26087e665db53924505bf471d3c0167d161ad61be01ade305812eb5790e78ecd6cea17c50bc8adf7c8
6
+ metadata.gz: eb344e5fad00b7cbf7bc48721d294f54bc7a236b10d3edc706511af19f23ff29e8bacd942d91fb8e8a72ec86b32992c718cb3fc75ad48eb8424f8f1450bd17f6
7
+ data.tar.gz: 54897ef4de7ec1aa26a2c6e280ccb97632851d0b80b7d0e0b4dac7b4b2441103ea80a0cc54aaf8db3dc95240406c0979e967e14f4702647112f06e63829279a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-gettext-plugin (0.0.3)
4
+ jekyll-gettext-plugin (0.0.4)
5
5
  fast_gettext (~> 0.8)
6
6
  get_pomo (~> 0.6)
7
7
 
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # Jekyll::Gettext::Plugin
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
- 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.
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
- - In _config.yml, add a languages array where the first one is your primary language, for example `languages: ["ja", "ja", "en"]`
24
- - For each language, make sure there is a po file in `_i18n/<LANG>/<LANG>.po`. So if you're doing japanese translations for the first time you'd do something like `mkdir -p _i18n/ja && touch _i18n/ja/ja.po`
25
- - Use tags that look like this {% t hey there! %} in your web pages
26
- - Any time jekyll builds, the plugin will add any new keys to the po file. Fill these in and rebuild to see the translated website. Each translated website is served at a url relative to that language, IE `http://localhost:8080/ja/`, `http://localhost:8080/en/`, etc.
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
 
@@ -1,7 +1,7 @@
1
1
  module Jekyll
2
2
  module Gettext
3
3
  module Plugin
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -25,6 +25,7 @@ module Jekyll
25
25
  include FastGettext::Translation
26
26
 
27
27
  alias :process_org :process
28
+ attr_accessor :dest
28
29
  def process
29
30
  if !self.config['baseurl']
30
31
  self.config['baseurl'] = ""
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.3
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: 2014-03-06 00:00:00.000000000 Z
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.2.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