Published on
3 min read

Local Edits in gtx-cli@2.4.0

Overview

In gtx-cli 2.4.0, we've added a new way to save your local translation edits directly from the CLI.
This means you can now make translation changes locally, persist them, and keep everything in sync with your project without touching the dashboard.


The save-local Command

Historically, the only way to make translation edits was through the dashboard editor. That worked, but it often broke flow, especially if you were mid-development and just wanted to tweak a translation inline.

The new save-local command lets you commit local translation edits back to your General Translation project. You stay in your workspace, and your changes stay in sync.

npx gtx-cli save-local

Running this command uploads any modified translation files, merges your local changes into the project, and ensures that the next translate run reflects your edits.


Translate (Now With Local Awareness)

Until now, translate would always assume the remote version of a translation was the source of truth.

If you made local changes and ran translate again, those edits would be overwritten. That's no longer the case.

Now, when you run:

npx gtx-cli translate

the CLI automatically checks for local edits and saves them in the background — the same way save-local does — before re-downloading translations. This guarantees that your local versions are preserved and that re-translations always persist your edits.

You'll see something like:

Starting translation...

Files to translate:
  - src/i18n/en/common.json
  - ...

◒  Updating translations...
◇  Updated translations

What Happens When Sources Change

You might wonder: what if I edit the source file after making local translation edits?
In earlier versions, that would have triggered a full retranslation that wiped your custom changes.

In 2.4.0, the CLI is smarter. Even when a source update causes a retranslation, your previous local edits persist. They're incorporated into the new translation automatically.

For example, imagine you have a source string:

"I am with my mother"

which was translated as:

"Estoy con mi madre"

You then make a local edit to prefer mamá instead of madre:

"Estoy con mi mamá"

If you later change the source:

"I am NOT with my mother"

the retranslation will still respect your wording choice:

"NO estoy con mi mamá"

Your local phrasing is preserved as long as the context remains relevant.

If the meaning of the source changes entirely (for example, changing mother to father), the CLI will trigger a fresh translation for that new content.

For teams managing translations directly in code, this closes a frustrating gap between local editing and project synchronization. You no longer have to choose between working locally or trusting the dashboard copy since both stay consistent.


TL;DR

  • save-local lets you push local translation edits from your CLI.
  • translate now automatically preserves and merges local edits.
  • Smart retranslation logic keeps your local changes unless the source meaningfully changes.