jekyll-multiple-languages-plugin 1.2.1 → 1.2.2

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: 437382c6919e0f607b4bb0d5b98d514704b1fd17
4
- data.tar.gz: 36b3c661881ae56a5d12f6d8fe3ddaa3bc835c9a
3
+ metadata.gz: fe3855f441762da2b1d4a9737a2e273bac6a639d
4
+ data.tar.gz: aab8762a89829c8b565831f9727ff7c02710784c
5
5
  SHA512:
6
- metadata.gz: eb3a7852cbb502d63aedf98ca78ed2c23fd1c9979699f507f82a3b82cf22fcffc3d9f5118dbe60e3ef2f999f74a945d7f387c7c37eae8e5abf1bcf320bc5101d
7
- data.tar.gz: fa407baf34ff429f22fc13830d826046abcba230995f8ba3c72981f7f5df1c5a7db1721ffc97293ab404d35c184ed2d998934d97f23f7c7cdf8ca681acfbabf8
6
+ metadata.gz: c696bf500206369ab839d2649dfa7a44f268c0897ac61a4dce146c4467de208fe42efe660be6254ea44fbb0683e2442810d82bb0cce904148253e20052abd0ef
7
+ data.tar.gz: 5564ef20925fa8cbdadd669aae6db1a9b51d8d7d34c6d9036d4e0f23afbe1d569f558c6a393eabe6e88c094df66fb99b515e8b557db1057a940fc5d6bd4cfa7e
data/README.md CHANGED
@@ -12,19 +12,19 @@ This plugin is available as a Rubygem, https://rubygems.org/gems/jekyll-multiple
12
12
 
13
13
  Add this line to your application's Gemfile:
14
14
 
15
- gem 'jekyll-multiple-languages-plugin'
15
+ gem 'jekyll-multiple-languages-plugin'
16
16
 
17
17
  And then execute:
18
18
 
19
- $ bundle
19
+ $ bundle
20
20
 
21
21
  Or install it yourself as:
22
22
 
23
- $ gem install jekyll-multiple-languages-plugin
23
+ $ gem install jekyll-multiple-languages-plugin
24
24
 
25
25
  To activate the plugin add this line in to a *.rb file in the _plugins directory:
26
26
 
27
- require 'jekyll/multiple/languages/plugin'
27
+ require 'jekyll/multiple/languages/plugin'
28
28
 
29
29
 
30
30
  ### Submodule
@@ -33,12 +33,12 @@ manage your plugins by utilizing git submodules.
33
33
 
34
34
  To install this plugin as a git submodule:
35
35
 
36
- git submodule add git://github.com/screeninteraction/jekyll-multiple-languages-plugin.git _plugins/multiple-languages
36
+ git submodule add git://github.com/screeninteraction/jekyll-multiple-languages-plugin.git _plugins/multiple-languages
37
37
 
38
38
  To update:
39
39
 
40
- cd _plugins/multiple-languages
41
- git pull origin master
40
+ cd _plugins/multiple-languages
41
+ git pull origin master
42
42
 
43
43
 
44
44
  ### Copy file
