Skip to content

feat(locale): bootstrap Estonian (et) locale with i18n + 5 news sources#3898

Open
zionappp-ui wants to merge 2 commits into
koala73:mainfrom
zionappp-ui:feat/et-locale
Open

feat(locale): bootstrap Estonian (et) locale with i18n + 5 news sources#3898
zionappp-ui wants to merge 2 commits into
koala73:mainfrom
zionappp-ui:feat/et-locale

Conversation

@zionappp-ui
Copy link
Copy Markdown
Contributor

What this adds

Full Estonian (`et`) locale bootstrap.

Locale changes

  • `src/services/i18n.ts` — `'et'` in `SUPPORTED_LANGUAGES` + `LANGUAGES` (`Eesti 🇪🇪`)
  • `src/utils/map-locale.ts` — `et: 'name:et'`
  • `public/offline.html` — Estonian offline strings
  • `scripts/translate-locales.mjs` + `sync-offline-translations.mjs` — `'et'` added
  • `src/locales/et.json` — locale bundle with Estonian overlay

Sources (5 feeds, all verified live via direct RSS)

Source Type RSS Items Tier
ERR (public broadcaster) mainstream direct 50 1
Postimees mainstream direct 25 1
Delfi ET mainstream direct 100 2
EPL (Eesti Päevaleht) mainstream direct 50 2
Äripäev market direct 25 2

ERR (Eesti Rahvusringhääling) is Estonia's public broadcaster. All 5 feeds use direct RSS — Estonia has unusually good direct feed support.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@zionappp-ui is attempting to deploy a commit to the World Monitor Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the trust:caution Brin: contributor trust score caution label May 24, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 24, 2026

Greptile Summary

This PR bootstraps the Estonian (et) locale for WorldMonitor, adding i18n registration, 5 direct-RSS Estonian news sources, offline strings, and an allowlist update across all four domain allowlists (api/, shared/, scripts/shared/, vite.config.ts). The locale uses an overlay approach — only a small set of shell/offline strings are translated to Estonian; all other keys fall back to English via fallbackLng.

  • 5 RSS feeds (ERR, Postimees, Delfi ET, EPL, Äripäev) added with consistent entries in both the client (src/config/feeds.ts) and server (server/worldmonitor/news/v1/_feeds.ts), passing the feeds-client-server-parity test requirement.
  • shell.metaDescription is explicitly set to English text in et.json rather than being omitted; because i18next only falls back for absent keys, Estonian users will see this in English while other locales (zh, ja, vi, it) have it translated.
  • map-locale.test.mts snapshot is not updated to include the new et: 'name:et' tile-field mapping, leaving it untested against future regressions.

Confidence Score: 4/5

Safe to merge; the Estonian locale and news source additions are well-contained and consistent across all required files.

All four RSS domain allowlists, both feed config files, source-tiers, and i18n registration are updated in sync. The feeds-client-server-parity test will pass because both client and server use identical direct-RSS URLs for all five new feeds. The only gaps are a meta description string that should be absent (or translated) in the locale file, and a missing snapshot entry in the map-locale test.

src/locales/et.json (shell.metaDescription left as English text rather than absent) and tests/map-locale.test.mts (new et tile-field mapping not covered by snapshot).

Important Files Changed

Filename Overview
src/locales/et.json New 3,269-line Estonian locale bundle added as an overlay; shell titles and a few countryBrief strings are translated to Estonian while most other keys are left in English (relying on i18next fallback). shell.metaDescription is explicitly set in English rather than being absent, unlike zh/ja/vi/it which have it translated.
src/config/feeds.ts 5 Estonian feeds added to FULL_FEEDS europe section and SOURCE_TYPES; all use direct RSS URLs and match server-side entries. Source type classification looks correct (ERR/Postimees/Delfi/EPL as mainstream, Äripäev as market).
server/worldmonitor/news/v1/_feeds.ts 5 Estonian feeds added to VARIANT_FEEDS.full.europe, mirroring client-side entries. Direct RSS URLs match the client. feeds-client-server-parity test should pass.
src/services/i18n.ts 'et' added to SUPPORTED_LANGUAGES (alphabetically placed) and to the LANGUAGES display array with correct label and flag. The locale will be lazy-loaded on demand and falls back to English for missing keys.
src/utils/map-locale.ts et: 'name:et' mapping added; OSM/Protomaps tiles carry name:et for Estonian place names, so this is correct. The map-locale.test.mts snapshot is not updated to cover the new mapping.
api/_rss-allowed-domains.js 5 Estonian RSS domains added; consistent with vite.config.ts, scripts/shared/rss-allowed-domains.json and shared/rss-allowed-domains.json — all four allowlists updated in sync.
scripts/sync-offline-translations.mjs 'et' added to LOCALES array; 'en' was also reordered from index 0 to its alphabetical position — behaviorally benign since the script iterates without order dependency.
shared/source-tiers.json 5 Estonian sources added with correct tiers (ERR/Postimees at 1, Delfi ET/EPL/Äripäev at 2); non-ASCII characters in pre-existing entries are escaped to Unicode sequences.

Sequence Diagram

sequenceDiagram
    participant Browser
    participant i18n as i18n.ts (initI18n)
    participant Locale as src/locales/et.json
    participant EN as src/locales/en.json (fallback)
    participant FeedConfig as src/config/feeds.ts
    participant RSSProxy as api/_rss-allowed-domains.js
    participant Server as server/_feeds.ts
    participant RSS as Estonian RSS feeds

    Browser->>i18n: detect language (navigator / wm-locale-explicit)
    i18n->>Locale: lazy-load et.json
    Locale-->>i18n: partial bundle (shell + a few countryBrief strings)
    i18n->>EN: addResourceBundle merge (fallbackLng for missing keys)
    EN-->>Browser: rendered UI (Estonian shell titles + English rest)

    Browser->>FeedConfig: resolve FULL_FEEDS.europe
    FeedConfig-->>Browser: ERR, Postimees, Delfi ET, EPL, Äripäev (rssProxyUrl)
    Browser->>RSSProxy: "GET /rss-proxy?url=https://www.err.ee/rss"
    RSSProxy->>RSS: fetch feed (domain allowlist check passed)
    RSS-->>Browser: news items

    Server->>RSS: direct fetch via VARIANT_FEEDS.full.europe (digest path)
Loading

Reviews (1): Last reviewed commit: "feat(locale): bootstrap Estonian (et) lo..." | Re-trigger Greptile

Comment thread src/locales/et.json Outdated
},
"shell": {
"documentTitle": "World Monitor — Globaalne luureteabe armatuurlaud reaalajas",
"metaDescription": "Real-time global intelligence platform. Featured in WIRED. Used by 2M+ people across 190 countries. Conflicts, markets, military, OSINT in one view.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 shell.metaDescription left in English

This key is explicitly present in et.json with its English value rather than being absent. Because i18next's fallbackLng: 'en' only fires when a key is missing from the bundle — not when it exists with an English value — Estonian-language users will see this English string instead of a translated version. Other locales (zh, ja, vi, it) all have this translated. Either translate it to Estonian or remove the key so fallback takes effect naturally.

…n + strip Unicode escape noise from source-tiers
@koala73 koala73 added the area: i18n Internationalization, translations label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: i18n Internationalization, translations trust:caution Brin: contributor trust score caution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants