spree_product_translations 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,34 +1,24 @@
1
1
  # Spree Product Translations #
2
2
 
3
- Makes product details, properties, prototypes, taxonomies and option types translatable by bridging the Globalize 2 plugin.
3
+ Makes product details, properties, prototypes, taxonomies and option types translatable by bridging the [Globalize3](https://github.com/svenfuchs/globalize3) gem.
4
4
 
5
5
  ## Installation and configuration: ##
6
6
 
7
- With Spree 0.11 installed and bootstrapped, install the spree-i18n extension and the Globalize 2 plugin:
7
+ In your Gemfile, add:
8
8
 
9
- script/extension install git://github.com/railsdog/spree-i18n.git
10
- script/plugin install git://github.com/joshmh/globalize2.git
11
-
12
- Then go ahead and install product_translations:
9
+ gem 'spree_product_translations'
13
10
 
14
- script/extension install git://github.com/oliverbarnes/spree-product-translations.git
15
-
16
- Configure product_translations to load after the i18n extension:
11
+ Then run
17
12
 
18
- # config/preinitializer.rb
19
- SPREE_EXTENSIONS_LOAD_ORDER = [:i18n, :product_translations, :all, :site]
13
+ rake db:migrate
20
14
 
21
- Then run
22
-
23
- rake db:migrate
24
-
25
15
  to create the translation tables defined in the migrations here.
26
16
 
27
17
  If you have pre-existing data, you'll need to run this rake task:
28
-
29
- rake spree:extensions:product_translations:globalize_legacy_data
30
18
 
31
- it will copy the original data over to the new translation tables. Globalize 2 doesn't default to the original model table for the default locale like v1 used to.
19
+ rake spree:extensions:product_translations:globalize_legacy_data
20
+
21
+ it will copy the original data over to the new translation tables. Globalize3 doesn't default to the original model table for the default locale like v1 used to.
32
22
 
33
23
  ## How to use it: ##
34
24
 
@@ -36,38 +26,49 @@ To edit the content in a specific language, simply change the locale on the lang
36
26
 
37
27
  ## Translated fields: ##
38
28
 
39
- Product
40
- name
41
- description
42
- meta_description
43
- meta_keywords
44
-
45
- Property
46
- presentation
47
-
48
- Prototype
49
- name
50
-
51
- Taxonomy
52
- name
53
-
54
- Taxon
55
- name
56
-
57
- OptionType
58
- presentation
59
-
60
- OptionValue
61
- presentation
29
+ Product:
30
+
31
+ * name
32
+ * description
33
+ * meta_description
34
+ * meta_keywords
35
+
36
+ Property:
37
+
38
+ * presentation
39
+
40
+ Prototype:
41
+
42
+ * name
43
+
44
+ Taxonomy:
45
+
46
+ * name
47
+
48
+ Taxon:
49
+
50
+ * name
51
+ * description
52
+
53
+ OptionType:
54
+
55
+ * presentation
56
+
57
+ OptionValue:
58
+
59
+ * presentation
62
60
 
63
61
  ## Running tests ##
64
62
 
63
+ The tests are not updated since the original fork of the spree 0.11 compatible version. They will pretty sure fail. Feel free to fork the project and create a pull request with tests.
64
+
65
+ ### Test information by [oliverbarnes](https://github.com/oliverbarnes) ###
65
66
  You might need to comment out the rspec gem requirement under config/environments/test.rb - for some reason, even with both the rspec gem and plugin installed, I would keep getting an annoying missing gem error.
66
67
 
67
- Spree is officially making a choice for Test::Unit anyway, so this shouldn't create a problem.
68
+ Spree is officially making a choice for Test::Unit anyway, so this shouldn't create a problem.
68
69
 
69
70
  (not that I don't like Rspec, I actually prefer it in other projects.)
70
71
 
71
72
  ## Feature requests and patches welcome ##
72
73
 
73
- If you see anything you need missing, or if you have a useful patch, feel free to submit them on the Issues section of the github project.
74
+ If you see anything you need missing, or if you have a useful patch, feel free to submit them on the Issues section of the github project.
@@ -27,7 +27,7 @@ module SpreeProductTranslations
27
27
  end
28
28
 
29
29
  ::Taxon.class_eval do
30
- translates :name
30
+ translates :name, :description
31
31
  end
32
32
 
33
33
  ::OptionType.class_eval do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_product_translations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeroen Jacobs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-02 00:00:00 +01:00
18
+ date: 2011-03-03 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency