magic_locales 0.0.1 → 0.0.2

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: 498e601a13a04035afb16656a7cf9af152e67472
4
- data.tar.gz: 360ebf86c851db764f25fe4e509befb3d684b4ae
3
+ metadata.gz: 29afe049a24c62e057bd1ea689aef47a83d3a87b
4
+ data.tar.gz: b920d3dce09ae628af9188497775d28b91671cfb
5
5
  SHA512:
6
- metadata.gz: fb9a01f7921ebbe5ca7d0c4ae95a2687b2a9872ba7f9aa7fbce22e420b453c76d590183b56e0fe2a3586d49ad14d3d51e6147fc5d6a24c76bf55be9df04c0177
7
- data.tar.gz: f1a2b08cad2fea9d4d3dfbd010c2e244b336fb801499aeeaf4ef7af6a4fe91527d8d3da8c6e0ba4d6a2e87e30157c3f9e52cf85251f88a0859f3cf1facce9fce
6
+ metadata.gz: 54e7e55f58b17ae4bfce5f6cdff0c4c8236229cb2fb8cb91e4ad6d52cb9dc4c839895621f82a0ce118a999f07f58c0226012052578f2cd94f9ad6b0251741774
7
+ data.tar.gz: f9134956a0191a2655981d52b9ecba5330c0e7db4bd41ffc1bfc6ad09af82bd22fa0e06480871ccb8c2fbffa97faa8d6722bb9e14abb9f1fd6138ac7a6fd9b9a
data/README.md CHANGED
@@ -37,6 +37,26 @@ The gem includes a seed file with most common european locales.
37
37
 
38
38
 
39
39
 
40
+ #### Features
41
+
42
+ - Seed-file for this languages
43
+ ```ruby
44
+ bg, cs, da, nl, en, fi, fr, de, el, hr, hu, it, pl, pt, ru, es, sv, uk
45
+ ```
46
+ - each translated in:
47
+ ```ruby
48
+ cs, de, en, es, fr, it, pl, ru
49
+ ```
50
+ - locale switch helper (only visible, if more than 1 locale is live)
51
+ ```ruby
52
+ <%= render "magic_locales/locale_switch" %>
53
+ ```
54
+ - helper to show fields for each active language (globalize helper)
55
+ ```ruby
56
+ <%= f.globalize_fields_for lc do |g| %>
57
+ # ..
58
+ <% end %>
59
+ ```
40
60
 
41
61
  #### License
42
62
  This project rocks and uses MIT-LICENSE.
@@ -5,8 +5,9 @@ module MagicLocales
5
5
  class InstallGenerator < ::Rails::Generators::Base
6
6
  include Rails::Generators::Migration
7
7
  source_root File.expand_path('../templates', __FILE__)
8
- desc "add magic_locales migrations"
9
8
 
9
+
10
+ desc "add magic_locales migrations"
10
11
  def self.next_migration_number(path)
11
12
  unless @prev_migration_nr
12
13
  @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
@@ -24,7 +25,7 @@ module MagicLocales
24
25
  empty_directory( "db/seeds" )
25
26
  end
26
27
 
27
- desc "add country-seed file"
28
+ desc "add locale-seed file"
28
29
  def copy_country_seeds
29
30
  copy_file( "locale_seeds.rb", "db/seeds/locales.rb" )
30
31
  end
@@ -34,7 +35,7 @@ module MagicLocales
34
35
  # => copy_file( "magic_initializer.rb", "config/initializers/magic_addresses.rb" )
35
36
  # => end
36
37
 
37
- desc "add magic_addresses routes"
38
+ desc "add magic_locales routes"
38
39
  def copy_mgca_routes
39
40
  route <<-ROUTE
40
41
 
@@ -1,3 +1,3 @@
1
1
  module MagicLocales
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_locales
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torsten Wetzel