feat(i18n): add Portuguese (pt-BR) language support to entire frontend#1696
Open
PauloHenriqueJr wants to merge 3 commits intopaperclipai:masterfrom
Open
feat(i18n): add Portuguese (pt-BR) language support to entire frontend#1696PauloHenriqueJr wants to merge 3 commits intopaperclipai:masterfrom
PauloHenriqueJr wants to merge 3 commits intopaperclipai:masterfrom
Conversation
Add complete internationalization infrastructure and Portuguese translations
covering all pages, components, and UI strings in the Paperclip frontend.
## What's included
- New `LanguageContext` with automatic browser locale detection and localStorage persistence
- New `locale.ts` with `t()` translation function and ~1450 en/pt-BR translation entries
- Language toggle (EN/PT-BR) in the bottom bar of the layout
- All 27+ pages translated (Dashboard, Issues, Agents, Skills, Settings, etc.)
- All 60+ components translated (Sidebar, CommandPalette, dialogs, forms, cards, etc.)
- Status labels, agent roles, dates, and currency formatted per locale
- Migrated all legacy `isPt ? "..." : "..."` patterns to centralized `t()` calls
## How it works
- `t("English key")` returns the Portuguese translation when pt-BR is active,
or falls back to English
- Language preference is auto-detected from browser locale and persisted in localStorage
- Components subscribe to language changes via `useLanguage()` hook for reactive re-renders
## Files not translated (intentional)
- `DesignGuide.tsx` — internal dev component showcase, not user-facing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Too many files changed for review. ( |
Accept upstream removal of Join Requests section while keeping all i18n translations intact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Accept upstream refactor of IssuesSearchInput component - Accept upstream removal of execution workspace options from IssueProperties - Accept upstream portal-based mention dropdown in MarkdownEditor (keep t() on Project label) - Accept upstream help text updates in agent-config-primitives (keep t() wrapper) - Accept upstream new "mine" tab in Inbox (add pt-BR translation for "Inbox zero.") - Keep all i18n translations intact Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Add complete internationalization infrastructure and Portuguese translations covering all pages, components, and UI strings in the Paperclip frontend.
What's included
LanguageContextwith automatic browser locale detection and localStorage persistencelocale.tswitht()translation function and ~1450 en/pt-BR translation entriesisPt ? "..." : "..."patterns to centralizedt()callsHow it works
t("English key")returns the Portuguese translation when pt-BR is active, or falls back to EnglishuseLanguage()hook for reactive re-rendersFiles not translated (intentional)
DesignGuide.tsx— internal dev component showcase, not user-facingThinking Path:
inconsistent UX
the pattern for future language additions
What Changed:
ui/src/lib/locale.ts— centralizedt()translation function with ~1450 en/pt-BR keypairs
ui/src/context/LanguageContext.tsx— React context for language state, browser detection,and localStorage persistence
t()for user-visible stringsisPt ? "pt" : "en"patterns tot()callsui/src/lib/utils.tsandui/src/lib/timeAgo.tsupdated for locale-aware formattingVerification:
tsc --noEmit— zero errors)Risks:
English string (safe degradation, never blank)
useLanguage()hook won't re-render on language switch until next navigation(acceptable since language changes are infrequent)
Checklist