@tolgee/format-icu 5.29.5 → 5.29.6-prerelease.fc7efe8f.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3898,7 +3898,7 @@ const createFormatIcu = () => {
3898
3898
  return false;
3899
3899
  }
3900
3900
  }
3901
- function getLocale(language) {
3901
+ function getLanguage(language) {
3902
3902
  if (!locales.get(language)) {
3903
3903
  let localeCandidate = String(language).replace(/[^a-zA-Z]/g, '-');
3904
3904
  while (!isLocaleValid(localeCandidate)) {
@@ -3911,12 +3911,12 @@ const createFormatIcu = () => {
3911
3911
  }
3912
3912
  const format = ({ translation, language, params, }) => {
3913
3913
  const ignoreTag = !Object.values(params || {}).find((p) => typeof p === 'function');
3914
- const locale = getLocale(language);
3914
+ const locale = getLanguage(language);
3915
3915
  return new IntlMessageFormat(translation, locale, undefined, {
3916
3916
  ignoreTag,
3917
3917
  }).format(params);
3918
3918
  };
3919
- return Object.freeze({ getLocale, format });
3919
+ return Object.freeze({ getLanguage, format });
3920
3920
  };
3921
3921
 
3922
3922
  const FormatIcu = () => (tolgee, tools) => {