Files
MagicMirror/translations/cy.json
Kristjan ESPERANTO df8a882966 fix(newsfeed): fix full article view and add framing check (#4039)
I was playing around with the newsfeed notification system
(`ARTICLE_MORE_DETAILS`, `ARTICLE_TOGGLE_FULL`, …) and discovered some
issues with the full article view:

The iframe was loading the CORS proxy URL instead of the actual article
URL, which could cause blank screens depending on the feed. Also, many
news sites block iframes entirely (`X-Frame-Options: DENY`) and the user
got no feedback at all — just an empty page. On top of that, scrolling
used `window.scrollTo()` which moved the entire MagicMirror page instead
of just the article.

This PR cleans that up:

- Use the raw article URL for the iframe (CORS proxy is only needed for
server-side feed fetching)
- Check `X-Frame-Options` / `Content-Security-Policy` headers
server-side before showing the iframe — if the site blocks it, show a
brief "Article cannot be displayed here." message and return to normal
view
- Show the iframe as a fixed full-screen overlay so other modules aren't
affected, scroll via `container.scrollTop`
- Keep the progressive disclosure behavior for `ARTICLE_MORE_DETAILS`
(title → description → iframe → scroll)
- Delete `fullarticle.njk`, replace with `getDom()` override
- Fix `ARTICLE_INFO_RESPONSE` returning proxy URL instead of real URL
- A few smaller fixes (negative scroll, null guard)
- Add `NEWSFEED_ARTICLE_UNAVAILABLE` translation to all 47 language
files
- Add e2e tests for the notification handlers (`ARTICLE_NEXT`,
`ARTICLE_PREVIOUS`, `ARTICLE_INFO_REQUEST`, `ARTICLE_LESS_DETAILS`)

## What this means for users

- The full article view now works reliably across different feeds
- If a news site blocks iframes, the user sees a brief message instead
of a blank screen
- Additional e2e tests make the module more robust and less likely to
break silently in future MagicMirror versions
2026-03-01 00:32:42 +01:00

54 lines
1.9 KiB
JSON

{
"LOADING": "Llwytho …",
"YESTERDAY": "Ddoe",
"TODAY": "Heddiw",
"TOMORROW": "Yfory",
"DAYAFTERTOMORROW": "Drennydd",
"RUNNING": "Gorffen mewn",
"EMPTY": "Dim digwyddiadau.",
"WEEK": "Wythnos {weekNumber}",
"N": "Go",
"NNE": "GoGoDw",
"NE": "GoDw",
"ENE": "DwGoDw",
"E": "Dw",
"ESE": "DwDeDw",
"SE": "DwDe",
"SSE": "DeDeDw",
"S": "De",
"SSW": "DeDeGr",
"SW": "DeGr",
"WSW": "GrDeGr",
"W": "Gr",
"WNW": "GrGoGr",
"NW": "GoGr",
"NNW": "GoGoGe",
"FEELS": "Teimlad {DEGREE}",
"PRECIP_POP": "Tebygolrwydd glawiad",
"PRECIP_AMOUNT": "Cyfanswm glawiad",
"MODULE_CONFIG_CHANGED": "Mae'r dewisiadau ar gyfer y modiwl {MODULE_NAME} wedi newid.\nGwiriwch y ddogfennaeth.",
"MODULE_CONFIG_ERROR": "Gwall yn y modiwl {MODULE_NAME}. {ERROR}",
"MODULE_ERROR_MALFORMED_URL": "URL anghywir.",
"MODULE_ERROR_NO_CONNECTION": "Dim cysylltiad rhyngrwyd.",
"MODULE_ERROR_UNAUTHORIZED": "Methiant awdurdodi.",
"MODULE_ERROR_RATE_LIMITED": "Gormod o geisiadau. Yn ceisio eto yn nes ymlaen.",
"MODULE_ERROR_SERVER_ERROR": "Gwall gweinydd. Yn ceisio eto yn nes ymlaen.",
"MODULE_ERROR_CLIENT_ERROR": "Cais wedi methu.",
"MODULE_ERROR_UNSPECIFIED": "Gwiriwch y logiau am ragor o fanylion.",
"NEWSFEED_NO_ITEMS": "Dim newyddion ar hyn o bryd.",
"NEWSFEED_ARTICLE_UNAVAILABLE": "Ni ellir dangos yr erthygl yma.",
"UPDATE_NOTIFICATION": "MagicMirror² mwy diweddar yn barod.",
"UPDATE_NOTIFICATION_MODULE": "Mae diweddaraiad ar gyfer y modiwl {MODULE_NAME}.",
"UPDATE_INFO_SINGLE": "Mae'r fersiwn bresenol {COMMIT_COUNT} commit tu ôl i'r gangen {BRANCH_NAME}.",
"UPDATE_INFO_MULTIPLE": "Mae'r fersiwn bresenol {COMMIT_COUNT} commit tu ôl i'r gangen {BRANCH_NAME}.",
"UPDATE_NOTIFICATION_DONE": "Diweddariad wedi'i gwblhau ar gyfer y modiwl {MODULE_NAME}",
"UPDATE_NOTIFICATION_ERROR": "Gwall diweddariad ar gyfer y modiwl {MODULE_NAME}",
"UPDATE_NOTIFICATION_NEED-RESTART": "Mae angen ailgychwyn MagicMirror."
}