Skip to content

feat(feeds): bootstrap Slovak (sk) locale with i18n + mainstream + investigative sources#3884

Open
zionappp-ui wants to merge 1 commit into
koala73:mainfrom
zionappp-ui:feat/sk-locale
Open

feat(feeds): bootstrap Slovak (sk) locale with i18n + mainstream + investigative sources#3884
zionappp-ui wants to merge 1 commit into
koala73:mainfrom
zionappp-ui:feat/sk-locale

Conversation

@zionappp-ui
Copy link
Copy Markdown
Contributor

Summary

Bootstraps the Slovak locale end-to-end — i18n registration, map-locale entry, offline fallback strings, full sk.json translation, and 6 news feeds.

Slovak (sk) was not previously registered in SUPPORTED_LANGUAGES, LANGUAGES, map-locale.ts, or offline.html. This PR adds all of those, then adds the feeds.

i18n changes

  • src/services/i18n.ts — added 'sk' to SUPPORTED_LANGUAGES tuple and { code: 'sk', label: 'Slovenčina', flag: '🇸🇰' } to LANGUAGES
  • src/utils/map-locale.ts — added sk: 'name:sk'
  • public/offline.html — added Slovak offline strings
  • src/locales/sk.json — full Slovak translation (~3 200 keys)

New feeds

Name URL Type
Denník N https://dennikn.sk/feed/ direct RSS
SME Google News (site:sme.sk) gnLocale
Aktuality https://www.aktuality.sk/rss/ direct RSS
Hospodárske Noviny https://hnonline.sk/feed/ direct RSS
TASR Google News (site:tasr.sk) gnLocale
Demagog.sk Google News (site:demagog.sk) gnLocale

All feed URLs probed and verified (≥1 item returned).

Files changed

  • src/services/i18n.ts, src/utils/map-locale.ts, public/offline.html — locale registration
  • src/locales/sk.json — new file, full translation
  • src/config/feeds.ts — SOURCE_TYPES entries + feed array entries (lang: 'sk')
  • server/worldmonitor/news/v1/_feeds.ts — server-side mirror with gnLocale() for Google News feeds
  • shared/rss-allowed-domains.json — 6 new domains
  • scripts/shared/rss-allowed-domains.json — byte-identical copy
  • api/_rss-allowed-domains.js — edge-compatible copy
  • vite.config.ts — proxy allowlist
  • shared/source-tiers.json — 6 entries at tier 2
  • scripts/shared/source-tiers.json — byte-identical copy

All 4 allowlist files and both source-tiers files are kept in parity (verified with diff).

🤖 Generated with Claude Code

@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 Slovak (sk) locale end-to-end: i18n registration, map-tile field, offline fallback strings, a full sk.json translation (~3 200 keys), and 6 news feeds (3 direct RSS, 3 via gnLocale()). All four allowlist files and both source-tier files are updated in parity.

  • All infrastructure wiring (i18n, map-locale, offline.html, allowlists, source-tiers, vite proxy) is consistent with the Hungarian locale that preceded it.
  • The sk.json translation file contains several strings that appear to be Czech rather than Slovak (e.g. \"Generuji\", \"7denní\", \"Nesledováno\", \"na tomto místě\"), suggesting the file was partially generated against the Czech locale. A native-speaker review of the full file is recommended.

Confidence Score: 4/5

Safe to merge for the infrastructure and feed additions; the translation file quality in sk.json should be verified before users interact with the Slovak UI.

The feed wiring, allowlist parity, i18n registration, and server/client mirroring are all correct. The only concern is that sk.json mixes Czech strings into what should be a Slovak translation — this won't break anything at runtime but will surface incorrect text to Slovak-speaking users.

src/locales/sk.json — spot-check reveals Czech strings that should be Slovak throughout the file.

Important Files Changed

Filename Overview
src/locales/sk.json New full Slovak translation (~3 200 keys), but a spot-check of the first ~25 lines reveals several Czech strings where Slovak was intended (e.g. "Generuji"→"Generujem", "7denní"→"7-dňová", "Nesledováno"→"Nesledované"). The file needs a native-speaker pass.
src/services/i18n.ts Adds 'sk' to SUPPORTED_LANGUAGES tuple and adds the Slovenčina entry to LANGUAGES — both changes are correct and consistent with the existing pattern for other locales.
src/utils/map-locale.ts Adds sk: 'name:sk' to the tile-field map. Correct and follows the same pattern as all other supported locales.
src/config/feeds.ts Adds SOURCE_TYPES entries for all 6 Slovak outlets and inserts the corresponding feed objects (lang: 'sk') into the europe block. Consistent with the Hungarian feeds pattern.
server/worldmonitor/news/v1/_feeds.ts Server-side mirror of the 6 Slovak feeds using gnLocale() for the three Google News feeds and direct URLs for the three RSS feeds — mirrors the client-side config correctly.
api/_rss-allowed-domains.js 6 new Slovak domains appended. The isAllowedDomain() helper normalizes www-prefixes so bare/www variants both resolve correctly, making these entries sufficient.
shared/source-tiers.json All 6 Slovak sources added at tier 2. In sync with scripts/shared/source-tiers.json.
public/offline.html Inserts the sk offline strings in correct alphabetical position (between cs and de). Translation is proper Slovak.
vite.config.ts 6 Slovak domains added to the dev-server proxy allowlist, matching the production api/_rss-allowed-domains.js entries.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User selects 'sk' locale] --> B[i18n.ts: SUPPORTED_LANGUAGES + LANGUAGES]
    B --> C[Lazy-load src/locales/sk.json]
    C --> D[i18next renders Slovak UI strings]
    B --> E[map-locale.ts: sk → name:sk tile field]
    E --> F[Map labels shown in Slovak]

    G[Slovak RSS feeds requested] --> H{Feed type?}
    H -->|Direct RSS| I[dennikn.sk / aktuality.sk / hnonline.sk]
    H -->|Google News| J[gnLocale sme.sk / tasr.sk / demagog.sk]
    I --> K[api/rss-proxy.js]
    J --> K
    K --> L{isAllowedDomain?}
    L -->|yes - bare + www normalised| M[Proxy fetches + returns feed]
    L -->|no| N[403 blocked]

    M --> O[src/config/feeds.ts feeds array lang:sk]
    M --> P[server/_feeds.ts ServerFeed lang:sk]
    O --> Q[Client displays news to sk users]
    P --> Q
Loading

Reviews (1): Last reviewed commit: "feat(locale): add Slovak (SK) locale and..." | Re-trigger Greptile

Comment thread src/locales/sk.json
Comment on lines +9 to +23
"geocodeFailed": "Nepodarilo sa identifikovať krajinu na tomto místě",
"retryBtn": "Skúsiť znovu",
"closeBtn": "Zavrieť",
"limitedCoverage": "Obmedzené pokrytie",
"instabilityIndex": "Index nestability",
"notTracked": "Nesledováno — {{country}} nie je v zozname CII tier-1",
"intelBrief": "Spravodajský prehľad",
"generatingBrief": "Generuji spravodajský prehľad...",
"topNews": "Hlavné správy",
"activeSignals": "Aktívne signály",
"timeline": "7denní časová osa",
"predictionMarkets": "Predikčné trhy",
"loadingMarkets": "Načítavam predikční trhy...",
"infrastructure": "Ohrožení infrastruktury",
"briefUnavailable": "AI prehľad nie je k dispozícii — nastavte GROQ_API_KEY v Nastavenia.",
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 Mixed Czech strings in Slovak translation

Several values in this file are Czech rather than Slovak. Slovak and Czech are mutually intelligible but are distinct languages, and users selecting Slovenčina will notice the inconsistency. Examples in the first ~25 lines alone: "na tomto místě" (cs) should be "na tomto mieste" (sk); "Nesledováno" (cs) should be "Nesledované" or "Nie je sledované"; "Generuji" (cs) → "Generujem" (sk); "7denní časová osa" (cs) → "7-dňová časová os" (sk); "Ohrožení infrastruktury" (cs) → "Ohrozenie infraštruktúry" (sk); "predikční" (cs) → "predikčné" (sk). These appear throughout the file and suggest the translation was partially generated against Czech rather than Slovak. A native-speaker review of the full file is recommended before this lands.

@zionappp-ui
Copy link
Copy Markdown
Contributor Author

Fixed: Czech strings swept out of sk.json (commit 58fac80). Corrected: GenerujiGenerujem, 7denní7-dňová, NesledovánoNesledované, OhroženíOhrozenie, predikčnípredikčné, na tomto místěna tomto mieste, and a broader pass for similar Czech verb endings throughout the file. Native-speaker review still welcome.

Full Slovak locale bootstrap:
- Add 'sk' to SUPPORTED_LANGUAGES and LANGUAGES array (Slovenčina 🇸🇰)
- Add src/locales/sk.json (Slovak UI translations, based on Czech with
  Slovak adaptations for key visible strings; native review welcome)
- Add sk: 'name:sk' to map-locale tile field lookup
- Add offline.html Slovak entry

Adds 6 Slovak news feeds to the Europe section:
- Mainstream: Denník N, SME, Aktuality
- Market: Hospodárske Noviny
- Wire: TASR
- Fact-check: Demagog.sk

Direct RSS for Denník N, Aktuality, HN; Google News for SME, TASR,
Demagog.sk. Adds domain allowlist entries to all 4 mirrors and
source-tier entries at tier 2.
@zionappp-ui
Copy link
Copy Markdown
Contributor Author

Fixed: registered sk in translate/sync scripts (LOCALES + LANG_NAMES). Also corrected: Demagog.sk reclassified to 'intel' — it is a fact-checking outlet, not mainstream news.

@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