lingui / lingui/js-lingui

Add AI skill for component/app migration

Open
#2,484 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

📖 documentation
Dominant language
TypeScript
Stars
5.9k
Forks
457
Avg merge
1d 23h
Merged PRs (30d)
16

Description

Problem Description

When you introducing a i18n for an existing application you want to wrap all existing strings with lingui methods

Proposed Solution

Provide a Lingui skill which will wrap to lingui methods separate files/components/apps

  • Use Trans in JSX
  • Use const { t } = useLingui() in components, in non JSX context
  • Use msg`ola!`macro outside of the components
Alternatives Considered

A codemod. But the codemod could be difficult to write considering that every app could be very diffrrent and also it's hard to distinguish where is a "copy" and where is a configuration property as string.

Additional Context

No response

Contributor guide

Open the contributing guide

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.

Research direction

Start by reviewing the proposed Lingui migration patterns: Trans in JSX, useLingui() in components outside JSX, and the msg macro elsewhere. Define the skill's scope and acceptance criteria for separate files, components, and apps; done means it consistently wraps translatable strings without confusing copy with configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
developer-experience, internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.