<commit_before><script>
  Spree.translations = <%==
  { abbr_day_names:           I18n.t(:abbr_day_names, scope: :date),
    add:                      Spree.t(:add),
    are_you_sure:             Spree.t(:are_you_sure),
    are_you_sure_delete:      Spree.t(:are_you_sure_delete),
    bill_address:             Spree.t(:bill_address),
    cancel:                   Spree.t(:cancel,  scope: :actions),
    choose_a_customer:        Spree.t(:choose_a_customer),
    confirm_delete:           Spree.t(:confirm_delete),
    currency_separator:       I18n.t('number.currency.format.separator'),
    cut:                      Spree.t(:cut),

    date_picker:              Spree.t(:js_format, scope: 'date_picker', default: 'yy/mm/dd'),
    firstDay:                 Spree.t(:first_day, scope: 'date_picker', default: (0).to_i),
    rangeSep:                 Spree.t(:rangeSeparator, scope: 'date_picker', default: ' to '),
    weekAbbr:                 Spree.t(:weekAbbreviation, scope: 'date_picker', default: 'Wk'),
    scrollTitle:              Spree.t(:scrollTitle, scope: 'date_picker', default: 'Scroll to increment'),
    toggleTitle:              Spree.t(:toggleTitle, scope: 'date_picker', default: 'Click to toggle'),
    am:                       Spree.t(:am, scope: 'date_picker', default: 'AM'),
    pm:                       Spree.t(:pm, scope: 'date_picker', default: 'PM'),
    yearAriaLabel:            Spree.t(:yearAriaLabel, scope: 'date_picker', default: 'Year'),
    hourAriaLabel:            Spree.t(:hourAriaLabel, scope: 'date_picker', default: 'Hour'),
    minuteAriaLabel:          Spree.t(:minuteAriaLabel, scope: 'date_picker', default: 'Minute'),

    sun:                      Spree.t(:sun, scope: 'date_picker', default: 'Sun'),
    mon:                      Spree.t(:mon, scope: 'date_picker', default: 'Mon'),
    tue:                      Spree.t(:tue, scope: 'date_picker', default: 'Tue'),
    wed:                      Spree.t(:wed, scope: 'date_picker', default: 'Wed'),
    thu:                      Spree.t(:thu, scope: 'date_picker', default: 'Thu'),
    fri:                      Spree.t(:fri, scope: 'date_picker', default: 'Fri'),
    sat:                      Spree.t(:sat, scope: 'date_picker', default: 'Sat'),

    lh_jan:                   Spree.t(:lh_jan, scope: 'date_picker', default: 'January'),
    lh_feb:                   Spree.t(:lh_feb, scope: 'date_picker', default: 'February'),
    lh_mar:                   Spree.t(:lh_mar, scope: 'date_picker', default: 'March'),
    lh_apr:                   Spree.t(:lh_apr, scope: 'date_picker', default: 'April'),
    lh_may:                   Spree.t(:lh_may, scope: 'date_picker', default: 'May'),
    lh_jun:                   Spree.t(:lh_jun, scope: 'date_picker', default: 'June'),
    lh_jul:                   Spree.t(:lh_jul, scope: 'date_picker', default: 'July'),
    lh_aug:                   Spree.t(:lh_aug, scope: 'date_picker', default: 'August'),
    lh_sep:                   Spree.t(:lh_sep, scope: 'date_picker', default: 'September'),
    lh_oct:                   Spree.t(:lh_oct, scope: 'date_picker', default: 'October'),
    lh_nov:                   Spree.t(:lh_nov, scope: 'date_picker', default: 'November'),
    lh_dec:                   Spree.t(:lh_dec, scope: 'date_picker', default: 'December'),

    destroy:                  Spree.t(:destroy, scope: :actions),
    edit:                     Spree.t(:edit,    scope: :actions),
    find_a_taxon:             Spree.t(:find_a_taxon),
    item_stock_placeholder:   Spree.t(:choose_location),
    loading:                  Spree.t(:loading),
    month_names:              I18n.t(:month_names, scope: :date).instance_eval {|o|
                                     o.try(:reject, &:blank?) || o},
    more:                     Spree.t(:more),
    name:                     Spree.t(:name),
    new_taxon:                Spree.t(:new_taxon),
    next:                     Spree.t(:next),
    no_results:               Spree.t(:no_results),
    option_type_placeholder:  Spree.t(:option_type_placeholder),
    paste:                    Spree.t(:paste),
    previous:                 Spree.t(:previous),
    remove:                   Spree.t(:remove),
    rename:                   Spree.t(:rename),
    save:                     Spree.t(:save,    scope: :actions),
    searching:                Spree.t(:searching),
    server_error:             Spree.t(:server_error),
    select_an_option:         Spree.t(:select_an_option),
    sku:                      Spree.t(:sku),
    type_to_search:           Spree.t(:type_to_search),
    taxon_placeholder:        Spree.t(:taxon_placeholder),
    taxonomy_tree_error:      Spree.t(:taxonomy_tree_error),
    tags_placeholder:         Spree.t(:tags_placeholder),
    tracking:                 Spree.t(:tracking),
    variant_placeholder:      Spree.t(:variant_placeholder),
    value:                    Spree.t(:value)
  }.to_json
%>
</script>

<% if I18n.locale != :en %>
  <%= javascript_include_tag "select2_locale_#{I18n.locale}" %>
