lingo.dev
lingo.dev copied to clipboard
Add file watching feature for automatic retranslation
WHAT
Implement a "watch" mode that automatically triggers retranslation when changes are detected in the source file.
WHY
- Saves time by eliminating manual retranslation after each edit
- Improves workflow for users working on iterative translations
- Keeps target language files in sync with source file changes
HOW
- Monitor specified source file for changes via
lingo.dev run --watch - When changes detected, trigger retranslation process
- Implement debounce mechanism to avoid excessive retranslations on rapid changes
Additional Context
No response
I would like to try my hands on the same, @maxprilutskiy .
@bluzeey awesome, go ahead!
Hey Max, I was trying on adding a file in the @replexica/cli for the watch command , such that it changes the source file. However in the package json , there were these libraries from replexica which were causing me error while running npm i .
"@replexica/sdk": "workspace:", "@replexica/spec": "workspace:",
Any ideas what should i do to remove this error ?
hey @bluzeey, we're using pnpm:
git clone https://github.com/lingodotdev/lingo.dev
cd lingo.dev
pnpm i
pnpm turbo build
# in terminal window 1
cd packages/cli
pnpm run dev # to start watching for changes in the cli code
# in terminal window 2
cd package
pnpm lingo.dev --help # this command will use the current cli code + demo config from ./package/i18n.json
feel free to ask questions on discord as well (lingo.dev/go/discord)
can i work on this issue?
@Akshat76845 yep, go ahead!
this one is available again! ✨
@maxprilutskiy @mathio I would like to work on this issue ? is 20 s debouncing time is okay? let me what you think?
PR looks good. Let's go with 5s debounce, as you have in your PR. Testing it locally now.