{"size": 338, "ext": "js", "max_stars_repo_path": "app/javascript/utils/transifex.js", "max_stars_repo_name": "alicekg/gfw", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/javascript/utils/transifex.js", "max_issues_repo_name": "alicekg/gfw", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/javascript/utils/transifex.js", "max_forks_repo_name": "alicekg/gfw", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.5333333333, "max_line_length": 80, "alphanum_fraction": 0.6656804734}
export function translateText(str, params) {
  if (!str || typeof str !== 'string') {
    return str;
  }

  const { Transifex } = window;
  if (typeof Transifex !== 'undefined') {
    return Transifex.live.translateText(str, params);
  }

  console.warn('Attempted translation before transifex finished loading:', str);

  return str;
}
