stringex 2.4.2 → 2.5.0

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: 661d7e3c65c95e9fe6997889d510780e0ef75e2c
4
- data.tar.gz: 8853af3eadd28ecf27b364a92ca26386d5ec2a5a
3
+ metadata.gz: 47aa84859cfcda0234954dc5d27c0edbf6b53b84
4
+ data.tar.gz: 7a6b9ddb24cd3f0a1294c62c90bb08351852bf63
5
5
  SHA512:
6
- metadata.gz: 0ad3f2a25575c1573a4cf48fb62345367410c087876e1602bd6855c345e91a644903c0941d7b2693144a8705c1614a71870fd774da55d16f68b8bc2db2455154
7
- data.tar.gz: 99ecf4ecb5b14b3e7811201dfe5581b9faab325d957b0fe4a341967176fa2153e5403eb628adc93fdc84c7fe3779b3413735dacee1ac645ff0115f96f61e5e17
6
+ metadata.gz: 37c1b5b57433316f6ddda153e47a76d84db3a75e16d0395c1f8f783be3db4875d1a79cc2bbb6b5e27ccd3f5d1caac871ce185fd9322f740135ac09d2c608ca74
7
+ data.tar.gz: 95fbbc88b285b34e5297d8968083bd678ea65578f47102c79087b55647dbcd47881ba1121a292099389cdd41600a20e93c05d33abae09e3a1191c7c327b2e25d
@@ -116,6 +116,7 @@ Currently, built-in translations are available for the following languages:
116
116
  * Swedish (sv)
117
117
  * Dutch (nl)
118
118
  * German (de)
119
+ * Polish (pl)
119
120
  * Portuguese Brazilian (pt-BR)
120
121
  * Russian (ru)
121
122
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.2
1
+ 2.5.0
@@ -0,0 +1,88 @@
1
+ # NOTE: Some translation keys make use of matches from regular expressions
2
+ # to manipulate whitespace and order. Please consult the source code for
3
+ # Stringex::Localization::ConversionExpressions to see what those
4
+ # regular expressions look like if you need to manipulate the order
5
+ # differently than the usage below.
6
+ pl:
7
+ stringex:
8
+ characters:
9
+ and: i
10
+ at: o
11
+ divide: podzielone przez
12
+ degrees: stopni
13
+ dot: \1 kropka \2
14
+ ellipsis: kropka kropka kropka
15
+ equals: równy
16
+ number: numer
17
+ percent: procent
18
+ plus: plus
19
+ slash: ukośnik
20
+ star: gwiazdka
21
+ currencies:
22
+ generic: \1 złotych
23
+ dollars: \1 dolarów
24
+ dollars_cents: \1 dolarów \2 centów
25
+ pounds: \1 funtów
26
+ pounds_pence: \1 funtów \2 pensów
27
+ euros: \1 euro
28
+ euros_cents: \1 euro \2 centów
29
+ yen: \1 jenów
30
+ reais: \1 reali
31
+ reais_cents: \1 reali \2 centów
32
+ html_entities:
33
+ amp: i
34
+ cent: " centów"
35
+ copy: (c)
36
+ deg: " stopni "
37
+ divide: " podzielone przez "
38
+ double_quote: '"'
39
+ ellipsis: "..."
40
+ en_dash: "-"
41
+ em_dash: "--"
42
+ frac14: jedna czwarta
43
+ frac12: pół
44
+ frac34: trzy czwarte
45
+ gt: ">"
46
+ lt: <
47
+ nbsp: " "
48
+ pound: " funtów "
49
+ reg: (r)
50
+ single_quote: "'"
51
+ times: x
52
+ trade: (TM)
53
+ yen: " jen "
54
+ vulgar_fractions:
55
+ half: pół
56
+ one_third: jedna trzecia
57
+ two_thirds: dwie trzecie
58
+ one_fourth: jedna czwarta
59
+ three_fourths: trzy czwarte
60
+ one_fifth: jedna piąta
61
+ two_fifths: dwie piąte
62
+ three_fifths: trzy piąte
63
+ four_fifths: cztery piąte
64
+ one_sixth: jedna szósta
65
+ five_sixths: pięć szóstych
66
+ one_eighth: jedna ósma
67
+ three_eighths: trzy ósme
68
+ five_eighths: pięć ósmych
69
+ seven_eighths: siedem ósmych
70
+ transliterations:
71
+ Ą: A
72
+ Ć: C
73
+ Ę: E
74
+ Ł: L
75
+ Ń: N
76
+ Ó: O
77
+ Ś: S
78
+ Ź: Z
79
+ Ż: Z
80
+ ą: a
81
+ ć: c
82
+ ę: e
83
+ ł: l
84
+ ń: n
85
+ ó: o
86
+ ś: s
87
+ ź: z
88
+ ż: z
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: stringex 2.4.2 ruby lib
5
+ # stub: stringex 2.5.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "stringex"
9
- s.version = "2.4.2"
9
+ s.version = "2.5.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Russell Norris"]
14
- s.date = "2014-03-17"
14
+ s.date = "2014-03-31"
15
15
  s.description = "Some [hopefully] useful extensions to Ruby's String class. Stringex is made up of three libraries: ActsAsUrl [permalink solution with better character translation], Unidecoder [Unicode to ASCII transliteration], and StringExtensions [miscellaneous helper methods for the String class]."
