Skip to content

feat(locale): add Bulgarian (bg) locale file + 7 news sources#3893

Open
zionappp-ui wants to merge 2 commits into
koala73:mainfrom
zionappp-ui:feat/bg-sources
Open

feat(locale): add Bulgarian (bg) locale file + 7 news sources#3893
zionappp-ui wants to merge 2 commits into
koala73:mainfrom
zionappp-ui:feat/bg-sources

Conversation

@zionappp-ui
Copy link
Copy Markdown
Contributor

What this adds

bg was already registered in SUPPORTED_LANGUAGES, LANGUAGES, map-locale.ts, offline.html, and both translate/sync scripts upstream — but src/locales/bg.json was missing and no Bulgarian news sources were wired. This PR fills both gaps.

Locale file

src/locales/bg.json seeded from en.json with Bulgarian overlay for the key visible UI strings (generatingBrief, timeline, infrastructure, shell titles). English fallback is acceptable for the long tail; the critical display strings are in Bulgarian.

Sources (7 feeds, all verified live)

Source Type RSS Items Tier
Dnevnik mainstream direct 30 2
Capital.bg market direct 30 2
24 Chasa mainstream direct 100 2
Sega mainstream direct 87 2
Mediapool mainstream Google News bg 100 2
BTA wire Google News bg 100 1
Bivol intel direct 300 2

Bivol is Bulgaria's leading investigative outlet and an OCCRP partner — classified 'intel'. Mediapool and BTA use locale-tuned Google News (hl=bg&gl=BG&ceid=BG:bg) because their direct feeds return 0 items from cloud IPs.

Files changed

  • src/locales/bg.json — new locale bundle (3 269 lines)
  • src/config/feeds.ts — SOURCE_TYPES + 7 feed entries (lang: 'bg')
  • server/worldmonitor/news/v1/_feeds.ts — server-side mirror (7 entries)
  • shared/rss-allowed-domains.json + scripts/shared/rss-allowed-domains.json — 5 new domains (byte-identical)
  • api/_rss-allowed-domains.js — same 5 domains
  • vite.config.ts — same 5 domains in dev-proxy allow-list
  • shared/source-tiers.json + scripts/shared/source-tiers.json — tier entries for all 7 (byte-identical)

(Mediapool and BTA use news.google.com which is already in the allow-list.)

Adds the missing src/locales/bg.json (seeded from en.json with Bulgarian
overlay for key visible strings). bg was already registered in
SUPPORTED_LANGUAGES, LANGUAGES, map-locale.ts, offline.html, and the
translate/sync scripts upstream — only the locale bundle and news feeds
were absent.

Sources (all verified live):
  Dnevnik      — independent quality daily          (direct RSS, 30 items) tier 2
  Capital.bg   — business / economics               (direct RSS, 30 items) tier 2
  24 Chasa     — mainstream daily                   (direct RSS, 100 items) tier 2
  Sega         — mainstream daily                   (direct RSS, 87 items)  tier 2
  Mediapool    — independent online (OCCRP partner) (Google News bg, 100 items) tier 2
  BTA          — national wire agency               (Google News bg, 100 items) tier 1
  Bivol        — investigative (OCCRP partner)      (direct RSS, 300 items) tier 2

All domains added to all 4 allowlist mirrors. SOURCE_TYPES: BTA=wire,
Capital.bg=market, Bivol=intel, others=mainstream.
@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 wires up Bulgarian (bg) locale support by adding src/locales/bg.json and 7 Bulgarian news feed entries across the client config, server feeds mirror, allowed-domain lists, source-tier registry, and Vite dev-proxy.

  • News feeds: 7 sources (Dnevnik, Capital.bg, 24 Chasa, Sega, Mediapool, BTA, Bivol) are added consistently to src/config/feeds.ts, server/worldmonitor/news/v1/_feeds.ts, all three rss-allowed-domains files, source-tiers.json (both copies), and vite.config.ts — the multi-file alignment is clean.
  • Locale file: bg.json is substantially restructured and gains new keys (shell, widgets, many header/panels additions), but hundreds of previously-complete Bulgarian translations across countryBrief, header, panels, signals, chips, and facts are replaced with English strings — a net regression for Bulgarian-locale users.
  • Unrelated diff noise: Three pre-existing entries in source-tiers.json (El País, Híradó, La Silla Vacía) are converted from native Unicode to JSON escape sequences; functionally harmless but it muddies the diff.

