# All files / src/_utils i18n.ts

100% Statements 6/6
100% Branches 9/9
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    2217x

    1849x

    6x

    1x

    1x

    1841x

     export function getFormatterLocale(locale: string): string {
      // This method solves for Procore's nonstandard locales
      // en-owner, en-budget, en-international are legacy locales
      // pseudo locale supports pseudolocalization
      // By request of Procore Canada, CA locales use US/FR date format
      switch (locale) {
        case 'en-CA':
        case 'en-owner':
        case 'en-owner-beta':
        case 'en-specialty-contractor':
        case 'en-budget':
        case 'pseudo':
          return 'en-US'
        case 'en-international':
          return 'en-GB'
        case 'fr-CA':
          return 'fr-FR'
        default:
          return locale
      }
    }