Skip to content

[Due for payment 2025-07-17] Validate that html is not mangled by translation script #64185

Description

@roryabraham

Problem

We send strings containing HTML tags to ChatGPT for translations. We tell him to leave the HMTL tags alone, but it's possible that he could hallucinate and break HTML that we need to work to keep the UI rendering as expected.

Solution

Similar to what we did for template placeholders, validate that the HTML is not broken by a translation, and retry if it is.

Note that there are some html attributes (such as alt on an img tag) that we do want translated. So we should create a whitelist of attributes that should be translated, and not throw if those are changed, but throw if any others (such as id, class, data-) are changed

Metadata

Metadata

Assignees

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionImprovementItem broken or needs improvement.WeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions