Skip to content

chore(apollo-react): expose ./i18n subpath export#721

Merged
StephenHanzlik merged 2 commits into
mainfrom
chore/expose-i18n-for-export
May 20, 2026
Merged

chore(apollo-react): expose ./i18n subpath export#721
StephenHanzlik merged 2 commits into
mainfrom
chore/expose-i18n-for-export

Conversation

@StephenHanzlik
Copy link
Copy Markdown
Contributor

@StephenHanzlik StephenHanzlik commented May 19, 2026

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

Copilot AI review requested due to automatic review settings May 19, 2026 22:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs May 20, 2026, 02:45:12 PM
apollo-docs 🟢 Ready Preview, Logs May 20, 2026, 02:45:12 PM
apollo-landing 🟢 Ready Preview, Logs May 20, 2026, 02:45:12 PM
apollo-ui-react 🟢 Ready Preview, Logs May 20, 2026, 02:45:12 PM
apollo-vertex 🟢 Ready Preview, Logs May 20, 2026, 02:45:12 PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Dependency License Review

  • 1901 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1671
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@StephenHanzlik StephenHanzlik changed the title chore(apollo-react): expose ./i18n subpath export" chore(apollo-react): expose ./i18n subpath export May 19, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ./i18n entry in @uipath/apollo-react’s exports map with ESM/CJS/types targets.

Comment thread packages/apollo-react/package.json
@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch from c837fce to 61244bd Compare May 19, 2026 22:49
Copilot AI review requested due to automatic review settings May 20, 2026 00:48
@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch from 61244bd to e697f16 Compare May 20, 2026 00:48
@github-actions github-actions Bot added size:M 30-99 changed lines. and removed size:XS 0-9 changed lines. labels May 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • localeRegistry is declared as const, so localeRegistry[component] is a readonly object. Returning it as Record<SupportedLocale, Messages> (mutable) will fail type-checking (readonly-to-mutable assignability). Consider returning Readonly<Record<SupportedLocale, Messages>> (or typeof localeRegistry[LocaleRegistryKey]) instead.
export function getAllPreImportedLocales(
  component: LocaleRegistryKey
): Record<SupportedLocale, Messages> | undefined {
  return localeRegistry[component];
}

Comment thread packages/apollo-react/src/i18n/locale-registry.ts
Comment thread packages/apollo-react/src/i18n/ApI18nProvider.tsx Outdated
@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch 2 times, most recently from 0f4ccdb to 2666d9d Compare May 20, 2026 17:25
Copilot AI review requested due to automatic review settings May 20, 2026 17:29
@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch from 2666d9d to 006e26e Compare May 20, 2026 17:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • ApI18nProvider reads document.documentElement.lang during render. With @uipath/apollo-react/i18n now being a public subpath export, this is likely to be used in SSR environments (e.g. Next.js), where document is undefined and rendering will throw. Consider guarding document access (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;

@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch from 006e26e to d1e6475 Compare May 20, 2026 17:39
Comment thread packages/apollo-react/src/i18n/ApI18nProvider.tsx Outdated
Copilot AI review requested due to automatic review settings May 20, 2026 19:19
@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch from d1e6475 to c2079cd Compare May 20, 2026 19:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread packages/apollo-react/src/i18n/ApI18nProvider.tsx
Comment thread packages/apollo-react/src/i18n/ApI18nProvider.tsx Outdated
@StephenHanzlik StephenHanzlik requested a review from kittyyueli May 20, 2026 19:29
StephenHanzlik and others added 2 commits May 20, 2026 15:40
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 20, 2026 21:40
@StephenHanzlik StephenHanzlik force-pushed the chore/expose-i18n-for-export branch from c6fa9c9 to 4da8813 Compare May 20, 2026 21:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@StephenHanzlik StephenHanzlik merged commit 0d7f71b into main May 20, 2026
47 checks passed
@StephenHanzlik StephenHanzlik deleted the chore/expose-i18n-for-export branch May 20, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:M 30-99 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants