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.

Simplify Flatpickr due to formatting issues using _ or - in file naming.

Matthew Kennedy00e41088d0a8
diff --git a/backend/app/helpers/spree/admin/base_helper.rb b/backend/app/helpers/spree/admin/base_helper.rb
index c757298244..a91b37cc61 100644
--- a/backend/app/helpers/spree/admin/base_helper.rb
+++ b/backend/app/helpers/spree/admin/base_helper.rb
@@ -10,7 +10,7 @@ module Spree
FLATPICKR_SUPPORTED_LOCALES = %w[
ar at az be bg bn bs cat cs cy da de eo es et fa fi fo fr ga gr he
hi hr hu id is it ja ka km ko kz lv mk mn ms my nl no pa pl pt ro ru
- si sk sl sq sr-cyr sr sv th tr uk uz uz_latn vn zh-tw zh
+ si sk sl sq sr sv th tr uk uz vn zh
].freeze
def flash_alert(flash)
@@ -229,9 +229,7 @@ module Spree
def flatpickr_local_fallback
stripped_locale = I18n.locale.to_s.split('-').first
- if ['sr_cyr', 'uz_latn', 'zh_tw'].include?(I18n.locale.to_s.downcase)
- I18n.locale.to_s.parameterize
- elsif FLATPICKR_SUPPORTED_LOCALES.include? stripped_locale
+ if FLATPICKR_SUPPORTED_LOCALES.include? stripped_locale
stripped_locale
else
'default'