<commit_before>import config from 'config'

export const currentBuildLocales = (): string[] => {
  const defaultLocale = config.i18n.defaultLocale || 'en-US'
  const multistoreLocales = config.storeViews.multistore
    ? Object.values(config.storeViews)
      .map((store: any) => store && typeof store === 'object' && store.i18n && store.i18n.defaultLocale)
      .filter(Boolean)
    : []
  const locales = multistoreLocales.includes(defaultLocale)
    ? multistoreLocales
    : [defaultLocale, ...multistoreLocales]

  return locales
}<commit_msg>get proper locales in single-store multi-lang scenario<commit_after>import config from 'config'

export const currentBuildLocales = (): string[] => {
  const defaultLocale = config.i18n.defaultLocale || 'en-US'
  const multistoreLocales = config.storeViews.multistore
    ? Object.values(config.storeViews)
      .map((store: any) => store && typeof store === 'object' && store.i18n && store.i18n.defaultLocale)
      .filter(Boolean)
    : config.i18n.availableLocale
  const locales = multistoreLocales.includes(defaultLocale)
    ? multistoreLocales
    : [defaultLocale, ...multistoreLocales]

  return locales
}
{'fraction_non_alphanumeric': 0.1234991423670669, 'fraction_numerical': 0.012006861063464836, 'mean_word_length': 4.280542986425339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1315429', 'n_tokens_mistral': 366, 'n_tokens_neox': 355, 'n_words': 73}