i18n-translators-tools 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -70,6 +70,21 @@ WARNING
70
70
  back. Then you lose nothing.
71
71
 
72
72
 
73
+ Installation
74
+ ------------
75
+
76
+ **RubyGems**
77
+
78
+ gem install i18n-translators-tools
79
+
80
+ **Latest from sources***
81
+
82
+ git clone git://github.com/pejuko/i18n-translators-tools.git
83
+ cd i18n-translators-tools
84
+ rake gem
85
+ gem install pkg/i18n-translators-tools.gem
86
+
87
+
73
88
  How to add support into your application
74
89
  ----------------------------------------
75
90
 
@@ -145,12 +160,12 @@ Supported formats
145
160
 
146
161
  * **po**; supported format looks like
147
162
 
148
- # there is some comment
149
- #, fuzzy, changed
150
- #| msgid Old default
151
- msgctxt "there.is.some.key"
152
- msgid "Default text"
153
- msgstr "Prelozeny defaultni text"
163
+ # there is some comment
164
+ #, fuzzy, changed
165
+ #| msgid Old default
166
+ msgctxt "there.is.some.key"
167
+ msgid "Default text"
168
+ msgstr "Prelozeny defaultni text"
154
169
 
155
170
  Such po file is pretty usable with po editors.
156
171
 
@@ -208,7 +223,7 @@ Configure file format
208
223
  Configuration files are normal ruby files which should return hash.
209
224
  It is not necessary to use all switches.
210
225
 
211
- *Example config file:*
226
+ **Example config file:**
212
227
 
213
228
  {
214
229
  :exclude => ['rules'],
@@ -12,16 +12,17 @@ spec = Gem::Specification.new do |s|
12
12
  s.email = "pejuko@gmail.com"
13
13
  s.authors = ["Petr Kovar"]
14
14
  s.name = 'i18n-translators-tools'
15
- s.version = '0.1'
16
- s.date = '2010-07-16'
17
- s.requirements << 'i18n' << 'ya2yaml'
15
+ s.version = '0.1.1'
16
+ s.date = '2010-07-17'
17
+ s.add_dependency('i18n', '>= 0.4.1')
18
+ s.add_dependency('ya2yaml')
18
19
  s.require_path = 'lib'
19
20
  s.files = ["bin/i18n-translate", "test/tc_translate.rb", "test/locale/src/default.yml", "test/locale/src/cze.yml", "test/locale/src/cze.rb", "test/locale/src/cze.po", "lib/i18n-translate.rb", "lib/i18n/translate.rb", "lib/i18n/processor.rb", "lib/i18n/processor/yaml.rb", "lib/i18n/processor/ruby.rb", "lib/i18n/processor/gettext.rb", "lib/i18n/backend/translate.rb", "README.md", "i18n-translators-tools.gemspec", "Rakefile"]
20
21
  s.executables = ["i18n-translate"]
21
22
  s.description = <<EOF
22
23
  This package brings you useful utility which can help you to handle locale files
23
- and translations in your Ruby projects. Read README.md file and run i18n-translate
24
- without parameters for more information.
24
+ and translations in your Ruby projects. Offers also built-in simple console editor.
25
+ Read README.md file and run i18n-translate without parameters for more information.
25
26
  EOF
26
27
  end
27
28
 
@@ -53,12 +53,18 @@ module I18n::Translate
53
53
  end
54
54
 
55
55
  def read
56
- data = File.open(@filename, mode("r")){ |f| f.read }
56
+ data = File.open(@filename, mode("r")) do |f|
57
+ f.flock File::LOCK_SH
58
+ f.read
59
+ end
57
60
  import(data)
58
61
  end
59
62
 
60
63
  def write(data)
61
- File.open(@filename, mode("w")) {|f| f << export(data)}
64
+ File.open(@filename, mode("w")) do |f|
65
+ f.flock File::LOCK_EX
66
+ f << export(data)
67
+ end
62
68
  end
63
69
 
64
70
  def self.can_handle?(fname)
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- version: "0.1"
8
+ - 1
9
+ version: 0.1.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Petr Kovar
@@ -13,14 +14,39 @@ autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2010-07-16 00:00:00 +02:00
17
+ date: 2010-07-17 00:00:00 +02:00
17
18
  default_executable:
18
- dependencies: []
19
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: i18n
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 4
30
+ - 1
31
+ version: 0.4.1
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: ya2yaml
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :runtime
45
+ version_requirements: *id002
20
46
  description: |
21
47
  This package brings you useful utility which can help you to handle locale files
22
- and translations in your Ruby projects. Read README.md file and run i18n-translate
23
- without parameters for more information.
48
+ and translations in your Ruby projects. Offers also built-in simple console editor.
49
+ Read README.md file and run i18n-translate without parameters for more information.
24
50
 
25
51
  email: pejuko@gmail.com
26
52
  executables:
@@ -69,9 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
95
  segments:
70
96
  - 0
71
97
  version: "0"
72
- requirements:
73
- - i18n
74
- - ya2yaml
98
+ requirements: []
99
+
75
100
  rubyforge_project:
76
101
  rubygems_version: 1.3.6
77
102
  signing_key: