Skip to content

Added local translations as param to locadex start#396

Merged
brian-lou merged 8 commits intomainfrom
ah/local-translations
Jun 18, 2025
Merged

Added local translations as param to locadex start#396
brian-lou merged 8 commits intomainfrom
ah/local-translations

Conversation

@andrewherndon
Copy link
Copy Markdown
Contributor

No description provided.

@andrewherndon andrewherndon requested a review from a team as a code owner June 16, 2025 23:23
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 4:52am
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
example-ai-chatbot ⬜️ Ignored (Inspect) Jun 18, 2025 4:52am
example-create-react-app ⬜️ Ignored (Inspect) Jun 18, 2025 4:52am
example-gt-next-starter ⬜️ Ignored (Inspect) Jun 18, 2025 4:52am
example-next-create-app ⬜️ Ignored (Inspect) Jun 18, 2025 4:52am
example-vite-create-app ⬜️ Ignored (Inspect) Jun 18, 2025 4:52am

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Added local translations support to Locadex CLI, enabling developers to use file-based translations with GT config integration and loadTranslations.ts.

  • Added --local-translations flag to Locadex CLI start command in packages/locadex/src/cli.ts
  • Implemented CliOptions type with localTranslations boolean in packages/locadex/src/types/cli.ts
  • Extended LocadexManager with CLI options storage in packages/locadex/src/utils/locadexManager.ts
  • Added automatic cleanup for loadTranslations.ts in packages/locadex/src/tasks/i18n.ts
  • Implemented GT config generation and loadTranslations.ts creation in packages/locadex/src/tasks/setup.ts

5 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

Copy link
Copy Markdown
Contributor

@archie-mckenzie archie-mckenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is adding local translations entirely programmatic or is Locadex involved at all? It seems entirely programmatic from looking at the code -- please confirm.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a consistent naming scheme we can have with the CLI tool? Does the CLI tool call these "local translations"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Its all programmatic
  • the cli tool has "--translations-dir " would this be better?

Comment thread packages/locadex/src/tasks/setup.ts Outdated
Comment on lines +282 to +283
const filePath = path.join(appDirectory, 'src', 'loadTranslations.js');
writeFileSync(filePath, loadTranslationsContent);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll have to first check if they have a src folder. If they don't, it should just write to the appDir

Copy link
Copy Markdown
Contributor

@brian-lou brian-lou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brian-lou brian-lou merged commit 4f41851 into main Jun 18, 2025
7 of 8 checks passed
@brian-lou brian-lou deleted the ah/local-translations branch June 18, 2025 04:50
@github-actions github-actions bot mentioned this pull request Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants