twitter_cldr 6.0.0 → 6.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2761927a832fb89569a63f8c743affcb87eb860aeab5730fc816a847e8471fe
4
- data.tar.gz: 2df5fbd5b0ced9631b47bface93887f4ad5858a3d63e9da8d2cb3307d56e7089
3
+ metadata.gz: e3393ba4d3d98613d00528bdcec456e18bc6a3aed3f9c51a40d75a390056c6c6
4
+ data.tar.gz: 0d7d4ffd39998e264f25d25ba8fdb5d56d79d10c47ccadb7d4856a83e432a113
5
5
  SHA512:
6
- metadata.gz: f8631d9b465ad2fc513f324b1219abd600d76ad69c845e01c80fa0fd6ab926fc264eb3664fe68ee89c4934324b22c02e8ff728c52687bd262bb269abaf1938cb
7
- data.tar.gz: d625f419a8c3e732a7b94b4c8a91e15db6e7688ca897611a7f0fd224f48c8911936272e779661e3b32b49f4653617ccebe6a719e0604821697e786960c474e26
6
+ metadata.gz: 4844ca03544ed92311170d968c9915bfc2b5865a17db8d0dbfb7834364f8ab208cb3f603c99a3a7695fbc619a07df98161245cf2247b957e7d51a461bfebe309
7
+ data.tar.gz: 9c7d78338b5eb3199b016161eecc4c6d293fbe8628934a33e9deaaf828f90b771404ca2e77e4a2e09846397c45b34c97d7e315a2bc26393af5e0ce9f07648e1c
@@ -54,7 +54,7 @@ module TwitterCldr
54
54
  result = result.localize.to_reordered_s(direction: :RTL)
55
55
  end
56
56
 
57
- result.gsub!(/(\d+)/) { elements[$1.to_i] }
57
+ result.gsub!(/(\d)/) { elements[$1.to_i] }
58
58
  result
59
59
  else
60
60
  elements[0] || ""
@@ -46,11 +46,13 @@ module TwitterCldr
46
46
  end
47
47
 
48
48
  next if line.empty?
49
- next if line.start_with?('%') # ignore comments
49
+
50
+ # ignore comments
51
+ next if line.start_with?('%') || line.start_with?('#')
50
52
 
51
53
  if line =~ /\A[A-Z]+/ # capitals
52
54
  option, value = line.split(' ')
53
- options[option.downcase.to_sym] = value.to_i
55
+ options[option.downcase.to_sym] = value
54
56
  next
55
57
  end
56
58
 
@@ -10,10 +10,10 @@ module TwitterCldr
10
10
  class Hyphenator
11
11
  class UnsupportedLocaleError < StandardError; end
12
12
 
13
- BASE_RESOURCE_PATH = %w(shared hyphenation)
13
+ BASE_RESOURCE_PATH = %w(shared hyphenation).freeze
14
14
  DEFAULT_LEFT_HYPHEN_MIN = 2
15
15
  DEFAULT_RIGHT_HYPHEN_MIN = 2
