spree_simple_product_translations 0.0.7.beta1 → 0.0.7.beta2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -25,13 +25,17 @@ If you have pre-existing data, you'll need to run this rake task:
25
25
  rake spree:extensions:product_translations:globalize_legacy_data
26
26
 
27
27
  # Open issues
28
+ ## Globalize3
28
29
  In the current version of [Globalize3](https://github.com/svenfuchs/globalize3) there is an issue with fallbacks. When you add new translations in the forms, but leave some of them blank, they won't fall back to the default locale. This is because [Globalize3](https://github.com/svenfuchs/globalize3) only loads fallbacks when the values are nil. Because of the way Rails handles these attributes, they will be stored as blank strings into the database.
29
30
 
30
31
  If you are using the fallbacks, you might want to use [my fork](https://github.com/jeroenj/globalize3) of [Globalize3](https://github.com/svenfuchs/globalize3) in your Gemfile until it gets merged into [Globalize3](https://github.com/svenfuchs/globalize3)'s [master branch](https://github.com/svenfuchs/globalize3):
31
32
 
32
33
  gem 'globalize3', :git => 'git://github.com/jeroenj/globalize3.git', :branch => 'fallbacks-master'
33
34
 
34
- For those interested, you can follow [the pull request here](https://github.com/svenfuchs/globalize3/pull/32).
35
+ For those interested, you can follow [the pull request here](https://github.com/svenfuchs/globalize3/pull/47).
36
+
37
+ ## Empty forms (properties & taxons)
38
+ Spree is using symbols instead of objects to define `form_for`'s for properties and taxons. This causes the forms to be empty. This can be fixed by overriding both edit pages with the changes found in [this pull request](https://github.com/spree/spree/pull/326).
35
39
 
36
40
  # To add in future releases
37
41
  * Add form to:
@@ -14,7 +14,7 @@
14
14
  <%= f.globalize_fields_for l do |g| %>
15
15
  <% default_locale = l.to_sym == I18n.default_locale %>
16
16
  <%= f.field_container :name do %>
17
- <%= g.label :name, t("name") %> <% if default_locale %><span class="required">*</span><br /><% end %>
17
+ <%= g.label :name, t("name") %> <% if default_locale %><span class="required">*</span><% end %><br />
18
18
  <%= g.text_field :name, :class => 'fullwidth title' %>
19
19
  <%= f.error_message_on :name %>
20
20
  <% end %>
@@ -9,7 +9,7 @@ module ActionView
9
9
  @index = @index ? @index + 1 : 1
10
10
  object_name = "#{@object_name}[translations_attributes][#{@index}]"
11
11
  form_object = @object || @object_name.to_s.camelize.constantize.new
12
- object = form_object.translations.select{|t| t.locale.to_s == locale}.first || form_object.translations.find_by_locale(locale)
12
+ object = form_object.translations.select{|t| t.locale.to_s == locale.to_s}.first
13
13
  @template.concat @template.hidden_field_tag("#{object_name}[id]", object ? object.id : "")
14
14
  @template.concat @template.hidden_field_tag("#{object_name}[locale]", locale)
15
15
  @template.fields_for(object_name, object, options, &proc)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_simple_product_translations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196377
4
+ hash: 62196383
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 7
10
10
  - beta
11
- - 1
12
- version: 0.0.7.beta1
11
+ - 2
12
+ version: 0.0.7.beta2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Jeroen Jacobs
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-05-18 00:00:00 +02:00
20
+ date: 2011-05-19 00:00:00 +02:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency