jekyll-language-plugin 1.3.3 → 1.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df4d9539694504869f268d01cf9aa495cfe52492
|
4
|
+
data.tar.gz: 11f717b0904403c342f14cffce7e80f0497a56b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f25389a1e7924db295ab73271d84b2bbcf05f3bbab73d802baa33e4c5d86dae20f1c805a738e9f9f49ca6307387b13e4c8c9c194f5c5c0d97c0f5d651f93c9da
|
7
|
+
data.tar.gz: 5ba36ccdefeb2eb3004851e78ba036b8166d33a45780134aaf993d31183ae61088c3ce34af24a6c2585b30f9d083b006629843eb2d704f776f209352149d09c1
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Frozen-string-literal: true
|
2
|
+
# Encoding: utf-8
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
module LanguagePlugin
|
6
|
+
module Tags
|
7
|
+
class NativeLanguageNameTag < Liquid::Tag
|
8
|
+
def initialize(tag_name, markup, tokens)
|
9
|
+
super
|
10
|
+
@markup = markup
|
11
|
+
end
|
12
|
+
|
13
|
+
def render(context)
|
14
|
+
p = Liquid::Parser.new(@markup)
|
15
|
+
name = Liquid::Expression.parse(exp = p.expression)
|
16
|
+
key = context.evaluate(name)
|
17
|
+
raise Liquid::SyntaxError.new("Invalid language key expression: #{exp}") if key.nil?
|
18
|
+
|
19
|
+
# get language name string from evaluated key
|
20
|
+
oldLanguage = context.registers[:page]['language']
|
21
|
+
context.registers[:page]['language'] = key
|
22
|
+
translation = Jekyll::LanguagePlugin::LiquidContext.get_language_string(context, "lang.#{key}")
|
23
|
+
context.registers[:page]['language'] = oldLanguage
|
24
|
+
translation
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
Liquid::Template.register_tag('tln', Jekyll::LanguagePlugin::Tags::NativeLanguageNameTag)
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-language-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Wochnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.2.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.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: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.6'
|
69
69
|
description: Jekyll 3.0-compatible multi-language plugin for posts, pages and includes
|
@@ -73,34 +73,8 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
-
|
77
|
-
-
|
78
|
-
- lib/jekyll/language-plugin/date_localizer.rb
|
79
|
-
- lib/jekyll/language-plugin/filters/language_date.rb
|
80
|
-
- lib/jekyll/language-plugin/filters.rb
|
81
|
-
- lib/jekyll/language-plugin/language_data.rb
|
82
|
-
- lib/jekyll/language-plugin/liquid_context.rb
|
83
|
-
- lib/jekyll/language-plugin/loaders/base_loader.rb
|
84
|
-
- lib/jekyll/language-plugin/loaders/builtin_data_loader.rb
|
85
|
-
- lib/jekyll/language-plugin/loaders/jekyll_data_loader.rb
|
86
|
-
- lib/jekyll/language-plugin/loaders.rb
|
87
|
-
- lib/jekyll/language-plugin/plugin_error.rb
|
88
|
-
- lib/jekyll/language-plugin/tags/language.rb
|
89
|
-
- lib/jekyll/language-plugin/tags/language_include.rb
|
90
|
-
- lib/jekyll/language-plugin/tags/language_name.rb
|
91
|
-
- lib/jekyll/language-plugin/tags.rb
|
92
|
-
- lib/jekyll/language-plugin/version.rb
|
93
|
-
- lib/jekyll/language-plugin.rb
|
94
|
-
- lib/jekyll/language_document.rb
|
95
|
-
- lib/jekyll/language_page.rb
|
96
|
-
- lib/jekyll/language_properties.rb
|
97
|
-
- lib/jekyll/language_reader.rb
|
98
|
-
- lib/jekyll/patches/jekyll/renderer.rb
|
99
|
-
- lib/jekyll/patches/jekyll/site.rb
|
100
|
-
- lib/jekyll/patches.rb
|
101
|
-
- lib/jekyll/readers/language_collection_reader.rb
|
102
|
-
- lib/jekyll/readers/language_page_reader.rb
|
103
|
-
- lib/jekyll/readers/language_post_reader.rb
|
76
|
+
- LICENSE.md
|
77
|
+
- README.md
|
104
78
|
- data/lang/af.yml
|
105
79
|
- data/lang/am.yml
|
106
80
|
- data/lang/ar.yml
|
@@ -183,8 +157,35 @@ files:
|
|
183
157
|
- data/lang/wo.yml
|
184
158
|
- data/lang/xh.yml
|
185
159
|
- data/lang/zh.yml
|
186
|
-
-
|
187
|
-
-
|
160
|
+
- lib/jekyll-language-plugin.rb
|
161
|
+
- lib/jekyll/drops/language_url_drop.rb
|
162
|
+
- lib/jekyll/language-plugin.rb
|
163
|
+
- lib/jekyll/language-plugin/date_localizer.rb
|
164
|
+
- lib/jekyll/language-plugin/filters.rb
|
165
|
+
- lib/jekyll/language-plugin/filters/language_date.rb
|
166
|
+
- lib/jekyll/language-plugin/language_data.rb
|
167
|
+
- lib/jekyll/language-plugin/liquid_context.rb
|
168
|
+
- lib/jekyll/language-plugin/loaders.rb
|
169
|
+
- lib/jekyll/language-plugin/loaders/base_loader.rb
|
170
|
+
- lib/jekyll/language-plugin/loaders/builtin_data_loader.rb
|
171
|
+
- lib/jekyll/language-plugin/loaders/jekyll_data_loader.rb
|
172
|
+
- lib/jekyll/language-plugin/plugin_error.rb
|
173
|
+
- lib/jekyll/language-plugin/tags.rb
|
174
|
+
- lib/jekyll/language-plugin/tags/language.rb
|
175
|
+
- lib/jekyll/language-plugin/tags/language_include.rb
|
176
|
+
- lib/jekyll/language-plugin/tags/language_name.rb
|
177
|
+
- lib/jekyll/language-plugin/tags/language_name_native.rb
|
178
|
+
- lib/jekyll/language-plugin/version.rb
|
179
|
+
- lib/jekyll/language_document.rb
|
180
|
+
- lib/jekyll/language_page.rb
|
181
|
+
- lib/jekyll/language_properties.rb
|
182
|
+
- lib/jekyll/language_reader.rb
|
183
|
+
- lib/jekyll/patches.rb
|
184
|
+
- lib/jekyll/patches/jekyll/renderer.rb
|
185
|
+
- lib/jekyll/patches/jekyll/site.rb
|
186
|
+
- lib/jekyll/readers/language_collection_reader.rb
|
187
|
+
- lib/jekyll/readers/language_page_reader.rb
|
188
|
+
- lib/jekyll/readers/language_post_reader.rb
|
188
189
|
homepage: https://github.com/vwochnik/jekyll-language-plugin
|
189
190
|
licenses:
|
190
191
|
- MIT
|
@@ -195,17 +196,17 @@ require_paths:
|
|
195
196
|
- lib
|
196
197
|
required_ruby_version: !ruby/object:Gem::Requirement
|
197
198
|
requirements:
|
198
|
-
- -
|
199
|
+
- - ">="
|
199
200
|
- !ruby/object:Gem::Version
|
200
201
|
version: '0'
|
201
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
203
|
requirements:
|
203
|
-
- -
|
204
|
+
- - ">="
|
204
205
|
- !ruby/object:Gem::Version
|
205
206
|
version: '0'
|
206
207
|
requirements: []
|
207
208
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
209
|
+
rubygems_version: 2.5.1
|
209
210
|
signing_key:
|
210
211
|
specification_version: 4
|
211
212
|
summary: This plugin enables Jekyll to run multilingual websites where pages and posts
|