Sha256: e48d96769eb0e9af2bb3e2eb0ca9a2cc2894352c517f2ec396da9d765aaf61de
Contents?: true
Size: 1.39 KB
Versions: 5
Compression:
Stored size: 1.39 KB
Contents
<script> if (Spree === undefined) { var Spree = {} } Spree.translations = <%== JSON.dump( I18n.t("spree").merge({ abbr_day_names: I18n.t(:abbr_day_names, scope: :date), month_names: I18n.t(:month_names, scope: :date).reject(&:blank?), currency_separator: I18n.t('number.currency.format.separator'), currency_delimiter: I18n.t('number.currency.format.delimiter'), activerecord: I18n.t('activerecord') })) %>; Spree.currencyInfo = <%== JSON.dump( Spree::Config.available_currencies.map { |c| format = if c.format.present? c.format.gsub("%u", "%s").gsub("%n", "%v") elsif c.symbol == "" || c.symbol_first "%s%v" else "%v %s" end [c.id.to_s.upcase, [ c.symbol || "ยค", c.exponent, format ]] }.to_h) %>; </script> <script data-hook='admin-custom-translations'> </script> <% select2_locale_path = "solidus_admin/select2_locales/select2_locale_#{I18n.locale}.js" %> <% if I18n.locale != :en && I18n.locale && ( Rails.application.assets&.find_asset(select2_locale_path) || # compiled on the fly Rails.application.assets_manifest.assets[select2_locale_path] # precompiled ) %> <%= javascript_include_tag select2_locale_path, data: {turbolinks_track: 'reload'} %> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems