mirror of
https://github.com/MichMich/MagicMirror.git
synced 2026-04-24 06:47:07 +00:00
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
55 lines
2.0 KiB
JSON
55 lines
2.0 KiB
JSON
{
|
|
"LOADING": "Laddar …",
|
|
|
|
"DAYBEFOREYESTERDAY": "",
|
|
"YESTERDAY": "I går",
|
|
"TODAY": "I dag",
|
|
"TOMORROW": "I morgon",
|
|
"DAYAFTERTOMORROW": "I övermorgon",
|
|
"RUNNING": "Slutar",
|
|
"EMPTY": "Inga kommande händelser.",
|
|
"WEEK": "Vecka {weekNumber}",
|
|
|
|
"N": "N",
|
|
"NNE": "NNO",
|
|
"NE": "NO",
|
|
"ENE": "ONO",
|
|
"E": "Ö",
|
|
"ESE": "OSO",
|
|
"SE": "SO",
|
|
"SSE": "SSO",
|
|
"S": "S",
|
|
"SSW": "SSV",
|
|
"SW": "SV",
|
|
"WSW": "VSV",
|
|
"W": "V",
|
|
"WNW": "VNV",
|
|
"NW": "NV",
|
|
"NNW": "NNV",
|
|
|
|
"FEELS": "Känns som {DEGREE}",
|
|
"PRECIP_POP": "Nederbördsrisk",
|
|
"PRECIP_AMOUNT": "Nederbördsmängd",
|
|
|
|
"MODULE_CONFIG_CHANGED": "Konfigurationsalternativen för modulen {MODULE_NAME} har ändrats.\nVänligen se dokumentationen.",
|
|
"MODULE_CONFIG_ERROR": "Fel i modulen {MODULE_NAME}. {ERROR}",
|
|
"MODULE_ERROR_MALFORMED_URL": "Felaktig URL.",
|
|
"MODULE_ERROR_NO_CONNECTION": "Ingen internetanslutning.",
|
|
"MODULE_ERROR_UNAUTHORIZED": "Autentisering misslyckades.",
|
|
"MODULE_ERROR_RATE_LIMITED": "För många förfrågningar. Försöker igen senare.",
|
|
"MODULE_ERROR_SERVER_ERROR": "Serverfel. Försöker igen senare.",
|
|
"MODULE_ERROR_CLIENT_ERROR": "Förfrågan misslyckades.",
|
|
"MODULE_ERROR_UNSPECIFIED": "Vänligen kontrollera loggarna för mer information.",
|
|
|
|
"NEWSFEED_NO_ITEMS": "Inga nyheter för tillfället.",
|
|
"NEWSFEED_ARTICLE_UNAVAILABLE": "Artikeln kan inte visas här.",
|
|
|
|
"UPDATE_NOTIFICATION": "MagicMirror² uppdatering finns tillgänglig.",
|
|
"UPDATE_NOTIFICATION_MODULE": "Uppdatering finns tillgänglig av {MODULE_NAME} modulen.",
|
|
"UPDATE_INFO_SINGLE": "Denna installation ligger {COMMIT_COUNT} commit steg bakom {BRANCH_NAME} grenen.",
|
|
"UPDATE_INFO_MULTIPLE": "Denna installation ligger {COMMIT_COUNT} commits steg bakom {BRANCH_NAME} grenen.",
|
|
"UPDATE_NOTIFICATION_DONE": "Uppdateringen av modulen {MODULE_NAME} har slutförts.",
|
|
"UPDATE_NOTIFICATION_ERROR": "Ett fel inträffade vid uppdateringen av modulen {MODULE_NAME}.",
|
|
"UPDATE_NOTIFICATION_NEED-RESTART": "Det krävs en omstart av MagicMirror."
|
|
}
|