jekyll-date-localization 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-date-localization.rb +5 -1
- data/lib/locales/id.yml +47 -0
- data/lib/locales/it.yml +47 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e1907a9ad86a44069a2f58513839ad5a98a805878afed9d4b5ac704b2b90a65
|
4
|
+
data.tar.gz: e8994955192ef5f63518984a22e8e7384e02172fb18d62d9faf2fefd61fdb89f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38f1b213d9e48e1881a1179ca63db931b68b138406c1035eebe51c5a69b2084868b55c22e1858ac69ff8594060544d4a754821f1e820207cfc1f81864d877a4
|
7
|
+
data.tar.gz: 8ea94f3d7546b7fe785b4fadb4e4f0c3ff38c2aea6bf5c19c3803d40e5ef4f9762c837560af0bdddcfbf75f2960c93ddea3bb7a5dab12d2c159f849d3eb7b676
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'date'
|
1
2
|
require 'i18n'
|
2
3
|
|
3
4
|
module Jekyll
|
@@ -5,6 +6,9 @@ module Jekyll
|
|
5
6
|
def localize(input, format=nil, locale=nil)
|
6
7
|
load_translations
|
7
8
|
locale = locale || @context.registers[:site].config["date_locale"]
|
9
|
+
if input.is_a?(String)
|
10
|
+
input = DateTime.parse(input)
|
11
|
+
end
|
8
12
|
I18n.l input, :format => format, :locale => locale
|
9
13
|
end
|
10
14
|
|
@@ -17,4 +21,4 @@ module Jekyll
|
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
20
|
-
Liquid::Template.register_filter(Jekyll::I18nFilter)
|
24
|
+
Liquid::Template.register_filter(Jekyll::I18nFilter)
|
data/lib/locales/id.yml
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
id:
|
3
|
+
date:
|
4
|
+
abbr_day_names:
|
5
|
+
- Min
|
6
|
+
- Sen
|
7
|
+
- Sel
|
8
|
+
- Rab
|
9
|
+
- Kam
|
10
|
+
- Jum
|
11
|
+
- Sab
|
12
|
+
abbr_month_names:
|
13
|
+
-
|
14
|
+
- Jan
|
15
|
+
- Feb
|
16
|
+
- Mar
|
17
|
+
- Apr
|
18
|
+
- Mei
|
19
|
+
- Jun
|
20
|
+
- Jul
|
21
|
+
- Agu
|
22
|
+
- Sep
|
23
|
+
- Okt
|
24
|
+
- Nov
|
25
|
+
- Des
|
26
|
+
day_names:
|
27
|
+
- Minggu
|
28
|
+
- Senin
|
29
|
+
- Selasa
|
30
|
+
- Rabu
|
31
|
+
- Kamis
|
32
|
+
- Jumat
|
33
|
+
- Sabtu
|
34
|
+
month_names:
|
35
|
+
-
|
36
|
+
- Januari
|
37
|
+
- Februari
|
38
|
+
- Maret
|
39
|
+
- April
|
40
|
+
- Mei
|
41
|
+
- Juni
|
42
|
+
- Juli
|
43
|
+
- Augustus
|
44
|
+
- September
|
45
|
+
- Oktober
|
46
|
+
- November
|
47
|
+
- Desember
|
data/lib/locales/it.yml
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
it:
|
3
|
+
date:
|
4
|
+
abbr_day_names:
|
5
|
+
- dom
|
6
|
+
- lun
|
7
|
+
- mar
|
8
|
+
- mer
|
9
|
+
- gio
|
10
|
+
- ven
|
11
|
+
- sab
|
12
|
+
abbr_month_names:
|
13
|
+
-
|
14
|
+
- gen
|
15
|
+
- feb
|
16
|
+
- mar
|
17
|
+
- apr
|
18
|
+
- mag
|
19
|
+
- giu
|
20
|
+
- lug
|
21
|
+
- ago
|
22
|
+
- set
|
23
|
+
- ott
|
24
|
+
- nov
|
25
|
+
- dic
|
26
|
+
day_names:
|
27
|
+
- domenica
|
28
|
+
- lunedì
|
29
|
+
- martedì
|
30
|
+
- mercoledì
|
31
|
+
- giovedì
|
32
|
+
- venerdì
|
33
|
+
- sabato
|
34
|
+
month_names:
|
35
|
+
-
|
36
|
+
- gennaio
|
37
|
+
- febbraio
|
38
|
+
- marzo
|
39
|
+
- aprile
|
40
|
+
- maggio
|
41
|
+
- giugno
|
42
|
+
- luglio
|
43
|
+
- agosto
|
44
|
+
- settembre
|
45
|
+
- ottobre
|
46
|
+
- novembre
|
47
|
+
- dicembre
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-date-localization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- krupkat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -38,6 +38,8 @@ files:
|
|
38
38
|
- lib/locales/en.yml
|
39
39
|
- lib/locales/es.yml
|
40
40
|
- lib/locales/fr.yml
|
41
|
+
- lib/locales/id.yml
|
42
|
+
- lib/locales/it.yml
|
41
43
|
- lib/locales/pt.yml
|
42
44
|
- lib/locales/ro.yml
|
43
45
|
- lib/locales/tr.yml
|