npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@procore/ai-translations

v0.6.1

Published

Library that provides a solution to use AI to translate text into a language

Maintainers

dancingshelldancingshelljustinmwattsjustinmwattsantonyayoubantonyayoubrysmithprocorerysmithprocorerobbiegprocorerobbiegprocorejadamsssjadamsssjeremy.bouzigardjeremy.bouzigardjgentesjgentesfaraz.haniffaraz.haniftimdohertytimdohertyajaykumar-procoreajaykumar-procoreb.bookoutb.bookoutjalyngjalyngchadryderchadryderhtaelhtaelrefaiepcnrefaiepcnjames.lawsonjames.lawsonvinayakaprabhuvinayakaprabhudavidshuredavidshurejames.clearyjames.clearyjl4everjl4everandersonbispoprocoreandersonbispoprocoredev-account-admindev-account-adminbrockpcorbrockpcorrowan.ibrahimrowan.ibrahimsseanwangsseanwangramysaid2ramysaid2vinaya-procorevinaya-procorelalovar-procorelalovar-procorebhargavrndbhargavrndihor.diachenko_procoreihor.diachenko_procorefarismmkfarismmkgideon-procoregideon-procoredannyporrellodannyporrelloalanprocorealanprocorechance.eakin.procorechance.eakin.procorestevenliprocorestevenliprocorejavio-procorejavio-procorekani-procorekani-procoreenyagaenyagadanny.oudanny.oumessanjahmessanjahdavid-christensen-procoredavid-christensen-procoreshradha.khardshradha.khardwinson.chuwinson.chueyvettesoueyvettesoulzhou888lzhou888jnhoang1jnhoang1nickprocorenickprocoreneil.mckeemanneil.mckeemanpam-whisenhuntpam-whisenhuntjgee67jgee67youssefameryoussefamermike-arndt-procoremike-arndt-procorebob.laskowskibob.laskowskicagmzcagmzmariah_delaneymariah_delaneylukenispellukenispelfabriciobdfabriciobdbikash.sahoobikash.sahoobbreyel921bbreyel921kimhin267kimhin267andy.mayerandy.mayerphil.custerphil.custerelijah.procoreelijah.procorejuliana.hernandezjuliana.hernandezjudy-lu-pcjudy-lu-pcprocore-it-supportprocore-it-supportandrewburke-pcandrewburke-pcjkleintechjkleintechrachel.arkebauerrachel.arkebauerprocore-npm-botprocore-npm-botgrafffffffgrafffffffyoyis3000yoyis3000james.dabbs-procorejames.dabbs-procorelaurenbrandsteinprocorelaurenbrandsteinprocorescottbieser-procorescottbieser-procoreamir-iskanderamir-iskanderzach.mckenzie.procorezach.mckenzie.procoreamyprocoreamyprocoreshayonj_procoreshayonj_procoreheplayskeysheplayskeysmike.southmike.souththomasoboylethomasoboyledischordedischordederek-carter-procorederek-carter-procoredlgasserdlgassercfprocorecfprocoreevan.waitsevan.waitsjeremy-marcusjeremy-marcusjmejia-fsljmejia-fslersgonzaloersgonzalotimofeeetimofeeestephan-procorestephan-procorealeclarsenprocorealeclarsenprocoresarah.freitassarah.freitasyihai.zweifelyihai.zweifeljay-rajanjay-rajanjacky-leijacky-leiapcarroll_procoreapcarroll_procoreprocore_halzyprocore_halzymehrdad-panahandehmehrdad-panahandehpeter.jinpeter.jinuddhavjoglekaruddhavjoglekarbrookyboy009brookyboy009denzylbalramdenzylbalramchangprocorechangprocoreallenanle.procoreallenanle.procoredevin.cunningham.procoredevin.cunningham.procoreari-procoreari-procorenoor.alinoor.alihgouhierprocorehgouhierprocorecyrille.baicyrille.baibrad.uranibrad.uranidmccraw-procoredmccraw-procorepatrick.lardinpatrick.lardinabhijit.patwardhanabhijit.patwardhanmatt.harris0223matt.harris0223alan.bresanialan.bresanijesse.olsenjesse.olsendtorres-procoredtorres-procoredineshkumar.jayakdineshkumar.jayakjason-kayejason-kayeyadhu.prakashyadhu.prakashleandro-procleandro-procandrew.wheelerandrew.wheelersherylnapigkitsherylnapigkitlydiaharalydiaharakahliholmeskahliholmessateesh-kadiyala-procoresateesh-kadiyala-procoreepalinprocoreepalinprocoredennis.heckmandennis.heckmanjamie-dugan-procorejamie-dugan-procoreviktoriia_azarovskaviktoriia_azarovskadaniel.ferreira-contractordaniel.ferreira-contractorwillpankonienwillpankonienladavargaladavargasteven.hinklesteven.hinkletxin1txin1chris.berberchris.berberetokarevetokarevritchleeritchleekarina.mendez-contractorkarina.mendez-contractorworldofsatyakiworldofsatyakigreg.sparksgreg.sparkskyle.williamskyle.williamskuldeepsingh4556kuldeepsingh4556jeremy.lundjeremy.lundbrocktillotsonprocorebrocktillotsonprocorestajicsstajicsryanfuentesprocoreryanfuentesprocoretyler.wasden.procoretyler.wasden.procorefabiomelo513fabiomelo513cody_schindler_procorecody_schindler_procoreamit.gurav-contractoramit.gurav-contractoryoasyo25yoasyo25kalyani.gosavikalyani.gosavihectorthielehectorthieleandersontr15andersontr15vishal-procorevishal-procoreomar.wagdyomar.wagdyyogevfine1yogevfine1charan_procorecharan_procorescorgiat-procorescorgiat-procorembartlett413mbartlett413attachiattachiahmed.ghorabahmed.ghorabvaromirvaromiralyelashram_procorealyelashram_procoreilya.dryha-contractorilya.dryha-contractorevan.cerwonka.procoreevan.cerwonka.procorevsobol-cvsobol-cdmitri_wmdmitri_wmkellikearnskellikearnsrichard.bunnrichard.bunnchaitra-m-15chaitra-m-15conner-procoreconner-procoremishaelowoyemimishaelowoyemipeterknifpeterknifaleh.haurylenia-contractoraleh.haurylenia-contractormiguel.garcia-procoremiguel.garcia-procorecodyrobertsprocorecodyrobertsprocorea.elbadaweia.elbadaweilnspatz914lnspatz914melch-procoremelch-procoremustafa-abdelrahmanmustafa-abdelrahmanatoaimaatoaimajasaswinijasaswiniadarsh.gautamadarsh.gautamamin.jaipuriamin.jaipurimax.helmetagmax.helmetags_kudryks_kudrykhyogmanhyogmankyle.liukyle.liudavidkangprodavidkangprostevenkang3stevenkang3cbathgatecbathgatevictorbendeck-pcvictorbendeck-pcsarah.herediasarah.herediamoaz-ashrafmoaz-ashrafaly-el-kerdanyaly-el-kerdanyprocore-oss-userprocore-oss-userabhishekkumar123abhishekkumar123stephanie.breretonstephanie.breretonsaurasumprocoresaurasumprocoremona.khairbekmona.khairbekelewando-procoreelewando-procorejyang-procorejyang-procoretedyangtedyangdeiabdeiabjgreene_procorejgreene_procoreasamayasamaykenny.foisykenny.foisyganesh.raghupathyganesh.raghupathyrajatmenhdirattarajatmenhdirattayzhou2024yzhou2024dlameter-procoredlameter-procoredecha-sansondecha-sansonkylepietzkylepietzconnie-feng-procoreconnie-feng-procoreroger-procoreroger-procorematheusprocorematheusprocorefernandocamilottifernandocamilottisimona.iancusimona.iancujacksonleach-procorejacksonleach-procoreg2mitchellg2mitchelltatsiana.cliftontatsiana.cliftonphunguyen-pcorphunguyen-pcorpmfrawleypmfrawleybrian.smith1brian.smith1scottsternscottsternneil1023neil1023srichaitanya.peddintisrichaitanya.peddintijake-pitkinjake-pitkinerikthoresonerikthoresonlhuang325lhuang325abhijit-procoreabhijit-procorerodayna.ehabrodayna.ehabfairchildfairchildmustafa-u-abdelrahmanmustafa-u-abdelrahmanaberkowitzaberkowitzpwhisenhunt-procorepwhisenhunt-procoremariia.solodovnikmariia.solodovniknigeld-procorenigeld-procoresamad.viranisamad.viranibohdan-horai-procorebohdan-horai-procoremathenes_procoremathenes_procorevinoth.kuppusamyvinoth.kuppusamyzayterzayteralan.facchini-contractoralan.facchini-contractorcassianomatos-procorecassianomatos-procoreamitk030amitk030sflang-procoresflang-procoretracy.ottotracy.ottodaniel-pierre-procoredaniel-pierre-procoreglidenorglidenorashish.sharma2024ashish.sharma2024gaurav.sharma.procoregaurav.sharma.procoreandres-mendez-procoreandres-mendez-procoreroobo-romeskiroobo-romeskikylemartinez-procorekylemartinez-procoresean.spearman.procoresean.spearman.procoregturkadzegturkadzejeffgiaquintojeffgiaquintoezrasimeloffezrasimeloffbill-wagnerbill-wagnerkellen.stewartkellen.stewartrodrigo.dejuanarodrigo.dejuanasaranahal2saranahal2andrew.isaacandrew.isaacagamaleldinagamaleldinmostafaeltazymostafaeltazymagdyyxxmagdyyxxandreszorrilla-procoreandreszorrilla-procoremohitsharma97mohitsharma97tejeshwartejeshwarswati.jadhavswati.jadhavsquidbeakssquidbeakssmishra06smishra06subham.panigrahisubham.panigrahideepak.kumartsdeepak.kumartsbagnaram-procorebagnaram-procoremahesh-s96mahesh-s96mohamed.adelmohamed.adelnubs-procorenubs-procorerana.eltayarrana.eltayarmahmoud-sharsharmahmoud-sharsharsyamphanindrasyamphanindraveroniaosamaveroniaosamaimanselimimanselimhelmy162-procorehelmy162-procorepclemonspclemonssamuelvelez8383samuelvelez8383vinitdeshkar-procorevinitdeshkar-procoremariam_mazenmariam_mazenmina-elnagarmina-elnagardaniel_andrewsdaniel_andrewsmohanad-aymanmohanad-aymanarsenii.derkach-procorearsenii.derkach-procorestepanvanzuriakprocorestepanvanzuriakprocorend-procorend-procoremarwansalem-prcmarwansalem-prcyoussefothmanyoussefothmanandrii.datsenko-contractorandrii.datsenko-contractor

