Feat/i18n support - #146
Conversation
|
@oscar24357 is attempting to deploy a commit to the psalmuel01's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@oscar24357 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
hello maintainer, can you please assign the point for me on drips |
|
Hello maintainer, good evening. Can you please award this points to me on drips..thank you |
|
can you please give me the point to this too |
| @@ -638,8 +707,19 @@ function VerifyInner() { | |||
| : m.claim} | |||
There was a problem hiding this comment.
Ternary chain short-circuits early —
income, accreditation, and employment labels broken
Lines 698–699 introduce a new terminal ternary arm : m.claim} that closes the entire JSX expression at line 699. The old branches for income > $... (line 700), accreditation (lines 701–703), and employment (lines 704–707) now sit outside the closed { } as dangling JSX fragments that start with ?, which is a syntax error. Even if the parser somehow tolerates the structure, any credential with key === "income" no longer shows a threshold label — it falls to m.claim (the raw claim type) instead. Additionally the new funds branch on line 691 writes balance > ${...} without the $ currency prefix, whereas the original on line 693 correctly wrote balance > $${...}.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/app/verify/page.tsx
Line: 690-707
Comment:
**Ternary chain short-circuits early — `income`, `accreditation`, and `employment` labels broken**
Lines 698–699 introduce a new terminal ternary arm `: m.claim}` that closes the entire JSX expression at line 699. The old branches for `income > $...` (line 700), `accreditation` (lines 701–703), and `employment` (lines 704–707) now sit outside the closed `{ }` as dangling JSX fragments that start with `?`, which is a syntax error. Even if the parser somehow tolerates the structure, any credential with `key === "income"` no longer shows a threshold label — it falls to `m.claim` (the raw claim type) instead. Additionally the new `funds` branch on line 691 writes `balance > ${...}` without the `$` currency prefix, whereas the original on line 693 correctly wrote `balance > $${...}`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
hello boss, can you award this points to me on drips please, thank you |
|
ci failing, and greptile score is 1/5 |
closes #131
Greptile Summary
This PR adds English/Spanish i18n support via
next-intl, introduces aLangSwitchercomponent, aLocaleProvidercontext, and a tag-driven release workflow with commitlint enforcement. The English and Spanish message catalogues are complete and the infrastructure files (lib/i18n.ts,lib/locale-context.tsx,LangSwitcher.tsx) are well-structured.frontend/app/layout.tsxduplicates the entire render tree andfrontend/i18n.tshard-codesdefaultLocalefor the server config, so even after compile errors are resolved, server-rendered content will always render in English regardless of user preference.frontend/components/SiteNav.tsxand two page files have duplicate named imports / duplicate prop attributes that are TypeScript compile errors independent of the runtime issues.Confidence Score: 1/5
Not safe to merge — six page files have unclosed JSX elements, duplicate JSX attributes, or malformed ternary chains that block compilation entirely.
The i18n strings were inserted alongside the original hardcoded strings rather than replacing them. Across apps/page.tsx, apps/[id]/page.tsx, holder/page.tsx, issuer/page.tsx, verify/page.tsx, and SiteNav.tsx there are compile-blocking issues: duplicate placeholder and title JSX attributes, unclosed ternary expressions inside button children, an unclosed simulation-info div that swallows subsequent layout nodes, and a ternary chain that terminates early leaving dangling fragments outside the JSX expression. The full-page duplicate render tree in layout.tsx and the hard-coded server locale in i18n.ts are additional correctness issues that would surface immediately after the compile errors are resolved.
Files Needing Attention: Every modified page file needs attention: app/apps/page.tsx, app/apps/[id]/page.tsx, app/holder/page.tsx, app/issuer/page.tsx, app/verify/page.tsx, app/layout.tsx, and components/SiteNav.tsx.
Important Files Changed
placeholderattribute on the search input (compile error){!activeWallet && (expression (previously flagged) plus a new unclosed ternary inside the action button's children — both prevent compilationtitleprop on button (compile error), duplicated expiry text rendered twice, unclosed JSX div and sibling-expression errors (previously flagged)useStateimport (previously flagged), duplicate heading renders two eyebrow+h1 pairs, and the new simulation banner div is never closed — nesting swallows the rest of the layoutredirectAfterIssuebody (previously flagged), ternary chain short-circuits early causing income/accreditation/employment labels to break, and duplicate Plaid balance display spanst(), STATS_VALUES refactored to use translation keys — clean changeif (!messages) return nullcauses a full-page blank on first render while messages load (previously flagged); locale hydration from localStorage is otherwise correctgetRequestConfighard-codesdefaultLocale("en") and never reads the user's actual locale (previously flagged) — server-rendered strings always render in Englisharia-pressed, consumes LocaleContext correctlyIconBook2andIconCode(previously flagged) — compile errorgit push origin HEAD:mainfrom the release job could conflict with branch protection rules requiring PRsFlowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Browser Request] --> B[layout.tsx] B --> C{LocaleProvider} C -->|useEffect: loads messages| D[localStorage / navigator.language] D --> E[import messages/locale.json] E --> F{messages loaded?} F -->|null return null| G[Blank page flash] F -->|messages set| H[NextIntlClientProvider] H --> I[WalletProvider] I --> J[SiteNav + LangSwitcher] I --> K[Page children] B --> L[Original ToastProvider tree still present] L --> M[Duplicate SiteNav] L --> N[Duplicate main/footer]Comments Outside Diff (1)
frontend/app/issuer/page.tsx, line 179-200 (link)<div>— JSX structural errorThe new i18n simulation banner opens
<div style={{...}}>at line 179 but is never closed with</div>. The original<div ...>at line 182 starts immediately inside it as a child. The outer div swallows all subsequent sibling content until something forces the JSX tree to fail, producing either a parse error or deeply mis-nested markup at runtime.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (5): Last reviewed commit: "Merge branch 'main' into feat/i18n-suppo..." | Re-trigger Greptile