Skip to content

fix(oref): sanitize Hebrew Unicode for reliable translation#694

Merged
koala73 merged 1 commit intomainfrom
fix/oref-hebrew-translation
Mar 1, 2026
Merged

fix(oref): sanitize Hebrew Unicode for reliable translation#694
koala73 merged 1 commit intomainfrom
fix/oref-hebrew-translation

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 1, 2026

Summary

  • Add sanitizeHebrew() to strip invisible Unicode control chars (RTL/LTR marks, zero-width chars) and normalize dash variants that OREF API embeds in Hebrew strings
  • Apply sanitization in both translateLocation() (location map lookup) and staticTranslate() (category name lookup) before matching against translation maps
  • Add bare city entries missing from the location map: Beer Sheva, Ashdod, Ashkelon, Sderot

Test plan

  • npx tsc --noEmit — clean
  • npx vite build — success
  • node --test tests/oref-locations.test.mjs — 8/8 pass
  • During active OREF sirens, verify panel shows English category names and transliterated area names

…tion

OREF API embeds invisible RTL/LTR marks and zero-width chars in Hebrew
strings, breaking exact key lookup in both STATIC_TRANSLATIONS and
OREF_LOCATIONS maps. Also normalizes en-dash variants to ASCII hyphen
and adds bare city entries (Beer Sheva, Ashdod, Ashkelon, Sderot).
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel
Copy link

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Mar 1, 2026 8:17pm
worldmonitor-finance Building Building Preview, Comment Mar 1, 2026 8:17pm
worldmonitor-happy Building Building Preview, Comment Mar 1, 2026 8:17pm
worldmonitor-startup Building Building Preview, Comment Mar 1, 2026 8:17pm

Request Review

@koala73 koala73 merged commit 78cecf3 into main Mar 1, 2026
6 checks passed
AaronCorkyj pushed a commit to AaronCorkyj/worldmonitor that referenced this pull request Mar 1, 2026
…tion (koala73#694)

OREF API embeds invisible RTL/LTR marks and zero-width chars in Hebrew
strings, breaking exact key lookup in both STATIC_TRANSLATIONS and
OREF_LOCATIONS maps. Also normalizes en-dash variants to ASCII hyphen
and adds bare city entries (Beer Sheva, Ashdod, Ashkelon, Sderot).
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.

1 participant