Confidence Score: 3/5

The feed/domain/tier additions are clean, but the locale file actively removes Bulgarian text that was already there, leaving Bulgarian users with an English-heavy UI.

The feed wiring across all six required files is consistent and correct. The locale file is the problem: it seeds from en.json without preserving the prior Bulgarian translations, so strings like countryBrief.identifying, every header.* label, all panels.* names, and the full signals/chips/infra/fallback blocks revert to English. Any user with bg set as their language will now see mostly English UI text — the opposite of the goal stated in the PR description.

src/locales/bg.json needs the previously-translated Bulgarian strings restored; shared/source-tiers.json and scripts/shared/source-tiers.json have unrelated Unicode-escape noise on existing entries.

Important Files Changed

Filename Overview
src/locales/bg.json Adds new shell, widgets, and extra keys; but replaces ~150 previously-translated Bulgarian strings in countryBrief, header, panels, and facts sections with English text — a significant localization regression.
src/config/feeds.ts Adds 7 Bulgarian news sources to SOURCE_TYPES and FULL_FEEDS europe block; feed URLs and lang tags are consistent with the allowed-domains list.
server/worldmonitor/news/v1/_feeds.ts Server-side mirror of the 7 Bulgarian feeds appended to the europe block; URLs and gnLocale() usage match the client-side config correctly.
scripts/shared/source-tiers.json Adds tier entries for all 7 Bulgarian sources; also needlessly converts Unicode characters in three existing entries (El País, Híradó, La Silla Vacía) to JSON escape sequences.
shared/source-tiers.json Byte-identical to scripts/shared/source-tiers.json; same Unicode escape issue on existing entries.
shared/rss-allowed-domains.json Adds 5 Bulgarian RSS domains; www-prefix conventions match the feed URLs used in feeds.ts.
api/_rss-allowed-domains.js Adds the same 5 Bulgarian domains to the Vercel Edge Function allow-list; consistent with shared/rss-allowed-domains.json.
vite.config.ts Adds the 5 new Bulgarian domains to the Vite dev-proxy allow-list; matches the other domain lists.

Reviews (1): Last reviewed commit: "feat(locale): add Bulgarian (bg) locale ..." | Re-trigger Greptile

Comment thread src/locales/bg.json Outdated
Comment on lines +269 to +500
"labels": {
"layers": {
"military": "Покажи военни слоеве",
"finance": "Покажи финансови слоеве",
"infra": "Покажи инфраструктурни слоеве",
"intel": "Покажи разузнавателни слоеве",
"all": "Включи всички слоеве",
"none": "Скрий всички слоеве",
"minimal": "Минимални слоеве (конфликти + горещи точки)"
"military": "Show military layers",
"finance": "Show finance layers",
"infra": "Show infrastructure layers",
"intel": "Show intelligence layers",
"all": "Enable all layers",
"none": "Hide all layers",
"minimal": "Minimal layers (conflicts + hotspots)"
},
"layer": {
"ais": "Превключи проследяване на кораби AIS",
"flights": "Превключи военни полети",
"conflicts": "Превключи конфликтни зони",
"hotspots": "Превключи горещи точки",
"protests": "Превключи протести и вълнения",
"cables": "Превключи подводни кабели",
"pipelines": "Превключи тръбопроводи",
"nuclear": "Превключи ядрени обекти",
"bases": "Превключи военни бази",
"fires": "Превключи сателитни пожари",
"weather": "Превключи метеорологичен слой",
"cyber": "Превключи киберзаплахи",
"displacement": "Превключи потоци на разселване",
"climate": "Превключи климатични аномалии",
"outages": "Превключи интернет прекъсвания",
"tradeRoutes": "Превключи търговски маршрути"
"ais": "Toggle AIS vessel tracking",
"flights": "Toggle military flights",
"conflicts": "Toggle conflict zones",
"hotspots": "Toggle intel hotspots",
"protests": "Toggle protests & unrest",
"cables": "Toggle undersea cables",
"pipelines": "Toggle pipelines",
"nuclear": "Toggle nuclear facilities",
"bases": "Toggle military bases",
"fires": "Toggle satellite fires",
"weather": "Toggle weather overlay",
"cyber": "Toggle cyber threats",
"displacement": "Toggle displacement flows",
"climate": "Toggle climate anomalies",
"outages": "Toggle internet outages",
"tradeRoutes": "Toggle trade routes"
},
"view": {
"dark": "Превключи на тъмна тема",
"light": "Превключи на светла тема",
"fullscreen": "Превключи цял екран",
"settings": "Отвори настройки",
"refresh": "Опресни всички данни"
"dark": "Switch to dark mode",
"light": "Switch to light mode",
"fullscreen": "Toggle fullscreen",
"settings": "Open settings",
"refresh": "Refresh all data"
},
"time": {
"1h": "Покажи събития от последния час",
"6h": "Покажи събития от последните 6 часа",
"24h": "Покажи събития от последните 24 часа",
"48h": "Покажи събития от последните 48 часа",
"7d": "Покажи събития от последните 7 дни"
"1h": "Show events from last hour",
"6h": "Show events from last 6 hours",
"24h": "Show events from last 24 hours",
"48h": "Show events from last 48 hours",
"7d": "Show events from last 7 days"
}
}
},
"modals": {
"search": {
"placeholder": "Търсене или въвеждане на команда...",
"hint": "Търсене • Държави • Слои • Панели • Навигиране • Настройки",
"placeholderTech": "Търсене или въвеждане на команда...",
"hintTech": "Търсене • Компании • AI лаборатории • Слои • Навигиране • Настройки",
"placeholderFinance": "Търсене или въвеждане на команда...",
"hintFinance": "Търсене • Борси • Пазари • Слои • Навигиране • Настройки",
"recent": "Скорошни търсения",
"empty": "Търсене на данни или изпълнение на команди",
"noResults": "Няма резултати",
"commands": "Команди",
"results": "Резултати",
"seeAllCommands": "Виж всички команди",
"hideCommandList": "Назад",
"navigate": "навигиране",
"select": "избор",
"close": "затвори",
"placeholder": "Search or type a command...",
"hint": "Search • Countries • Layers • Panels • Navigation • Settings",
"placeholderTech": "Search or type a command...",
"hintTech": "Search • Companies • AI Labs • Layers • Navigation • Settings",
"placeholderFinance": "Search or type a command...",
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.

P1 Wholesale replacement of existing Bulgarian translations with English

The previous bg.json had complete Bulgarian translations for large UI sections — countryBrief (identifying, locating, signals, chips, fallback, infra, levels, trends, facts), header (world, tech, live, settings, sources, region labels, panel categories), and panels (panel names). All of these are replaced with English strings here. Bulgarian users who relied on this locale will now see English text for most of the UI, including core navigation labels ("WORLD", "SETTINGS", "LIVE") and the entire country-brief panel.

The PR description frames this as "seeding from en.json with a Bulgarian overlay," but the prior file already had a Bulgarian overlay that was more comprehensive. The net result is a regression for any user with bg selected as their locale.

Comment on lines 47 to 75
"The National": 2,
"Yonhap News": 2,
"Chosun Ilbo": 2,
"El País": 2,
"El Pa\u00eds": 2,
"El Mundo": 2,
"BBC Mundo": 2,
"Brasil Paralelo": 2,
"Der Spiegel": 2,
"Die Zeit": 2,
"DW News": 2,
"Corriere della Sera": 2,
"Repubblica": 2,
"NRC": 2,
"De Telegraaf": 2,
"Dagens Nyheter": 2,
"Svenska Dagbladet": 2,
"BBC Turkce": 2,
"DW Turkish": 2,
"Hurriyet": 2,
"TVN24": 2,
"Polsat News": 2,
"Rzeczpospolita": 2,
"Telex": 2,
"Index.hu": 2,
"HVG": 2,
"444.hu": 2,
"24.hu": 2,
"Híradó": 2,
"H\u00edrad\u00f3": 2,
"Portfolio.hu": 2,
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 Unrelated Unicode escape conversion changes existing entries

Three pre-existing entries — "El País", "Híradó", and "La Silla Vacía" — are rewritten from native Unicode characters to JSON escape sequences (\u00ed, \u00f3, etc.). While these are semantically identical to any JSON parser, the change is unrelated to adding Bulgarian sources and touches the identical keys in both scripts/shared/source-tiers.json and shared/source-tiers.json. It creates a misleading diff that obscures the actual new tier additions and will generate noise in future comparisons of these files.

…e + 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