<% end %><commit_msg>[SD-1129] Fixes error after setting certain languages for a store<commit_after><script>
  Spree.translations = <%==
  { abbr_day_names:           I18n.t(:abbr_day_names, scope: :date),
    add:                      Spree.t(:add),
    are_you_sure:             Spree.t(:are_you_sure),
    are_you_sure_delete:      Spree.t(:are_you_sure_delete),
    bill_address:             Spree.t(:bill_address),
    cancel:                   Spree.t(:cancel,  scope: :actions),
    choose_a_customer:        Spree.t(:choose_a_customer),
    confirm_delete:           Spree.t(:confirm_delete),
    currency_separator:       I18n.t('number.currency.format.separator'),
    cut:                      Spree.t(:cut),

    date_picker:              Spree.t(:js_format, scope: 'date_picker', default: 'yy/mm/dd'),
    firstDay:                 Spree.t(:first_day, scope: 'date_picker', default: (0).to_i),
    rangeSep:                 Spree.t(:rangeSeparator, scope: 'date_picker', default: ' to '),
    weekAbbr:                 Spree.t(:weekAbbreviation, scope: 'date_picker', default: 'Wk'),
    scrollTitle:              Spree.t(:scrollTitle, scope: 'date_picker', default: 'Scroll to increment'),
    toggleTitle:              Spree.t(:toggleTitle, scope: 'date_picker', default: 'Click to toggle'),
    am:                       Spree.t(:am, scope: 'date_picker', default: 'AM'),
    pm:                       Spree.t(:pm, scope: 'date_picker', default: 'PM'),
    yearAriaLabel:            Spree.t(:yearAriaLabel, scope: 'date_picker', default: 'Year'),
    hourAriaLabel:            Spree.t(:hourAriaLabel, scope: 'date_picker', default: 'Hour'),
    minuteAriaLabel:          Spree.t(:minuteAriaLabel, scope: 'date_picker', default: 'Minute'),

    sun:                      Spree.t(:sun, scope: 'date_picker', default: 'Sun'),
    mon:                      Spree.t(:mon, scope: 'date_picker', default: 'Mon'),
    tue:                      Spree.t(:tue, scope: 'date_picker', default: 'Tue'),
    wed:                      Spree.t(:wed, scope: 'date_picker', default: 'Wed'),
    thu:                      Spree.t(:thu, scope: 'date_picker', default: 'Thu'),
    fri:                      Spree.t(:fri, scope: 'date_picker', default: 'Fri'),
    sat:                      Spree.t(:sat, scope: 'date_picker', default: 'Sat'),

    lh_jan:                   Spree.t(:lh_jan, scope: 'date_picker', default: 'January'),
    lh_feb:                   Spree.t(:lh_feb, scope: 'date_picker', default: 'February'),
    lh_mar:                   Spree.t(:lh_mar, scope: 'date_picker', default: 'March'),
    lh_apr:                   Spree.t(:lh_apr, scope: 'date_picker', default: 'April'),
    lh_may:                   Spree.t(:lh_may, scope: 'date_picker', default: 'May'),
    lh_jun:                   Spree.t(:lh_jun, scope: 'date_picker', default: 'June'),
    lh_jul:                   Spree.t(:lh_jul, scope: 'date_picker', default: 'July'),
    lh_aug:                   Spree.t(:lh_aug, scope: 'date_picker', default: 'August'),
    lh_sep:                   Spree.t(:lh_sep, scope: 'date_picker', default: 'September'),
    lh_oct:                   Spree.t(:lh_oct, scope: 'date_picker', default: 'October'),
    lh_nov:                   Spree.t(:lh_nov, scope: 'date_picker', default: 'November'),
    lh_dec:                   Spree.t(:lh_dec, scope: 'date_picker', default: 'December'),

    destroy:                  Spree.t(:destroy, scope: :actions),
    edit:                     Spree.t(:edit,    scope: :actions),
    find_a_taxon:             Spree.t(:find_a_taxon),
    item_stock_placeholder:   Spree.t(:choose_location),
    loading:                  Spree.t(:loading),
    month_names:              I18n.t(:month_names, scope: :date).instance_eval {|o|
                                     o.try(:reject, &:blank?) || o},
    more:                     Spree.t(:more),
    name:                     Spree.t(:name),
    new_taxon:                Spree.t(:new_taxon),
    next:                     Spree.t(:next),
    no_results:               Spree.t(:no_results),
    option_type_placeholder:  Spree.t(:option_type_placeholder),
    paste:                    Spree.t(:paste),
    previous:                 Spree.t(:previous),
    remove:                   Spree.t(:remove),
    rename:                   Spree.t(:rename),
    save:                     Spree.t(:save,    scope: :actions),
    searching:                Spree.t(:searching),
    server_error:             Spree.t(:server_error),
    select_an_option:         Spree.t(:select_an_option),
    sku:                      Spree.t(:sku),
    type_to_search:           Spree.t(:type_to_search),
    taxon_placeholder:        Spree.t(:taxon_placeholder),
    taxonomy_tree_error:      Spree.t(:taxonomy_tree_error),
    tags_placeholder:         Spree.t(:tags_placeholder),
    tracking:                 Spree.t(:tracking),
    variant_placeholder:      Spree.t(:variant_placeholder),
    value:                    Spree.t(:value)
  }.to_json
%>
</script>

<% stripped_locale = I18n.locale.to_s.split('-').first %>
<% if ['zh-CN', 'zh-TW', 'sr-Cyrl', 'pt-BR'].include?(I18n.locale.to_s) %>
  <%= javascript_include_tag "select2_locale_#{I18n.locale}" %>
<% else %>
  <%= javascript_include_tag "select2_locale_#{stripped_locale}" %>
<% end %>
{'fraction_non_alphanumeric': 0.14527938342967245, 'fraction_numerical': 0.0029865125240847784, 'mean_word_length': 1.9516633494455502, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6437729', 'n_tokens_mistral': 3443, 'n_tokens_neox': 3266, 'n_words': 588}