16
16
  s.email = "rsl@luckysneaks.com"
17
17
  s.extra_rdoc_files = [
@@ -234,6 +234,7 @@ Gem::Specification.new do |s|
234
234
  "locales/de.yml",
235
235
  "locales/en.yml",
236
236
  "locales/nl.yml",
237
+ "locales/pl.yml",
237
238
  "locales/pt-BR.yml",
238
239
  "locales/ru.yml",
239
240
  "locales/sv.yml",
@@ -250,6 +251,7 @@ Gem::Specification.new do |s|
250
251
  "test/unit/localization/default_test.rb",
251
252
  "test/unit/localization/en_test.rb",
252
253
  "test/unit/localization/nl_test.rb",
254
+ "test/unit/localization/pl_test.rb",
253
255
  "test/unit/localization/pt_br_test.rb",
254
256
  "test/unit/localization/ru_test.rb",
255
257
  "test/unit/localization/sv_test.rb",
@@ -24,8 +24,8 @@ class DanishYAMLLocalizationTest < Test::Unit::TestCase
24
24
  "100%" => "100 procent",
25
25
  "cost+tax" => "cost plus tax",
26
26
  "batman/robin fan fiction" => "batman skråstreg robin fan fiction",
27
- "dial *69" => "dial stjerne 69"
28
- # " i leave whitespace on ends unchanged " => " i leave whitespace on ends unchanged "
27
+ "dial *69" => "dial stjerne 69",
28
+ " i leave whitespace on ends unchanged " => " i leave whitespace on ends unchanged "
29
29
  }.each do |original, converted|
30
30
  define_method "test_character_conversion: '#{original}'" do
31
31
  assert_equal converted, original.convert_miscellaneous_characters
