Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix translation_table_alias to be valid for locales with a dash (e.g. en-US)

mrbrdo43e932771bb0
diff --git a/core/app/models/concerns/spree/translatable_resource.rb b/core/app/models/concerns/spree/translatable_resource.rb
index 73c0de27b4..6ebec248c0 100644
--- a/core/app/models/concerns/spree/translatable_resource.rb
+++ b/core/app/models/concerns/spree/translatable_resource.rb
@@ -18,7 +18,7 @@ module Spree
end
def translation_table_alias
- "#{self::Translation.table_name}_#{Mobility.locale}"
+ "#{self::Translation.table_name}_#{Mobility.locale.to_s.underscore}"
end
end
end