Keywords

Readme

@procore/ai-translations

React package for AI-powered UI string translation in frontend apps. It provides:

  • AITranslationProvider to initialize translation context
  • AITranslateText to render translated text
  • useAITranslation for direct access to translation and progress state

Need deeper implementation details? See the internal guide: README.internal.md.

This package supports two runtime strategies:

  • frontend_translations: browser-based translation (Chrome-family AI APIs)
  • backend_translations: server-side translation API

For Procore-specific operational details, see README.internal.md.

Installation

yarn add @procore/ai-translations

Peer dependencies:

  • react >= 16 < 19
  • react-dom >= 16 < 19
  • @procore/web-sdk-mfe-utils > 1.0.0 < 2

Quick Start

import React from 'react';
import {
  AITranslationProvider,
  AITranslateText,
} from '@procore/ai-translations';

export function AppRoot() {
  return (
    <AITranslationProvider
      tool="timecard"
      companyId={1}
      projectId={10}
      userId={42}
      locale="es"
      enableAIT={true}
      companyLocale="de-DE"
      projectLocale="fr-CA"
    >
      <AITranslateText text="Hello world" shouldTranslate={true} />
    </AITranslationProvider>
  );
}

Public API

AITranslationProvider

Required props:

  • locale: string - target locale (BCP-47, for example es, fr, de)
  • tool: string - tool/MFE identifier used to scope translation events
  • companyId: number
  • projectId: number
  • userId: number

