ri18n 0.0.4 → 0.0.5
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.
- data/lib/i18nservice.rb +14 -8
- data/lib/ri18n/po.rb +6 -2
- metadata +31 -37
data/lib/i18nservice.rb
CHANGED
@@ -28,16 +28,22 @@ class I18nService
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def application_encoding
|
31
|
-
|
32
|
-
|
33
|
-
'
|
34
|
-
|
35
|
-
'
|
36
|
-
|
37
|
-
'
|
31
|
+
if RUBY_VERSION =~ /^1\.8\.[0-9]$/
|
32
|
+
case $KCODE[0,1].downcase
|
33
|
+
when 'u'
|
34
|
+
'UTF-8'
|
35
|
+
when 'e'
|
36
|
+
'EUC-JP'
|
37
|
+
when 's'
|
38
|
+
'Shift-JIS'
|
39
|
+
else
|
40
|
+
'ASCII'
|
41
|
+
end
|
38
42
|
else
|
39
|
-
|
43
|
+
nil
|
40
44
|
end
|
45
|
+
|
46
|
+
|
41
47
|
end
|
42
48
|
|
43
49
|
# execute code bloc in the PO dir
|
data/lib/ri18n/po.rb
CHANGED
@@ -2,7 +2,9 @@ require 'ri18n/msg'
|
|
2
2
|
require 'ri18n/pohelper'
|
3
3
|
require 'ri18n/newmsglist'
|
4
4
|
require 'ri18n/catalog'
|
5
|
-
|
5
|
+
if RUBY_VERSION =~ /^1\.8\.[0-9]$/
|
6
|
+
require 'iconv'
|
7
|
+
end
|
6
8
|
|
7
9
|
class PoSource < String
|
8
10
|
ENTRY_SEP = /(?:\n\n)|(?:\n \n)/m
|
@@ -25,7 +27,9 @@ class PoSource < String
|
|
25
27
|
|
26
28
|
def parse(app_enc='utf-8')
|
27
29
|
parse_header
|
28
|
-
|
30
|
+
if RUBY_VERSION =~ /^1\.8\.[0-9]$/
|
31
|
+
reencode(app_enc)
|
32
|
+
end
|
29
33
|
@entries.each{|entry|
|
30
34
|
next if entry.strip.empty?
|
31
35
|
id, msg = Msg::Parse(entry)
|
metadata
CHANGED
@@ -1,65 +1,59 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ri18n
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
+
authors:
|
7
8
|
- Denis Mertz
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2010-01-06 00:00:00 +01:00
|
13
|
-
default_executable:
|
12
|
+
date: 2013-09-05 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
14
|
+
description: ! ' Ri18n is an internationalization and localization library for
|
15
|
+
Ruby applications.
|
15
16
|
|
16
|
-
|
17
|
+
'
|
17
18
|
email: dmertz at online dot de
|
18
19
|
executables: []
|
19
|
-
|
20
20
|
extensions: []
|
21
|
-
|
22
21
|
extra_rdoc_files: []
|
23
|
-
|
24
|
-
files:
|
22
|
+
files:
|
25
23
|
- lib/i18nservice.rb
|
26
|
-
- lib/
|
27
|
-
- lib/ri18n/pohelper.rb
|
24
|
+
- lib/gettext.rb
|
28
25
|
- lib/ri18n/plural_forms.rb
|
29
|
-
- lib/ri18n/
|
26
|
+
- lib/ri18n/pohelper.rb
|
27
|
+
- lib/ri18n/langtools.rb
|
30
28
|
- lib/ri18n/translators.rb
|
31
|
-
- lib/ri18n/
|
29
|
+
- lib/ri18n/standard_exts.rb
|
32
30
|
- lib/ri18n/newmsglist.rb
|
31
|
+
- lib/ri18n/po.rb
|
33
32
|
- lib/ri18n/catalog.rb
|
34
|
-
- lib/ri18n/
|
35
|
-
- lib/gettext.rb
|
36
|
-
has_rdoc: true
|
33
|
+
- lib/ri18n/msg.rb
|
37
34
|
homepage: http://ri18n.berlios.de/
|
38
35
|
licenses: []
|
39
|
-
|
40
36
|
post_install_message:
|
41
37
|
rdoc_options: []
|
42
|
-
|
43
|
-
require_paths:
|
38
|
+
require_paths:
|
44
39
|
- lib
|
45
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
requirements:
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
requirements:
|
58
53
|
- Rake
|
59
54
|
rubyforge_project: ri18n
|
60
|
-
rubygems_version: 1.
|
55
|
+
rubygems_version: 1.8.23
|
61
56
|
signing_key:
|
62
57
|
specification_version: 3
|
63
58
|
summary: Ruby application internationalization and localization library
|
64
59
|
test_files: []
|
65
|
-
|