fix(sync): backfill missing target_hash for hand-added translations - #5
Merged
Conversation
…t drift protection
Translations written straight into the locale YAML (never passing through
translate or accept-edits) ended up as bare {source_hash} entries — invisible
to the manual_edits validator. sync now records target_hash from the current
value when the entry has none; an existing target_hash is never recomputed,
so hand-edit drift stays visible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Translations added straight to the locale YAML (agents/humans writing the af/fr values by hand instead of running
translate) get bare{source_hash}state entries fromsync— notarget_hashbaseline, so themanual_editsvalidator can never detect subsequent hand-edits to them. Surfaced by the getzazu/app state reconciliation (getzazu/app#2931), which produced ~10 such bare entries.Fix
syncbackfillstarget_hashfrom the current target value only when the entry has none. An existingtarget_hashis never recomputed — that would silently absorb hand-edit drift, which 0.4.0 deliberately keeps visible until resolved viaaccept-edits.manualflags remain untouched. This restores the baseline coverage the pre-extraction script had (it always recordedtarget_hash) without its drift-absorbing recompute.Verification
rake release[x.y.z]owns it