Saving and opening a PR
How saves work
Section titled “How saves work”The editor’s Save button opens a save dialog that wraps the entire commit-and-push cycle in one place. The dialog commits your locale-file changes; whether it also pushes — and where — depends on the save target you pick.
The flow runs through staged states you can watch in the dialog: serializing → writing → branching → committing → pushing → done. On done, the dialog stays open with a summary and (when applicable) a button to open the PR.
Save targets
Section titled “Save targets”Click Change target… in the save dialog to expand the target picker. Three options:
Save to a new branch
Section titled “Save to a new branch”The default for most flows. The branch-name input pre-fills with {branchPrefix}<descriptive-name>, where branchPrefix is the project’s prefix from the translations config (default translations/).
A checkbox labelled Open a new PR after save is shown alongside. When ticked, on a successful save the dialog reveals a button that opens GitHub’s compare page in your browser, with the source branch (the one you were on when you clicked Save) as the base — so the new commits merge back into it.
Update this branch (push)
Section titled “Update this branch (push)”Commits to the current branch and pushes to origin/<current-branch>. Use this to add commits to an existing feature branch or to an existing PR (push triggers GitHub’s PR sync — no extra step needed).
This target is disabled on the default branch (main / master). Use Save to a new branch instead.
Commit only
Section titled “Commit only”Commits locally and stops. No push, no remote contact. Useful if you’re offline or want to batch several saves before pushing.
What gets committed
Section titled “What gets committed”The save dialog summarizes what’s about to land:
- Files touched (locale JSON files only).
- Draft count and deletion count.
- An editable commit message (pre-filled from the change scope).
- A warning if the working tree contains other uncommitted changes — those are not included in the commit.
Only locale-file edits made through the editor are staged. Anything else in the working tree stays unstaged.
Opening the PR
Section titled “Opening the PR”After a successful new-branch save with Open a new PR after save checked, the dialog shows an Open compare page button. Click it and your default browser opens GitHub’s compare URL (built by buildOpenPrUrl) with the right base and head pre-selected. Fill in the PR title and description on GitHub’s side and create the PR there.
For existing PRs, there is no separate “Push to PR” button. Switch to the PR branch (see PR Mode), edit, and pick Update this branch (push) as the save target — the push automatically updates the open PR.
Required gh scopes
Section titled “Required gh scopes”Authentication is delegated entirely to gh auth. No GitHub tokens are stored in the app. The default gh auth login flow grants the repo scope, which covers everything the app does:
| Action | Scope needed |
|---|---|
| Clone, push, pull | repo |
| List PRs (PR Mode) | repo |
| Read org repos | read:org (org repos only) |
If env-check shows a “missing scope” error, run:
gh auth refresh -s repo,read:orgThen click Recheck in the app. See Troubleshooting for gh-related issues.
Branch naming
Section titled “Branch naming”New translation branches default to the prefix translations/ (e.g. translations/uk-homepage-keys). Override per project with the branchPrefix field in .translations.json — see the reference.