16
- DEFAULT_NO_HYPHEN = %w(- ' )
16
+ DEFAULT_NO_HYPHEN = "-'’".freeze
17
17
 
18
18
  class << self
19
19
  def get(locale)
@@ -164,12 +164,12 @@ module TwitterCldr
164
164
 
165
165
  def left_hyphen_min
166
166
  @left_hyphen_min ||=
167
- options.fetch(:lefthyphenmin, DEFAULT_LEFT_HYPHEN_MIN)
167
+ options.fetch(:lefthyphenmin, DEFAULT_LEFT_HYPHEN_MIN).to_i
168
168
  end
169
169
 
170
170
  def right_hyphen_min
171
171
  @right_hyphen_min ||=
172
- options.fetch(:righthyphenmin, DEFAULT_RIGHT_HYPHEN_MIN)
172
+ options.fetch(:righthyphenmin, DEFAULT_RIGHT_HYPHEN_MIN).to_i
173
173
  end
174
174
 
175
175
  def no_hyphen
@@ -4,5 +4,5 @@
4
4
  # http://www.apache.org/licenses/LICENSE-2.0
5
5
 
6
6
  module TwitterCldr
7
- VERSION = '6.0.0'
7
+ VERSION = '6.0.1'
8
8
  end
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - а1
7
7
  - ъ1
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 1
4
- :righthyphenmin: 1
5
- :compoundlefthyphenmin: 1
6
- :compoundrighthyphenmin: 1
7
- :nohyphen: 0
8
- :nextlevel: 0
3
+ :lefthyphenmin: '1'
4
+ :righthyphenmin: '1'
5
+ :compoundlefthyphenmin: '1'
6
+ :compoundrighthyphenmin: '1'
7
+ :nohyphen: "',’"
8
+ :nextlevel:
9
9
  :rules:
10
10
  - 1'1
11
11
  - 1’1
@@ -1,42 +1,10 @@
1
1
  ---
2
2
  :options:
3
- :compoundlefthyphenmin: 2
4
- :compoundrighthyphenmin: 2
5
- :nohyphen: 0
6
- :nextlevel: 0
3
+ :compoundlefthyphenmin: '2'
4
+ :compoundrighthyphenmin: '2'
5
+ :nohyphen: "-,'"
6
+ :nextlevel:
7
7
  :rules:
8
- - "####################################################################################"
9
- - '# This is the hyphenation file "hyph_de_AT.dic" of the German dictionary #'
10
- - "# according to the reform of 2006-08-01\t(i.e. reformed or new spelling) #"
11
- - "# #"
12
- - "# Language: German (de AT) #"
13
- - "# #"
14
- - "# Version: 2017-01-12 #"
15
- - "# New: using the COMPOUND feature for improved hyphenation #"
16
- - "# New: list with over 69,000 words and compounds by Karl Zeiler #"
17
- - "# #"
18
- - "# Origin: Based on the TeX hyphenation tables\t\"dehyphn.tex\", revision level
19
- 31. #"
20
- - "# http://www.ctan.org/tex-archive/language/hyphenation/dehyphn.tex #"
21
- - "# The TeX hyphenation tables are released under the LaTeX Project #"
22
- - "# Public License (LPPL) #"
23
- - "# #"
24
- - "# License: OpenOffice.org Adaptions of this package are licensed under the #"
25
- - "# GNU Lesser General Public License (LGPL 2 or later) and are under #"
26
- - "# Copyright by #"
27
- - "# #"
28
- - "# Authors: conversion author: Marco Huggenberger <marco@by-night.ch> #"
29
- - "# revised conversion: Daniel Naber <naber@danielnaber.de> #"
30
- - "# improvements: Karl Zeiler <karl.zeiler@t-online.de> #"
31
- - "# #"
32
- - "# Please note, this dictionary is based on syllable matching patterns #"
33
- - "# and thus should be suitable under other variations of German #"
34
- - "# #"
35
- - "# HYPH de DE hyph_de_DE #"
36
- - "# HYPH de AT hyph_de_AT #"
37
- - "# HYPH de CH hyph_de_CH #"
38
- - "####################################################################################"
39
- - "# Zusammengesetzte adverbiale Präfixe"
40
8
  - da1her
41
9
  - da1her1ab1
42
10
  - da1her1an1
@@ -87,7 +55,6 @@
87
55
  - vor1an1
88
56
  - vor1weg1
89
57
  - weg
90
- - "# Zusammensetzungen"
91
58
  - aar1gau
92
59
  - aar1gaus
93
60
  - ab1ächze
@@ -73157,7 +73124,6 @@
73157
73124
  - mä1k
73158
73125
  - mä6kl8
73159
73126
  - 1män
73160
- - "#mä1s"
73161
73127
  - mäs1t
73162
73128
  - mä5tr6
73163
73129
  - mäu4s3c
@@ -76640,7 +76606,6 @@
76640
76606
  - ol2l1ernt
76641
76607
  - ol1ler
76642
76608
  - olle2rn
76643
- - "# NEUE PATTERNS"
76644
76609
  - ägä1
76645
76610
  - äl1t
76646
76611
  - ö2s1ti
@@ -76817,7 +76782,6 @@
76817
76782
  - wäl1s
76818
76783
  - wal1s
76819
76784
  - yk1ti
76820
- - "# Ausnahmen - Trennung von -ie-"
76821
76785
  - ".3flo1ri"
76822
76786
  - ".3flo1ri2er."
76823
76787
  - ".3ge1ne1ri"
@@ -76853,7 +76817,6 @@
76853
76817
  - u1ri
76854
76818
  - vr2ie
76855
76819
  - vri6er
76856
- - "# Einsilbler mit au/äu/ck/sst/ß/ä/ö/ü"
76857
76820
  - a1cke
76858
76821
  - a1cku
76859
76822
  - a4ck1t
@@ -76921,7 +76884,6 @@
76921
76884
  - usste1r
76922
76885
  - üs4s1t
76923
76886
  - üsste1r
76924
- - "# Sonderfälle auf -aue, -äue, -eie, -eue,"
76925
76887
  - au1e
76926
76888
  - au5e1ne
76927
76889
  - au5e1nem
@@ -76962,7 +76924,6 @@
76962
76924
  - sau5e1re
76963
76925
  - sau7e1ren
76964
76926
  - sauere1r
76965
- - "# Wörter auf -able, -al, -ar, -är, -ät, -av, -iv, -ös"
76966
76927
  - a1r
76967
76928
  - are1r
76968
76929
  - arere1r
@@ -76997,7 +76958,6 @@
76997
76958
  - r1nö
76998
76959
  - ri1nä
76999
76960
  - ä1nö
77000
- - "# Vokalsilben"
77001
76961
  - bi1a1l
77002
76962
  - bi5a1ne
77003
76963
  - bi1a1ni
@@ -77340,7 +77300,6 @@
77340
77300
  - zo1i1ku
77341
77301
  - zo1i1sc
77342
77302
  - zu3e1la
77343
- - "# Ausnahmen und Fremdwörter: Englisch - Französisch - Italienisch"
77344
77303
  - ".ab1st2er1be."
77345
77304
  - ".ab2lep1sie."
77346
77305
  - ".aber1de2en."
@@ -1,42 +1,10 @@
1
1
  ---
2
2
  :options:
3
- :compoundlefthyphenmin: 2
4
- :compoundrighthyphenmin: 2
5
- :nohyphen: 0
6
- :nextlevel: 0
3
+ :compoundlefthyphenmin: '2'
4
+ :compoundrighthyphenmin: '2'
5
+ :nohyphen: "-,'"
6
+ :nextlevel:
7
7
  :rules:
8
- - "####################################################################################"
9
- - '# This is the hyphenation file "hyph_de_CH.dic" of the German dictionary #'
10
- - "# according to the reform of 2006-08-01\t(i.e. reformed or new spelling) #"
11
- - "# #"
12
- - "# Language: German (de CH) #"
13
- - "# #"
14
- - "# Version: 2017-01-12 #"
15
- - "# New: using the COMPOUND feature for improved hyphenation #"
16
- - "# New: list with over 69,000 words and compounds by Karl Zeiler #"
17
- - "# #"
18
- - "# Origin: Based on the TeX hyphenation tables\t\"dehyphn.tex\", revision level
19
- 31. #"
20
- - "# http://www.ctan.org/tex-archive/language/hyphenation/dehyphn.tex #"
21
- - "# The TeX hyphenation tables are released under the LaTeX Project #"
22
- - "# Public License (LPPL) #"
23
- - "# #"
24
- - "# License: OpenOffice.org Adaptions of this package are licensed under the #"
25
- - "# GNU Lesser General Public License (LGPL 2 or later) and are under #"
26
- - "# Copyright by #"
27
- - "# #"
28
- - "# Authors: conversion author: Marco Huggenberger <marco@by-night.ch> #"
29
- - "# revised conversion: Daniel Naber <naber@danielnaber.de> #"
30
- - "# improvements: Karl Zeiler <karl.zeiler@t-online.de> #"
31
- - "# #"
32
- - "# Please note, this dictionary is based on syllable matching patterns #"
33
- - "# and thus should be suitable under other variations of German #"
34
- - "# #"
35
- - "# HYPH de DE hyph_de_DE #"
36
- - "# HYPH de AT hyph_de_AT #"
37
- - "# HYPH de CH hyph_de_CH #"
38
- - "####################################################################################"
39
- - "# Zusammengesetzte adverbiale Präfixe"
40
8
  - da1her
41
9
  - da1her1ab1
42
10
  - da1her1an1
@@ -87,7 +55,6 @@
87
55
  - vor1an1
88
56
  - vor1weg1
89
57
  - weg
90
- - "# Zusammensetzungen"
91
58
  - aar1gau
92
59
  - aar1gaus
93
60
  - ab1ächze
@@ -73157,7 +73124,6 @@
73157
73124
  - mä1k
73158
73125
  - mä6kl8
73159
73126
  - 1män
73160
- - "#mä1s"
73161
73127
  - mäs1t
73162
73128
  - mä5tr6
73163
73129
  - mäu4s3c
@@ -76640,7 +76606,6 @@
76640
76606
  - ol2l1ernt
76641
76607
  - ol1ler
76642
76608
  - olle2rn
76643
- - "# NEUE PATTERNS"
76644
76609
  - ägä1
76645
76610
  - äl1t
76646
76611
  - ö2s1ti
@@ -76817,7 +76782,6 @@
76817
76782
  - wäl1s
76818
76783
  - wal1s
76819
76784
  - yk1ti
76820
- - "# Ausnahmen - Trennung von -ie-"
76821
76785
  - ".3flo1ri"
76822
76786
  - ".3flo1ri2er."
76823
76787
  - ".3ge1ne1ri"
@@ -76853,7 +76817,6 @@
76853
76817
  - u1ri
76854
76818
  - vr2ie
76855
76819
  - vri6er
76856
- - "# Einsilbler mit au/äu/ck/sst/ß/ä/ö/ü"
76857
76820
  - a1cke
76858
76821
  - a1cku
76859
76822
  - a4ck1t
@@ -76921,7 +76884,6 @@
76921
76884
  - usste1r
76922
76885
  - üs4s1t
76923
76886
  - üsste1r
76924
- - "# Sonderfälle auf -aue, -äue, -eie, -eue,"
76925
76887
  - au1e
76926
76888
  - au5e1ne
76927
76889
  - au5e1nem
@@ -76962,7 +76924,6 @@
76962
76924
  - sau5e1re
76963
76925
  - sau7e1ren
76964
76926
  - sauere1r
76965
- - "# Wörter auf -able, -al, -ar, -är, -ät, -av, -iv, -ös"
76966
76927
  - a1r
76967
76928
  - are1r
76968
76929
  - arere1r
@@ -76997,7 +76958,6 @@
76997
76958
  - r1nö
76998
76959
  - ri1nä
76999
76960
  - ä1nö
77000
- - "# Vokalsilben"
77001
76961
  - bi1a1l
77002
76962
  - bi5a1ne
77003
76963
  - bi1a1ni
@@ -77340,7 +77300,6 @@
77340
77300
  - zo1i1ku
77341
77301
  - zo1i1sc
77342
77302
  - zu3e1la
77343
- - "# Ausnahmen und Fremdwörter: Englisch - Französisch - Italienisch"
77344
77303
  - ".ab1st2er1be."
77345
77304
  - ".ab2lep1sie."
77346
77305
  - ".aber1de2en."
@@ -1,42 +1,10 @@
1
1
  ---
2
2
  :options:
3
- :compoundlefthyphenmin: 2
4
- :compoundrighthyphenmin: 2
5
- :nohyphen: 0
6
- :nextlevel: 0
3
+ :compoundlefthyphenmin: '2'
4
+ :compoundrighthyphenmin: '2'
5
+ :nohyphen: "-,'"
6
+ :nextlevel:
7
7
  :rules:
8
- - "####################################################################################"
9
- - '# This is the hyphenation file "hyph_de_DE.dic" of the German dictionary #'
10
- - "# according to the reform of 2006-08-01\t(i.e. reformed or new spelling) #"
11
- - "# #"
12
- - "# Language: German (de DE) #"
13
- - "# #"
14
- - "# Version: 2017-01-12 #"
15
- - "# New: using the COMPOUND feature for improved hyphenation #"
16
- - "# New: list with over 69,000 words and compounds by Karl Zeiler #"
17
- - "# #"
18
- - "# Origin: Based on the TeX hyphenation tables\t\"dehyphn.tex\", revision level
19
- 31. #"
20
- - "# http://www.ctan.org/tex-archive/language/hyphenation/dehyphn.tex #"
21
- - "# The TeX hyphenation tables are released under the LaTeX Project #"
22
- - "# Public License (LPPL) #"
23
- - "# #"
24
- - "# License: OpenOffice.org Adaptions of this package are licensed under the #"
25
- - "# GNU Lesser General Public License (LGPL 2 or later) and are under #"
26
- - "# Copyright by #"
27
- - "# #"
28
- - "# Authors: conversion author: Marco Huggenberger <marco@by-night.ch> #"
29
- - "# revised conversion: Daniel Naber <naber@danielnaber.de> #"
30
- - "# improvements: Karl Zeiler <karl.zeiler@t-online.de> #"
31
- - "# #"
32
- - "# Please note, this dictionary is based on syllable matching patterns #"
33
- - "# and thus should be suitable under other variations of German #"
34
- - "# #"
35
- - "# HYPH de DE hyph_de_DE #"
36
- - "# HYPH de AT hyph_de_AT #"
37
- - "# HYPH de CH hyph_de_CH #"
38
- - "####################################################################################"
39
- - "# Zusammengesetzte adverbiale Präfixe"
40
8
  - da1her
41
9
  - da1her1ab1
42
10
  - da1her1an1
@@ -87,7 +55,6 @@
87
55
  - vor1an1
88
56
  - vor1weg1
89
57
  - weg
90
- - "# Zusammensetzungen"
91
58
  - aar1gau
92
59
  - aar1gaus
93
60
  - ab1ächze
@@ -73157,7 +73124,6 @@
73157
73124
  - mä1k
73158
73125
  - mä6kl8
73159
73126
  - 1män
73160
- - "#mä1s"
73161
73127
  - mäs1t
73162
73128
  - mä5tr6
73163
73129
  - mäu4s3c
@@ -76640,7 +76606,6 @@
76640
76606
  - ol2l1ernt
76641
76607
  - ol1ler
76642
76608
  - olle2rn
76643
- - "# NEUE PATTERNS"
76644
76609
  - ägä1
76645
76610
  - äl1t
76646
76611
  - ö2s1ti
@@ -76817,7 +76782,6 @@
76817
76782
  - wäl1s
76818
76783
  - wal1s
76819
76784
  - yk1ti
76820
- - "# Ausnahmen - Trennung von -ie-"
76821
76785
  - ".3flo1ri"
76822
76786
  - ".3flo1ri2er."
76823
76787
  - ".3ge1ne1ri"
@@ -76853,7 +76817,6 @@
76853
76817
  - u1ri
76854
76818
  - vr2ie
76855
76819
  - vri6er
76856
- - "# Einsilbler mit au/äu/ck/sst/ß/ä/ö/ü"
76857
76820
  - a1cke
76858
76821
  - a1cku
76859
76822
  - a4ck1t
@@ -76921,7 +76884,6 @@
76921
76884
  - usste1r
76922
76885
  - üs4s1t
76923
76886
  - üsste1r
76924
- - "# Sonderfälle auf -aue, -äue, -eie, -eue,"
76925
76887
  - au1e
76926
76888
  - au5e1ne
76927
76889
  - au5e1nem
@@ -76962,7 +76924,6 @@
76962
76924
  - sau5e1re
76963
76925
  - sau7e1ren
76964
76926
  - sauere1r
76965
- - "# Wörter auf -able, -al, -ar, -är, -ät, -av, -iv, -ös"
76966
76927
  - a1r
76967
76928
  - are1r
76968
76929
  - arere1r
@@ -76997,7 +76958,6 @@
76997
76958
  - r1nö
76998
76959
  - ri1nä
76999
76960
  - ä1nö
77000
- - "# Vokalsilben"
77001
76961
  - bi1a1l
77002
76962
  - bi5a1ne
77003
76963
  - bi1a1ni
@@ -77340,7 +77300,6 @@
77340
77300
  - zo1i1ku
77341
77301
  - zo1i1sc
77342
77302
  - zu3e1la
77343
- - "# Ausnahmen und Fremdwörter: Englisch - Französisch - Italienisch"
77344
77303
  - ".ab1st2er1be."
77345
77304
  - ".ab2lep1sie."
77346
77305
  - ".aber1de2en."
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 3
5
- :compoundlefthyphenmin: 2
6
- :compoundrighthyphenmin: 3
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '3'
5
+ :compoundlefthyphenmin: '2'
6
+ :compoundrighthyphenmin: '3'
7
7
  :rules:
8
8
  - ".1ab"
9
9
  - ".ab4i"
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 3
5
- :compoundlefthyphenmin: 2
6
- :compoundrighthyphenmin: 3
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '3'
5
+ :compoundlefthyphenmin: '2'
6
+ :compoundrighthyphenmin: '3'
7
7
  :rules:
8
8
  - ".a2ch4"
9
9
  - ".ad4der"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - ".s2a5b2"
7
7
  - ".s1a2"
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
5
- :compoundlefthyphenmin: 2
6
- :compoundrighthyphenmin: 2
7
- :nextlevel: 0
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
+ :compoundlefthyphenmin: '2'
6
+ :compoundrighthyphenmin: '2'
7
+ :nextlevel:
8
8
  :rules:
9
9
  - 2'2
10
10
  - ".a4"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - ".odi1"
7
7
  - ".o3v"
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
5
- :nextlevel: 0
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
+ :nextlevel:
6
6
  :rules:
7
7
  - 1'.
8
8
  - a1a2
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :compoundlefthyphenmin: 3
4
- :compoundrighthyphenmin: 3
3
+ :compoundlefthyphenmin: '3'
4
+ :compoundrighthyphenmin: '3'
5
5
  :rules:
6
6
  - ".a2"
7
7
  - ".ada2t1á1t1a2"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 1
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '1'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - ".a4"
7
7
  - ".að3"
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
5
- :nextlevel: 0
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
+ :nextlevel:
6
6
  :rules:
7
7
  - 1'.
8
8
  - ".av5r"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - t2j
7
7
  - t2l
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 2
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '2'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - т2ј
7
7
  - т2л
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :options:
3
- :lefthyphenmin: 1
4
- :righthyphenmin: 2
3
+ :lefthyphenmin: '1'
4
+ :righthyphenmin: '2'
5
5
  :rules:
6
6
  - ".a2bak"
7
7
  - ".2ab2a"
@@ -39,6 +39,16 @@ describe TwitterCldr::Formatters::ListFormatter do
39
39
  expect(formatter.format(list, :"unit-narrow")).to eq("larry curly")
40
40
  end
41
41
  end
42
+
43
+ context 'with a Chinese list formatter' do
44
+ let(:formatter) { described_class.new(:zh) }
45
+
46
+ it 'formats correctly' do
47
+ expect(formatter.format(list)).to eq('larry和curly')
48
+ expect(formatter.format(list, :unit)).to eq('larrycurly')
49
+ expect(formatter.format(list, :"unit-narrow")).to eq('larrycurly')
50
+ end
51
+ end
42
52
  end
43
53
 
44
54
  context 'with three elements' do
@@ -63,6 +73,16 @@ describe TwitterCldr::Formatters::ListFormatter do
63
73
  expect(formatter.format(list, :"unit-narrow")).to eq("larry curly moe")
64
74
  end
65
75
  end
76
+
77
+ context 'with a Chinese list formatter' do
78
+ let(:formatter) { described_class.new(:zh) }
79
+
80
+ it 'formats correctly' do
81
+ expect(formatter.format(list)).to eq('larry、curly和moe')
82
+ expect(formatter.format(list, :unit)).to eq('larrycurlymoe')
83
+ expect(formatter.format(list, :"unit-narrow")).to eq('larrycurlymoe')
84
+ end
85
+ end
66
86
  end
67
87
  end
68
88
  end
@@ -81,9 +81,17 @@ describe TwitterCldr::Shared::Hyphenator do
81
81
  expect(hyphenator.hyphenate(' ')).to eq(' ')
82
82
  end
83
83
 
84
+ described_class.supported_locales.each do |locale|
85
+ word = 'antidisastablishmentarianism'
86
+
87
+ it "does not error for #{locale}" do
88
+ expect { described_class.get(locale).hyphenate(word) }.to_not raise_error
89
+ end
90
+ end
91
+
84
92
  context 'hunspell tests' do
85
93
  let(:options) do
86
- { left_hyphen_min: 2, right_hyphen_min: 3, no_hyphen: %w(- ' ) }
94
+ { left_hyphen_min: 2, right_hyphen_min: 3, no_hyphen: "-'’" }
87
95
  end
88
96
 
89
97
  it 'passes all hunspell tests' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_cldr
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-25 00:00:00.000000000 Z
11
+ date: 2020-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: camertron-eprun