jekyll-multiple-languages-plugin 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +33 -17
- data/example/_i18n/en.yml +8 -7
- data/example/_i18n/en/footer.md +2 -0
- data/example/_i18n/es.yml +9 -7
- data/example/_i18n/es/footer.md +2 -0
- data/example/_i18n/it.yml +9 -7
- data/example/_i18n/it/footer.md +2 -0
- data/example/_layouts/default.html +8 -6
- data/example/_layouts/post.html +1 -4
- data/jekyll-multiple-languages-plugin.gemspec +1 -1
- data/lib/jekyll/multiple/languages/plugin.rb +1 -9
- data/lib/jekyll/multiple/languages/plugin/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe3855f441762da2b1d4a9737a2e273bac6a639d
|
|
4
|
+
data.tar.gz: aab8762a89829c8b565831f9727ff7c02710784c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
15
|
+
gem 'jekyll-multiple-languages-plugin'
|
|
16
16
|
|
|
17
17
|
And then execute:
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
$ bundle
|
|
20
20
|
|
|
21
21
|
Or install it yourself as:
|
|
22
22
|
|
|
23
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
-
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
# home: Home
|
|
9
|
-
# work: Work
|
|
10
|
+
example: example
|
data/example/_i18n/es.yml
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
global:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
data/example/_i18n/it.yml
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
global:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
@@ -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">
|
|
47
|
-
<a href="" class="footer-link">
|
|
48
|
-
<a href="" class="footer-link">
|
|
43
|
+
<a href="" class="footer-link">{% t global.about %}</a> <span class="separator">•</span>
|
|
44
|
+
<a href="" class="footer-link">{% t global.twitter %}</a> <span class="separator">•</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 }}
|
data/example/_layouts/post.html
CHANGED
|
@@ -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
|
-
|
|
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
|
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.
|
|
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-
|
|
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
|