Optional props:

  • enableAIT?: boolean (default true) - when false, returns source text without translation
  • companyLocale?: string - company-level locale from environment metadata (e.g. "de-DE"); passed through to context for downstream consumers such as Amplitude
  • projectLocale?: string - project-level locale from environment metadata (e.g. "fr-CA"); passed through to context for downstream consumers such as Amplitude

AITranslateText

Props:

  • text: string
  • shouldTranslate: boolean
  • showHighlight?: boolean (default false)
  • translatedIconProps?: TranslatedIconProps

useAITranslation()

Returns:

  • ait(text: string): Promise<string> - translates text or returns cached value
  • locale: string
  • companyLocale: string | undefined - company-level locale from environment metadata
  • projectLocale: string | undefined - project-level locale from environment metadata
  • tool: string
  • translationProgress: { progress: number; current: number; total: number } | null
  • modelDownloadProgress: ModelDownloadProgress | null
  • renderVersion: number | undefined

Feature flag helpers

  • AI_TRANSLATION_FEATURE_FLAG_KEY
  • getAITranslationLDId(domain: string)

How It Works

flowchart LR
consumerApp[ConsumerApp] --> provider[AITranslationProvider]
provider --> aitCall["ait(text)"]
aitCall --> registryCheck[TranslationRegistryCheck]
registryCheck --> returnCached[ReturnCachedText]
registryCheck --> queueText[QueueText]
queueText --> manager[TranslationManager]
manager --> strategy[TranslatorStrategy]
strategy --> frontendClient[ChromeFrontendClient]
strategy --> backendClient[BackendApiClient]
frontendClient --> persist[PersistToIndexedDB]
backendClient --> persist
persist --> publish[PublishTranslationEvents]
publish --> rerender[AITranslateTextRerender]
rerender --> translatedUi[DisplayTranslatedText]

At runtime, strings are registered through ait(), processed in batches, cached in memory and IndexedDB, and then rerendered via package events.

Configuration

The provider uses useConfig (React Query) to fetch translation config and refetch every 30 minutes.

Expected remote config shape:

type ToolConfig = {
  strategy: 'frontend_translations' | 'backend_translations';
  supportedLocales: string[];
  translationBatchSize: number;
  renderingBatchSize: number;
  apiTimeout: number;
  apiVersion: string;
};

Operational Notes

  • AITranslateText and useAITranslation must be used inside AITranslationProvider.
  • Frontend strategy depends on Chrome-family AI support; behavior differs by browser support.
  • Backend/config endpoints are resolved from window.location.origin under /rest/.
  • Translation cache uses IndexedDB; some restricted browser environments may limit persistence.

Development

From packages/ai-translations:

yarn build
yarn test
yarn lint
yarn storybook
yarn cypress:run