@@ -0,0 +1,118 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'test_helper'
4
+ require 'i18n'
5
+ require 'stringex'
6
+
7
+ class PolishYAMLLocalizationTest < Test::Unit::TestCase
8
+ def setup
9
+ Stringex::Localization.reset!
10
+ Stringex::Localization.backend = :i18n
11
+ Stringex::Localization.backend.load_translations :pl
12
+ Stringex::Localization.locale = :pl
13
+ end
14
+
15
+ {
16
+ "foo & bar" => "foo i bar",
17
+ "AT&T" => "AT i T",
18
+ "99° is normal" => "99 stopni is normal",
19
+ "4 ÷ 2 is 2" => "4 podzielone przez 2 is 2",
20
+ "webcrawler.com" => "webcrawler kropka com",
21
+ "Well..." => "Well kropka kropka kropka",
22
+ "x=1" => "x równy 1",
23
+ "a #2 pencil" => "a numer 2 pencil",
24
+ "100%" => "100 procent",
25
+ "cost+tax" => "cost plus tax",
26
+ "batman/robin fan fiction" => "batman ukośnik robin fan fiction",
27
+ "dial *69" => "dial gwiazdka 69",
28
+ " i leave whitespace on ends unchanged " => " i leave whitespace on ends unchanged "
29
+ }.each do |original, converted|
30
+ define_method "test_character_conversion: '#{original}'" do
31
+ assert_equal converted, original.convert_miscellaneous_characters
32
+ end
33
+ end
34
+
35
+ {
36
+ "¤20" => "20 złotych",
37
+ "$100" => "100 dolarów",
38
+ "$19.99" => "19 dolarów 99 centów",
39
+ "£100" => "100 funtów",
40
+ "£19.99" => "19 funtów 99 pensów",
41
+ "€100" => "100 euro",
42
+ "€19.99" => "19 euro 99 centów",
43
+ "¥1000" => "1000 jenów"
44
+ }.each do |original, converted|
45
+ define_method "test_currency_conversion: '#{original}'" do
46
+ assert_equal converted, original.convert_miscellaneous_characters
47
+ end
48
+ end
49
+
50
+ {
51
+ "Tea &amp; Sympathy" => "Tea i Sympathy",
52
+ "10&cent;" => "10 centów",
53
+ "&copy;2000" => "(c)2000",
54
+ "98&deg; is fine" => "98 stopni is fine",
55
+ "10&divide;5" => "10 podzielone przez 5",
56
+ "&quot;quoted&quot;" => '"quoted"',
57
+ "to be continued&hellip;" => "to be continued...",
58
+ "2000&ndash;2004" => "2000-2004",
59
+ "I wish&mdash;oh, never mind" => "I wish--oh, never mind",
60
+ "&frac12; ounce of gold" => "pół ounce of gold",
61
+ "1 and &frac14; ounces of silver" => "1 and jedna czwarta ounces of silver",
62
+ "9 and &frac34; ounces of platinum" => "9 and trzy czwarte ounces of platinum",
63
+ "3&gt;2" => "3>2",
64
+ "2&lt;3" => "2<3",
65
+ "two&nbsp;words" => "two words",
66
+ "&pound;100" => "funtów 100",
67
+ "Walmart&reg;" => "Walmart(r)",
68
+ "&apos;single quoted&apos;" => "'single quoted'",
69
+ "2&times;4" => "2x4",
70
+ "Programming&trade;" => "Programming(TM)",
71
+ "&yen;20000" => "jen 20000",
72
+ " i leave whitespace on ends unchanged " => " i leave whitespace on ends unchanged "
73
+ }.each do |original, converted|
74
+ define_method "test_html_entity_conversion: '#{original}'" do
75
+ assert_equal converted, original.convert_miscellaneous_html_entities
76
+ end
77
+ end
78
+
79
+ {
80
+ "&frac12;" => "pół",
81
+ "½" => "pół",
82
+ "&#189;" => "pół",
83
+ "⅓" => "jedna trzecia",
84
+ "&#8531;" => "jedna trzecia",
85
+ "⅔" => "dwie trzecie",
86
+ "&#8532;" => "dwie trzecie",
87
+ "&frac14;" => "jedna czwarta",
88
+ "¼" => "jedna czwarta",
89
+ "&#188;" => "jedna czwarta",
90
+ "&frac34;" => "trzy czwarte",
91
+ "¾" => "trzy czwarte",
92
+ "&#190;" => "trzy czwarte",
93
+ "⅕" => "jedna piąta",
94
+ "&#8533;" => "jedna piąta",
95
+ "⅖" => "dwie piąte",
96
+ "&#8534;" => "dwie piąte",
97
+ "⅗" => "trzy piąte",
98
+ "&#8535;" => "trzy piąte",
99
+ "⅘" => "cztery piąte",
100
+ "&#8536;" => "cztery piąte",
101
+ "⅙" => "jedna szósta",
102
+ "&#8537;" => "jedna szósta",
103
+ "⅚" => "pięć szóstych",
104
+ "&#8538;" => "pięć szóstych",
105
+ "⅛" => "jedna ósma",
106
+ "&#8539;" => "jedna ósma",
107
+ "⅜" => "trzy ósme",
108
+ "&#8540;" => "trzy ósme",
109
+ "⅝" => "pięć ósmych",
110
+ "&#8541;" => "pięć ósmych",
111
+ "⅞" => "siedem ósmych",
112
+ "&#8542;" => "siedem ósmych"
113
+ }.each do |original, converted|
114
+ define_method "test_vulgar_fractions_conversion: #{original}" do
115
+ assert_equal converted, original.convert_vulgar_fractions
116
+ end
117
+ end
118
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Norris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-17 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeweler
@@ -320,6 +320,7 @@ files:
320
320
  - locales/de.yml
321
321
  - locales/en.yml
322
322
  - locales/nl.yml
323
+ - locales/pl.yml
323
324
  - locales/pt-BR.yml
324
325
  - locales/ru.yml
325
326
  - locales/sv.yml
@@ -336,6 +337,7 @@ files:
336
337
  - test/unit/localization/default_test.rb
337
338
  - test/unit/localization/en_test.rb
338
339
  - test/unit/localization/nl_test.rb
340
+ - test/unit/localization/pl_test.rb
339
341
  - test/unit/localization/pt_br_test.rb
340
342
  - test/unit/localization/ru_test.rb
341
343
  - test/unit/localization/sv_test.rb