chore(apollo-react): expose ./i18n subpath export#721
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
This PR adds a package subpath export for @uipath/apollo-react/i18n so external consumers (e.g., PO.Frontend) can import and use <ApI18nProvider /> introduced in the localization work from #702.
Changes:
- Expose a new
./i18nentry in@uipath/apollo-react’sexportsmap with ESM/CJS/types targets.
c837fce to
61244bd
Compare
61244bd to
e697f16
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
packages/apollo-react/src/i18n/locale-registry.ts:134
localeRegistryis declaredas const, solocaleRegistry[component]is a readonly object. Returning it asRecord<SupportedLocale, Messages>(mutable) will fail type-checking (readonly-to-mutable assignability). Consider returningReadonly<Record<SupportedLocale, Messages>>(ortypeof localeRegistry[LocaleRegistryKey]) instead.
export function getAllPreImportedLocales(
component: LocaleRegistryKey
): Record<SupportedLocale, Messages> | undefined {
return localeRegistry[component];
}
0f4ccdb to
2666d9d
Compare
2666d9d to
006e26e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/apollo-react/src/i18n/ApI18nProvider.tsx:63
ApI18nProviderreadsdocument.documentElement.langduring render. With@uipath/apollo-react/i18nnow being a public subpath export, this is likely to be used in SSR environments (e.g. Next.js), wheredocumentis undefined and rendering will throw. Consider guardingdocumentaccess (e.g.typeof document !== 'undefined') and/or deferring language detection to an effect, falling back to'en'when no DOM is available.
* </ApI18nProvider>
* ```
*/
export function ApI18nProvider({ component, locale: propLocale, children }: ApI18nProviderProps) {
const detectedLang = document.documentElement.lang as SupportedLocale;
006e26e to
d1e6475
Compare
kittyyueli
reviewed
May 20, 2026
d1e6475 to
c2079cd
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c6fa9c9 to
4da8813
Compare
kittyyueli
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to: #702 so that we can use
<ApI18nProvider>in PO.Frontend.To be consumed by: https://github.com/UiPath/PO.Frontend/pull/5462