decentraland / decentraland/decentraland-dapps

Navbar2 renders English in every locale

Open
#825 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
116
Forks
52
Avg merge
18h 12m
Merged PRs (30d)
11

Description

`src/containers/Navbar/Navbar2.tsx` renders ui2's `NavbarComponent` without an `i18n` prop, so ui2's English `DEFAULT_I18N` (30 strings: SIGN IN, Discover, Shop, Log Out, Account Settings, ...) shows in every locale on every consuming dapp. The legacy sibling container already does per-locale plumbing for the chain selector (`Navbar.tsx:170-177`), so `t()` access in this layer is established.

Fix shape: build the i18n object from `t()` in Navbar2 (ui2's `NavbarProps.i18n` accepts `Partial` — no ui2 change needed) and add a new `@dapps.navbar2.*` block to all 6 `src/modules/translation/defaults/*.json` (the existing `@dapps.navbar` block is the old ui-v1 shape, structurally incompatible). English content can be copied from ui2's `Navbar.defaults.ts`; the other five locales need actual translation.

Note: reaches consumers only after an npm publish + dependency bumps in each dapp.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.