-- Repair English translation values after the old auto-translate bug duplicated labels.
-- Safe to run more than once.
UPDATE translations tr
JOIN languages l ON l.id = tr.language_id
JOIN translation_keys tk ON tk.id = tr.key_id
SET tr.value = tk.description
WHERE l.code = 'en'
  AND tk.description IS NOT NULL
  AND tk.description <> '';
