Start translating the interface: move text into one strings file

Open
#144 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript

Research direction

Start with the strings currently hard-coded in apps/web/src/components/AuthForm.tsx and apps/web/src/components/LeftNav.tsx, plus the TITLES map in apps/web/src/App.tsx. Choose a small translation helper and an en strings file, then move one area (the auth forms and left menu) behind readable keys like auth.login.submit. Claim the issue first, and done means the English UI looks unchanged while a second language file changes the converted screens.

Written by the indexing model from the issue text.

Description

enhancement help wanted web

Difficulty: Intermediate · Estimated size: 2 to 3 days (can be split by page)

Context

All text is written directly in the components. Commune has users in many countries, and people have asked for other languages.

Problem or goal

Lay the groundwork for translations without changing how the app looks.

Suggested approach

  • Add a tiny translation helper (no heavy library needed to start, or use a small one such as i18next if you justify it) and an en strings file.
  • Convert one area first, for example the auth forms and the left menu, so the pull request stays reviewable. Keep the keys readable (auth.login.submit).
  • Make the language come from the browser, with a manual override saved in localStorage inside try/catch.
  • Document how to add a language.

Where to look

  • apps/web/src/components/AuthForm.tsx
  • apps/web/src/components/LeftNav.tsx
  • apps/web/src/App.tsx (TITLES)

Acceptance criteria

  • The English UI is identical to before.
  • Adding a second language file changes the converted screens.
  • Dates and numbers use Intl with the chosen language.
  • Bundle size grows by less than a few KB.

Out of scope

Translating the legal pages and the emails, and right-to-left layouts (follow-up issues).

How to work on it

  1. Comment here to claim it, so two people do not do the same work.
  2. Fork the repo and branch from main (feat/short-name or fix/short-name). Setup steps are in docs/DEVELOPMENT.md.
  3. Keep the change focused and add tests for backend logic.
  4. Run npm run typecheck, npm test and npm run lint and npm run format before opening the pull request.
  5. Use a Conventional Commits title (for example feat(web): add bookmarks). More in CONTRIBUTING.md.

Stuck? Ask in this issue. Questions are welcome.


Generated by Claude Code

Dominant language
TypeScript
Stars
6
Forks
6
Avg merge
1h 59m
Merged PRs (30d)
59

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Haseeb-MernStack/commune

All issues in Haseeb-MernStack/commune

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.