Skip to content

fix: restore Ask-streaming copy in 10 locales after mojibake - #2951

Merged
esokullu merged 1 commit into
webbrain-one:mainfrom
esokullu:codex/fix-ask-streaming-locales-2950
Aug 29, 2026
Merged

fix: restore Ask-streaming copy in 10 locales after mojibake#2951
esokullu merged 1 commit into
webbrain-one:mainfrom
esokullu:codex/fix-ask-streaming-locales-2950

Conversation

@esokullu

Copy link
Copy Markdown
Collaborator

Closes #2950

Summary

Restores the garbled st.display.openai_ask_streaming.label / .desc settings
copy in the 10 locales that still ship it as literal runs of ? (e.g. "? Ask ????????" / "???????????????? Ask"):

  • ar, bn, fa, he, hi, ja, ko, ru, th, uk
  • both build targets: src/chrome/src/ui/locales/ and
    src/firefox/src/ui/locales/ (20 files, 40 lines)

PR #2949 fixed only the Chinese (zh.js) locale for this exact key; this PR
fixes the remaining ten with native-quality copy.

Where the corruption came from

All 20 files had intact native translations until commit
e9643a67f"Add 76 LLM providers and Ask streaming", by Barack Sokullu
(2026-07-23 17:12:06 +0300). That commit re-translated these two keys for the
"Ask" rename and committed them as ?-runs (verified via git log -L on each
file: every one of the 20 files shows INTACT → CHANGED IN e9643a67f). The
garble has shipped in every release since, including the committed
dist/webbrain-*-33.6.0.zip submission packages.

Implementation

  • scripts/i18n-perm-translations.mjs — adds a second, idempotent,
    replace-in-place pass for the Ask-streaming keys. It only rewrites a value
    when the stored value contains ? (never clobbers intact translations), and
    skips locales without entries. Also adds table entries for the previously
    missing bn, fa, he, hi and hardens the pass-1 insert guard to be
    quote-agnostic (he.js uses double-quoted keys).
  • 20 locale files patched in one script run (the script is re-runnable and
    no-ops once fixed).
  • test/run.js — generalizes the PR fix: restore Chinese Ask streaming copy #2949 zh-only mojibake regression
    guard to every locale (both builds): the
    st.display.openai_ask_streaming.label/.desc keys must not contain a
    ?-run, so a recurrence fails the build.

Testing

  • node test/run.js2110 passed, 0 failed
  • Corruption scan across all locale files: zero ?{4,} matches remain
  • Script re-run is a no-op (idempotency verified)

Follow-up (out of scope)

es.js, fr.js, pl.js, pt.js, vi.js show a subtler single-? accent
loss (e.g. "transmisi?n", "r?ponses") for this same key — a different
whole-file Latin-encoding corruption that affects many other keys in those
files. Worth a separate issue/PR.

'st.display.openai_ask_streaming.label'/'.desc' have shipped as literal runs
of '?' (e.g. "? Ask ????????") since commit e9643a6 ("Add 76 LLM providers
and Ask streaming") in ar, bn, fa, he, hi, ja, ko, ru, th, uk — in both the
chrome and firefox locale directories (20 files, 40 lines). PR webbrain-one#2949 restored
only zh; this restores the remaining 10 locales with native-quality copy via
an idempotent replace-in-place pass added to
scripts/i18n-perm-translations.mjs.

Also generalize the PR webbrain-one#2949 mojibake regression guard from zh-only to every
locale in test/run.js, so a recurrence of '?'-run corruption fails the build.
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@esokullu is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu
esokullu merged commit 0fd6d59 into webbrain-one:main Aug 29, 2026
1 of 2 checks passed
@esokullu
esokullu deleted the codex/fix-ask-streaming-locales-2950 branch August 29, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Garbled placeholder text still broken in 10 locales (ar, bn, fa, he, hi, ja, ko, ru, th, uk) for st.display.openai_ask_streaming

1 participant