feat(feeds): add Ukrainian (uk) locale with mainstream + investigative sources#3880
feat(feeds): add Ukrainian (uk) locale with mainstream + investigative sources#3880zionappp-ui wants to merge 1 commit into
Conversation
|
@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. |
Greptile SummaryThis PR adds Ukrainian (
Confidence Score: 3/5Safe to merge after resolving the two orphaned allowlist entries; all other locale wiring is correct and consistent. The core locale addition — feeds, i18n, tiers, offline page, map labels — is well-executed and the parity test extension is correct. The one concrete defect is that All four allowlist mirrors ( Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User browser locale = uk] --> B{Free-tier cap active?}
B -- No --> C[All feeds enabled normally]
B -- Yes --> D[getLocaleBoostedSources returns 10 UK sources]
D --> E[protectedNames pre-seeded into keep set]
E --> F[selectSourcesUnderCap round-robin fills remaining slots]
F --> G[Ukrainian sources never evicted by cap]
H[feeds.ts 10 UK feeds with lang:uk] --> D
subgraph AllowlistMismatch[Allowlist mismatch in this PR]
N[zaborona.com in allowlist]
O[texty.org.ua in allowlist]
P[No feed entry in feeds.ts or server feeds]
N --> P
O --> P
end
Reviews (1): Last reviewed commit: "feat(feeds): add Ukrainian (uk) locale w..." | Re-trigger Greptile |
| "zaborona.com", | ||
| "texty.org.ua" |
There was a problem hiding this comment.
Dead allowlist entries — no corresponding feed config
zaborona.com and texty.org.ua are added to all four allowlist mirrors (shared/rss-allowed-domains.json, scripts/shared/rss-allowed-domains.json, api/_rss-allowed-domains.js, and vite.config.ts) but appear in neither src/config/feeds.ts nor server/worldmonitor/news/v1/_feeds.ts. The PR description explicitly enumerates 10 sources (6 mainstream + 4 investigative), and none of them is Zaborona or Texty.org.ua. The RSS proxy will accept requests to these domains even though no feed will ever reference them under the current config. Either the feeds for these two sources should be added to complete the intended inclusion, or these allowlist entries should be removed.
95eba09 to
644fe4d
Compare
…e sources Adds Ukrainian as a supported locale following the pattern established in koala73#3857 (Hungarian). Sources added: - Mainstream: Ukrinform, Ukrainska Pravda, Hromadske, Suspilne Media, ZN.UA, RBC-Ukraine - Investigative: Bihus.Info, Slidstvo.Info, Skhemy (Schemes), VoxUkraine Direct RSS (verified working): ukrinform.ua, bihus.info, slidstvo.info (redirects to www.slidstvo.info) Google News fallback (blocked from probe IP — UA:uk locale params): pravda.com.ua, hromadske.ua, suspilne.media, schemes.media, zn.ua, rbc.ua, voxukraine.org All 4 allowlist mirrors updated (shared/, scripts/shared/, api/, vite.config.ts). Redirect trap: slidstvo.info/feed/ → www.slidstvo.info/feed/ — both hostnames added to allowlist. Server _feeds.ts mirrors client feeds.ts routing decisions (direct vs Google News) — feeds-client-server-parity test coverage maintained.
644fe4d to
4a25a97
Compare
|
Updated: registered |
Summary
Adds Ukrainian (
uk) as a supported locale following the pattern established in #3857 (Hungarian). All 14 steps from the locale-addition recipe are complete.Sources added
Mainstream (6):
UA:uk)UA:uk)UA:uk)UA:uk)UA:uk) — typedmarketInvestigative (4) — typed
intel(noinvestigativetype in codebase;intelis the established pattern for Bellingcat, RAND, etc.):UA:uk)UA:uk)Investigative sources (Bihus, Slidstvo, Skhemy, VoxUkraine) are Ukraine's leading anti-corruption and investigative outlets — see discussion in #3879.
Redirect trap caught
slidstvo.info/feed/redirects towww.slidstvo.info/feed/— both hostnames added to all 4 allowlist mirrors.Files changed
shared/rss-allowed-domains.json,scripts/shared/rss-allowed-domains.json,api/_rss-allowed-domains.js,vite.config.tssrc/config/feeds.ts(client),server/worldmonitor/news/v1/_feeds.ts(server digest) —gnLocale()helper added to server fileshared/source-tiers.json+scripts/shared/source-tiers.json(byte-identical, all at tier 2)src/services/i18n.ts(ukinSUPPORTED_LANGUAGES+LANGUAGESarray),src/utils/map-locale.ts(name:uk)src/locales/uk.json— native Ukrainian for all critical UI sections; remaining keys bootstrapped from Russian as placeholder; full run viatranslate-locales.mjswithANTHROPIC_API_KEYrecommended post-mergescripts/translate-locales.mjs(ukinLOCALES+LANG_NAMES),scripts/sync-offline-translations.mjs(ukadded)public/offline.htmlupdated (22 locales, clean run)protectedNamesguardprotectedNamesparam (defaultsnew Set()— all existing call sites unaffected)tests/feeds-client-server-parity.test.mjs— extendisGoogleNewsclassifier to recognisegnLocale()callsTest results
Notes
gnLocale()useshl=uk&gl=UA&ceid=UA:uk— materially more Ukrainian-language results thanen-USdefaultssource-tiers.jsonmirrors are byte-identical (diff confirmed)