jipiboily / spree_multi_lingual Goto Github PK
View Code? Open in Web Editor NEWSpree multi-lingual is a plugin to make multi locale store with Spree possible
License: BSD 3-Clause "New" or "Revised" License
Spree multi-lingual is a plugin to make multi locale store with Spree possible
License: BSD 3-Clause "New" or "Revised" License
When I add :
gem 'spree_multi_lingual', :git => "[email protected]:jipiboily/spree_multi_lingual.git"
gem 'globalize3', :git => 'git://github.com/svenfuchs/globalize3.git'
and bundle install it is giving the following error::
Could not find gem 'globalize3 (= 0.2.0) ruby', which is required by gem 'spree_multi_lingual (>= 0) ruby', in any of the sources.
Also if I remove :git => 'git://github.com/svenfuchs/globalize3.git' and do rails g spree_multi_lingual:install its giving error like ::
/home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/polyglot-0.3.3/lib/polyglot.rb:63:in polyglot_original_require': /home/ntf/.rvm/gems/ruby-1.8.7-p371/bundler/gems/spree_multi_lingual-6d332ef67094/lib/spree_multi_lingual/translates_with_accessors.rb:50: syntax error, unexpected ':', expecting kEND (SyntaxError) ... globalize_accessors locales: SpreeMultiLingual.languages, ... ^ /home/ntf/.rvm/gems/ruby-1.8.7-p371/bundler/gems/spree_multi_lingual-6d332ef67094/lib/spree_multi_lingual/translates_with_accessors.rb:50: syntax error, unexpected ':', expecting '=' ...Lingual.languages, attributes: params.to_a if accessors ^ from /home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
require'
from /home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in require' from /home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in
load_dependency'
from /home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in require' from /home/ntf/.rvm/gems/ruby-1.8.7-p371/bundler/gems/spree_multi_lingual-6d332ef67094/lib/spree_multi_lingual.rb:6 from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in
require'
from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in require' from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in
each'
from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in require' from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in
each'
from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in require' from /home/ntf/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler.rb:128:in
require'
from /home/ntf/SPREE_WITH_RAILS/blackpearl1.2/config/application.rb:7
from /home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.11/lib/rails/commands.rb:24:in require' from /home/ntf/.rvm/gems/ruby-1.8.7-p371/gems/railties-3.2.11/lib/rails/commands.rb:24 from script/rails:6:in
require'
from script/rails:6
fatal: The remote end hung up unexpectedly
Git error: command git clone '[email protected]:jipiboily/spree_multi_lingual.git' "/tmp/build_3syaahufqs1y8/vendor/bundle/ruby/1.9.1/cache/bundler/git/spree_multi_lingual-f89b8dade805d6961a231a32f085ca3c907e0ce1" --bare --no-hardlinks
in directory /tmp/build_3syaahufqs1y8 has failed.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To [email protected]:frozen-cliffs-7645.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:frozen-cliffs-7645.git'
config.I18n.fallbacks = true
should be read :
config.i18n.fallbacks = true
Switch the mailers to be invoked using ids, not model objects.
I think is related to this change: spree/spree@20b5ba1
hi @jipiboily,
do you think we should handle email translation like having email template in spree_multi_lingual gem ?
Stephane.
Hi,
I trying to deploy your extension on a spree store v1.1 but when I'm running the rails g spree_multi_lingual:install command I obtain this error :
/Users/olivierbuffon/.rvm/gems/ruby-1.9.3-p125/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require': cannot load such file -- easy_globalize3_accessors (LoadError)
Do you have any idea to solve that problem ?
Thanks.
I am not able to change the locale to update as the SWF video in Readme.md, I am using Chrome, and when I am selecting the locale in product edit page, nothing happen, is it under construction right now?
I saw this line in previous post :
filter :locale, :exclude => /^/admin/ if SpreeMultiLingual.use_locale_filter
I tried to add a locale selector in the admin header , but it doesn't change the locale
is it due to this filter exclude ? if yes , why it's not possible to change the admin locale ?
spree_multi_lingual is using globalize3 0.2.0.beta8 which has a bug when you try to drop the translation tables: https://github.com/svenfuchs/globalize3/blob/v0.2.0/lib/globalize/active_record/migration.rb#L136
which has already been fixed here:
svenfuchs/globalize3@7dc900c
any particular reason why still using 0.2.0.beta8? Version 0.2.0 still has this bug!
hi i get a sytax error while installation :
/Library/Ruby/Gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in polyglot_original_require': /Users/umuthanuyan/railsprojects/----/vendor/cache/spree_multi_lingual-86981bd6d407/lib/spree_multi_lingual/translates_with_accessors.rb:50: syntax error, unexpected ':', expecting kEND (SyntaxError) ... globalize_accessors locales: SpreeMultiLingual.languages, ... ^ /Users/umuthanuyan/railsprojects/----/vendor/cache/spree_multi_lingual-86981bd6d407/lib/spree_multi_lingual/translates_with_accessors.rb:50: syntax error, unexpected ':', expecting '=' ...Lingual.languages, attributes: params.to_a if accessors ^ from /Library/Ruby/Gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in
load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in require' from /Users/umuthanuyan/railsprojects/----/vendor/cache/spree_multi_lingual-86981bd6d407/lib/spree_multi_lingual.rb:6 from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:68:in
require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:68:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:66:in
each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:66:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:55:in
each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:55:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler.rb:128:in
require'
from /Users/umuthanuyan/railsprojects/----/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24:in require' from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24 from script/rails:6:in
require'
from script/rails:6
Current globalize3 version is 0.3.0 (also on master git), can we update the gemspec?
Due to a bug in the routing-filter gem, which incorrectly monkey patched rack-mount (svenfuchs/routing-filter#15), the use of spree_multi_lingual (which depends on routing-filter) causes errors when using multiple constrained catch all routes. What to do?
I thought it was solved but running again the migrations on a brand new sample db leads to other errors when migrating products ... I also mentioned this issue to Spree gem (radar) as it could be a Spree issue ... 'on_demand' option being modified recently ..
as there is no uninstall process , it's quite a little bit messay to go back to initial Spree samples state ..
need to remove multilingual models decorators...
need to comment multilingual initializer
need to comment gem multilingual globalize3 in Gemfile
run bundle install
run bundle exec rake db:bootstrap to get a brand new sample data db
THEN
need to uncomment gem multilingual globalize3 in Gemfile
run bundle install
need to uncomment multilingual initializer
need to add multilingual models decorators back
run rails g spree_multi_lingual:install
then again ...
here is the error
== MigrateDataForProducts: migrating =========================================
rake aborted!
An error has occurred, all later migrations canceled:
cannot set on_demand of product with variants
I 've done some debugging ( I'm not aware of Spree internals at all..)
by running in the console w debugger
Spree::Product.find_each { |product| debugger; product.update_attributes!(product.untranslated_attributes, :without_protection => true) }
this error happen on Spree::Product # 528469905
which seems to be the first product ( among the 16 in samples) to be a master with 3 variants
( no issues w previous products in the list: 107377505, 176895127, 187438981, 248786582, 302032070, 398400663, 459084718, 500501192, they are all master variants only... )
the error comes from trying to update: "on_demand"=>false on this product w variants...
product = Spree::Product.find(528469905)
product.untranslated_attributes
=> {
"name"=>"Spree Baseball Jersey",
"description"=>"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla nonummy aliquet mi. Proin lacus. Ut placerat. Proin consequat, justo sit amet tempus consequat, elit est adipiscing odio, ut egestas pede eros in diam. Proin varius, lacus vitae suscipit varius, ipsum eros convallis nisi, sit amet sodales lectus pede non est. Duis augue. Suspendisse hendrerit pharetra metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur nec pede. Quisque volutpat, neque ac porttitor sodales, sem lacus rutrum nulla, ullamcorper placerat ante tortor ac odio. Suspendisse vel libero. Nullam volutpat magna vel ligula. Suspendisse sit amet metus. Nunc quis massa. Nulla facilisi. In enim. In venenatis nisi id eros. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc sit amet felis sed lectus tincidunt egestas. Mauris nibh.",
"meta_description"=>nil,
"meta_keywords"=>nil,
"permalink"=>"spree-baseball-jersey",
"id"=>528469905,
"available_on"=>Sun, 17 Feb 2013 19:25:06 CET +01:00,
"deleted_at"=>nil,
"tax_category_id"=>25484906,
"shipping_category_id"=>nil,
"count_on_hand"=>30,
"created_at"=>Sun, 17 Feb 2013 19:25:06 CET +01:00,
"updated_at"=>Sun, 17 Feb 2013 19:25:06 CET +01:00,
"on_demand"=>false
}
hope this helps ..Tested with Spree config
config.track_inventory_levels=false
and NO ERROR ....
When using the Spree sample data , there are some products with variants, but by default track_inventory_levels is 'true'...
as I raised this issue with Spree ge, I don't know if it has any impact on your gem, or if it's only related to Spree sample data....
======= debugging in console ==========
(rdb:1) product.id
528469905
(rdb:1) product
Spree::Product::Translation Load (0.9ms) SELECT spree_product_translations
.* FROM spree_product_translations
WHERE spree_product_translations
.spree_product_id
= 528469905
Spree::Product::Translation Load (0.8ms) SELECT spree_product_translations
.* FROM spree_product_translations
WHERE spree_product_translations
.spree_product_id
= 528469905 AND spree_product_translations
.locale
= 'en' LIMIT 1
(rdb:1) c
(0.4ms) BEGIN
(0.9ms) SELECT COUNT(*) FROM spree_variants
WHERE spree_variants
.product_id
= 528469905 AND spree_variants
.is_master
= 0 AND spree_variants
.deleted_at
IS NULL
(0.3ms) ROLLBACK
RuntimeError: cannot set on_demand of product with variants
i want to add different price for each language.
it can not possible with multi lingual now but can you attach this funtionality?
hi @jipiboily,
are here any reason we are stripping out return line and tabs ?
This might be an issue when translating textarea like I am doing with spree_essential_cms : https://github.com/sbounmy/spree_essential_cms/tree/i18n
I got message "Can't mass-assign protected attributes: locale" when doing the migration.
rails g spree_multi_lingual:install
append app/assets/javascripts/store/all.js
append app/assets/javascripts/admin/all.js
insert app/assets/stylesheets/store/all.css
insert app/assets/stylesheets/admin/all.css
run bundle exec rake railties:install:migrations FROM=spree_multi_lingual from "."
Would you like to run the migrations now? [Y/n] Y
run bundle exec rake db:migrate from "."
== MigrateDataForProducts: migrating =========================================
rake aborted!
An error has occurred, this and all later migrations canceled:
cannot set on_demand of product with variants
anybody with solution or same issue here..........
Spree 1.1.1, spree_multi_lingual 1-1-stable branch.
I set :it as default on spree configuration and ['it', 'en'] in spree_multi_lingual initalizer.
In edit product field price is localized in :en, as 1,111.11 with separator and when I save it became 1.11
Same result with 1.111,11 (localization in italian).
Only work without separator, 1111.11 is saved correctly, as 1111,11 .
I try add delocalize gem without results.
On my spree 1.2.x, i have spree_multi_lingual and spree_editor.
In the admin, when i switch locale with the spree_multi_lingual dropdown, the tinyMCE doesn't reload with the translated content because translated_fields are created only if we change the locale.
I worked on a solution who need to be improved.
At this time, i'm able to use those extensions if i override the spree_multi_lingual_class.js.coffee. It works only for 2 languages on the website, it use a setTimeout (i hate that) and he doesn't check if spree_editor is running or not.
This is my concept proof :
$(document).ready ->
ml = new SpreeMultiLingual
ml.create_localized_fields()
$("#spree_multi_lingual_dropdown").change (e) ->
ml.change_language(@.value)
# declare the class in global scope so we can extend it from within our app
class window.SpreeMultiLingual
constructor: ->
@translated_fields = window.spree_multi_lingual.translated_fields
@default_locale = window.spree_multi_lingual.backend_locale
@current_locale = @default_locale
@other_locale = $('#spree_multi_lingual_dropdown option').not(':selected').attr('value')
create_localized_fields: =>
for field in @translated_fields
field_name = @localized_field_name(field)
if !$("#" + field_name).length
@duplicate_field(field)
setTimeout =>
@show_fields()
, 1000
change_language: (locale) =>
@current_locale = locale
@make_sure_field_exists_for_language()
@show_fields()
duplicate_field: (field) =>
field_name = @localized_field_name(field)
if $("#" + field)[0]
new_field_name_value = $("#" + field).attr("name").substring(0,$("#" + field).attr("name").length - 1) + "_" + @other_locale + "]"
new_field = $("#" + field).clone().attr("id", field_name).attr("name", new_field_name_value).removeClass("sml-localized-field-"+@default_locale)
value = eval("window.spree_multi_lingual.translated_fields_values['#{field_name}']")
new_field.val(value) if value
$("#" + field).after(new_field)
@add_localized_class(field_name)
@add_localized_class(field, @default_locale)
make_sure_field_exists_for_language: =>
for field in @translated_fields
field_name = @localized_field_name(field)
if !$("#" + field_name).length
@duplicate_field(field)
show_fields: =>
for field in $(".sml-localized-field")
$(field).hide()
$(field).next('.mceEditor').hide()
if $(field).hasClass("sml-localized-field-#{@current_locale}")
if $(field).is('textarea')
$(field).next('.mceEditor').show()
else
$(field).show()
localized_field_name: (field) =>
(field + "_" + @other_locale)
add_localized_class: (id, locale = @other_locale) =>
@add_class(id, "sml-localized-field")
@add_class(id, "sml-localized-field-" + locale)
add_class: (id, klass) ->
$("#" + id).addClass(klass) unless $("#" + id).hasClass(klass)
Could you help me to improve this class ?
there is an image decorator, but the spree_asset_translations table is not created ..
ActionView::Template::Error (Mysql2::Error: Table 'my_store_dev.spree_asset_translations' doesn't exist: SHOW FULL FIELDS FROM spree_asset_translations
):
got it working by adding a new migration
class AddTranslationToAsset < ActiveRecord::Migration
def up
Spree::Asset.create_translation_table! :alt => :string
end
def down
Spree::Asset.drop_translation_table!
end
end
and a new decorator :
module Spree
Asset.class_eval do
translates :alt
end
end
seems the image decorator is not anymore useful w latest Spree 1.3
I need something like this where I can have a unique translated title and description for each product. Is spree_multi_lingual the best thing available now for spree/solidus? I'm still on 2.4-stable.
In the installation part, I can't bundle the gem with adding the following code to Gemfile
gem "spree_multi_lingual", :git => "[email protected]:jipiboily/spree_multi_lingual.git"
And it should be
gem 'spree_multi_lingual', :git => 'git://github.com/jipiboily/spree_multi_lingual.git'
I think you should add description to shipping_method_decorator according to migration add_description_to_shipping_method.spree_multi_lingual
module Spree
ShippingMethod.class_eval do
translates :name, :description
end
end
I installed and used your gem wo any trouble until then ... ( w spree-example demo)
Now I started translating (setting up) the products descriptions into :en and :fr
Got correctly in spree_product_translations 2 records for the same spree_product_id one for each locale... ( 16 rows in spree_products , 32 rows in spree_product_translations..)
When displaying the products on the home page ( previously 6 items per page., 3 pages )..
now the pagination changed , I have the double of pages 6 pages ! and added 3 are empty ... so it's a matter of pagination ... any clue ?
thanks
Hy, is possible to use only :it
language. I need to disable all non italian routes and I need to make :it
the default language. I need some special configuration?
Currently, search is only searching in Spree::Product and not in the the Spree::Product::Translation (spree_product_translations). I did something in my project about that, but maybe something less custom could be done within this extension.
@sbounmy have you faced that problem too?
rails 3.1.2 / ruby 1.9.3 / Spree 1.3.2
data from Spree demo test data ... ( will check them)
Would you like to run the migrations now? [Y/n]
run bundle exec rake db:migrate from "."
......
== MigrateDataForProducts: migrating =========================================
rake aborted!
An error has occurred, this and all later migrations canceled:
Validation failed: Price can't be blank
/Users/yves/.rvm/gems/ruby-1.9.3-p374@rails32/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in `save!'
I re-installed Spree data from scratch into a new MySQL db ... then run the migratiion
passed OK ...
I have an error running migrations on 1-1-stable branch:
** Execute db:migrate
== MigrateDataForProducts: migrating =========================================
rake aborted!
An error has occurred, all later migrations canceled:
Can't mass-assign protected attributes: id, created_at, updated_at, count_on_hand
Then I temporary add this line
attr_accessible :id, :created_at, :updated_at, :count_on_hand
to Spree::Product model and they run smooth.
I don't know how o solve this issue without override the model.
@bricesanchez @jipiboily @stevenjenkins I think we need to sync 1.2 and 1-3-stable branches. And then I will be able to start merging pull requests and maintain a master branch.
@bricesanchez I've started a looking at your branch 1.2 (if I remember correctly) :
What are the models 'ContentChunk', 'Video' is this a custom branch ?
I followed the readme instructions (with gem 'globalize3', '0.2.0' in gemfile to get around dependency)
until...
rails g spree_multi_lingual:install
[...]/deface-0.9.1/lib/deface/dsl/loader.rb:28:in instance_eval': (eval):1: syntax error, unexpected tIDENTIFIER, expecting $end (SyntaxError) ...ink_part do')" closing_selector 'code[erb-silent]:contains("... ... ^ from [...]/deface-0.9.1/lib/deface/dsl/loader.rb:28:in
block in load'
from [...]/deface-0.9.1/lib/deface/dsl/loader.rb:17:in open' from [...]/deface-0.9.1/lib/deface/dsl/loader.rb:17:in
load'
from [...]/deface-0.9.1/lib/deface/environment.rb:66:in block (2 levels) in enumerate_and_load' from [...]/deface-0.9.1/lib/deface/environment.rb:65:in
glob'
from [...]/deface-0.9.1/lib/deface/environment.rb:65:in block in enumerate_and_load' from [...]/deface-0.9.1/lib/deface/environment.rb:55:in
each'
from [...]/deface-0.9.1/lib/deface/environment.rb:55:in enumerate_and_load' from [...]/deface-0.9.1/lib/deface/environment.rb:49:in
load_overrides'
from [...]/deface-0.9.1/lib/deface/environment.rb:31:in block in load_all' from [...]/deface-0.9.1/lib/deface/environment.rb:29:in
each'
from [...]/deface-0.9.1/lib/deface/environment.rb:29:in load_all' from [...]/deface-0.9.1/lib/deface/railtie.rb:12:in
activate'
from [...]/activesupport-3.2.12/lib/active_support/callbacks.rb:429:in _run__3500165977034887579__prepare__3119406908442186579__callbacks' from [...]/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in
__run_callback'
from [...]/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in _run_prepare_callbacks' from [...]/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in
run_callbacks'
from [...]/actionpack-3.2.12/lib/action_dispatch/middleware/reloader.rb:74:in prepare!' from [...]/actionpack-3.2.12/lib/action_dispatch/middleware/reloader.rb:48:in
prepare!'
from [...]/railties-3.2.12/lib/rails/application/finisher.rb:47:in block in <module:Finisher>' from [...]/railties-3.2.12/lib/rails/initializable.rb:30:in
instance_exec'
from [...]/railties-3.2.12/lib/rails/initializable.rb:30:in run' from [...]/railties-3.2.12/lib/rails/initializable.rb:55:in
block in run_initializers'
from [...]/railties-3.2.12/lib/rails/initializable.rb:54:in each' from [...]/railties-3.2.12/lib/rails/initializable.rb:54:in
run_initializers'
from [...]/railties-3.2.12/lib/rails/application.rb:136:in initialize!' from [...]/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in
method_missing'
from /Users/daniellebakhazi/Sites/rudy/config/environment.rb:5:in <top (required)>' from [...]/polyglot-0.3.3/lib/polyglot.rb:63:in
require'
from [...]/polyglot-0.3.3/lib/polyglot.rb:63:in require' from [...]/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in
block in require'
from [...]/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in load_dependency' from [...]/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in
require'
from [...]/railties-3.2.12/lib/rails/application.rb:103:in require_environment!' from [...]/railties-3.2.12/lib/rails/commands.rb:25:in
<top (required)>'
from script/rails:6:in require' from script/rails:6:in
I'm running ruby-1.9.3-p286 (via RVM) and Rails 3.2.12.
Any ideas? I saw that @sbounmy posted a similar issue about this, but there is no fix as far as I can see.
I am having an issue with i18n and spree. If you look this file:
https://github.com/spree/spree/blob/1-1-stable/core/app/helpers/spree/admin/navigation_helper.rb
If you look line 27, I'm having a particular issue where request.fullpath returns does not return the locale at the beginning of the path, while root_path is '/:locale', in my case '/:fr'. So the string comparison made at this line is never met.
I could not think of a proper fix for this particular case. Anyone got a clue?
When I put config.I18n.fallbacks = true in config/application.rb I get the error:
/Users/martijnlafeber/.rvm/gems/ruby-1.9.3-p0@ladress-spree/gems/railties-3.1.3/lib/rails/railtie/configuration.rb:78:in `method_missing': undefined method `I18n' for #<Rails::Application::Configuration:0x007fb11ea417b8> (NoMethodError)
When I leave it out and try to load a product for which there aren't any translations, I get a Product for which all the fields that could be translated are nil.
I added some attributes to my Product model which I'd need to support locales.
I'm already using spree_multi_lingual and I tried to take advantage of easy_globalize3_accessors and override in my product_decorator the translated attributes (after creating and running the corresponding migrations).
Yet, only the ones defined in spree_multi_lingual get translated.
I'll solve this problem by forking the gem and making it suit my requirements, but
what about adding the possibility of add/remove the translated attributes of a product?
Hi,
i really like your gem and i have used it on some shops. I would like to know if you are planning to upgrade it soon to be compatible with the new version of spree.
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.