From 35c1ea312c0b15709c39218c8e61bb619adc0c1d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 09:29:58 +0200 Subject: [PATCH 1/5] Update dependency capybara-playwright-driver to v0.5.10 (#39723) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c2e7137c8c..8d48a74e18 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -151,7 +151,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-playwright-driver (0.5.9) + capybara-playwright-driver (0.5.10) addressable capybara playwright-ruby-client (>= 1.16.0) @@ -446,7 +446,7 @@ GEM mime-types (3.7.0) logger mime-types-data (~> 3.2025, >= 3.2025.0507) - mime-types-data (3.2026.0414) + mime-types-data (3.2026.0701) mini_mime (1.1.5) mini_portile2 (2.8.9) minitest (6.0.6) From 934cf35026747bdef52c38d3b02bedef4f1fb62a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:47:14 +0200 Subject: [PATCH 2/5] New Crowdin Translations (automated) (#39765) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/et.json | 19 ++++++----- app/javascript/mastodon/locales/eu.json | 37 +++++++++++++++++++++ app/javascript/mastodon/locales/fr-CA.json | 2 +- app/javascript/mastodon/locales/fr.json | 6 ++-- app/javascript/mastodon/locales/ja.json | 17 ++++++++++ app/javascript/mastodon/locales/nan-TW.json | 2 +- app/javascript/mastodon/locales/pa.json | 1 + config/locales/de.yml | 2 +- config/locales/et.yml | 3 ++ config/locales/fa.yml | 4 +++ config/locales/fr-CA.yml | 2 +- config/locales/fr.yml | 2 +- config/locales/ga.yml | 2 ++ config/locales/it.yml | 2 ++ config/locales/tr.yml | 2 ++ 15 files changed, 87 insertions(+), 16 deletions(-) diff --git a/app/javascript/mastodon/locales/et.json b/app/javascript/mastodon/locales/et.json index dd411f35f2..b344402a84 100644 --- a/app/javascript/mastodon/locales/et.json +++ b/app/javascript/mastodon/locales/et.json @@ -358,8 +358,8 @@ "carousel.slide": "Slaid {current, number} / {max, number}", "character_counter.recommended": "{currentLength}/{maxLength} soovitatud märke", "character_counter.required": "{currentLength}/{maxLength} märki", - "closed_registrations.other_server_instructions": "Kuna Mastodon on detsentraliseeritud, võib konto teha teise serverisse ja sellegipoolest siinse kontoga suhelda.", - "closed_registrations_modal.description": "Praegu ei ole võimalik teha {domain} peale kontot, aga pea meeles, et sul ei pea olema just {domain} konto, et Mastodoni kasutada.", + "closed_registrations.other_server_instructions": "Kuna Mastodon on detsentraliseeritud, võid konto teha teise serverisse ja sellegipoolest siinse kontoga suhelda.", + "closed_registrations_modal.description": "Praegu ei ole võimalik {domain} serverisse kontot lisada, aga pea meeles, et sul ei pea olema just {domain}-i konto, et Mastodoni kasutada.", "closed_registrations_modal.find_another_server": "Leia mõni muu server", "closed_registrations_modal.preamble": "Mastodon on hajutatud võrk, mis tähendab, et konto võid luua ükskõik kuhu, kuid ikkagi saad jälgida ja suhelda igaühega selles serveris. Võid isegi oma serveri püsti panna!", "closed_registrations_modal.title": "Mastodoni registreerumine", @@ -415,21 +415,21 @@ "collections.mark_as_sensitive_hint": "Peidab kogumiku kirjelduse ja kontod sisuhoiatuse taha. Kogumiku nimi ise on sellele vaatamata nähtav.", "collections.maximum_collection_count_description": "Sinu server lubab luua kuni {count} kogumikku.", "collections.maximum_collection_count_reached": "Sa oled loonud nii palju kogumikke, kui on lubatud", - "collections.name_length_hint": "40 märgi piir", + "collections.name_length_hint": "40 tähemärgi piir", "collections.new_collection": "Uus kogumik", - "collections.pending_accounts.message": "Kui oled ootamst vastut kasutajalt oma serverist, võivad kasutajakontod tunduda olema ootel olekus. Vaid sina saad näha ootel kasutajakontosid.", + "collections.pending_accounts.message": "Kui oled ootamas vastust kasutajalt tema serverist, võivad kasutajakontod tunduda olema ootel olekus. Vaid sina saad näha ootel kasutajakontosid.", "collections.pending_accounts.title": "Miks ma näen ootel kasutajakontosid?", "collections.remove_account": "Eemalda", - "collections.report_collection": "Raporteeri sellest kogumikust", + "collections.report_collection": "Teata sellest kogumikust", "collections.revoke_collection_inclusion": "Eemalda mind sellest kogumikust", - "collections.revoke_inclusion.confirmation": "Oled eemaldatud \"{collection}\"-st", - "collections.revoke_inclusion.error": "Oli viga, palun proovi hiljem uuesti.", + "collections.revoke_inclusion.confirmation": "Oled eemaldatud „{collection}“ kogumikust", + "collections.revoke_inclusion.error": "Tekkis viga, palun proovi hiljem uuesti.", "collections.search_accounts_label": "Otsi kontot, mida lisada", "collections.search_accounts_max_reached": "Oled lisanud maksimumarvu kontosid", "collections.sensitive": "Tundlik", "collections.share_short": "Jaga", "collections.sort_alphabetical": "Tähestikuline", - "collections.sort_by": "Sortimine:", + "collections.sort_by": "Järjestus:", "collections.sort_date_added": "Lisamisaeg", "collections.sort_last_active": "Viimati aktiivne", "collections.sort_most_followers": "Enim jälgijaid", @@ -1231,6 +1231,7 @@ "status.block": "Blokeeri @{name}", "status.bookmark": "Järjehoidja", "status.cancel_reblog_private": "Lõpeta jagamine", + "status.cannot_edit": "Sul pole õigust seda postitust muuta", "status.cannot_quote": "Sul pole õigust seda postitust tsiteerida", "status.cannot_reblog": "Seda postitust ei saa jagada", "status.contains_quote": "Sisaldab tsitaati", @@ -1264,8 +1265,10 @@ "status.more": "Veel", "status.mute": "Summuta @{name}", "status.mute_conversation": "Summuta vestlus", + "status.not_quoted": "Sa pole selles postituses tsiteeritud", "status.open": "Laienda postitus", "status.pin": "Kinnita profiilile", + "status.public_only": "See postitus on privaatne", "status.quote": "Tsiteeri", "status.quote.cancel": "Katkesta tsiteerimine", "status.quote_error.blocked_account_hint.title": "Kuna sa oled blokeerinud kasutaja @{name}, siis see postitus on peidetud.", diff --git a/app/javascript/mastodon/locales/eu.json b/app/javascript/mastodon/locales/eu.json index 48ccff24e4..aa0c8b4363 100644 --- a/app/javascript/mastodon/locales/eu.json +++ b/app/javascript/mastodon/locales/eu.json @@ -2,6 +2,7 @@ "about.blocks": "Moderatutako zerbitzariak", "about.contact": "Kontaktua:", "about.default_locale": "Lehenetsia", + "about.disclaimer": "Mastodon software libre eta kode irekikoa da, eta Mastodon gGmbH-ren marka erregistratua.", "about.domain_blocks.no_reason_available": "Arrazoia ez dago eskuragarri", "about.domain_blocks.preamble": "Mastodonek orokorrean aukera ematen dizu fedibertsoko beste zerbitzarietako erabiltzaileen edukia ikusi eta haiekin komunikatzeko. Zerbitzari zehatz honi ezarritako salbuespenak hauek dira.", "about.domain_blocks.silenced.explanation": "Orokorrean ez duzu zerbitzari honetako profil eta edukirik ikusiko. Profilak jarraitzen badituzu edo edukia esplizituki bilatzen baduzu bai.", @@ -13,9 +14,14 @@ "about.powered_by": "{mastodon} erabiltzen duen sare sozial deszentralizatua", "about.rules": "Zerbitzariaren arauak", "account.account_note_header": "Ohar pertsonala", + "account.activity": "Jarduera", + "account.add_note": "Gehitu ohar pertsonala", "account.add_or_remove_from_list": "Gehitu edo kendu zerrendetatik", + "account.badges.admin": "Administratzailea", + "account.badges.blocked": "Blokeatuta", "account.badges.bot": "Bot-a", "account.badges.group": "Taldea", + "account.badges.muted": "Mutututa", "account.block": "Blokeatu @{name}", "account.block_domain": "Blokeatu {domain} domeinua", "account.block_short": "Blokeatu", @@ -24,6 +30,7 @@ "account.copy": "Kopiatu profilerako esteka", "account.direct": "Aipatu pribatuki @{name}", "account.disable_notifications": "Utzi jakinarazteari @{name} erabiltzaileak argitaratzean", + "account.edit_note": "Editatu ohar pertsonala", "account.edit_profile": "Editatu profila", "account.edit_profile_short": "Editatu", "account.enable_notifications": "Jakinarazi @{name} erabiltzaileak argitaratzean", @@ -33,6 +40,15 @@ "account.familiar_followers_two": "{name1}-k eta {name2}-k jarraitzen dute", "account.featured": "Gailenak", "account.featured.accounts": "Profilak", + "account.featured.collections": "Bildumak", + "account.featured.new_collection": "Bilduma berria", + "account.field_overflow": "Erakutsi eduki osoa", + "account.filters.all": "Jarduera guztia", + "account.filters.boosts_toggle": "Erakutsi bultzadak", + "account.filters.posts_boosts": "Bidalketak eta bultzadak", + "account.filters.posts_only": "Bidalketak", + "account.filters.posts_replies": "Bidalketak eta erantzunak", + "account.filters.replies_toggle": "Erakutsi erantzunak", "account.follow": "Jarraitu", "account.follow_back": "Jarraitu bueltan", "account.follow_back_short": "Jarraitu bueltan", @@ -51,18 +67,38 @@ "account.go_to_profile": "Joan profilera", "account.hide_reblogs": "Ezkutatu @{name} erabiltzailearen bultzadak", "account.in_memoriam": "Oroimenezkoa.", + "account.join_modal.day": "Eguna", "account.joined_short": "Elkartuta", "account.languages": "Aldatu harpidetutako hizkuntzak", + "account.last_active": "Azkenekoz aktiboa", "account.link_verified_on": "Esteka honen jabetzaren egiaztaketa data: {date}", "account.locked_info": "Kontu honen pribatutasun egoera blokeatuta gisa ezarri da. Jabeak eskuz erabakitzen du nork jarraitu diezaioken.", "account.media": "Multimedia", "account.mention": "Aipatu @{name}", + "account.menu.add_to_collection": "Gehitu bildumara…", + "account.menu.add_to_list": "Gehitu zerrendara…", + "account.menu.block": "Blokeatu kontua", + "account.menu.block_domain": "Blokeatu {domain}", + "account.menu.copy": "Kopiatu esteka", + "account.menu.direct": "Aipatu pribatuki", + "account.menu.hide_reblogs": "Ezkutatu bultzadak denbora-lerroan", + "account.menu.mention": "Aipamena", + "account.menu.mute": "Mututu kontua", + "account.menu.open_original_page": "Ikusi {domain}-(e)n", + "account.menu.remove_follower": "Kendu jarraitzailea", + "account.menu.report": "Salatu kontua", + "account.menu.share": "Partekatu…", + "account.menu.show_reblogs": "Ezkutatu bultzadak denbora-lerroan", + "account.menu.unblock": "Desblokeatu kontua", + "account.menu.unblock_domain": "Desblokeatu {domain}", + "account.menu.unmute": "Desmututu kontua", "account.moved_to": "{name} erabiltzaileak adierazi du bere kontu berria hau dela:", "account.mute": "Mututu @{name}", "account.mute_notifications_short": "Mututu jakinarazpenak", "account.mute_short": "Mututu", "account.muted": "Mutututa", "account.mutual": "Elkar jarraitzen duzue", + "account.name.copy": "Kopiatu helbidea", "account.name.help.domain_self": "{domain} zure zerbitzaria da, zure profila eta bidalketak ostatatzen dituena.", "account.name.help.footer": "Poste elektronikoak hornitzaile ezberdinak darabiltzaten lagunei bidali ahal dizkiezun bezalaxe, beste Mastodon zerbitzari abtzuetako erabiltzaileekin ere komunikatu zaitezke, baita Fedobertsoko beste aplikazioen erabiltzaileekin ere.", "account.name.help.header": "Erabiltzaile-izena posta elektroniko helbide bat bezalakoa da", @@ -318,6 +354,7 @@ "collection.share_modal.share_via_system": "Bidali hona…", "collection.share_modal.title": "Partekatu bilduma", "collection.share_modal.title_new": "Partekatu zure bilduma berria!", + "collections.last_updated_at": "Azkenengo eguneraketa: {date}", "collections.pending_accounts.title": "Zergatik ikusten ditut kontu batzuk 'zain'?", "collections.remove_account": "Kendu", "collections.report_collection": "Salatu bilduma hau", diff --git a/app/javascript/mastodon/locales/fr-CA.json b/app/javascript/mastodon/locales/fr-CA.json index 1432309f8d..1b378a07b5 100644 --- a/app/javascript/mastodon/locales/fr-CA.json +++ b/app/javascript/mastodon/locales/fr-CA.json @@ -668,7 +668,7 @@ "empty_column.notifications": "Vous n'avez pas encore de notifications. Quand d'autres personnes interagissent avec vous, vous en verrez ici.", "empty_column.public": "Il n’y a rien ici! Écrivez quelque chose publiquement, ou bien suivez manuellement des personnes d’autres serveurs pour remplir le fil public", "empty_state.no_results": "Aucun résultat", - "error.no_hashtag_feed_access": "Rejoindre ou se connecter pour voir et suivre cet hashtag.", + "error.no_hashtag_feed_access": "Rejoindre ou se connecter pour voir et suivre ce hashtag.", "error.unexpected_crash.explanation": "En raison d’un bogue dans notre code ou d’un problème de compatibilité avec votre navigateur, cette page n’a pas pu être affichée correctement.", "error.unexpected_crash.explanation_addons": "Cette page n’a pas pu être affichée correctement. Cette erreur est probablement causée par une extension de navigateur ou des outils de traduction automatique.", "error.unexpected_crash.next_steps": "Essayez de rafraîchir la page. Si cela n’aide pas, vous pouvez toujours utiliser Mastodon via un autre navigateur ou une application native.", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 1f0176a7bf..9a15d7684a 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -661,14 +661,14 @@ "empty_column.follow_requests": "Vous n’avez pas encore de demande de suivi. Lorsque vous en recevrez une, elle apparaîtra ici.", "empty_column.followed_tags": "Vous n'avez pas encore suivi de hashtags. Lorsque vous le ferez, ils apparaîtront ici.", "empty_column.hashtag": "Il n’y a encore aucun contenu associé à ce hashtag.", - "empty_column.home": "Votre fil principal est vide ! Suivez plus de personnes pour le remplir.", + "empty_column.home": "Votre fil d'actualité est vide ! Suivez plus de personnes pour le remplir.", "empty_column.list": "Il n’y a rien dans cette liste pour l’instant. Quand des membres de cette liste publieront de nouveaux messages, ils apparaîtront ici.", "empty_column.mutes": "Vous n’avez masqué aucun compte pour le moment.", "empty_column.notification_requests": "C'est fini ! Il n'y a plus rien ici. Lorsque vous recevez de nouvelles notifications, elles apparaitront ici conformément à vos préférences.", "empty_column.notifications": "Vous n’avez pas encore de notification. Interagissez avec d’autres personnes pour commencer la conversation.", - "empty_column.public": "Il n’y a rien ici ! Écrivez quelque chose publiquement, ou bien suivez manuellement des personnes d’autres serveurs pour remplir le fil public", + "empty_column.public": "Il n’y a rien ici ! Écrivez quelque chose publiquement, ou bien suivez manuellement des personnes d’autres serveurs pour remplir le fil d'actualité", "empty_state.no_results": "Aucun résultat", - "error.no_hashtag_feed_access": "Rejoindre ou se connecter pour voir et suivre cet hashtag.", + "error.no_hashtag_feed_access": "Rejoindre ou se connecter pour voir et suivre ce hashtag.", "error.unexpected_crash.explanation": "En raison d’un bug dans notre code ou d’un problème de compatibilité avec votre navigateur, cette page n’a pas pu être affichée correctement.", "error.unexpected_crash.explanation_addons": "Cette page n’a pas pu être affichée correctement. Cette erreur est probablement causée par une extension de navigateur ou des outils de traduction automatique.", "error.unexpected_crash.next_steps": "Essayez de rafraîchir la page. Si cela n’aide pas, vous pouvez toujours utiliser Mastodon via un autre navigateur ou une application native.", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index f622e3935d..26464ad7fe 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -2,6 +2,7 @@ "about.blocks": "制限中のサーバー", "about.contact": "連絡先", "about.default_locale": "デフォルト", + "about.disclaimer": "Mastodonは自由なオープンソースソフトウェアであり、Mastodon GmbHの商標です。", "about.domain_blocks.no_reason_available": "理由未記載", "about.domain_blocks.preamble": "Mastodonでは原則的にあらゆるサーバー同士で交流したり、互いの投稿を読んだりできますが、当サーバーでは例外的に次のような制限を設けています。", "about.domain_blocks.silenced.explanation": "このサーバーのプロフィールやコンテンツは、明示的に検索したり、フォローでオプトインしない限り、通常は表示されません。", @@ -43,6 +44,7 @@ "account.featured.accounts": "プロフィール", "account.featured.collections": "コレクション", "account.featured.new_collection": "新規のコレクション", + "account.field_overflow": "すべて表示", "account.filters.all": "全てのアクティビティ", "account.filters.boosts_toggle": "ブーストを表示", "account.filters.posts_boosts": "投稿とブースト", @@ -67,15 +69,28 @@ "account.go_to_profile": "プロフィールページへ", "account.hide_reblogs": "@{name}さんからのブーストを非表示", "account.in_memoriam": "故人を偲んで。", + "account.join_modal.day": "日", + "account.join_modal.me": "あなたが {server} に参加したのは", + "account.join_modal.me_anniversary": "Fediversaryおめでとうございます!あなたが {server} に参加したのは", + "account.join_modal.me_today": "今日は {server} での最初の日です!", + "account.join_modal.other": "{name} が {server} に参加したのは", + "account.join_modal.other_today": "今日は {name} の {server} での最初の日です!", + "account.join_modal.share.celebrate": "お祝いの投稿を共有する", + "account.join_modal.share.intro": "自己紹介の投稿を共有する", + "account.join_modal.share.welcome": "歓迎の投稿を共有する", + "account.join_modal.years": "{number, plural, one {年} other {年}}", "account.joined_short": "登録日", "account.languages": "購読言語の変更", + "account.last_active": "最後の活動", "account.link_verified_on": "このリンクの所有権は{date}に確認されました", "account.locked_info": "このアカウントは承認制アカウントです。相手が承認するまでフォローは完了しません。", "account.media": "メディア", "account.mention": "@{name}さんにメンション", + "account.menu.add_to_collection": "コレクションに追加…", "account.menu.add_to_list": "リストに追加する…", "account.menu.block": "アカウントをブロックする", "account.menu.block_domain": "{domain} をブロックする", + "account.menu.copied": "アカウントへのリンクをクリップボードにコピーしました", "account.menu.copy": "リンクをコピーする", "account.menu.direct": "非公開でメンションする", "account.menu.hide_reblogs": "タイムラインでブーストを隠す", @@ -85,6 +100,8 @@ "account.menu.open_original_page": "{domain} で表示する", "account.menu.remove_follower": "フォロワーを削除する", "account.menu.report": "アカウントを報告する", + "account.menu.share": "共有…", + "account.menu.show_reblogs": "タイムラインにブーストを表示する", "account.menu.unblock": "アカウントのブロックを解除する", "account.menu.unblock_domain": "{domain} のブロックを解除する", "account.menu.unmute": "アカウントのミュートを解除する", diff --git a/app/javascript/mastodon/locales/nan-TW.json b/app/javascript/mastodon/locales/nan-TW.json index 51e32c717f..34b464a1d0 100644 --- a/app/javascript/mastodon/locales/nan-TW.json +++ b/app/javascript/mastodon/locales/nan-TW.json @@ -54,7 +54,7 @@ "account.follow": "跟tuè", "account.follow_back": "Tuè tńg去", "account.follow_back_short": "Tuè tńg去", - "account.follow_request": "請求跟tuè lí", + "account.follow_request": "請求跟tuè", "account.follow_request_cancel": "取消跟tuè", "account.follow_request_cancel_short": "取消", "account.follow_request_short": "請求", diff --git a/app/javascript/mastodon/locales/pa.json b/app/javascript/mastodon/locales/pa.json index d7f3003303..c1a361c48b 100644 --- a/app/javascript/mastodon/locales/pa.json +++ b/app/javascript/mastodon/locales/pa.json @@ -190,6 +190,7 @@ "closed_registrations_modal.title": "Mastodon ਲਈ ਸਾਈਨ ਅੱਪ ਕਰੋ", "collection.share_modal.share_link_label": "ਲਿੰਕ ਸਾਂਝਾ ਕਰੋ", "collection.share_modal.share_via_post": "Mastodon ਉੱਤੇ ਪੋਸਟ ਕਰੋ", + "collection.share_modal.share_via_system": "…ਰਾਹੀਂ ਸਾਂਝਾ ਕਰੋ", "collections.block_collection_owner": "…ਰਾਹੀਂ ਸਾਂਝਾ ਕਰੋ", "collections.by_account": "{account_handle} ਵਲੋਂ", "collections.collection_description": "ਵਰਣਨ", diff --git a/config/locales/de.yml b/config/locales/de.yml index f3ebe654dd..763ce513c7 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1021,7 +1021,7 @@ de: major: Hauptversion minor: Nebenversion patch: Revision — Fehlerkorrekturen und einfach zu implementierende Änderungen - unsupported_since: Seit %{date} nicht mehr unterstützt + unsupported_since: Nicht mehr unterstützt seit %{date} version: Version statuses: account: Autor*in diff --git a/config/locales/et.yml b/config/locales/et.yml index 92b3612ad0..2fd2771f6e 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1014,12 +1014,14 @@ et: description: Soovitatav on hoida oma Mastodoni paigaldus ajakohasena, et saada kasu viimastest parandustest ja funktsioonidest. Lisaks sellele on mõnikord oluline Mastodoni õigeaegne uuendamine, et vältida turvaprobleeme. Neil põhjustel kontrollib Mastodon uuendusi iga 30 minuti järel ja teavitab vastavalt sinu e-posti teavitamise eelistustele. documentation_link: Vaata lisa release_notes: Väljalaskemärkused + supported_until: Tugi lõppeb %{date} title: Saadaval uuendused type: Tüüp types: major: Suur uuendus minor: Väike uuendus patch: Parandusuuendus — veaparandused ja hõlpsalt rakendatavad muudatused + unsupported_since: Alates %{date} pole enam toetatud version: Versioon statuses: account: Autor @@ -1235,6 +1237,7 @@ et: other: Kasutatud %{count} kasutaja poolt viimase nädala jooksul title: Soovitused ja trendid trending: Trendid + update_available: Uuendus saadaval username_blocks: add_new: Lisa uus block_registrations: Blokeeri registreerimisi diff --git a/config/locales/fa.yml b/config/locales/fa.yml index b3204a2f1c..82eff40213 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -931,6 +931,10 @@ fa: authenticated: تنها کاربران تأیید شده disabled: نیازمند نقش کاربری خاص public: هرکسی + landing_page: + values: + overview: نمای کلی + trends: پرطرفدار registrations: moderation_recommandation: لطفاً قبل از اینکه ثبت نام را برای همه باز کنید، مطمئن شوید که یک تیم نظارتی مناسب و واکنشی دارید! preamble: کنترل کنید چه کسی می تواند در سرور شما یک حساب ایجاد کند. diff --git a/config/locales/fr-CA.yml b/config/locales/fr-CA.yml index d6acb23c33..e51dd57707 100644 --- a/config/locales/fr-CA.yml +++ b/config/locales/fr-CA.yml @@ -1020,7 +1020,7 @@ fr-CA: types: major: Mise à jour majeure minor: Mise à jour mineure - patch: Mise à jour « patch » — correctifs de bugs et changements faciles à faire + patch: Mise à jour corrective — corrections de bugs et changements faciles à appliquer unsupported_since: Non supportée depuis le %{date} version: Version statuses: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7f9e325933..c776a25029 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1020,7 +1020,7 @@ fr: types: major: Mise à jour majeure minor: Mise à jour mineure - patch: Mise à jour « patch » — correctifs de bugs et changements faciles à faire + patch: Mise à jour corrective — corrections de bugs et changements faciles à appliquer unsupported_since: Non supportée depuis le %{date} version: Version statuses: diff --git a/config/locales/ga.yml b/config/locales/ga.yml index c9d60cf5dd..c3389b2464 100644 --- a/config/locales/ga.yml +++ b/config/locales/ga.yml @@ -1062,12 +1062,14 @@ ga: description: Moltar do shuiteáil Mastodon a choinneáil cothrom le dáta chun leas a bhaint as na socruithe agus na gnéithe is déanaí. Ina theannta sin, tá sé ríthábhachtach uaireanta Mastodon a nuashonrú go tráthúil chun saincheisteanna slándála a sheachaint. Ar na cúiseanna seo, seiceálann Mastodon nuashonruithe gach 30 nóiméad, agus tabharfaidh sé fógra duit de réir do shainroghanna fógra ríomhphoist. documentation_link: Foghlaim níos mó release_notes: Nótaí scaoilte + supported_until: Críochnaíonn an tacaíocht ar %{date} title: Nuashonruithe ar fáil type: Cineál types: major: Mórscaoileadh minor: Mionscaoileadh patch: Scaoileadh paiste - ceartúcháin agus athruithe atá éasca a chur i bhfeidhm + unsupported_since: Gan tacaíocht ó %{date} version: Leagan statuses: account: Údar diff --git a/config/locales/it.yml b/config/locales/it.yml index bfa1daa8fc..a97aafb534 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1014,12 +1014,14 @@ it: description: Si consiglia di mantenere aggiornata l'installazione di Mastodon per beneficiare delle ultime correzioni e funzionalità. Inoltre, a volte è fondamentale aggiornare Mastodon in modo tempestivo per evitare problemi di sicurezza. Per queste ragioni, Mastodon verifica la presenza di aggiornamenti ogni 30 minuti e ti avviserà in base alle tue preferenze di notifica e-mail. documentation_link: Scopri di più release_notes: Note di rilascio + supported_until: Il supporto termina il %{date} title: Aggiornamenti disponibili type: Tipo types: major: Rilascio principale minor: Rilascio secondario patch: 'Patch: correzioni di bug e modifiche facili da applicare' + unsupported_since: Non più supportato dal %{date} version: Versione statuses: account: Autore diff --git a/config/locales/tr.yml b/config/locales/tr.yml index ea454e1300..ceb2479152 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1014,12 +1014,14 @@ tr: description: Son düzeltme ve özelliklerden yararlanmak için Mastodon kurulumunu güncel tutmanızı öneriyoruz. Üstelik güvenlik sorunlarından kaçınmak için Mastodon'u zamanında güncellemek kritiktir. Bu nedenlerle Mastodon her 30 dakikada bir güncellemeleri denetler ve e-posta bildirim seçeneğinize göre size haber verir. documentation_link: Daha fazlası release_notes: Sürüm notları + supported_until: Destek %{date} tarihinde bitiyor title: Mevcut güncellemeler type: Tür types: major: Ana sürüm minor: Alt sürüm patch: Yama sürümü — hata düzeltmeleri ve uygulaması kolay değişiklikler + unsupported_since: "%{date} tarihinden beri desteklenmiyor" version: Sürüm statuses: account: Yazar From acd0a161e5d957c4206304e856458dd7aef94661 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 9 Jul 2026 16:11:51 +0200 Subject: [PATCH 3/5] Refactor outgoing HTTP Signature code as HTTP.rb feature/middleware (#39766) --- app/lib/request.rb | 80 +++++++++++++++++++++------------------- spec/lib/request_spec.rb | 35 +++++++++++++----- 2 files changed, 68 insertions(+), 47 deletions(-) diff --git a/app/lib/request.rb b/app/lib/request.rb index f7bbd10446..ee4c486dfc 100644 --- a/app/lib/request.rb +++ b/app/lib/request.rb @@ -60,6 +60,25 @@ class PerOperationWithDeadline < HTTP::Timeout::PerOperation end end +# Implement HTTP Signature cavage draft as a HTTP.rb middleware +class CavageSignatureFeature < HTTP::Feature + def initialize(keypair: nil, covered_headers: []) + super + + @signing = HttpSignatureDraft.new(keypair.keypair, keypair.full_uri) if keypair.present? + @covered_headers = covered_headers + end + + def wrap_request(request) + signed_headers = request.headers.to_h.slice(*@covered_headers) + request.headers['Signature'] = @signing.sign(signed_headers, request.verb, Addressable::URI.parse(request.uri)) + request + end + + # Register this feature with http.rb + ::HTTP::Options.register_feature(:http_cavage_signature, self) +end + class Request # We enforce a 5s timeout on DNS resolving, 5s timeout on socket opening # and 5s timeout on the TLS handshake, meaning the worst case should take @@ -69,6 +88,8 @@ class Request include RoutingHelper + attr_reader :headers, :signing_keypair + def initialize(verb, url, **options) raise ArgumentError if url.blank? @@ -79,7 +100,6 @@ class Request @options = { follow: { max_hops: 3, - on_redirect: ->(response, request) { re_sign_on_redirect(response, request) }, }, }.merge(options).merge( socket_class: use_proxy? || @allow_local ? ProxySocket : Socket, @@ -89,19 +109,17 @@ class Request @options = @options.merge(proxy_url) if use_proxy? @headers = {} - @signing = nil + @signing_keypair = nil raise Mastodon::HostValidationError, 'Instance does not support hidden service connections' if block_hidden_service? set_common_headers! - set_digest! if options.key?(:body) end def on_behalf_of(actor, sign_with: nil) raise ArgumentError, 'actor must not be nil' if actor.nil? - keypair = sign_with.presence || actor.keypair(type: :rsa) - @signing = HttpSignatureDraft.new(keypair.keypair, keypair.full_uri) + @signing_keypair = sign_with.presence || actor.keypair(type: :rsa) self end @@ -113,7 +131,7 @@ class Request def perform begin - response = http_client.request(@verb, @url.to_s, @options.merge(headers: headers)) + response = perform_cavage_signed_request rescue => e raise e.class, "#{e.message} on #{@url}", e.backtrace[0] end @@ -126,10 +144,6 @@ class Request end end - def headers - (@signing ? @headers.merge('Signature' => signature) : @headers) - end - class << self def valid_url?(url) begin @@ -148,6 +162,24 @@ class Request private + def perform_cavage_signed_request + headers = @headers + headers = headers.merge('Digest' => "SHA-256=#{Digest::SHA256.base64digest(@options[:body])}") if @options[:body] + + client = http_client + + if @signing_keypair.present? + client = client.use( + http_cavage_signature: { + keypair: @signing_keypair, + covered_headers: headers.keys - %w(User-Agent Accept-Encoding Accept), + } + ) + end + + client.request(@verb, @url.to_s, @options.merge(headers:)) + end + # Using code from https://github.com/sporkmonger/addressable/blob/3450895887d0a1770660d8831d1b6fcfed9bd9d6/lib/addressable/uri.rb#L1609-L1635 # to preserve some URL Encodings while normalizing def normalize_preserving_url_encodings(url, preserved_chars = SAFE_PRESERVED_CHARS, *flags) @@ -183,34 +215,6 @@ class Request @headers['Accept-Encoding'] = 'gzip' if @verb != :head end - def set_digest! - @headers['Digest'] = "SHA-256=#{Digest::SHA256.base64digest(@options[:body])}" - end - - def signature - @signing.sign(@headers.without('User-Agent', 'Accept-Encoding'), @verb, @url) - end - - def re_sign_on_redirect(_response, request) - # Delete existing signature if there is one, since it will be invalid - request.headers.delete('Signature') - - return unless @signing.present? && @verb == :get - - signed_headers = request.headers.to_h.slice(*@headers.keys) - unless @headers.keys.all? { |key| signed_headers.key?(key) } - # We have lost some headers in the process, so don't sign the new - # request, in order to avoid issuing a valid signature with fewer - # conditions than expected. - - Rails.logger.warn { "Some headers (#{@headers.keys - signed_headers.keys}) have been lost on redirect from {@uri} to #{request.uri}, this should not happen. Skipping signatures" } - return - end - - signature_value = @signing.sign(signed_headers.without('User-Agent', 'Accept-Encoding', 'Accept'), @verb, Addressable::URI.parse(request.uri)) - request.headers['Signature'] = signature_value - end - def http_client @http_client ||= Request.http_client end diff --git a/spec/lib/request_spec.rb b/spec/lib/request_spec.rb index 228c8bbb67..f8c2de203a 100644 --- a/spec/lib/request_spec.rb +++ b/spec/lib/request_spec.rb @@ -27,9 +27,9 @@ RSpec.describe Request do end describe '#on_behalf_of' do - it 'when used, adds signature header' do + it 'when used, sets signing keypair' do subject.on_behalf_of(Fabricate(:account)) - expect(subject.headers['Signature']).to be_present + expect(subject.signing_keypair).to be_present end end @@ -110,14 +110,12 @@ RSpec.describe Request do expect { |block| subject.on_behalf_of(account).perform(&block) }.to yield_control # request.headers includes the `Signature` sent for the first request - expect(a_request(:get, 'http://example.com').with(headers: subject.headers)).to have_been_made.once + expect(a_request(:get, 'http://example.com').with(headers: subject.headers.merge('Signature' => /.*/))).to have_been_made.once + expect(a_request(:get, 'http://example.com').with { |request| verified_signed_mocked_request?(request, account.keypair) }).to have_been_made.once - # request.headers includes the `Signature`, but it has changed - expect(a_request(:get, 'http://redirected.example.com/foo').with(headers: subject.headers.merge({ 'Host' => 'redirected.example.com' }))).to_not have_been_made - - # `with(headers: )` matching tests for inclusion, so strip `Signature` - # This doesn't actually test that there is a signature, but it tests that the original signature is not passed - expect(a_request(:get, 'http://redirected.example.com/foo').with(headers: subject.headers.without('Signature').merge({ 'Host' => 'redirected.example.com' }))).to have_been_made.once + # This doesn't actually test that the signature has changed, but I verified this manually + expect(a_request(:get, 'http://redirected.example.com/foo').with(headers: subject.headers.merge({ 'Host' => 'redirected.example.com', 'Signature' => /.*/ }))).to have_been_made.once + expect(a_request(:get, 'http://redirected.example.com/foo').with { |request| verified_signed_mocked_request?(request, account.keypair) }).to have_been_made.once end end @@ -225,4 +223,23 @@ RSpec.describe Request do expect(subject.perform { |response| response.body_with_limit.encoding }).to eq Encoding::UTF_8 end end + + def verified_signed_mocked_request?(webmock_request, keypair) + # Webmock requests are rather barebones and our signature verification + # code works with `ActionDispatch::Request` objects. + + # This method builds a test request from the webmock request first, + # but this currently does not cover requests with bodies. + # A better way would probably be to build a whole Rack env, but + # that code was a lot more straightforward, and sufficient for + # the added test. + + request = ActionDispatch::TestRequest.create + request.request_uri = webmock_request.uri + request.path = webmock_request.uri.path + request.request_method = webmock_request.method + request.headers.merge!(webmock_request.headers) + + SignedRequest.new(request).verified?(keypair) + end end From 5dad89e56d5c8a07a677f02cf4d9e9a48c967469 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 9 Jul 2026 16:41:13 +0200 Subject: [PATCH 4/5] Add notifications for out-of-support versions of Mastodon (#39734) --- app/mailers/admin_mailer.rb | 20 ++++- app/models/software_deprecation.rb | 37 ++++++++ app/models/user_settings.rb | 1 + app/services/software_update_check_service.rb | 59 ++++++++++-- .../admin/software_updates/index.html.haml | 6 ++ ...of_support_out_of_support_warning.text.erb | 7 ++ ...d_of_support_three_months_warning.text.erb | 7 ++ .../end_of_support_two_weeks_warning.text.erb | 7 ++ .../preferences/notifications/show.html.haml | 32 ++++--- config/locales/en.yml | 12 +++ config/locales/simple_form.en.yml | 1 + config/navigation.rb | 2 +- ...0706143100_create_software_deprecations.rb | 15 ++++ db/schema.rb | 11 ++- .../software_update_check_service_spec.rb | 89 ++++++++++++++++++- 15 files changed, 282 insertions(+), 24 deletions(-) create mode 100644 app/models/software_deprecation.rb create mode 100644 app/views/admin_mailer/end_of_support_out_of_support_warning.text.erb create mode 100644 app/views/admin_mailer/end_of_support_three_months_warning.text.erb create mode 100644 app/views/admin_mailer/end_of_support_two_weeks_warning.text.erb create mode 100644 db/migrate/20260706143100_create_software_deprecations.rb diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index dcf0ef5c7f..9735004c80 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -9,7 +9,7 @@ class AdminMailer < ApplicationMailer before_action :process_params before_action :set_instance - after_action :set_important_headers!, only: :new_critical_software_updates + after_action :set_important_headers!, only: [:new_critical_software_updates, :end_of_support_out_of_support_warning] around_action :set_locale @@ -57,6 +57,24 @@ class AdminMailer < ApplicationMailer mail subject: default_i18n_subject(instance: @instance) end + def end_of_support_three_months_warning + @software_updates = SoftwareUpdate.by_version + + mail subject: default_i18n_subject(instance: @instance, branch: SoftwareDeprecation.current_branch) + end + + def end_of_support_two_weeks_warning + @software_updates = SoftwareUpdate.by_version + + mail subject: default_i18n_subject(instance: @instance, branch: SoftwareDeprecation.current_branch) + end + + def end_of_support_out_of_support_warning + @software_updates = SoftwareUpdate.by_version + + mail subject: default_i18n_subject(instance: @instance, branch: SoftwareDeprecation.current_branch) + end + def auto_close_registrations mail subject: default_i18n_subject(instance: @instance) end diff --git a/app/models/software_deprecation.rb b/app/models/software_deprecation.rb new file mode 100644 index 0000000000..b7f42ca20e --- /dev/null +++ b/app/models/software_deprecation.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# == Schema Information +# +# Table name: software_deprecations +# +# id :bigint(8) not null, primary key +# branch :string not null +# end_of_support :date not null +# warning_issued :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# +class SoftwareDeprecation < ApplicationRecord + enum :warning_issued, { + none: 0, + three_months_warning: 1, + two_weeks_warning: 2, + out_of_support_warning: 3, + }, validate: true, suffix: :issued + + def unsupported? + end_of_support.past? + end + + def self.clear_irrelevant_branches! + where.not(branch: current_branch).delete_all + end + + def self.current + find_by(branch: current_branch) + end + + def self.current_branch + Mastodon::Version.gem_version.segments[...2].join('.') + end +end diff --git a/app/models/user_settings.rb b/app/models/user_settings.rb index 1590ce4e89..6e1537fdbc 100644 --- a/app/models/user_settings.rb +++ b/app/models/user_settings.rb @@ -54,6 +54,7 @@ class UserSettings setting :trends, default: true setting :appeal, default: true setting :software_updates, default: 'critical', in: %w(none critical patch all) + setting :end_of_support, default: true end namespace :interactions do diff --git a/app/services/software_update_check_service.rb b/app/services/software_update_check_service.rb index 353a9a6c20..c606971300 100644 --- a/app/services/software_update_check_service.rb +++ b/app/services/software_update_check_service.rb @@ -3,9 +3,12 @@ class SoftwareUpdateCheckService < BaseService def call clean_outdated_updates! + clean_outdated_deprecations! return unless SoftwareUpdate.check_enabled? - process_update_notices!(fetch_update_notices) + json = fetch_update_notices + process_update_notices!(json&.fetch('updatesAvailable', nil)) + process_deprecation_notice!(json&.fetch('currentVersion', nil)) end private @@ -18,6 +21,10 @@ class SoftwareUpdateCheckService < BaseService end end + def clean_outdated_deprecations! + SoftwareDeprecation.clear_irrelevant_branches! + end + def fetch_update_notices Request.new(:get, "#{api_url}?version=#{version}").add_headers('Accept' => 'application/json', 'User-Agent' => 'Mastodon update checker').perform do |res| return JSON.parse(res.body_with_limit) if res.code == 200 @@ -35,19 +42,17 @@ class SoftwareUpdateCheckService < BaseService end def process_update_notices!(update_notices) - return if update_notices.blank? || update_notices['updatesAvailable'].nil? + return if update_notices.blank? # Clear notices that are not listed by the update server anymore - SoftwareUpdate.where.not(version: update_notices['updatesAvailable'].pluck('version')).delete_all - - return if update_notices['updatesAvailable'].blank? + SoftwareUpdate.where.not(version: update_notices.pluck('version')).delete_all # Check if any of the notices is new, and issue notifications - known_versions = SoftwareUpdate.where(version: update_notices['updatesAvailable'].pluck('version')).pluck(:version) - new_update_notices = update_notices['updatesAvailable'].filter { |notice| known_versions.exclude?(notice['version']) } + known_versions = SoftwareUpdate.where(version: update_notices.pluck('version')).pluck(:version) + new_update_notices = update_notices.filter { |notice| known_versions.exclude?(notice['version']) } return if new_update_notices.blank? - SoftwareUpdate.upsert_all(update_notices['updatesAvailable'].map do |notice| + SoftwareUpdate.upsert_all(update_notices.map do |notice| { version: notice['version'], urgent: notice['urgent'], type: notice['type'], release_notes: notice['releaseNotes'], end_of_support: notice['endOfSupport']&.to_date } end, unique_by: :version) @@ -56,6 +61,18 @@ class SoftwareUpdateCheckService < BaseService notify_devops!(new_updates) end + def process_deprecation_notice!(current_version) + return if current_version.blank? || current_version['endOfSupport'].blank? + + deprecation_notice = SoftwareDeprecation + .create_with(warning_issued: :none, end_of_support: current_version['endOfSupport'].to_date) + .find_or_create_by(branch: SoftwareDeprecation.current_branch) + + deprecation_notice.update(end_of_support: current_version['endOfSupport'].to_date) + + notify_of_end_of_support!(deprecation_notice) + end + def should_notify_user?(user, urgent_version, patch_version) case user.settings['notification_emails.software_updates'] when 'none' @@ -83,4 +100,30 @@ class SoftwareUpdateCheckService < BaseService end end end + + def should_notify_about_end_of_support?(user) + user.settings['notification_emails.end_of_support'] + end + + def send_notification_for_end_of_support_warning!(deprecation_notice, warning_type) + return if deprecation_notice.warning_issued == warning_type + + User.those_who_can(:view_devops).includes(:account).find_each do |user| + next unless should_notify_about_end_of_support?(user) + + AdminMailer.with(recipient: user.account).public_send("end_of_support_#{warning_type}").deliver_later + end + + deprecation_notice.update!(warning_issued: warning_type) + end + + def notify_of_end_of_support!(deprecation_notice) + if deprecation_notice.end_of_support.past? + send_notification_for_end_of_support_warning!(deprecation_notice, 'out_of_support_warning') + elsif deprecation_notice.end_of_support < 2.weeks.from_now + send_notification_for_end_of_support_warning!(deprecation_notice, 'two_weeks_warning') + elsif deprecation_notice.end_of_support < 3.months.from_now + send_notification_for_end_of_support_warning!(deprecation_notice, 'three_months_warning') + end + end end diff --git a/app/views/admin/software_updates/index.html.haml b/app/views/admin/software_updates/index.html.haml index 25de175a7b..3f117801a1 100644 --- a/app/views/admin/software_updates/index.html.haml +++ b/app/views/admin/software_updates/index.html.haml @@ -1,6 +1,12 @@ - content_for :page_title do = t('admin.software_updates.title') +- current_deprecation = SoftwareDeprecation.current +- if current_deprecation&.unsupported? + .flash-message.alert= t('admin.software_updates.unsupported_branch') +- elsif current_deprecation.present? + .flash-message.warning= t('admin.software_updates.nearing_eol', date: current_deprecation.end_of_support) + .simple_form %p.lead = t('admin.software_updates.description') diff --git a/app/views/admin_mailer/end_of_support_out_of_support_warning.text.erb b/app/views/admin_mailer/end_of_support_out_of_support_warning.text.erb new file mode 100644 index 0000000000..f2cc54bae0 --- /dev/null +++ b/app/views/admin_mailer/end_of_support_out_of_support_warning.text.erb @@ -0,0 +1,7 @@ +<%= raw t('admin_mailer.end_of_support_out_of_support_warning.body') %> + +<% @software_updates.each do |update| %> +- Mastodon <%= update.version %>: <%= update.release_notes %> +<% end %> + +<%= raw t('application_mailer.view')%> <%= admin_software_updates_url %> diff --git a/app/views/admin_mailer/end_of_support_three_months_warning.text.erb b/app/views/admin_mailer/end_of_support_three_months_warning.text.erb new file mode 100644 index 0000000000..bfa813e291 --- /dev/null +++ b/app/views/admin_mailer/end_of_support_three_months_warning.text.erb @@ -0,0 +1,7 @@ +<%= raw t('admin_mailer.end_of_support_three_months_warning.body') %> + +<% @software_updates.each do |update| %> +- Mastodon <%= update.version %>: <%= update.release_notes %> +<% end %> + +<%= raw t('application_mailer.view')%> <%= admin_software_updates_url %> diff --git a/app/views/admin_mailer/end_of_support_two_weeks_warning.text.erb b/app/views/admin_mailer/end_of_support_two_weeks_warning.text.erb new file mode 100644 index 0000000000..6c95b018c7 --- /dev/null +++ b/app/views/admin_mailer/end_of_support_two_weeks_warning.text.erb @@ -0,0 +1,7 @@ +<%= raw t('admin_mailer.end_of_support_two_weeks_warning.body') %> + +<% @software_updates.each do |update| %> +- Mastodon <%= update.version %>: <%= update.release_notes %> +<% end %> + +<%= raw t('application_mailer.view')%> <%= admin_software_updates_url %> diff --git a/app/views/settings/preferences/notifications/show.html.haml b/app/views/settings/preferences/notifications/show.html.haml index fb206b1308..ac5d333519 100644 --- a/app/views/settings/preferences/notifications/show.html.haml +++ b/app/views/settings/preferences/notifications/show.html.haml @@ -23,8 +23,8 @@ .fields-group = ff.input :always_send_emails, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_always_send_emails'), hint: I18n.t('simple_form.hints.defaults.setting_always_send_emails') - - if current_user.can?(:manage_reports, :manage_appeals, :manage_users, :manage_taxonomies) || (SoftwareUpdate.check_enabled? && current_user.can?(:view_devops)) - %h2= t 'notifications.administration_emails' + - if current_user.can?(:manage_reports, :manage_appeals, :manage_users, :manage_taxonomies) + %h2= t 'notifications.moderation_emails' .fields-group = ff.input :'notification_emails.report', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.report') if current_user.can?(:manage_reports) @@ -32,13 +32,21 @@ = ff.input :'notification_emails.pending_account', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.pending_account') if current_user.can?(:manage_users) = ff.input :'notification_emails.trends', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.trending_tag') if current_user.can?(:manage_taxonomies) - - if SoftwareUpdate.check_enabled? && current_user.can?(:view_devops) - .fields-group - = ff.input :'notification_emails.software_updates', - collection: user_settings_collection('notification_emails.software_updates'), - hint: false, - include_blank: false, - label_method: ->(setting) { I18n.t("simple_form.labels.notification_emails.software_updates.#{setting}") }, - label: I18n.t('simple_form.labels.notification_emails.software_updates.label'), - wrapper: :with_label, - required: false + - if SoftwareUpdate.check_enabled? && current_user.can?(:view_devops) + %h2= t 'notifications.administration_emails' + + .fields-group + = ff.input :'notification_emails.end_of_support', + wrapper: :with_label, + label: I18n.t('simple_form.labels.notification_emails.end_of_support'), + recommended: true + + .fields-group + = ff.input :'notification_emails.software_updates', + collection: user_settings_collection('notification_emails.software_updates'), + hint: false, + include_blank: false, + label_method: ->(setting) { I18n.t("simple_form.labels.notification_emails.software_updates.#{setting}") }, + label: I18n.t('simple_form.labels.notification_emails.software_updates.label'), + wrapper: :with_label, + required: false diff --git a/config/locales/en.yml b/config/locales/en.yml index 410e54980a..8b3aca6b68 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1013,6 +1013,7 @@ en: critical_update: Critical — please update quickly description: It is recommended to keep your Mastodon installation up to date to benefit from the latest fixes and features. Moreover, it is sometimes critical to update Mastodon in a timely manner to avoid security issues. For these reasons, Mastodon checks for updates every 30 minutes, and will notify you according to your email notification preferences. documentation_link: Learn more + nearing_eol: Support for the branch you are currently running will stop on %{date}, please consider updating. release_notes: Release notes supported_until: Support ends on %{date} title: Available updates @@ -1021,6 +1022,7 @@ en: major: Major release minor: Minor release patch: Patch release — bugfixes and easy to apply changes + unsupported_branch: The branch you are currently running is unsupported, please update as soon as possible. unsupported_since: Unsupported since %{date} version: Version statuses: @@ -1287,6 +1289,15 @@ en: auto_close_registrations: body: Due to a lack of recent moderator activity, registrations on %{instance} have been automatically switched to requiring manual review, to prevent %{instance} from being used as a platform for potential bad actors. You can switch it back to open registrations at any time. subject: Registrations for %{instance} have been automatically switched to requiring approval + end_of_support_out_of_support_warning: + body: The Mastodon version currently in use on your server is not supported anymore. We recommend you to update as soon as possible! + subject: Mastodon %{branch} used on %{instance} is now unsupported! + end_of_support_three_months_warning: + body: The Mastodon version currently in use on your server will stop being supported in 3 months. You may want to update to a newer branch ahead of time. + subject: Support for Mastodon %{branch} used on %{instance} to end in 3 months. + end_of_support_two_weeks_warning: + body: The Mastodon version currently in use on your server will stop being supported in 2 weeks. We recommend you update to a newer branch ahead of time. + subject: Support for Mastodon %{branch} used on %{instance} to end in 2 weeks. new_appeal: actions: delete_statuses: to delete their posts @@ -1922,6 +1933,7 @@ en: administration_emails: Admin email notifications email_events: Events for email notifications email_events_hint: 'Select events that you want to receive notifications for:' + moderation_emails: Moderation email notifications number: human: decimal_units: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 4c9a3bce61..82c4f42bcf 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -345,6 +345,7 @@ en: notification_emails: appeal: Someone appeals a moderator decision digest: Send digest e-mails + end_of_support: The current Mastodon version is nearing end of support favourite: Someone favourited your post follow: Someone followed you follow_request: Someone requested to follow you diff --git a/config/navigation.rb b/config/navigation.rb index dbc542bfbc..361e06b3a4 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -11,7 +11,7 @@ SimpleNavigation::Configuration.run do |navigation| SoftwareUpdate.urgent_pending? ? [material_symbol('report'), t('admin.critical_update_pending')] : [material_symbol('system_update_alt'), t('admin.update_available')] ), admin_software_updates_path, - html: { class: SoftwareUpdate.urgent_pending? ? 'warning' : nil }, + html: { class: SoftwareUpdate.urgent_pending? || SoftwareDeprecation.current&.unsupported? ? 'warning' : nil }, if: -> { Rails.configuration.x.mastodon.software_update_url.present? && current_user.can?(:view_devops) && SoftwareUpdate.pending? } n.item :profile, safe_join([material_symbol('person'), t('settings.profile')]), settings_profile_path, if: -> { current_user.functional? && !self_destruct }, highlights_on: %r{/settings/profile|/settings/featured_tags|/settings/verification} diff --git a/db/migrate/20260706143100_create_software_deprecations.rb b/db/migrate/20260706143100_create_software_deprecations.rb new file mode 100644 index 0000000000..d5b0780057 --- /dev/null +++ b/db/migrate/20260706143100_create_software_deprecations.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class CreateSoftwareDeprecations < ActiveRecord::Migration[8.1] + def change + create_table :software_deprecations do |t| + t.string :branch, null: false + t.date :end_of_support, null: false + t.integer :warning_issued, null: false + + t.timestamps + end + + add_index :software_deprecations, :branch, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 1b24c81b3f..ecf113318d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.1].define(version: 2026_07_06_122112) do +ActiveRecord::Schema[8.1].define(version: 2026_07_06_143100) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -1157,6 +1157,15 @@ ActiveRecord::Schema[8.1].define(version: 2026_07_06_122112) do t.index ["var"], name: "index_site_uploads_on_var", unique: true end + create_table "software_deprecations", force: :cascade do |t| + t.string "branch", null: false + t.datetime "created_at", null: false + t.date "end_of_support", null: false + t.datetime "updated_at", null: false + t.integer "warning_issued", null: false + t.index ["branch"], name: "index_software_deprecations_on_branch", unique: true + end + create_table "software_updates", force: :cascade do |t| t.datetime "created_at", null: false t.date "end_of_support" diff --git a/spec/services/software_update_check_service_spec.rb b/spec/services/software_update_check_service_spec.rb index ea72c52734..d0f205e8e0 100644 --- a/spec/services/software_update_check_service_spec.rb +++ b/spec/services/software_update_check_service_spec.rb @@ -66,10 +66,12 @@ RSpec.describe SoftwareUpdateCheckService do end context 'when the server returns new versions' do + let(:deprecation_date) { nil } + let(:server_json) do { currentVersion: { - endOfSupport: nil, + endOfSupport: deprecation_date&.iso8601, }, updatesAvailable: [ { @@ -104,6 +106,91 @@ RSpec.describe SoftwareUpdateCheckService do expect { subject.call }.to change { SoftwareUpdate.pluck(:version).sort }.from(['3.5.0', '42.13.12', 'Malformed']).to(['4.2.1', '4.3.0', '5.0.0']) end + context 'when server returns deprecation in the distant future' do + let(:deprecation_date) { 5.years.from_now.to_date } + + it 'updates the software deprecation info' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([]).to([[deprecation_date, 'none']]) + end + + context 'when an irrelevant deprecation was stored' do + before do + SoftwareDeprecation.create!(branch: '4.3', end_of_support: '2026-05-06'.to_date, warning_issued: :out_of_support_warning) + end + + it 'updates the software deprecation info' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([['2026-05-06'.to_date, 'out_of_support_warning']]).to([[deprecation_date, 'none']]) + end + end + end + + context 'when server returns deprecation in 2 months' do + let(:deprecation_date) { 2.months.from_now.to_date } + + it 'updates the software deprecation info' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([]).to([[deprecation_date, 'three_months_warning']]) + end + + context 'when an irrelevant deprecation was stored' do + before do + SoftwareDeprecation.create!(branch: '4.3', end_of_support: '2026-05-06'.to_date, warning_issued: :out_of_support_warning) + end + + it 'updates the software deprecation info and sends email' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([['2026-05-06'.to_date, 'out_of_support_warning']]).to([[deprecation_date, 'three_months_warning']]) + .and(have_enqueued_mail(AdminMailer, :end_of_support_three_months_warning).with(hash_including(params: { recipient: owner_user.account })).once) + end + end + end + + context 'when server returns deprecation in 1 week' do + let(:deprecation_date) { 1.week.from_now.to_date } + + it 'updates the software deprecation info' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([]).to([[deprecation_date, 'two_weeks_warning']]) + .and(have_enqueued_mail(AdminMailer, :end_of_support_two_weeks_warning).with(hash_including(params: { recipient: owner_user.account })).once) + end + + context 'when an irrelevant deprecation was stored' do + before do + SoftwareDeprecation.create!(branch: '4.3', end_of_support: '2026-05-06'.to_date, warning_issued: :out_of_support_warning) + end + + it 'updates the software deprecation info and sends email' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([['2026-05-06'.to_date, 'out_of_support_warning']]).to([[deprecation_date, 'two_weeks_warning']]) + .and(have_enqueued_mail(AdminMailer, :end_of_support_two_weeks_warning).with(hash_including(params: { recipient: owner_user.account })).once) + end + end + end + + context 'when server returns deprecation in the past' do + let(:deprecation_date) { 1.week.ago.to_date } + + it 'updates the software deprecation info' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([]).to([[deprecation_date, 'out_of_support_warning']]) + .and(have_enqueued_mail(AdminMailer, :end_of_support_out_of_support_warning).with(hash_including(params: { recipient: owner_user.account })).once) + end + + context 'when an irrelevant deprecation was stored' do + before do + SoftwareDeprecation.create!(branch: '4.3', end_of_support: '2026-05-06'.to_date, warning_issued: :out_of_support_warning) + end + + it 'updates the software deprecation info and sends email' do + expect { subject.call } + .to change { SoftwareDeprecation.pluck(:end_of_support, :warning_issued) }.from([['2026-05-06'.to_date, 'out_of_support_warning']]).to([[deprecation_date, 'out_of_support_warning']]) + .and(have_enqueued_mail(AdminMailer, :end_of_support_out_of_support_warning).with(hash_including(params: { recipient: owner_user.account })).once) + end + end + end + context 'when no update is urgent' do it 'sends e-mail notifications according to settings', :aggregate_failures do expect { subject.call }.to have_enqueued_mail(AdminMailer, :new_software_updates) From ba0fadc332b440864e6b6010e749b02a5d94a5de Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 9 Jul 2026 16:55:03 +0200 Subject: [PATCH 5/5] Change error message for missing Multibase value (#39760) --- app/lib/multibase.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/multibase.rb b/app/lib/multibase.rb index d8f54bd949..9b6b20aba1 100644 --- a/app/lib/multibase.rb +++ b/app/lib/multibase.rb @@ -25,7 +25,7 @@ class Multibase class Error < StandardError; end def self.decode(string) - raise Error, 'Multibase string is null' if string.nil? + raise Error, 'Multibase string is nil' if string.nil? case string[0] when 'u'