@@ -54,8 +54,24 @@ Copy or link the file `lib/jekyll/multiple/languages/plugin.rb` into your `_plug
54
54
  * Contains an example web site thanks to [@davrandom](https://github.com/davrandom/)
55
55
  * Supports translated keys in YAML format
56
56
  * Supports translated template files
57
- * *NEW!* Supports writing translated posts
58
- * *NEW!* Supports Octopress
57
+
58
+ ##Changelog
59
+ * 1.2.2
60
+ * Supports translated posts in Octopress
61
+ * 1.2.1
62
+ * Supports writing translated posts in Jekyll
63
+ * Supports Octopress
64
+ * 1.2.0
65
+ * Renamed the project to jekyll-multiple-languages-plugin
66
+ * 1.1.2
67
+ * Support for both variables and strings in ```translate_file```
68
+ * 1.1.1
69
+ * Fixed documentation
70
+ * 1.1.0
71
+ * Pull request that removed dirty forward slash from URLs
72
+ * 1.0.0
73
+ * First release
74
+
59
75
 
60
76
  ##Usage
61
77
  ###Configuration
@@ -70,14 +86,14 @@ The first language in the array will be the default language, English, German an
70
86
  ###i18n
71
87
  Create this folder structure in your Jekyll project as an example:
72
88
 
73
- - /_i18n/sv.yml
74
- - /_i18n/en.yml
75
- - /_i18n/de.yml
76
- - /_i18n/fr.yml
77
- - /_i18n/sv/pagename/blockname.md
78
- - /_i18n/en/pagename/blockname.md
79
- - /_i18n/de/pagename/blockname.md
80
- - /_i18n/fr/pagename/blockname.md
89
+ - /_i18n/sv.yml
90
+ - /_i18n/en.yml
91
+ - /_i18n/de.yml
92
+ - /_i18n/fr.yml
93
+ - /_i18n/sv/pagename/blockname.md
94
+ - /_i18n/en/pagename/blockname.md
95
+ - /_i18n/de/pagename/blockname.md
96
+ - /_i18n/fr/pagename/blockname.md
81
97
 
82
98
  To add a string to your site use one of these
83
99
 
data/example/_i18n/en.yml CHANGED
@@ -1,9 +1,10 @@
1
1
  global:
2
- italian: Italiano
3
- english: English
4
- spanish: Español
5
- tagline: English
2
+ italian: Italiano
3
+ english: English
4
+ spanish: Español
5
+ tagline: English
6
+ about: About
7
+ twitter: Twitter
8
+ github: GitHub
6
9
  pages:
7
- example: example
8
- # home: Home
9
- # work: Work
10
+ example: example
@@ -0,0 +1,2 @@
1
+ ### Footer
2
+ This is a translated footer!
data/example/_i18n/es.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  global:
2
- italian: Italiano
3
- english: English
4
- spanish: Español
5
- tagline: Español
6
- #pages:
7
- # home: Home
8
- # work: Work
2
+ italian: Italiano
3
+ english: English
4
+ spanish: Español
5
+ tagline: Español
6
+ about: Sobre
7
+ twitter: Twitter
8
+ github: GitHub
9
+ pages:
10
+ example: Ejemplo
@@ -0,0 +1,2 @@
1
+ ### Footer
2
+ Se trata de un pie de página traducida!
data/example/_i18n/it.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  global:
2
- italian: Italiano
3
- english: English
4
- spanish: Español
5
- tagline: Italiano
6
- #pages:
7
- example: esempio
8
- # work: Work
2
+ italian: Italiano
3
+ english: English
4
+ spanish: Español
5
+ tagline: Italiano
6
+ about: Riquardo
7
+ twitter: Twitter
8
+ github: GitHub
9
+ pages:
10
+ example: Esempio
@@ -0,0 +1,2 @@
1
+ ### Footer
2
+ Questo è un footer tradotto!
@@ -23,9 +23,6 @@
23
23
  <div class="site">
24
24
  <div class="sidebar" id="sidebar">
25
25
  <div class="header">
26
- <a class="link-it" href="{{ site.baseurl_root }}/">it</a>
27
- <a class="link-en" href="{{ site.baseurl_root }}/en">en</a>
28
- <a class="link-es" href="{{ site.baseurl_root }}/es">es</a>
29
26
 
30
27
  <h1 class="title"><a href="/"><img id="logo" src="/images/logo.png"></a></h1>
31
28
  <span class="tagline">{% t global.tagline %}</span>
@@ -43,11 +40,16 @@
43
40
  </div>
44
41
  <div class="footer">
45
42
  <span id="footer-links">
46
- <a href="" class="footer-link">About</a> <span class="separator">&bull;</span>
47
- <a href="" class="footer-link">Twitter</a> <span class="separator">&bull;</span>
48
- <a href="" class="footer-link">GitHub</a>
43
+ <a href="" class="footer-link">{% t global.about %}</a> <span class="separator">&bull;</span>
44
+ <a href="" class="footer-link">{% t global.twitter %}</a> <span class="separator">&bull;</span>
45
+ <a href="" class="footer-link">{% t global.github %}</a>
49
46
  </span>
50
47
  </div>
48
+ {% tf footer.md %}
49
+ <br />
50
+ <a class="link-it" href="{{ site.baseurl_root }}/">it</a>
51
+ <a class="link-en" href="{{ site.baseurl_root }}/en">en</a>
52
+ <a class="link-es" href="{{ site.baseurl_root }}/es">es</a>
51
53
  </div>
52
54
 
53
55
  {{ content }}
@@ -2,7 +2,4 @@
2
2
  layout: default
3
3
  ---
4
4
  {% include post.html %}
5
-
6
-
7
-
8
-
5
+ {% tf footer.md %}
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
22
+ spec.add_development_dependency "rake", "~> 0"
23
23
  end
@@ -37,15 +37,7 @@ module Jekyll
37
37
  alias :read_posts_org :read_posts
38
38
  def read_posts(dir)
39
39
  if dir == ''
40
- posts = read_things("_i18n/#{self.config['lang']}","_posts", Post)
41
- posts.each do |post|
42
- post.categories = []
43
- if post.date != ''
44
- if post.published && (self.future || post.date <= self.time)
45
- aggregate_post_info(post)
46
- end
47
- end
48
- end
40
+ read_posts("_i18n/#{self.config['lang']}/")
49
41
  else
50
42
  read_posts_org(dir)
51
43
  end
@@ -2,7 +2,7 @@ module Jekyll
2
2
  module Multiple
3
3
  module Languages
4
4
  module Plugin
5
- VERSION = "1.2.1"
5
+ VERSION = "1.2.2"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-multiple-languages-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Kurtsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-03 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Plugin for Jekyll and Octopress that adds support for translated keys,
@@ -57,10 +57,13 @@ files:
57
57
  - example/_config.yml
58
58
  - example/_i18n/en.yml
59
59
  - example/_i18n/en/_posts/2013-12-09-example-post.md
60
+ - example/_i18n/en/footer.md
60
61
  - example/_i18n/es.yml
61
62
  - example/_i18n/es/_posts/2013-12-09-example-post.md
63
+ - example/_i18n/es/footer.md
62
64
  - example/_i18n/it.yml
63
65
  - example/_i18n/it/_posts/2013-12-09-example-post.md
66
+ - example/_i18n/it/footer.md
64
67
  - example/_includes/post.html
65
68
  - example/_layouts/default.html
66
69
  - example/_layouts/post.html