Caching: The i18n.lock
File
Replexica uses a lockfile (i18n.lock
) to optimize translation updates. Here's why it matters and how it works.
What's the i18n.lock file?
It's file that stores checksums of your source content. Think of it as Replexica's memory of what it's seen before.
Why use a lockfile?
- Speed: Replexica only translates what's changed;
- Consistency: Prevents unnecessary retranslations of unchanged content;
- Cost-efficiency: You're not billed for translating the same thing twice.
How it works
- Replexica calculates checksums for your source content;
- It compares these with the stored checksums in
i18n.lock
; - Only content with new or changed checksums gets translated.
Pro tips
Always commit
i18n.lock
. It's crucial for tracking changes.Use
--force
to ignore the lockfile and retranslate everything:bashnpx replexica@latest i18n --force
Useful after changing AI context settings.
The
--frozen
flag is great for CI/CD to catch missing translations:bashnpx replexica@latest i18n --frozen
Remember, Replexica's goal is to make localization a set-it-and-forget-it process. The lockfile is a key part of that, ensuring you're always efficient with your translations.