i18n_screwdriver 0.2.0 → 0.2.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.
data/README.rdoc CHANGED
@@ -8,7 +8,11 @@ stick to the rails standard libraries. Therefor I created this small toolbox.
8
8
 
9
9
  == Installation
10
10
 
11
- First run the generator that copies the translation rake task to your application task dir.
11
+ Just include the screwdriver gem in your Bundler Gemfile
12
+
13
+ gem 'i18n_screwdriver'
14
+
15
+ Then run the generator that copies the translation rake task to your application task dir.
12
16
 
13
17
  rails g screwdriver
14
18
 
@@ -35,13 +39,14 @@ It gets recreated everytime you run the tasks - edit those translations in your
35
39
 
36
40
  TRANSLATE=en rake i18n:translate
37
41
 
38
-
39
42
  == Next steps
40
43
 
44
+ * fix drawback that multiple translations on the same name are currently not recognized, happens very well with options for select tags
45
+ * also recognize model validation error messages
41
46
  * DRY the code
42
47
  * test more
43
48
  * use ruby_parser instead of regex
44
- * support interpolation
49
+ * support interpolation like "my name is #{user.full_name} and I am living in #{user.location}"
45
50
 
46
51
  == Contributing to i18n_screwdriver
47
52
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{i18n_screwdriver}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias Miesel"]
data/lib/tasks/i18n.rake CHANGED
@@ -37,7 +37,7 @@ namespace :i18n do
37
37
 
38
38
  # add new keys with empty translation to hash
39
39
  translations.each_key do |key|
40
- existing_translations[key] = "TRANSLATION_MISSING: #{key}" unless existing_translations.has_key?(key)
40
+ existing_translations[key] = "TRANSLATION_MISSING" unless existing_translations.has_key?(key)
41
41
  end
42
42
  write_translation_file(language, existing_translations)
43
43
  end
@@ -51,7 +51,7 @@ namespace :i18n do
51
51
  existing_translations = existing_translations[language]
52
52
  puts "Translating #{existing_translations.keys.size} entries to <#{language}> (enter :q to save and quit):"
53
53
  existing_translations.keys.sort.each do |key|
54
- if existing_translations[key] == "TRANSLATION_MISSING"
54
+ if ["TRANSLATION_MISSING", ""].include?(existing_translations[key])
55
55
  puts "> #{key}"
56
56
  input = STDIN.gets.chomp
57
57
  if input == ":q"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_screwdriver
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Miesel