web_translate_it 1.4.1 → 1.4.2

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/README.md CHANGED
@@ -11,7 +11,7 @@ This gem provides your app with:
11
11
 
12
12
  * For each environment you want to use the gem, add to your config/environment/development.rb:
13
13
 
14
- `config.gem 'web_translate_it', :version => '~> 1.4.1', :source => 'http://gemcutter.org'`
14
+ `config.gem 'web_translate_it', :version => '~> 1.4.2', :source => 'http://gemcutter.org'`
15
15
 
16
16
  * Then, run:
17
17
 
@@ -0,0 +1,18 @@
1
+ # The Project API Token from Web Translate It
2
+ api_key: SECRET
3
+
4
+ # The locales not to sync with Web Translate It.
5
+ # Pass an array of string, or an array of symbols, a string or a symbol.
6
+ # eg. [:en, :fr] or just 'en'
7
+ ignore_locales: :en
8
+
9
+ # A list of files to translate
10
+ # You can name your language files as you want, as long as the locale name match the
11
+ # locale name you set in Web Translate It, and that the different language files names are
12
+ # differenciated by their locale name.
13
+ # For example, if you set to translate a project in en_US in WTI, you should use the locale en_US in your app
14
+ #
15
+ # wti_id is the file id from Web Translate It.
16
+ files:
17
+ wti_id: config/locales/file1_[locale].yml
18
+ wti_id: config/locales/file2_[locale].yml
data/history.md CHANGED
@@ -1,4 +1,8 @@
1
- ## Edge
1
+ ## Version 1.4.2 / 2010-01-07
2
+
3
+ * Bug fix for `rake trans:config` which was not installing the translation.yml file properly.
4
+
5
+ ## Version 1.4.1 / 2010-01-07
2
6
 
3
7
  * Rename `rake trans:send[fr_Fr]` to `rake trans:upload[fr_FR]`
4
8
  * Remove `rake trans:version` task. Instead, version number is displayed in the welcome banner.
@@ -1,6 +1,7 @@
1
1
  module WebTranslateIt
2
2
  class Configuration
3
3
  require 'yaml'
4
+ require 'fileutils'
4
5
  attr_accessor :api_key, :files, :ignore_locales
5
6
 
6
7
  def initialize
@@ -27,8 +28,8 @@ module WebTranslateIt
27
28
  def self.create_config_file
28
29
  config_file = "config/translation.yml"
29
30
  unless File.exists?(config_file)
30
- puts "Creating #{config_file}"
31
- File.cp File.join(File.dirname(__FILE__), 'examples', 'translation.yml'), config_file
31
+ puts "Created #{config_file}"
32
+ FileUtils.copy File.join(File.dirname(__FILE__), '..', '..', 'examples', 'translation.yml'), config_file
32
33
  end
33
34
  end
34
35
  end
data/version.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 4
4
- :patch: 1
4
+ :patch: 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_translate_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "\xC3\x89douard Bri\xC3\xA8re"
@@ -22,7 +22,7 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "1.0"
24
24
  version:
25
- description: Ruby on Rails plugin and rack middleware to sync your translations between webtranslateit.com and your rails applications.
25
+ description: A rack middleware and a handful of rake tasks to sync your translations between webtranslateit.com and your rails applications.
26
26
  email: edouard@atelierconvivialite.com
27
27
  executables: []
28
28
 
@@ -36,6 +36,7 @@ files:
36
36
  - README.md
37
37
  - version.yml
38
38
  - examples/locale.rb
39
+ - examples/translation.yml
39
40
  - lib/web_translate_it.rb
40
41
  - lib/web_translate_it/auto_fetch.rb
41
42
  - lib/web_translate_it/configuration.rb