Interfaces break differently in different languages. A German label grows and spills out of its button. An Arabic page has text flowing right-to-left but arrow icons that still point the wrong way. A Japanese string falls back to a font that cannot render it. These bugs appear only when the same code is rendered in another locale, the term software engineers use for the combination of language and region. Code-repair agents that look at screenshots have improved on visual JavaScript bugs, but every system and benchmark in this space assumes English, Western-style interfaces. Separately, work on multimodal reasoning shows that vision-language models often perceive a picture correctly and then fail at the logical step that follows. Together these suggest a specific hypothesis. When an agent has to repair a localized interface, handing it more screenshots is the wrong input. It should instead receive compiler-style layout diagnostics: short structured statements of what differs between the correctly rendered reference locale and the broken target locale. These diagnostics should be paired with locale conventions retrieved from a curated store.
In two sentences, the proposal is this. We render each component in several locales, convert the cross-locale differences into textual diagnostics such as "label overflows container by 38 px in de-DE" or "reading order of toolbar not mirrored in ar-EG," and feed these, along with retrieved locale rules, into the repair prompt the way compiler errors are fed to code-repair models. We test whether this beats screenshot-centric repair agents. We also test whether it avoids a failure we expect from ungrounded agents: "fixing" intentional regional design choices into Western defaults.
Core Claim
The proposal makes two claims, each of which can be tested and could turn out false.
The first claim is about inputs. For locale-dependent UI bugs, structured textual diagnostics derived from rendering the same code in multiple locales will raise repair success more than giving the model the rendered screenshots, at matched token budgets. The idea comes from two literatures. In code repair, appending raw compiler diagnostics to the prompt lets a general LLM fix bugs across programming languages (Repair Is Nearly Generation). Injecting structural context about where the cause lives, beyond the symptom, helps further (TransRepair). In multimodal reasoning, models identify diagram elements and then fail the subsequent deduction (MATH-Vision, GAOKAO-MM). Models also sometimes answer from textual cues rather than the image (Plot Twist). Translating visual content into discrete, executable-like rationales helps chart reasoning (Synthesize Step-by-Step). Our diagnostics apply that translation to rendered interfaces. The browser's layout engine already computes exact boxes, text direction and font fallback, so we read those facts from it rather than asking a vision model to estimate them.
The second claim is about preservation. Repair agents without locale grounding will over-correct regional conventions toward Western defaults, and diagnostics framed relative to retrieved locale rules will reduce this. The motivating evidence comes from three papers. In Design2Code, human judges preferred model-generated pages over the originals in 64% of cases, a "clean-up" effect that reflects the model's priors. Having Beer after Prayer? reports a 40% to 65% preference for Western entities even in Arab contexts, and finds that larger multilingual models were more biased. Marco-Bench-MIF shows that machine-translated instructions misjudge models by 7–22% because many constraints do not transfer across scripts. To our knowledge, no repair benchmark measures whether an agent leaves a correct locale-specific layout alone.
Relation to Closest Work
Three systems connect code repair, multimodal inputs and retrieval on visual front-end bugs. Our proposal reuses their machinery and changes what the oracle checks and what the prompt contains.
Seeing is Fixing (GUIRepair) synthesizes a reproduction script from the issue image. It then replays candidate patches in a headless browser and filters them by pixel difference against the buggy render. FailureMem adds crop and grounding tools and a hand-curated bank of past failures. It reports that distilled natural-language summaries of past fixes help more than raw diffs, which is consistent with our bet that the prompt should carry distilled, structured facts. Both systems compare a patch against the buggy state of a single rendering. Neither renders across locales, and neither can tell a bug from an intentional regional difference.
DesignRepair is closest in spirit. It retrieves rules from a Material Design 3 knowledge base and reads computed DOM properties through a browser. Its knowledge base is fixed to a single Western design system. It also notes that its repairs can break surrounding responsive layouts, and localization makes that problem worse.
RubSE shows that naive visual self-revision causes "visual repair coupling", where fixing one element breaks another. Its remedy is to fix one structured rubric item per round. We adopt that discipline by addressing one diagnostic per repair round.
On the cultural-retrieval side, RAVENEA shows that culture-aware retrieval improves vision-language models on cultural question answering (+6%) and captioning (+11%), but only over Wikipedia and only for question answering and captioning, not code. The "Wikipedia trap" described in Having Beer after Prayer? limits our design: retrieval over uncurated web text can import Western defaults. Our locale store is therefore curated and small, and we test retrieval source as a variable.
Research Program
Components. We build three components.
- Cross-locale renderer. This uses the Playwright harness already used by GUIRepair and DesignRepair. It renders a component or page under a reference locale and one or more target locales. It then extracts computed geometry, text direction, overflow, clipping, missing-glyph and font-fallback events, mirroring state of directional icons, and DOM reading order.
- Diagnostic generator. This compares renders and emits short typed messages. Each message names the element, the selector, the source file and line that set the offending style, and the magnitude of the problem. The aim is diagnostics that resemble compiler errors pointing at a cause rather than at a symptom.
- Locale convention store. Platform localization guidance and native-speaker-written notes are indexed by locale and diagnostic type. The notes cover reading direction, mirroring exceptions (media playback controls usually are not mirrored), date, number and name formats, typographic line-height needs for scripts such as Thai or Devanagari, and color and iconography conventions. Retrieval is keyed on the diagnostic type plus the locale, which keeps it narrow.
Repair prompt. The prompt follows GAMMA, which keeps the original line as a comment anchor so the model stays close to developer intent. It contains the localized code hunk with the original lines as comments, one diagnostic, and the retrieved rules. A patch is accepted only if four conditions hold:
- the repository's tests pass;
- the target-locale diagnostic disappears;
- no new diagnostic appears in any other rendered locale;
- every element flagged in the benchmark as intentionally locale-specific remains unchanged.
The third condition is a cross-locale regression check. The fourth is a preservation check. This stricter oracle also responds to SWE-ABS, which found that about one in five "solved" patches on SWE-Bench Verified are semantically wrong because test suites are incomplete.
Benchmark (L10n-Repair). No benchmark exists, so we build one with three sources.
- Mined issues. GitHub issues labeled i18n, RTL or locale, with screenshots and merged fixes, taken from the 17 JavaScript projects in SWE-bench Multimodal and from comparable projects.
- Controlled cases. Locale swaps applied to pages from Design2Code and its HARD split, which already contains non-English content. Where real translations exist we use them, and we never rely on machine translation alone, given Marco-Bench-MIF's evidence that translation distorts constraints. Native speakers verify each injected bug.
- Preservation set. Pages whose locale-specific layout is correct and must not change, verified by native speakers.
We target at least four scripts and directions: Arabic or Hebrew (right-to-left), Japanese or Chinese, German (text expansion), and an Indic script.
Baselines
The naive reference is the repository's code with no patch, scored on our oracle. This gives the floor and confirms that bugs are real. A second naive point is a text-only agentless repair that receives the issue text translated into English and no images. On SWE-bench M, text-only Agentless JS resolved 6% while SWE-agent M with GPT-4o resolved 12.2% (SWE-bench Multimodal). We expect a similar gap here, but we measure it rather than assume it.
The strongest existing method is FailureMem, which reports a 33.1% resolve rate on SWE-bench M with GPT-5.1, a 3.7-point absolute gain over GUIRepair (FailureMem). GUIRepair itself is a second strong baseline; it reports 175 resolved instances with o4-mini and 157 with GPT-4o at $0.29 per issue (Seeing is Fixing). We found no reported result on Lacuna for any system on locale or i18n repair, so all numbers on L10n-Repair will be new.
For fairness, every system uses the same backbone model and the same per-issue token and dollar budget, capped at FailureMem's reported $0.33. Every system gets the same number of repair rounds and the same patch-sampling budget. We give GUIRepair and FailureMem multi-locale screenshots as input, so they are not handicapped by seeing only one rendering. We also run both systems on the standard SWE-bench M test split, to confirm that our reimplementation reproduces roughly their reported numbers before comparing on our benchmark. Our method beats them if it resolves more L10n-Repair issues under the full oracle. Our margin should come mainly from lower cross-locale regression and lower preservation-violation rates, not only from more raw test passes. A gain under 3 points or within bootstrap confidence intervals would not count.
The DesignRepair-style guideline baseline reuses DesignRepair's design: static code analysis, DOM property extraction and retrieval of guideline rules. We swap its Material Design 3 knowledge base for our locale store. This tests whether a guideline knowledge base alone accounts for the gain.
The pseudo-localization plus linter baseline uses rule-based i18n checks. These include detecting hard-coded strings, flagging physical CSS properties such as margin-left that should be logical properties such as margin-inline-start, and running expanded pseudo-locale overflow checks. Each flag triggers a templated fix. This is the strongest non-LLM competitor for mechanical bugs.
Ablations isolate the key ingredient by varying one input at a time:
- screenshots only;
- diagnostics only;
- both;
- diagnostics with retrieval over uncurated web text instead of the curated store;
- diagnostics with no retrieval;
- all diagnostics at once instead of one per round.
The screenshots-only versus diagnostics-only comparison, at matched tokens, decides the first claim.
Why not just…?
Why not just use pseudo-localization and i18n linters? This is a real threat for mechanical bugs such as overflow and unmirrored margins. These tools are deterministic and cheap, and teams already run them. Two pieces of evidence suggest they fall short. DesignRepair found that the rule-based detector UIS-Hunter reached only 32.3% recall on AI-generated UI violations, against 92.1% for its LLM approach (DesignRepair). Linters also flag without repairing, and they cannot tell an intentional regional difference from a defect. We report results split by bug type. If the linter baseline matches us on mechanical bugs, we will say so. The claim would then narrow to mixed and convention-dependent bugs and to the preservation set, where templated fixes have no notion of intent.
Why not just give a frontier vision model screenshots from every locale and ask it to fix the difference? This is exactly the screenshots-only ablation, run on the strongest available backbone. The perception–reasoning results suggest the model will notice that something looks off but misattribute the cause in the code (MATH-Vision, Plot Twist). Scale also does not remove cultural defaults (Kabra et al., Having Beer after Prayer?). If screenshots-only matches diagnostics-only at equal tokens, the first claim is false and we will report it as false.
Why not just add locale guidelines to an existing guideline-aware repairer like DesignRepair? This is the swapped-knowledge-base baseline. If it closes most of the gap, retrieval rather than cross-locale diagnostics is doing the work, and the contribution shrinks to the curated store. We expect it to fall short for two reasons. Guidelines say what should hold but not where the code violates it, and the diagnostic supplies that location, much as compiler errors help repair in Repair Is Nearly Generation. DesignRepair's own reports of layout breakage also suggest that single-render checking will miss regressions in other locales.
Why not just iterate with visual self-revision? RubSE shows that naive self-evolution peaks early (round 3.0 on average versus 5.7 with rubrics) and that structured selection wins in 15 of 18 settings (RubSE). We include naive self-revision at a matched round budget. We expect it to show the highest cross-locale regression rate.
Decisive Experiments
The main table reports results on L10n-Repair for all systems at matched budget, with five metrics:
- resolve rate under the full oracle;
- regression rate, the share of accepted patches that introduce a diagnostic in another locale;
- Westernization rate, the share of preservation cases altered toward the reference locale's layout or conventions;
- native-speaker acceptability, rated blind on a sample of patches;
- cost per issue.
We also report standard SWE-bench M resolve rate. Our method should not lose there; if it does, the diagnostics are crowding out other context.
Three results would settle the proposal.
- Diagnostics-only should beat screenshots-only at equal tokens, and the combination should help further or tie. Reversal falsifies the first claim.
- FailureMem and GUIRepair run with multi-locale screenshots should show a measurably higher Westernization rate than our system. If the rates are indistinguishable, the preservation concern is not real for current models, and we will report that.
- Retrieval over uncurated web text should raise the Westernization rate relative to the curated store, testing the Wikipedia-trap concern in a code setting. A null result there would suggest curation effort is unnecessary.
All comparisons use paired bootstrap over issues, with results reported per locale. A gain that comes entirely from one script would be reported as such rather than averaged away.
References
- Repair Is Nearly Generation: Multilingual Program Repair with LLMs
- TransRepair: Context-aware Program Repair for Compilation Errors
- Measuring Multimodal Mathematical Reasoning with MATH-Vision Dataset
- GAOKAO-MM: A Chinese Human-Level Benchmark for Multimodal Models Evaluation
- Plot Twist: Multimodal Models Don't Comprehend Simple Chart Details
- Synthesize Step-by-Step: Tools, Templates and LLMs as Data Generators for Reasoning-Based Chart VQA
- Design2Code: Benchmarking Multimodal Code Generation for Automated Front-End Engineering
- Having Beer after Prayer? Measuring Cultural Bias in Large Language Models
- Marco-Bench-MIF: On Multilingual Instruction-Following Capability of Large Language
- Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Repair
- FailureMem: A Failure-Aware Multimodal Framework for Autonomous Software Repair
- DesignRepair: Dual-Stream Design Guideline-Aware Frontend Repair with Large Language Models
- Rubrics as Visual-Repair Context for Self-Evolving UI-to-Code Generation
- RAVENEA: A Benchmark for Multimodal Retrieval-Augmented Visual Culture Understanding
- Gamma: Revisiting Template-Based Automated Program Repair Via Mask Prediction
- SWE-ABS: Adversarial Benchmark Strengthening Exposes Inflated Success Rates on Test-based Benchmark
- SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?
- Multi-lingual and Multi-cultural Figurative Language Understanding