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.4 KiB
JSON
55 lines
2.4 KiB
JSON
{
|
|
"LOADING": "ローディング …",
|
|
|
|
"DAYBEFOREYESTERDAY": "おととい",
|
|
"YESTERDAY": "昨日",
|
|
"TODAY": "今日",
|
|
"TOMORROW": "明日",
|
|
"DAYAFTERTOMORROW": "明後日",
|
|
"RUNNING": "で終わります",
|
|
"EMPTY": "直近のイベントはありません",
|
|
"WEEK": "第 {weekNumber} 週",
|
|
|
|
"N": "北",
|
|
"NNE": "北北東",
|
|
"NE": "北東",
|
|
"ENE": "東北東",
|
|
"E": "東",
|
|
"ESE": "東南東",
|
|
"SE": "南東",
|
|
"SSE": "南南東",
|
|
"S": "南",
|
|
"SSW": "南南西",
|
|
"SW": "南西",
|
|
"WSW": "西南西",
|
|
"W": "西",
|
|
"WNW": "西北西",
|
|
"NW": "北西",
|
|
"NNW": "北北西",
|
|
|
|
"FEELS": "体感温度 {DEGREE}",
|
|
"PRECIP_POP": "降水確率",
|
|
"PRECIP_AMOUNT": "降水量",
|
|
|
|
"MODULE_CONFIG_CHANGED": "モジュール {MODULE_NAME} の設定オプションが変更されました。\nドキュメントを確認してください。",
|
|
"MODULE_CONFIG_ERROR": "モジュール {MODULE_NAME} でエラーが発生しました。{ERROR}",
|
|
"MODULE_ERROR_MALFORMED_URL": "不正なURLです。",
|
|
"MODULE_ERROR_NO_CONNECTION": "インターネット接続がありません。",
|
|
"MODULE_ERROR_UNAUTHORIZED": "認証に失敗しました。",
|
|
"MODULE_ERROR_RATE_LIMITED": "リクエストが多すぎます。後で再試行します。",
|
|
"MODULE_ERROR_SERVER_ERROR": "サーバーエラー。後で再試行します。",
|
|
"MODULE_ERROR_CLIENT_ERROR": "リクエストが失敗しました。",
|
|
"MODULE_ERROR_UNSPECIFIED": "詳細はログを確認してください。",
|
|
|
|
"NEWSFEED_NO_ITEMS": "現在ニュースはありません。",
|
|
"NEWSFEED_ARTICLE_UNAVAILABLE": "この記事はここでは表示できません。",
|
|
|
|
"UPDATE_NOTIFICATION": "MagicMirror² のアップデートが利用可能です。",
|
|
"UPDATE_NOTIFICATION_MODULE": "モジュール {MODULE_NAME} のアップデートが利用可能です。",
|
|
"UPDATE_INFO_SINGLE": "現在のインストールは {BRANCH_NAME} ブランチから {COMMIT_COUNT} コミット遅れています。",
|
|
"UPDATE_INFO_MULTIPLE": "現在のインストールは {BRANCH_NAME} ブランチから {COMMIT_COUNT} コミット遅れています。",
|
|
"UPDATE_NOTIFICATION_DONE": "モジュール {MODULE_NAME} のアップデートが完了しました。",
|
|
"UPDATE_NOTIFICATION_ERROR": "モジュール {MODULE_NAME} のアップデート中にエラーが発生しました。",
|
|
"UPDATE_NOTIFICATION_NEED-RESTART": "MagicMirror の再起動が必要です。"
|
|
}
|