Skip to content

Fix duplicate source strings

Uses sonenta-source-health. Install it once: sonenta agents add sonenta-source-health.

Prompt:

Using sonenta-source-health, list my duplicate source strings and explain each group.

Produces: the groups of keys that share the same source text (within a namespace), read-only. Review: the same groups appear in the dashboard, flagged to_fix. No change is made.

Prompt:

Resolve these duplicates step by step. For each group, propose which key survives and repoint the others.

Produces: a merge plan per group - consolidate redundant keys onto a canonical key, OR create a brand-new canonical key. It then repoints the t() usages onto the survivor, soft-deletes the redundant keys (restorable), and records an audit trail (found key, replacement key, files). It never edits a source value. Review: you accept each group; the dashboard moves it to_fix -> resolved and shows the recorded plan + modified files. Apply: done on acceptance, per cluster.

Variants:

Consolidate these onto a new canonical key called brand.sonenta.

Apply the merge plan I approved in the dashboard.

Use the AI-proposed plan from "Let AI decide" as a second opinion.

Prompt:

Find translations whose interpolation variables no longer match the source, and fix them.

Produces: a list of translations whose placeholders (e.g. {{name}}, {count}) drifted from the source, with proposed rewrites that restore the variables. Review: proposed per-string fixes. Apply: on acceptance it rewrites the targets and re-checks until clean.