lingo.dev icon indicating copy to clipboard operation
lingo.dev copied to clipboard

feat: added lingo.dev validate command

Open navyansh007 opened this issue 3 months ago • 1 comments

Adds new lingo.dev validate command for comprehensive configuration validation before running translations.

Features

Commands

  • lingo.dev validate - Basic validation
  • lingo.dev validate --strict - Treat missing target files as errors
  • lingo.dev validate --api-key <key> - Include authentication check

Validates

  • Configuration file existence and parseability
  • Source and target locale formats
  • Bucket types support
  • Source files existence and readability
  • Target files/directories accessibility and permissions

Output

Simple linear format with ✓ (success), ⚠ (warning), ✗ (error)

✓ Configuration file (i18n.json) exists
✓ Source locale 'en' is valid
✓ Target locales ['es', 'fr'] are valid
✓ Bucket type 'json' is supported
✓ Source file exists: src/locales/en/common.json
⚠ Target file missing: src/locales/es/common.json (will be created)
✓ All source files are readable
✓ Target directories are writable

Validation complete: 7 checks passed, 1 warning

Testing

  • 9 new tests, all passing
  • All existing CLI tests passing
  • Build successful with no TypeScript errors

Use Cases

  • Pre-translation validation
  • CI/CD quality gates
  • Configuration debugging
  • Team onboarding
  • Post-migration validation

Closes #1300

https://github.com/user-attachments/assets/f61813cd-6369-442a-92da-38395b67ff77

navyansh007 avatar Oct 30 '25 15:10 navyansh007

@navyansh007 please resolve the comments

sumitsaurabh927 avatar Nov 17 '25 09:11 sumitsaurabh927

Hey @navyansh007! Just checking in - are you still working on this PR? We noticed there are some comments that may need addressing. If you need more time, no problem! Just let us know. If we don't hear back within a week, we'll close this to keep the repo tidy, but you can always reopen when ready.

github-actions[bot] avatar Dec 01 '25 00:12 github-actions[bot]

Closing this PR as stale to keep the repo clean. Feel free to reopen or create a new PR once you're ready to continue. Thanks for your contribution!

github-actions[bot] avatar Dec 08 '25 00:12 github-actions[bot]