Appearance
Staging overlay
In-context editing on staging — not production by default.
Prerequisites
- Application allowed domains include your staging origin
- Staging bundles published
- Runtime API key in
init() - Edit JWT (short-lived; never commit)
Mark UI
html
<p data-i18n-key="common.greeting"></p>Enable edit mode
Append ?translation_edit=1 to your staging URL and use the Translate launcher (bottom-left).
With admin configured, the launcher redirects to sign in, then returns with #edit_token= in the URL.
ts
await init({
environment: "staging",
editLauncher: {
signInUrl: "https://admin.platform.stringpush.com/overlay-grant",
},
// …applicationId, apiKey, etc.
});Use @stringpush/sdk@0.7.0 or newer for the latest edit panel (conflict banner, last editor, Git sync queue, comments, governed production overlay).
Last editor attribution
For each locale that already has a stored value, the edit panel shows who last changed it:
Last edit · {display label} · {relative time}
- Labels use first name + last initial (not full email). Removed or unknown editors show as Former member.
- Visible only to users with a valid edit token on an allowlisted origin — not shipped in runtime CDN bundles.
- Expand Recent changes in the edit panel for a capped, metadata-only history of the open key (no prior string values).
- Expand Comments for Figma-style discussion threads on the open key (plain text; resolve/reopen). Comments load only on expand and never appear in CDN bundles or visitor-facing runtime.
- Screenshot placeholder: open a key in the edit panel after at least one save and capture the per-locale attribution line under the locale header.
Save behavior
The edit panel uses Discard and Save to Staging (or Save to {environment} when editing another environment). Saving updates published values for that environment and triggers a bundle rebuild.
- Staging edits go live on staging immediately.
- Production requires a separate promote step in admin (staging → production).
Refresh the page to confirm persistence from the CDN.
Git sync (linked applications)
When the application has a Git link in admin (Settings → Git sync → Application Git sync):
- Each overlay Save enqueues that key/locale for the next Git export batch.
- The edit panel shows a pending Git export count.
- Ready for merge (when queue is non-empty) opens or updates a pull request on
stringpush/sync-{environment}.
Requirements:
- Hosted GitHub App installed and repo linked in admin (see Git sync — Admin link).
- SDK 0.7.0+ on the staging site (overlay Git queue requires 0.3.8+ minimum).
If Ready for merge does not open a PR, confirm the Git link in admin and contact support with your project and application ids.
CI-only alternative: skip Git link and run npx @stringpush/cli sync-pr in GitHub Actions after publish — same PR branch naming, no overlay queue UI.
Full export, inbound, and verification steps: Git sync.
Production overlay (governed)
Production in-context editing is opt-in and approval-gated (Business+):
- Settings → Billing — enable Production overlay.
- Keys → Translation approvals — enable Require approval before publish on the project.
- Publish production bundles after reviewers approve drafts (owner/admin).
ts
await init({
environment: "production",
editLauncher: {
signInUrl: "https://admin.platform.stringpush.com/overlay-grant",
allowProduction: true,
},
// …applicationId, apiKey, etc.
});Append ?translation_edit=1 on your live site URL. Saves are drafts — live users see published copy until an owner/admin publishes production in admin.
For urgent live copy without the approval workflow, use admin hotfix in Keys (paid plans) — see Environment release scenario C.
| Admin setting | Purpose |
|---|---|
| Production overlay (Settings → Billing) | Allow production edit sessions + overlay (Business+) |
| Translation approvals (Keys, per project) | Required for production overlay — saves draft until publish |
| Production hotfix (Settings → Billing) | Admin Keys Hotfix production editor (paid plans; bypasses approval) |
Production overlay and production hotfix toggles are in admin Settings → Billing (owners/admins).
Security
| Credential | Where |
|---|---|
Runtime key (trt_…) | Browser — read-only |
| Edit token | Session storage — overlay writes only |
Add every origin (localhost, staging, preview URLs) to allowed domains.