From 5a3062f723abefe4ec49898256e1d81b01fbf6f4 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Fri, 10 May 2024 10:00:02 +0200 Subject: [PATCH 001/113] Pass the CodeCov token from the secret to the action (#30219) --- .github/workflows/test-ruby.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index b28f5261c2e886..84b907570837f2 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -145,6 +145,8 @@ jobs: uses: codecov/codecov-action@v4 with: files: coverage/lcov/mastodon.lcov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} test-e2e: name: End to End testing From 6819bcc4b6772075a8fd45b995b9e1bf92ef7868 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 11:18:52 +0200 Subject: [PATCH 002/113] Update dependency glob to v10.3.14 (#30230) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 95a3923e25d008..22f81166f859d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8882,17 +8882,17 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.2.6, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.3.12 - resolution: "glob@npm:10.3.12" + version: 10.3.14 + resolution: "glob@npm:10.3.14" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^2.3.6" minimatch: "npm:^9.0.1" minipass: "npm:^7.0.4" - path-scurry: "npm:^1.10.2" + path-scurry: "npm:^1.11.0" bin: glob: dist/esm/bin.mjs - checksum: 10c0/f60cefdc1cf3f958b2bb5823e1b233727f04916d489dc4641d76914f016e6704421e06a83cbb68b0cb1cb9382298b7a88075b844ad2127fc9727ea22b18b0711 + checksum: 10c0/19126e53b99c94dea9b3509500e22b325e24d2674523fc95b9fe710f1549ad7e091fbb0704c325c53d3a172fc21a8251acce5395c4f3efd872a2e65a376c82a1 languageName: node linkType: hard @@ -12770,13 +12770,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.2": - version: 1.10.2 - resolution: "path-scurry@npm:1.10.2" +"path-scurry@npm:^1.11.0": + version: 1.11.0 + resolution: "path-scurry@npm:1.11.0" dependencies: lru-cache: "npm:^10.2.0" minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/d723777fbf9627f201e64656680f66ebd940957eebacf780e6cce1c2919c29c116678b2d7dbf8821b3a2caa758d125f4444005ccec886a25c8f324504e48e601 + checksum: 10c0/a5cd5dfbc6d5bb01d06bc2eb16ccdf303d617865438a21fe15431b8ad334f23351f73259abeb7e4be56f9c68d237b26b4dba51c78b508586035dfc2b55085493 languageName: node linkType: hard From 6ccee2600bf8920131f9b4ad5706cf632262556b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 11:19:06 +0200 Subject: [PATCH 003/113] Update dependency rubocop to v1.63.5 (#30225) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 435144700f255f..9df960e61809b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -640,7 +640,7 @@ GEM rspec-mocks (~> 3.0) sidekiq (>= 5, < 8) rspec-support (3.13.1) - rubocop (1.63.4) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From c36a8786c10c36e5181c9c53d848fa8e7b24b692 Mon Sep 17 00:00:00 2001 From: Chee Aun Date: Fri, 10 May 2024 17:19:27 +0800 Subject: [PATCH 004/113] Fix typo (#30224) --- .../mastodon/features/notifications/components/notification.jsx | 2 +- app/javascript/mastodon/locales/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index caf7f9bdc104ae..69084c2111b47e 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -41,7 +41,7 @@ const messages = defineMessages({ adminSignUp: { id: 'notification.admin.sign_up', defaultMessage: '{name} signed up' }, adminReport: { id: 'notification.admin.report', defaultMessage: '{name} reported {target}' }, relationshipsSevered: { id: 'notification.relationships_severance_event', defaultMessage: 'Lost connections with {name}' }, - moderationWarning: { id: 'notification.moderation_warning', defaultMessage: 'Your have received a moderation warning' }, + moderationWarning: { id: 'notification.moderation_warning', defaultMessage: 'You have received a moderation warning' }, }); const notificationForScreenReader = (intl, message, timestamp) => { diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 9d127b6b03b06c..56e4612c1ce2bf 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name} has requested to follow you", "notification.mention": "{name} mentioned you", "notification.moderation-warning.learn_more": "Learn more", - "notification.moderation_warning": "Your have received a moderation warning", + "notification.moderation_warning": "You have received a moderation warning", "notification.moderation_warning.action_delete_statuses": "Some of your posts have been removed.", "notification.moderation_warning.action_disable": "Your account has been disabled.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Some of your posts have been marked as sensitive.", From 0a4a93038fa08e0f64f3b1f267853f38f41cd0cf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 09:22:47 +0000 Subject: [PATCH 005/113] Update Yarn to v4.2.2 (#30220) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- streaming/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3abc11c34b09bc..d8848833311297 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@mastodon/mastodon", "license": "AGPL-3.0-or-later", - "packageManager": "yarn@4.2.1", + "packageManager": "yarn@4.2.2", "engines": { "node": ">=18" }, diff --git a/streaming/package.json b/streaming/package.json index f08d2a4c2d1e86..cf1fe4ba69b7a0 100644 --- a/streaming/package.json +++ b/streaming/package.json @@ -1,7 +1,7 @@ { "name": "@mastodon/streaming", "license": "AGPL-3.0-or-later", - "packageManager": "yarn@4.2.1", + "packageManager": "yarn@4.2.2", "engines": { "node": ">=18" }, From 1aa3976f280efed1ae4c72c1ac58e3e4ff9061f1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 11:23:45 +0200 Subject: [PATCH 006/113] Update dependency pino-http to v10.1.0 (#30199) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 22f81166f859d2..28cf500466b1cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13004,14 +13004,14 @@ __metadata: linkType: hard "pino-http@npm:^10.0.0": - version: 10.0.0 - resolution: "pino-http@npm:10.0.0" + version: 10.1.0 + resolution: "pino-http@npm:10.1.0" dependencies: get-caller-file: "npm:^2.0.5" pino: "npm:^9.0.0" pino-std-serializers: "npm:^7.0.0" process-warning: "npm:^3.0.0" - checksum: 10c0/40d2dcb2bc0c51f1ce45d3d7144c54f087fe1a122d82d0f497d65656151a1603a64f82f62d7fc6a3c172754c5a5cf6105b3096620eece31cefbc8cf95b26c062 + checksum: 10c0/d97691f2ee248b0aca0e49169d0c7ca0d4c604ee57b63ae264a6f9914fc7277cace74686d5088a876f8152a8d5b8211af904b2d24a516728a662de0e9cc79e9f languageName: node linkType: hard From 3a5a1b2e5838d8915bd2d08e5d3ea363d66b611e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 09:25:07 +0000 Subject: [PATCH 007/113] Update dependency node to 20.13 (#30211) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 7795cadb579573..973f49d55ca1e3 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.12 +20.13 From c9557bdd3bc7c67f6513295b0ab633cfca8cbfdd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 11:34:48 +0200 Subject: [PATCH 008/113] New Crowdin Translations (automated) (#30215) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/gl.json | 8 +-- app/javascript/mastodon/locales/hi.json | 5 ++ app/javascript/mastodon/locales/ie.json | 29 ++++++++ app/javascript/mastodon/locales/lt.json | 93 +++++++++++++++---------- app/javascript/mastodon/locales/lv.json | 35 ++++++++-- config/locales/devise.ia.yml | 25 +++++++ config/locales/doorkeeper.ia.yml | 4 ++ config/locales/doorkeeper.ie.yml | 1 + config/locales/doorkeeper.lt.yml | 50 ++++++------- config/locales/gl.yml | 10 +-- config/locales/ia.yml | 44 ++++++++++++ config/locales/ie.yml | 2 + config/locales/ko.yml | 1 + config/locales/lt.yml | 5 ++ config/locales/lv.yml | 21 ++++++ config/locales/pt-BR.yml | 1 + config/locales/ro.yml | 9 +++ config/locales/simple_form.ar.yml | 5 ++ config/locales/simple_form.bg.yml | 2 + config/locales/simple_form.de.yml | 4 +- config/locales/simple_form.hu.yml | 2 +- config/locales/simple_form.ia.yml | 2 + config/locales/simple_form.it.yml | 2 + config/locales/simple_form.ko.yml | 3 + config/locales/simple_form.lt.yml | 2 +- config/locales/simple_form.nn.yml | 3 +- config/locales/simple_form.pt-BR.yml | 5 ++ config/locales/simple_form.ro.yml | 1 + config/locales/simple_form.sq.yml | 2 + config/locales/uk.yml | 2 +- 30 files changed, 296 insertions(+), 82 deletions(-) diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json index 49802ac48876f5..88d4f5f60e059a 100644 --- a/app/javascript/mastodon/locales/gl.json +++ b/app/javascript/mastodon/locales/gl.json @@ -2,7 +2,7 @@ "about.blocks": "Servidores suxeitos a moderación", "about.contact": "Contacto:", "about.disclaimer": "Mastodon é software libre, de código aberto, e unha marca comercial de Mastodon gGmbH.", - "about.domain_blocks.no_reason_available": "Motivo non indicado. ", + "about.domain_blocks.no_reason_available": "Motivo non indicado", "about.domain_blocks.preamble": "Mastodon de xeito xeral permíteche ver contidos doutros servidores do fediverso e interactuar coas súas usuarias. Estas son as excepcións que se estabeleceron neste servidor en particular.", "about.domain_blocks.silenced.explanation": "Por defecto non verás perfís e contido desde este servidor, a menos que mires de xeito explícito ou optes por seguir ese contido ou usuaria.", "about.domain_blocks.silenced.title": "Limitado", @@ -115,7 +115,7 @@ "closed_registrations_modal.find_another_server": "Atopa outro servidor", "closed_registrations_modal.preamble": "Mastodon é descentralizado, así que non importa onde crees a conta, poderás seguir e interactuar con calquera conta deste servidor. Incluso podes ter o teu servidor!", "closed_registrations_modal.title": "Crear conta en Mastodon", - "column.about": "Acerca de", + "column.about": "Sobre", "column.blocks": "Usuarias bloqueadas", "column.bookmarks": "Marcadores", "column.community": "Cronoloxía local", @@ -322,7 +322,7 @@ "follow_suggestions.view_all": "Ver todas", "follow_suggestions.who_to_follow": "A quen seguir", "followed_tags": "Cancelos seguidos", - "footer.about": "Acerca de", + "footer.about": "Sobre", "footer.directory": "Directorio de perfís", "footer.get_app": "Descarga a app", "footer.invite": "Convidar persoas", @@ -441,7 +441,7 @@ "mute_modal.title": "Acalar usuaria?", "mute_modal.you_wont_see_mentions": "Non verás as publicacións que a mencionen.", "mute_modal.you_wont_see_posts": "Seguirá podendo ler as túas publicacións, pero non verás as súas.", - "navigation_bar.about": "Acerca de", + "navigation_bar.about": "Sobre", "navigation_bar.advanced_interface": "Abrir coa interface web avanzada", "navigation_bar.blocks": "Usuarias bloqueadas", "navigation_bar.bookmarks": "Marcadores", diff --git a/app/javascript/mastodon/locales/hi.json b/app/javascript/mastodon/locales/hi.json index 372eb09fa78fd4..5dc99dd76e40b1 100644 --- a/app/javascript/mastodon/locales/hi.json +++ b/app/javascript/mastodon/locales/hi.json @@ -205,6 +205,10 @@ "dismissable_banner.dismiss": "डिसमिस", "dismissable_banner.explore_links": "इन समाचारों के बारे में लोगों द्वारा इस पर और डेसेंट्रलीसेड नेटवर्क के अन्य सर्वरों पर अभी बात की जा रही है।", "dismissable_banner.explore_tags": "ये हैशटैग अभी इस पर और डेसेंट्रलीसेड नेटवर्क के अन्य सर्वरों पर लोगों के बीच कर्षण प्राप्त कर रहे हैं।", + "domain_block_modal.block": "सर्वर ब्लॉक करें", + "domain_block_modal.title": "डोमेन ब्लॉक करें", + "domain_pill.server": "सर्वर", + "domain_pill.username": "यूज़रनेम", "embed.instructions": "अपने वेबसाइट पर, निचे दिए कोड को कॉपी करके, इस स्टेटस को एम्बेड करें", "embed.preview": "यह ऐसा दिखेगा :", "emoji_button.activity": "गतिविधि", @@ -274,6 +278,7 @@ "follow_request.authorize": "अधिकार दें", "follow_request.reject": "अस्वीकार करें", "follow_requests.unlocked_explanation": "हालाँकि आपका खाता लॉक नहीं है, फिर भी {domain} डोमेन स्टाफ ने सोचा कि आप इन खातों के मैन्युअल अनुरोधों की समीक्षा करना चाहते हैं।", + "follow_suggestions.dismiss": "दोबारा न दिखाएं", "followed_tags": "फॉलो किए गए हैशटैग्स", "footer.about": "अबाउट", "footer.directory": "प्रोफाइल्स डायरेक्टरी", diff --git a/app/javascript/mastodon/locales/ie.json b/app/javascript/mastodon/locales/ie.json index 8d491412c0155a..7bd91ca0f9032e 100644 --- a/app/javascript/mastodon/locales/ie.json +++ b/app/javascript/mastodon/locales/ie.json @@ -212,13 +212,20 @@ "domain_block_modal.block_account_instead": "Altrimen, bloccar @{name}", "domain_block_modal.they_can_interact_with_old_posts": "Persones de ti servitor posse interacter con tui old postas.", "domain_block_modal.they_cant_follow": "Nequi de ti-ci servitor posse sequer te.", + "domain_block_modal.they_wont_know": "Ne va esser conscient pri li bloccada.", + "domain_block_modal.title": "Bloccar dominia?", + "domain_block_modal.you_will_lose_followers": "Omni tui sequitores de ti-ci servitor va esser efaciat.", + "domain_block_modal.you_wont_see_posts": "Tu ne va vider postas ni notificationes de usatores sur ti-ci servitor.", + "domain_pill.activitypub_lets_connect": "It possibilisa tui conexiones e interactiones con persones ne solmen sur Mastodon, ma anc tra diferent social aplis.", "domain_pill.activitypub_like_language": "ActivityPub es li lingue usat de Mastodon por parlar con altri social retages.", "domain_pill.server": "Servitor", "domain_pill.their_handle": "Identificator:", "domain_pill.their_server": "Su digital hem e omni su postas.", + "domain_pill.their_username": "Su unic identificator sur su servitor. It es possibil que altri servitores va haver usatores con li sam nómine.", "domain_pill.username": "Usator-nómine", "domain_pill.whats_in_a_handle": "Ex quo consiste un identificator?", "domain_pill.your_handle": "Tui identificator:", + "domain_pill.your_username": "Tui unic identificator sur ti-ci servitor. It es possibil que altri servitores va haver usatores con li sam nómine.", "embed.instructions": "Inbedar ti-ci posta per copiar li code in infra.", "embed.preview": "Vi qualmen it va aspecter:", "emoji_button.activity": "Activitá", @@ -286,6 +293,7 @@ "filter_modal.select_filter.subtitle": "Usar un existent categorie o crear nov", "filter_modal.select_filter.title": "Filtrar ti-ci posta", "filter_modal.title.status": "Filtrar un posta", + "filtered_notifications_banner.mentions": "{count, plural, one {mention} other {mentiones}}", "filtered_notifications_banner.pending_requests": "Notificationes de {count, plural, =0 {nequi} one {un person} other {# persones}} quel tu possibilmen conosse", "filtered_notifications_banner.title": "Filtrat notificationes", "firehose.all": "Omno", @@ -296,6 +304,8 @@ "follow_requests.unlocked_explanation": "Benque tu conto ne es cludet, li administratores de {domain} pensat que tu fórsan vell voler tractar seque-petitiones de tis-ci contos manualmen.", "follow_suggestions.curated_suggestion": "Selection del employates", "follow_suggestions.dismiss": "Ne monstrar plu", + "follow_suggestions.featured_longer": "Selectet manualmen del equip de {domain}", + "follow_suggestions.friends_of_friends_longer": "Populari ínter li persones queles tu seque", "follow_suggestions.hints.featured": "Ti-ci profil ha esset selectet directmen del equip de {domain}.", "follow_suggestions.hints.friends_of_friends": "Ti-ci profil es populari ínter tis qui tu seque.", "follow_suggestions.hints.most_followed": "Ti-ci profil es un del max sequet sur {domain}.", @@ -303,6 +313,8 @@ "follow_suggestions.hints.similar_to_recently_followed": "Ti-ci profil es simil al profiles queles tu ha recentmen sequet.", "follow_suggestions.personalized_suggestion": "Personalisat suggestion", "follow_suggestions.popular_suggestion": "Populari suggestion", + "follow_suggestions.popular_suggestion_longer": "Populari sur {domain}", + "follow_suggestions.similar_to_recently_followed_longer": "Simil a profiles queles tu sequet recentmen", "follow_suggestions.view_all": "Vider omnicos", "follow_suggestions.who_to_follow": "Persones a sequer", "followed_tags": "Sequet hashtags", @@ -423,6 +435,8 @@ "mute_modal.they_can_mention_and_follow": "Posse mentionar e sequer te, ma va esser ínvisibil a te.", "mute_modal.they_wont_know": "Ne va esser conscient pri li silentation.", "mute_modal.title": "Silentiar usator?", + "mute_modal.you_wont_see_mentions": "Tu ne va vider postas mentionant li usator.", + "mute_modal.you_wont_see_posts": "Ne posse vider tui postas e inversi.", "navigation_bar.about": "Information", "navigation_bar.advanced_interface": "Aperter in li web-interfacie avansat", "navigation_bar.blocks": "Bloccat usatores", @@ -455,10 +469,23 @@ "notification.follow": "{name} sequet te", "notification.follow_request": "{name} ha petit sequer te", "notification.mention": "{name} mentionat te", + "notification.moderation-warning.learn_more": "Aprender plu", + "notification.moderation_warning": "Tu ha recivet un moderatori advertiment", + "notification.moderation_warning.action_delete_statuses": "Alcun de tui postas ha esset efaciat.", + "notification.moderation_warning.action_disable": "Tui conto ha esset desactivisat.", + "notification.moderation_warning.action_mark_statuses_as_sensitive": "Alcun de tui postas ha esset marcat quam sensitiv.", + "notification.moderation_warning.action_none": "Tui conto ha recivet un moderatori advertiment.", + "notification.moderation_warning.action_sensitive": "Desde nu tui postas va esser marcat quam sensitiv.", + "notification.moderation_warning.action_silence": "Tui conto ha esset limitat.", + "notification.moderation_warning.action_suspend": "Tui conto ha esset suspendet.", "notification.own_poll": "Tui balotation ha finit", "notification.poll": "Un balotation in quel tu votat ha finit", "notification.reblog": "{name} boostat tui posta", + "notification.relationships_severance_event": "Perdit conexiones con {name}", + "notification.relationships_severance_event.account_suspension": "Un admin de {from} ha suspendet {target}, dunc con ti person tu ne plu posse reciver actualisationes ni far interactiones.", + "notification.relationships_severance_event.domain_block": "Un admin de {from} ha bloccat {target}, includente {followersCount} de tui sequitores e {followingCount, plural, one {# conto} other {# contos}} sequet de te.", "notification.relationships_severance_event.learn_more": "Aprender plu", + "notification.relationships_severance_event.user_domain_block": "Tu ha bloccat {target}, efaciante {followersCount} de tui sequitores e {followingCount, plural, one {# conto} other {# contos}} sequet de te.", "notification.status": "{name} just postat", "notification.update": "{name} modificat un posta", "notification_requests.accept": "Acceptar", @@ -472,6 +499,7 @@ "notifications.column_settings.alert": "Notificationes sur li computator", "notifications.column_settings.favourite": "Favorites:", "notifications.column_settings.filter_bar.advanced": "Monstrar omni categories", + "notifications.column_settings.filter_bar.category": "Rapid filtre-barre", "notifications.column_settings.follow": "Nov sequitores:", "notifications.column_settings.follow_request": "Nov petitiones de sequer:", "notifications.column_settings.mention": "Mentiones:", @@ -707,6 +735,7 @@ "status.reblog": "Boostar", "status.reblog_private": "Boostar con li original visibilitá", "status.reblogged_by": "{name} boostat", + "status.reblogs": "{count, plural, one {boost} other {boosts}}", "status.reblogs.empty": "Ancor nequi ha boostat ti-ci posta. Quande alqui fa it, ilu va aparir ci.", "status.redraft": "Deleter & redacter", "status.remove_bookmark": "Remover marcator", diff --git a/app/javascript/mastodon/locales/lt.json b/app/javascript/mastodon/locales/lt.json index 083a922012b46f..798b24569f135a 100644 --- a/app/javascript/mastodon/locales/lt.json +++ b/app/javascript/mastodon/locales/lt.json @@ -1,7 +1,7 @@ { "about.blocks": "Prižiūrimi serveriai", "about.contact": "Kontaktai:", - "about.disclaimer": "Mastodon – nemokama atvirojo kodo programa ir Mastodon gGmbH prekės ženklas.", + "about.disclaimer": "Mastodon – tai nemokama atvirojo kodo programinė įranga ir Mastodon gGmbH prekės ženklas.", "about.domain_blocks.no_reason_available": "Priežastis nepateikta", "about.domain_blocks.preamble": "Mastodon paprastai leidžia peržiūrėti turinį ir bendrauti su naudotojais iš bet kurio kito fediverse esančio serverio. Šios yra išimtys, kurios buvo padarytos šiame konkrečiame serveryje.", "about.domain_blocks.silenced.explanation": "Paprastai nematysi profilių ir turinio iš šio serverio, nebent jį aiškiai ieškosi arba pasirinksi jį sekdamas (-a).", @@ -30,7 +30,7 @@ "account.endorse": "Rodyti profilyje", "account.featured_tags.last_status_at": "Paskutinis įrašas {date}", "account.featured_tags.last_status_never": "Nėra įrašų", - "account.featured_tags.title": "{name} rekomenduojami saitažodžiai", + "account.featured_tags.title": "{name} rodomi saitažodžiai", "account.follow": "Sekti", "account.follow_back": "Sekti atgal", "account.followers": "Sekėjai", @@ -38,13 +38,13 @@ "account.followers_counter": "{count, plural, one {{counter} sekėjas} few {{counter} sekėjai} many {{counter} sekėjo} other {{counter} sekėjų}}", "account.following": "Sekama", "account.following_counter": "{count, plural, one {{counter} sekimas} few {{counter} sekimai} many {{counter} sekimo} other {{counter} sekimų}}", - "account.follows.empty": "Šis (-i) naudotojas (-a) dar nieko neseka.", + "account.follows.empty": "Šis naudotojas dar nieko neseka.", "account.go_to_profile": "Eiti į profilį", "account.hide_reblogs": "Slėpti pakėlimus iš @{name}", "account.in_memoriam": "Atminimui.", "account.joined_short": "Prisijungė", "account.languages": "Keisti prenumeruojamas kalbas", - "account.link_verified_on": "Šios nuorodos nuosavybė buvo patikrinta {date}.", + "account.link_verified_on": "Šios nuorodos nuosavybė buvo patikrinta {date}", "account.locked_info": "Šios paskyros privatumo būsena nustatyta kaip užrakinta. Savininkas (-ė) rankiniu būdu peržiūri, kas gali sekti.", "account.media": "Medija", "account.mention": "Paminėti @{name}", @@ -59,7 +59,7 @@ "account.posts": "Įrašai", "account.posts_with_replies": "Įrašai ir atsakymai", "account.report": "Pranešti apie @{name}", - "account.requested": "Laukiama patvirtinimo. Spustelėk, jei nori atšaukti sekimo prašymą.", + "account.requested": "Laukiama patvirtinimo. Spustelėk, jei nori atšaukti sekimo prašymą", "account.requested_follow": "{name} paprašė tave sekti", "account.share": "Bendrinti @{name} profilį", "account.show_reblogs": "Rodyti pakėlimus iš @{name}", @@ -82,7 +82,7 @@ "admin.impact_report.instance_followers": "Sekėjai, kuriuos prarastų mūsų naudotojai", "admin.impact_report.instance_follows": "Sekėjai, kuriuos prarastų jų naudotojai", "admin.impact_report.title": "Poveikio apibendrinimas", - "alert.rate_limited.message": "Pabandyk vėliau po {retry_time, time, medium}.", + "alert.rate_limited.message": "Bandyk vėliau po {retry_time, time, medium}.", "alert.rate_limited.title": "Sparta ribota.", "alert.unexpected.message": "Įvyko netikėta klaida.", "alert.unexpected.title": "Ups!", @@ -92,7 +92,12 @@ "block_modal.remote_users_caveat": "Paprašysime serverio {domain} gerbti tavo sprendimą. Tačiau atitiktis negarantuojama, nes kai kurie serveriai gali skirtingai tvarkyti blokavimus. Vieši įrašai vis tiek gali būti matomi neprisijungusiems naudotojams.", "block_modal.show_less": "Rodyti mažiau", "block_modal.show_more": "Rodyti daugiau", - "boost_modal.combo": "Galima paspausti {combo}, kad praleisti kitą kartą.", + "block_modal.they_cant_mention": "Jie negali tave paminėti ar sekti.", + "block_modal.they_cant_see_posts": "Jie negali matyti tavo įrašus, o tu nematysi jų.", + "block_modal.they_will_know": "Jie mato, kad yra užblokuoti.", + "block_modal.title": "Blokuoti naudotoją?", + "block_modal.you_wont_see_mentions": "Nematysi įrašus, kuriuose jie paminimi.", + "boost_modal.combo": "Galima paspausti {combo}, kad praleisti tai kitą kartą", "bundle_column_error.copy_stacktrace": "Kopijuoti klaidos ataskaitą", "bundle_column_error.error.body": "Paprašytos puslapio nepavyko atvaizduoti. Tai gali būti dėl mūsų kodo klaidos arba naršyklės suderinamumo problemos.", "bundle_column_error.error.title": "O, ne!", @@ -117,7 +122,7 @@ "column.direct": "Privatūs paminėjimai", "column.directory": "Naršyti profilius", "column.domain_blocks": "Užblokuoti domenai", - "column.favourites": "Mėgstamiausi", + "column.favourites": "Mėgstami", "column.firehose": "Tiesioginiai srautai", "column.follow_requests": "Sekimo prašymai", "column.home": "Pagrindinis", @@ -144,7 +149,7 @@ "compose.saved.body": "Įrašas išsaugotas.", "compose_form.direct_message_warning_learn_more": "Sužinoti daugiau", "compose_form.encryption_warning": "Mastodon įrašai nėra visapusiškai šifruojami. Per Mastodon nesidalyk jokia slapta informacija.", - "compose_form.hashtag_warning": "Šis įrašas nebus įtraukta į jokį saitažodį, nes ji nėra vieša. Tik viešų įrašų galima ieškoti pagal saitažodį.", + "compose_form.hashtag_warning": "Šis įrašas nebus įtrauktas į jokį saitažodį, nes ji nėra vieša. Tik viešų įrašų galima ieškoti pagal saitažodį.", "compose_form.lock_disclaimer": "Tavo paskyra nėra {locked}. Bet kas gali sekti tave ir peržiūrėti tik sekėjams skirtus įrašus.", "compose_form.lock_disclaimer.lock": "užrakinta", "compose_form.placeholder": "Kas tavo mintyse?", @@ -152,7 +157,7 @@ "compose_form.poll.multiple": "Keli pasirinkimai", "compose_form.poll.option_placeholder": "{number} parinktis", "compose_form.poll.single": "Pasirinkti vieną", - "compose_form.poll.switch_to_multiple": "Keisti apklausą, kad būtų galima pasirinkti kelis pasirinkimus.", + "compose_form.poll.switch_to_multiple": "Keisti apklausą, kad būtų galima pasirinkti kelis pasirinkimus", "compose_form.poll.switch_to_single": "Keisti apklausą, kad būtų galima pasirinkti vieną pasirinkimą", "compose_form.poll.type": "Stilius", "compose_form.publish": "Skelbti", @@ -172,16 +177,17 @@ "confirmations.delete_list.message": "Ar tikrai nori visam laikui ištrinti šį sąrašą?", "confirmations.discard_edit_media.confirm": "Atmesti", "confirmations.discard_edit_media.message": "Turi neišsaugotų medijos aprašymo ar peržiūros pakeitimų, vis tiek juos atmesti?", + "confirmations.domain_block.confirm": "Blokuoti serverį", "confirmations.domain_block.message": "Ar tikrai, tikrai nori užblokuoti visą {domain}? Daugeliu atvejų užtenka kelių tikslinių blokavimų arba nutildymų. Šio domeno turinio nematysi jokiose viešose laiko skalėse ar pranešimuose. Tavo sekėjai iš to domeno bus pašalinti.", "confirmations.edit.confirm": "Redaguoti", "confirmations.edit.message": "Redaguojant dabar, bus perrašyta šiuo metu kuriama žinutė. Ar tikrai nori tęsti?", "confirmations.logout.confirm": "Atsijungti", "confirmations.logout.message": "Ar tikrai nori atsijungti?", "confirmations.mute.confirm": "Nutildyti", - "confirmations.redraft.confirm": "Ištrinti ir parengti iš naujo", - "confirmations.redraft.message": "Ar tikrai nori ištrinti šį įrašą ir parengti jį iš naujo kaip juodraštį? Bus prarastos mėgstamiausios ir pakėlimai, o atsakymai į originalinį įrašą taps liekamojais.", + "confirmations.redraft.confirm": "Ištrinti ir perrašyti", + "confirmations.redraft.message": "Ar tikrai nori ištrinti šį įrašą ir parašyti jį iš naujo? Bus prarastos mėgstamai ir pakėlimai, o atsakymai į originalinį įrašą taps liekamojais.", "confirmations.reply.confirm": "Atsakyti", - "confirmations.reply.message": "Atsakant dabar, bus perrašyta metu kuriama žinutė. Ar tikrai nori tęsti?", + "confirmations.reply.message": "Atsakant dabar, bus perrašyta šiuo metu kuriama žinutė. Ar tikrai nori tęsti?", "confirmations.unfollow.confirm": "Nebesekti", "confirmations.unfollow.message": "Ar tikrai nori nebesekti {name}?", "conversation.delete": "Ištrinti pokalbį", @@ -196,34 +202,42 @@ "directory.new_arrivals": "Nauji atvykėliai", "directory.recently_active": "Neseniai aktyvus (-i)", "disabled_account_banner.account_settings": "Paskyros nustatymai", - "disabled_account_banner.text": "Tavo paskyra {disabledAccount} šiuo metu išjungta.", - "dismissable_banner.community_timeline": "Tai – naujausi vieši įrašai, kuriuos paskelbė žmonės, kurių paskyros talpinamos {domain}.", + "disabled_account_banner.text": "Tavo paskyra {disabledAccount} šiuo metu yra išjungta.", + "dismissable_banner.community_timeline": "Tai – naujausi vieši įrašai iš žmonių, kurių paskyros talpinamos {domain}.", "dismissable_banner.dismiss": "Atmesti", "dismissable_banner.explore_links": "Tai – naujienos, kuriomis šiandien daugiausiai bendrinamasi socialiniame žiniatinklyje. Naujesnės naujienų istorijos, kurias paskelbė daugiau skirtingų žmonių, vertinamos aukščiau.", "dismissable_banner.explore_statuses": "Tai – įrašai iš viso socialinio žiniatinklio, kurie šiandien sulaukia daug dėmesio. Naujesni įrašai, turintys daugiau pakėlimų ir mėgstamų, vertinami aukščiau.", "dismissable_banner.explore_tags": "Tai – saitažodžiai, kurie šiandien sulaukia daug dėmesio socialiniame žiniatinklyje. Saitažodžiai, kuriuos naudoja daugiau skirtingų žmonių, vertinami aukščiau.", - "dismissable_banner.public_timeline": "Tai – naujausi vieši įrašai, kuriuos socialiniame žiniatinklyje paskelbė žmonės, sekantys {domain}.", - "domain_pill.activitypub_lets_connect": "Tai leidžia tau bendrauti su žmonėmis ne tik Mastodon, bet ir įvairiose socialinėse programėlėse.", - "domain_pill.activitypub_like_language": "ActivityPub – tarsi kalba, kuria Mastodon kalba su kitais socialiniais tinklais.", + "dismissable_banner.public_timeline": "Tai – naujausi vieši įrašai iš žmonių socialiniame žiniatinklyje, kuriuos seka {domain} žmonės.", + "domain_block_modal.block": "Blokuoti serverį", + "domain_block_modal.block_account_instead": "Blokuoti {name} vietoj to", + "domain_block_modal.they_can_interact_with_old_posts": "Žmonės iš šio serverio gali sąveikauti su tavo senomis įrašomis.", + "domain_block_modal.they_cant_follow": "Niekas iš šio serverio negali tavęs sekti.", + "domain_block_modal.they_wont_know": "Jie nežinos, kad buvo užblokuoti.", + "domain_block_modal.title": "Blokuoti domeną?", + "domain_block_modal.you_will_lose_followers": "Visi tavo sekėjai iš šio serverio bus pašalinti.", + "domain_block_modal.you_wont_see_posts": "Nematysi naudotojų įrašų ar pranešimų šiame serveryje.", + "domain_pill.activitypub_lets_connect": "Tai leidžia tau sąveikauti su žmonėmis ne tik Mastodon, bet ir įvairiose socialinėse programėlėse.", + "domain_pill.activitypub_like_language": "ActivityPub – tai tarsi kalba, kuria Mastodon kalba su kitais socialiniais tinklais.", "domain_pill.server": "Serveris", "domain_pill.their_handle": "Jų socialinis medijos vardas:", "domain_pill.their_server": "Jų skaitmeniniai namai, kuriuose saugomi visi jų įrašai.", "domain_pill.their_username": "Jų unikalus identifikatorius jų serveryje. Skirtinguose serveriuose galima rasti naudotojų, turinčių tą patį naudotojo vardą.", "domain_pill.username": "Naudotojo vardas", "domain_pill.whats_in_a_handle": "Kas yra socialiniame medijos varde?", - "domain_pill.who_they_are": "Kadangi socialines medijos vardai nurodo, kas ir kur jie yra, galima bendrauti su žmonėmis visame socialiniame tinkle, kuriame yra .", - "domain_pill.who_you_are": "Kadangi tavo socialinis medijos vardas nurodo, kas esi ir kur esi, žmonės gali bendrauti su tavimi visame socialiniame tinkle, kurį sudaro .", + "domain_pill.who_they_are": "Kadangi socialines medijos vardai nurodo, kas žmogus yra ir kur jie yra, gali sąveikauti su žmonėmis visame socialiniame žiniatinklyje, kurį sudaro .", + "domain_pill.who_you_are": "Kadangi tavo socialinis medijos vardas nurodo, kas esi ir kur esi, žmonės gali sąveikauti su tavimi visame socialiniame tinkle, kurį sudaro .", "domain_pill.your_handle": "Tavo socialinis medijos vardas:", "domain_pill.your_server": "Tavo skaitmeniniai namai, kuriuose saugomi visi tavo įrašai. Nepatinka šis? Bet kada perkelk serverius ir atsivesk ir savo sekėjus.", - "domain_pill.your_username": "Tavo unikalus identifikatorius šiame serveryje. Skirtinguose serveriuose galima rasti naudotojų, turinčių tą patį naudotojo vardą.", + "domain_pill.your_username": "Tavo unikalus identifikatorius šiame serveryje. Skirtinguose serveriuose galima rasti naudotojų su tuo pačiu naudotojo vardu.", "embed.instructions": "Įterpk šį įrašą į savo svetainę nukopijavus (-usi) toliau pateiktą kodą.", - "embed.preview": "Štai, kaip tai atrodys:", + "embed.preview": "Štai kaip tai atrodys:", "emoji_button.activity": "Veikla", "emoji_button.clear": "Išvalyti", "emoji_button.custom": "Pasirinktinis", "emoji_button.flags": "Vėliavos", "emoji_button.food": "Maistas ir gėrimai", - "emoji_button.label": "Įterpti veidelius", + "emoji_button.label": "Įterpti jaustuką", "emoji_button.nature": "Gamta", "emoji_button.not_found": "Nerasta jokių tinkamų jaustukų.", "emoji_button.objects": "Objektai", @@ -234,12 +248,12 @@ "emoji_button.symbols": "Simboliai", "emoji_button.travel": "Kelionės ir vietos", "empty_column.account_hides_collections": "Šis (-i) naudotojas (-a) pasirinko nepadaryti šią informaciją prieinamą.", - "empty_column.account_suspended": "Paskyra sustabdyta.", - "empty_column.account_timeline": "Nėra įrašų čia.", + "empty_column.account_suspended": "Paskyra pristabdyta.", + "empty_column.account_timeline": "Nėra čia įrašų.", "empty_column.account_unavailable": "Profilis neprieinamas.", "empty_column.blocks": "Dar neužblokavai nė vieno naudotojo.", - "empty_column.bookmarked_statuses": "Dar neturi nė vienos įrašo žymės. Kai vieną iš jų pridėsi į žymes, jis bus rodomas čia.", - "empty_column.community": "Vietinė laiko skalė tuščia. Parašyk ką nors viešai, kad pradėtum bendrauti!", + "empty_column.bookmarked_statuses": "Dar neturi nė vienos įrašo pridėtos žymės. Kai vieną iš jų pridėsi į žymes, jis bus rodomas čia.", + "empty_column.community": "Vietinė laiko skalė yra tuščia. Parašyk ką nors viešai, kad pradėtum sąveikauti.", "empty_column.direct": "Dar neturi jokių privačių paminėjimų. Kai išsiųsi arba gausi vieną iš jų, jis bus rodomas čia.", "empty_column.domain_blocks": "Dar nėra užblokuotų domenų.", "empty_column.explore_statuses": "Šiuo metu niekas nėra tendencinga. Patikrink vėliau.", @@ -248,12 +262,13 @@ "empty_column.follow_requests": "Dar neturi jokių sekimo prašymų. Kai gausi tokį prašymą, jis bus rodomas čia.", "empty_column.followed_tags": "Dar neseki jokių saitažodžių. Kai tai padarysi, jie bus rodomi čia.", "empty_column.hashtag": "Nėra nieko šiame saitažodyje kol kas.", - "empty_column.home": "Tavo pagrindinio laiko skalė tuščia! Sek daugiau žmonių, kad ją užpildytum.", + "empty_column.home": "Tavo pagrindinio laiko skalė tuščia. Sek daugiau žmonių, kad ją užpildytum.", "empty_column.list": "Nėra nieko šiame sąraše kol kas. Kai šio sąrašo nariai paskelbs naujų įrašų, jie bus rodomi čia.", "empty_column.lists": "Dar neturi jokių sąrašų. Kai jį sukursi, jis bus rodomas čia.", "empty_column.mutes": "Dar nesi nutildęs (-usi) nė vieno naudotojo.", - "empty_column.notifications": "Dar neturi jokių pranešimų. Kai kiti žmonės su tavimi bendraus, matysi tai čia.", - "empty_column.public": "Čia nieko nėra! Parašyk ką nors viešai arba rankiniu būdu sek naudotojus iš kitų serverių, kad jį užpildytum.", + "empty_column.notification_requests": "Viskas švaru! Čia nieko nėra. Kai gausi naujų pranešimų, jie bus rodomi čia pagal tavo nustatymus.", + "empty_column.notifications": "Dar neturi jokių pranešimų. Kai kiti žmonės su tavimi sąveikaus, matysi tai čia.", + "empty_column.public": "Čia nieko nėra. Parašyk ką nors viešai arba rankiniu būdu sek naudotojus iš kitų serverių, kad jį užpildytum.", "error.unexpected_crash.explanation": "Dėl mūsų kodo riktos arba naršyklės suderinamumo problemos šis puslapis negalėjo būti rodomas teisingai.", "error.unexpected_crash.explanation_addons": "Šį puslapį nepavyko parodyti teisingai. Šią klaidą greičiausiai sukėlė naršyklės priedas arba automatinio vertimo įrankiai.", "error.unexpected_crash.next_steps": "Pabandyk atnaujinti puslapį. Jei tai nepadeda, galbūt vis dar galėsi naudotis Mastodon per kitą naršyklę arba savąją programėlę.", @@ -270,9 +285,9 @@ "filter_modal.added.context_mismatch_title": "Konteksto neatitikimas.", "filter_modal.added.expired_explanation": "Ši filtro kategorija nustojo galioti. Kad ji būtų taikoma, turėsi pakeisti galiojimo datą.", "filter_modal.added.expired_title": "Baigėsi filtro galiojimas.", - "filter_modal.added.review_and_configure": "Norint peržiūrėti ir toliau konfigūruoti šią filtro kategoriją, eik į nuorodą {settings_link}.", + "filter_modal.added.review_and_configure": "Norint peržiūrėti ir toliau konfigūruoti šią filtro kategoriją, eik į {settings_link}.", "filter_modal.added.review_and_configure_title": "Filtro nustatymai", - "filter_modal.added.settings_link": "nustatymų puslapis", + "filter_modal.added.settings_link": "nustatymų puslapį", "filter_modal.added.short_explanation": "Šis įrašas buvo pridėtas į šią filtro kategoriją: {title}.", "filter_modal.added.title": "Pridėtas filtras.", "filter_modal.select_filter.context_mismatch": "netaikoma šiame kontekste.", @@ -283,6 +298,8 @@ "filter_modal.select_filter.title": "Filtruoti šį įrašą", "filter_modal.title.status": "Filtruoti įrašą", "filtered_notifications_banner.mentions": "{count, plural, one {paminėjimas} few {paminėjimai} many {paminėjimo} other {paminėjimų}}", + "filtered_notifications_banner.pending_requests": "Pranešimai iš {count, plural, =0 {nė vieno} one {vienos žmogaus} few {# žmonių} many {# žmonių} other {# žmonių}}, kuriuos galbūt pažįsti", + "filtered_notifications_banner.title": "Filtruojami pranešimai", "firehose.all": "Visi", "firehose.local": "Šis serveris", "firehose.remote": "Kiti serveriai", @@ -295,8 +312,8 @@ "follow_suggestions.friends_of_friends_longer": "Populiarus tarp žmonių, kurių seki", "follow_suggestions.hints.featured": "Šį profilį atrinko {domain} komanda.", "follow_suggestions.hints.friends_of_friends": "Šis profilis yra populiarus tarp žmonių, kuriuos seki.", - "follow_suggestions.hints.most_followed": "Šis profilis yra vienas iš labiausiai sekamų {domain}.", - "follow_suggestions.hints.most_interactions": "Pastaruoju metu šis profilis sulaukia daug dėmesio šiame {domain}.", + "follow_suggestions.hints.most_followed": "Šis profilis yra vienas iš labiausiai sekamų domene {domain}.", + "follow_suggestions.hints.most_interactions": "Pastaruoju metu šis profilis sulaukia daug dėmesio domane {domain}.", "follow_suggestions.hints.similar_to_recently_followed": "Šis profilis panašus į profilius, kuriuos neseniai sekei.", "follow_suggestions.personalized_suggestion": "Suasmenintas pasiūlymas", "follow_suggestions.popular_suggestion": "Populiarus pasiūlymas", @@ -312,8 +329,8 @@ "footer.keyboard_shortcuts": "Spartieji klavišai", "footer.privacy_policy": "Privatumo politika", "footer.source_code": "Peržiūrėti šaltinio kodą", - "footer.status": "Būsena", - "generic.saved": "Išsaugoti", + "footer.status": "Statusas", + "generic.saved": "Išsaugota", "getting_started.heading": "Kaip pradėti", "hashtag.column_header.tag_mode.all": "ir {additional}", "hashtag.column_header.tag_mode.any": "ar {additional}", @@ -333,7 +350,7 @@ "home.column_settings.show_reblogs": "Rodyti pakėlimus", "home.column_settings.show_replies": "Rodyti atsakymus", "home.hide_announcements": "Slėpti skelbimus", - "home.pending_critical_update.body": "Kuo greičiau atnaujink savo Mastodon serverį!", + "home.pending_critical_update.body": "Kuo greičiau atnaujink savo Mastodon serverį.", "home.pending_critical_update.link": "Žiūrėti naujinimus", "home.pending_critical_update.title": "Galimas kritinis saugumo naujinimas.", "home.show_announcements": "Rodyti skelbimus", @@ -480,7 +497,7 @@ "notifications.column_settings.follow_request": "Nauji sekimo prašymai:", "notifications.column_settings.mention": "Paminėjimai:", "notifications.column_settings.poll": "Balsavimo rezultatai:", - "notifications.column_settings.push": "Stumdomieji pranešimai", + "notifications.column_settings.push": "Tiesioginiai pranešimai", "notifications.column_settings.reblog": "Pakėlimai:", "notifications.column_settings.show": "Rodyti stulpelyje", "notifications.column_settings.sound": "Paleisti garsą", diff --git a/app/javascript/mastodon/locales/lv.json b/app/javascript/mastodon/locales/lv.json index 55ceb564b637d4..32ea6e47c45a7c 100644 --- a/app/javascript/mastodon/locales/lv.json +++ b/app/javascript/mastodon/locales/lv.json @@ -8,7 +8,7 @@ "about.domain_blocks.silenced.title": "Ierobežotie", "about.domain_blocks.suspended.explanation": "Nekādi dati no šī servera netiks apstrādāti, uzglabāti vai apmainīti, padarot neiespējamu mijiedarbību vai saziņu ar lietotājiem no šī servera.", "about.domain_blocks.suspended.title": "Apturētie", - "about.not_available": "Šī informācija šajā serverī nav bijusi pieejama.", + "about.not_available": "Šī informācija nav padarīta pieejama šajā serverī.", "about.powered_by": "Decentralizētu sociālo tīklu nodrošina {mastodon}", "about.rules": "Servera noteikumi", "account.account_note_header": "Piezīme", @@ -89,6 +89,9 @@ "announcement.announcement": "Paziņojums", "attachments_list.unprocessed": "(neapstrādāti)", "audio.hide": "Slēpt audio", + "block_modal.remote_users_caveat": "Mēs vaicāsim serverim {domain} ņemt vērā Tavu lēmumu. Tomēr atbilstība nav nodrošināta, jo atsevišķi serveri var apstrādāt bloķēšanu citādi. Publiski ieraksti joprojām var būt redzami lietotājiem, kuri nav pieteikušies.", + "block_modal.show_less": "Parādīt vairāk", + "block_modal.show_more": "Parādīt mazāk", "boost_modal.combo": "Nospied {combo}, lai nākamreiz šo izlaistu", "bundle_column_error.copy_stacktrace": "Kopēt kļūdu ziņojumu", "bundle_column_error.error.body": "Pieprasīto lapu nevarēja atveidot. Tas varētu būt saistīts ar kļūdu mūsu kodā, vai tā ir pārlūkprogrammas saderības problēma.", @@ -190,7 +193,7 @@ "directory.federated": "No pazīstamas federācijas", "directory.local": "Tikai no {domain}", "directory.new_arrivals": "Jaunpienācēji", - "directory.recently_active": "Nesen aktīvie", + "directory.recently_active": "Nesen aktīvi", "disabled_account_banner.account_settings": "Konta iestatījumi", "disabled_account_banner.text": "Tavs konts {disabledAccount} pašlaik ir atspējots.", "dismissable_banner.community_timeline": "Šie ir jaunākie publiskie ieraksti no cilvēkiem, kuru konti ir mitināti {domain}.", @@ -199,6 +202,9 @@ "dismissable_banner.explore_statuses": "Šie ir ieraksti, kas šodien gūst arvien lielāku ievērību visā sociālajā tīklā. Augstāk tiek kārtoti jaunāki ieraksti, kuri tiek vairāk pastiprināti un ievietoti izlasēs.", "dismissable_banner.explore_tags": "Šie tēmturi šobrīd kļūst arvien populārāki cilvēku vidū šajā un citos decentralizētā tīkla serveros.", "dismissable_banner.public_timeline": "Šie ir jaunākie publiskie ieraksti no lietotājiem sociālajā tīmeklī, kuriem {domain} seko cilvēki.", + "domain_block_modal.they_cant_follow": "Neviens šajā serverī nevar Tev sekot.", + "domain_pill.server": "Serveris", + "domain_pill.username": "Lietotājvārds", "embed.instructions": "Iestrādā šo ziņu savā mājaslapā, kopējot zemāk redzamo kodu.", "embed.preview": "Tas izskatīsies šādi:", "emoji_button.activity": "Aktivitāte", @@ -275,6 +281,7 @@ "follow_suggestions.curated_suggestion": "Darbinieku izvēle", "follow_suggestions.dismiss": "Vairs nerādīt", "follow_suggestions.personalized_suggestion": "Pielāgots ieteikums", + "follow_suggestions.similar_to_recently_followed_longer": "Līdzīgi profieliem, kuriem nesen sāki sekot", "follow_suggestions.view_all": "Skatīt visu", "follow_suggestions.who_to_follow": "Kam sekot", "followed_tags": "Sekojamie tēmturi", @@ -388,6 +395,10 @@ "loading_indicator.label": "Ielādē…", "media_gallery.toggle_visible": "{number, plural, one {Slēpt attēlu} other {Slēpt attēlus}}", "moved_to_account_banner.text": "Tavs konts {disabledAccount} pašlaik ir atspējots, jo Tu pārcēlies uz kontu {movedToAccount}.", + "mute_modal.hide_from_notifications": "Paslēpt paziņojumos", + "mute_modal.hide_options": "Paslēpt iespējas", + "mute_modal.show_options": "Parādīt iespējas", + "mute_modal.title": "Apklusināt lietotāju?", "navigation_bar.about": "Par", "navigation_bar.advanced_interface": "Atvērt paplašinātā tīmekļa saskarnē", "navigation_bar.blocks": "Bloķētie lietotāji", @@ -420,11 +431,23 @@ "notification.follow": "{name} uzsāka Tev sekot", "notification.follow_request": "{name} nosūtīja Tev sekošanas pieprasījumu", "notification.mention": "{name} pieminēja Tevi", + "notification.moderation-warning.learn_more": "Uzzināt vairāk", + "notification.moderation_warning.action_delete_statuses": "Daži no Taviem ierakstiem tika noņemti.", + "notification.moderation_warning.action_disable": "Tavs konts tika atspējots.", + "notification.moderation_warning.action_mark_statuses_as_sensitive": "Daži no Taviem ierakstiem tika atzīmēti kā jutīgi.", + "notification.moderation_warning.action_sensitive": "Tavi ieraksti turpmāk tiks atzīmēti kā jutīgi.", + "notification.moderation_warning.action_silence": "Tavs konts tika ierobežots.", + "notification.moderation_warning.action_suspend": "Tava konta darbība tika apturēta.", "notification.own_poll": "Tava aptauja ir noslēgusies", "notification.poll": "Aptauja, kurā tu piedalījies, ir noslēgusies", "notification.reblog": "{name} pastiprināja Tavu ierakstu", + "notification.relationships_severance_event": "Zaudēti savienojumi ar {name}", + "notification.relationships_severance_event.learn_more": "Uzzināt vairāk", "notification.status": "{name} tikko publicēja", "notification.update": "{name} rediģēja ierakstu", + "notification_requests.accept": "Pieņemt", + "notification_requests.dismiss": "Noraidīt", + "notification_requests.notifications_from": "Paziņojumi no {name}", "notifications.clear": "Notīrīt paziņojumus", "notifications.clear_confirmation": "Vai tiešām vēlies neatgriezeniski notīrīt visus savus paziņojumus?", "notifications.column_settings.admin.report": "Jauni ziņojumi:", @@ -456,6 +479,9 @@ "notifications.permission_denied": "Darbvirsmas paziņojumi nav pieejami, jo iepriekš tika noraidīts pārlūka atļauju pieprasījums", "notifications.permission_denied_alert": "Darbvirsmas paziņojumus nevar iespējot, jo pārlūkprogrammai atļauja tika iepriekš atteikta", "notifications.permission_required": "Darbvirsmas paziņojumi nav pieejami, jo nav piešķirta nepieciešamā atļauja.", + "notifications.policy.filter_new_accounts_title": "Jauni konti", + "notifications.policy.filter_not_followers_title": "Cilvēki, kuri Tev neseko", + "notifications.policy.filter_not_following_title": "Cilvēki, kuriem Tu neseko", "notifications_permission_banner.enable": "Iespējot darbvirsmas paziņojumus", "notifications_permission_banner.how_to_control": "Lai saņemtu paziņojumus, kad Mastodon nav atvērts, iespējo darbvirsmas paziņojumus. Vari precīzi kontrolēt, kāda veida mijiedarbības rada darbvirsmas paziņojumus, izmantojot augstāk redzamo pogu {icon}, kad tie būs iespējoti.", "notifications_permission_banner.title": "Nekad nepalaid neko garām", @@ -485,7 +511,7 @@ "onboarding.start.title": "Tev tas izdevās!", "onboarding.steps.follow_people.body": "Tu pats veido savu plūsmu. Piepildīsim to ar interesantiem cilvēkiem.", "onboarding.steps.follow_people.title": "Pielāgo savu mājas barotni", - "onboarding.steps.publish_status.body": "Sveicini pasauli ar tekstu, fotoattēliem, video, vai aptaujām {emoji}", + "onboarding.steps.publish_status.body": "Pasveicini pasauli ar tekstu, attēliem, video vai aptaujām {emoji}", "onboarding.steps.publish_status.title": "Izveido savu pirmo ziņu", "onboarding.steps.setup_profile.body": "Palielini mijiedarbību ar aptverošu profilu!", "onboarding.steps.setup_profile.title": "Pielāgo savu profilu", @@ -603,7 +629,7 @@ "search_results.statuses": "Ieraksti", "search_results.title": "Meklēt {q}", "server_banner.about_active_users": "Cilvēki, kas izmantojuši šo serveri pēdējo 30 dienu laikā (aktīvie lietotāji mēnesī)", - "server_banner.active_users": "aktīvie lietotāji", + "server_banner.active_users": "aktīvi lietotāji", "server_banner.administered_by": "Administrē:", "server_banner.introduction": "{domain} ir daļa no decentralizētā sociālā tīkla, ko nodrošina {mastodon}.", "server_banner.learn_more": "Uzzināt vairāk", @@ -625,6 +651,7 @@ "status.direct": "Pieminēt @{name} privāti", "status.direct_indicator": "Pieminēts privāti", "status.edit": "Labot", + "status.edited": "Pēdējoreiz labots {date}", "status.edited_x_times": "Labots {count, plural, one {{count} reizi} other {{count} reizes}}", "status.embed": "Iegult", "status.favourite": "Izlasē", diff --git a/config/locales/devise.ia.yml b/config/locales/devise.ia.yml index b365668210fb0c..d83c708647718a 100644 --- a/config/locales/devise.ia.yml +++ b/config/locales/devise.ia.yml @@ -21,28 +21,47 @@ ia: confirmation_instructions: action: Verificar adresse de e-mail action_with_app: Confirmar e retornar a %{app} + explanation: Tu ha create un conto sur %{host} con iste adresse de e-mail. Tu es a un sol clic de activar lo. Si isto non esseva tu, per favor ignora iste e-mail. + explanation_when_pending: Tu ha sollicitate un invitation a %{host} con iste adresse de e-mail. Post que tu confirma tu adresse de e-mail, nos va revider tu demanda. Tu pote aperir session pro cambiar tu detalios o eliminar tu conto, ma tu non pote acceder al majoritate del functiones usque tu conto es approbate. Si tu demanda es rejectate, tu datos essera removite e nulle action ulterior essera requirite de te. Si isto non esseva tu, per favor ignora iste message de e-mail. + extra_html: Per favor consulta tamben le regulas del servitor e nostre conditiones de servicio. subject: 'Mastodon: Instructiones de confirmation pro %{instance}' title: Verificar adresse de e-mail email_changed: explanation: 'Le adresse de e-mail pro tu conto essera cambiate a:' + extra: Si tu non ha cambiate de adresse de e-mail, es probabile que alcuno ha ganiate le accesso a tu conto. Per favor cambia immediatemente tu contrasigno o contacta le administrator del servitor si tu non pote acceder a tu conto. subject: 'Mastodon: E-mail cambiate' title: Nove adresse de e-mail password_change: explanation: Le contrasigno de tu conto ha essite cambiate. + extra: Si tu non ha cambiate tu contrasigno, es probabile que alcuno ha ganiate le accesso a tu conto. Per favor cambia immediatemente tu contrasigno o contacta le administrator del servitor si tu non pote acceder a tu conto. subject: 'Mastodon: Contrasigno cambiate' title: Contrasigno cambiate reconfirmation_instructions: explanation: Confirma le nove adresse pro cambiar tu email. + extra: Si non es tu qui ha initiate iste cambiamento, per favor ignora iste e-mail. Le adresse de e-mail pro le conto de Mastodon non cambiara usque tu accede al ligamine hic supra. subject: 'Mastodon: Confirmar e-mail pro %{instance}' title: Verificar adresse de e-mail reset_password_instructions: action: Cambiar contrasigno + explanation: Tu ha requestate un nove contrasigno pro tu conto. + extra: Si tu non ha requestate isto, per favor ignora iste e-mail. Tu contrasigno non cambiara usque tu accede al ligamine hic supra e crea un nove. subject: 'Mastodon: Instructiones pro reinitialisar le contrasigno' title: Reinitialisar contrasigno two_factor_disabled: + explanation: Ora es possibile aperir session con solmente le adresse de e-mail e contrasigno. + subject: 'Mastodon: Authentication bifactorial disactivate' + subtitle: Le authentication bifactorial ha essite disactivate pro tu conto. title: 2FA disactivate two_factor_enabled: + explanation: Pro le apertura de session essera necessari un token generate per le application TOTP accopulate. + subject: 'Mastodon: Authentication bifactorial activate' + subtitle: Le authentication bifactorial ha essite activate pro tu conto. title: 2FA activate + two_factor_recovery_codes_changed: + explanation: Le ancian codices de recuperation ha essite invalidate e nove codices ha essite generate. + subject: 'Mastodon: Codices de recuperation regenerate' + subtitle: Le ancian codices de recuperation ha essite invalidate e nove codices ha essite generate. + title: Codices de recuperation cambiate unlock_instructions: subject: 'Mastodon: Instructiones pro disblocar' webauthn_credential: @@ -53,9 +72,15 @@ ia: deleted: explanation: Le sequente clave de securitate esseva delite de tu conto subject: 'Mastodon: Clave de securitate delite' + title: Un de tu claves de securitate ha essite delite webauthn_disabled: + explanation: Le authentication con claves de securitate ha essite disactivate pro tu conto. + extra: Ora es possibile aperir session usante solmente le token generate per le application TOTP accopulate. + subject: 'Mastodon: Le authentication con claves de securitate es disactivate' title: Claves de securitate disactivate webauthn_enabled: + explanation: Le authentication con claves de securitate ha essite activate pro tu conto. + extra: Tu clave de securitate pote ora esser usate pro aperir session. title: Claves de securitate activate registrations: destroyed: A revider! Tu conto esseva cancellate con successo. Nos spera vider te novemente tosto. diff --git a/config/locales/doorkeeper.ia.yml b/config/locales/doorkeeper.ia.yml index 86bd1ad9853ca2..b5bd6cc5369fbb 100644 --- a/config/locales/doorkeeper.ia.yml +++ b/config/locales/doorkeeper.ia.yml @@ -34,10 +34,12 @@ ia: title: Nove application show: actions: Actiones + scopes: Ambitos title: 'Application: %{name}' authorizations: buttons: authorize: Autorisar + deny: Negar error: title: Ocurreva un error authorized_applications: @@ -66,7 +68,9 @@ ia: conversations: Conversationes favourites: Favoritos filters: Filtros + follows: Sequites lists: Listas + media: Annexos multimedial mutes: Silentiates notifications: Notificationes push: Notificationes push diff --git a/config/locales/doorkeeper.ie.yml b/config/locales/doorkeeper.ie.yml index 0119f3573f13b3..fc8132c926d8b7 100644 --- a/config/locales/doorkeeper.ie.yml +++ b/config/locales/doorkeeper.ie.yml @@ -174,6 +174,7 @@ ie: read:filters: vider tui filtres read:follows: vider tui sequitores read:lists: vider tui listes + read:me: leer solmen li basic information de tui conto read:mutes: vider tui silentias read:notifications: vider tui notificationes read:reports: vider tui raportes diff --git a/config/locales/doorkeeper.lt.yml b/config/locales/doorkeeper.lt.yml index 5be291bf89e604..82695d8ba69fec 100644 --- a/config/locales/doorkeeper.lt.yml +++ b/config/locales/doorkeeper.lt.yml @@ -31,8 +31,8 @@ lt: form: error: Ups! Patikrink, ar formoje nėra galimų klaidų. help: - native_redirect_uri: Naudoti %{native_redirect_uri} vietiniams bandymams - redirect_uri: Naudoti po vieną eilutę kiekvienam URI + native_redirect_uri: Naudok %{native_redirect_uri} vietiniams bandymams. + redirect_uri: Naudok po vieną eilutę kiekvienam URI. scopes: Atskirk aprėptis tarpais. Palik tuščią, jei nori naudoti numatytąsias aprėtis. index: application: Programėlė @@ -90,7 +90,7 @@ lt: request_not_authorized: Užklausą reikia įgalioti. Reikalingo parametro užklausai įgalioti trūksta arba jis netinkamas. unknown: Užklausoje trūksta privalomo parametro, turi nepalaikomą parametro reikšmę arba yra kitaip netinkamai suformuota. invalid_resource_owner: Pateikti išteklių savininko įgaliojimai yra netinkami arba išteklių savininko negalima surasti. - invalid_scope: Užklausos aprėptis yra netinkama, nežinoma arba netinkamai suformuota. + invalid_scope: Užklausos aprėptis yra netinkama, nežinoma arba netaisyklingas. invalid_token: expired: Baigėsi prieigos rakto galiojimas. revoked: Prieigos raktas buvo panaikintas. @@ -133,9 +133,9 @@ lt: follows: Sekimai lists: Sąrašai media: Medijos priedai - mutes: Užtildymai + mutes: Nutildymai notifications: Pranešimai - push: Stumdomieji pranešimai + push: Tiesioginiai pranešimai reports: Ataskaitos search: Paieška statuses: Įrašai @@ -147,30 +147,30 @@ lt: application: title: Reikalingas OAuth leidimas scopes: - admin:read: skaityti visus serveryje esančius duomenis - admin:read:accounts: skaityti neskelbtiną visų paskyrų informaciją - admin:read:canonical_email_blocks: skaityti neskelbtiną visų kanoninių el. laiško blokavimų informaciją - admin:read:domain_allows: skaityti neskelbtiną visų domeno leidimus informaciją - admin:read:domain_blocks: skaityti neskelbtiną visų domeno blokavimų informaciją - admin:read:email_domain_blocks: skaityti neskelbtiną visų el. laiško domeno blokavimų informaciją - admin:read:ip_blocks: skaityti neskelbtiną visų IP blokavimų informaciją - admin:read:reports: skaityti neskelbtiną visų ataskaitų ir praneštų paskyrų informaciją - admin:write: modifikuoti visus serveryje esančius duomenis + admin:read: skaityti visus duomenis serveryje + admin:read:accounts: skaityti slaptą visų paskyrų informaciją + admin:read:canonical_email_blocks: skaityti slaptą visų kanoninių el. laiško blokavimų informaciją + admin:read:domain_allows: skaityti slaptą visų domeno leidimus informaciją + admin:read:domain_blocks: skaityti slaptą visų domeno blokavimų informaciją + admin:read:email_domain_blocks: skaityti slaptą visų el. laiško domeno blokavimų informaciją + admin:read:ip_blocks: skaityti slaptą visų IP blokavimų informaciją + admin:read:reports: skaityti slaptą visų ataskaitų ir praneštų paskyrų informaciją + admin:write: modifikuoti visus duomenis serveryje admin:write:accounts: atlikti paskyrų prižiūrėjimo veiksmus admin:write:canonical_email_blocks: atlikti kanoninių el. laiško blokavimų prižiūrėjimo veiksmus - admin:write:domain_allows: atlikti prižiūrėjimo veiksmus su domeno leidimais - admin:write:domain_blocks: atlikti prižiūrėjimo veiksmus su domenų blokavimais - admin:write:email_domain_blocks: atlikti prižiūrėjimo veiksmus su el. laiško domenų blokavimais - admin:write:ip_blocks: atlikti prižiūrėjimo veiksmus su IP blokavimais - admin:write:reports: atlikti paskyrų prižiūrėjimo veiksmus atsakaitams + admin:write:domain_allows: atlikti domeno leidimų prižiūrėjimo veiksmus + admin:write:domain_blocks: atlikti domeno blokavimų prižiūrėjimo veiksmus + admin:write:email_domain_blocks: atlikti el. laiško domenų blokavimų prižiūrėjimo veiksmus + admin:write:ip_blocks: atlikti IP blokavimų prižiūrėjimo veiksmus + admin:write:reports: atlikti ataskaitų prižiūrėjimo veiksmus crypto: naudoti visapusį šifravimą follow: modifikuoti paskyros sąryšius - push: gauti tavo stumiamuosius pranešimus - read: skaityti tavo visus paskyros duomenis + push: gauti tiesioginius pranešimus + read: skaityti visus paskyros duomenis read:accounts: matyti paskyrų informaciją read:blocks: matyti tavo blokavimus read:bookmarks: matyti tavo žymes - read:favourites: matyti tavo mėgstamiausius + read:favourites: matyti tavo mėgstamus read:filters: matyti tavo filtrus read:follows: matyti tavo sekimus read:lists: matyti tavo sąrašus @@ -183,14 +183,14 @@ lt: write: modifikuoti visus tavo paskyros duomenis write:accounts: modifikuoti tavo profilį write:blocks: blokuoti paskyras ir domenus - write:bookmarks: įrašyti įrašus + write:bookmarks: pridėti į žymes įrašus write:conversations: nutildyti ir ištrinti pokalbius - write:favourites: mėgti įrašai + write:favourites: pamėgti įrašus write:filters: sukurti filtrus write:follows: sekti žmones write:lists: sukurti sąrašus write:media: įkelti medijos failus write:mutes: nutildyti žmones ir pokalbius write:notifications: išvalyti tavo pranešimus - write:reports: pranešti kitus asmenus + write:reports: pranešti apie kitus žmones write:statuses: skelbti įrašus diff --git a/config/locales/gl.yml b/config/locales/gl.yml index bdf6e5a75f2958..57af7c82c030db 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -5,7 +5,7 @@ gl: contact_missing: Non establecido contact_unavailable: Non dispoñíbel hosted_on: Mastodon aloxado en %{domain} - title: Acerca de + title: Sobre accounts: follow: Seguir followers: @@ -503,7 +503,7 @@ gl: instance_follows_measure: as súas seguidoras aquí instance_languages_dimension: Top de idiomas instance_media_attachments_measure: anexos multimedia gardados - instance_reports_measure: denuncias acerca deles + instance_reports_measure: denuncias sobre eles instance_statuses_measure: publicacións gardadas delivery: all: Todo @@ -615,7 +615,7 @@ gl: created_at: Denunciado delete_and_resolve: Eliminar publicacións forwarded: Reenviado - forwarded_replies_explanation: Esta denuncia procede dunha usuaria remota e acerca de contido remoto. Enviouseche unha copia porque o contido denunciado é unha resposta a unha das túas usuarias. + forwarded_replies_explanation: Esta denuncia procede dunha usuaria remota e sobre contido remoto. Enviouseche unha copia porque o contido denunciado é unha resposta a unha das túas usuarias. forwarded_to: Reenviado a %{domain} mark_as_resolved: Marcar como resolto mark_as_sensitive: Marcar como sensible @@ -740,7 +740,7 @@ gl: manage_rules: Xestionar regras do servidor preamble: Proporciona información detallada acerca do xeito en que se xestiona, modera e financia o servidor. rules_hint: Hai un espazo dedicado para as normas que é de agardar as usuarias acaten. - title: Acerca de + title: Sobre appearance: preamble: Personalizar a interface web de Mastodon. title: Aparencia @@ -1870,7 +1870,7 @@ gl: feature_action: Saber máis feature_audience: Mastodon dache a oportunidade de xestionar sen intermediarios as túas relacións. Incluso se usas o teu propio servidor Mastodon poderás seguir e ser seguida desde calquera outro servidor Mastodon conectado á rede e estará baixo o teu control exclusivo. feature_audience_title: Crea a túa audiencia con tranquilidade - feature_control: Sabes mellor ca ninguén o que queres ver na cronoloxía. Non hai algoritmos nin publicidade facéndoche perder o tempo. Segue cunha soa conta a outras persoas en servidores Mastodon diferentes ao teu, recibirás as publicacións en orde cronolóxica, e farás deste curruchiño de internet un lugar para ti. + feature_control: Sabes mellor ca ninguén o que queres ver na cronoloxía. Non hai algoritmos nin publicidade facéndoche perder o tempo. Sigue cunha soa conta a outras persoas en servidores Mastodon diferentes ao teu, recibirás as publicacións en orde cronolóxica, e farás deste curruchiño de internet un lugar para ti. feature_control_title: Tes o control da túa cronoloxía feature_creativity: Mastodon ten soporte para audio, vídeo e imaxes nas publicacións, descricións para mellorar a accesibilidade, enquisas, avisos sobre o contido, avatares animados, emojis personalizados, control sobre o recorte de miniaturas, e moito máis, para axudarche a expresarte en internet. Tanto se publicas o teu arte, música ou podcast, Mastodon está aquí para ti. feature_creativity_title: Creatividade incomparable diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 193f2b0d5972b2..712328deb83144 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -886,6 +886,7 @@ ia: one: Compartite per un persona le septimana passate other: Compartite per %{count} personas le septimana passate title: Ligamines de tendentia + usage_comparison: Compartite %{today} vices hodie, comparate al %{yesterday} de heri not_allowed_to_trend: Non permittite haber tendentia only_allowed: Solo permittite pending_review: Attende revision @@ -915,6 +916,7 @@ ia: tag_servers_dimension: Servitores principal tag_servers_measure: servitores differente tag_uses_measure: usos total + description_html: Istos es hashtags que actualmente appare in tante messages que tu servitor vide. Illo pote adjutar tu usatores a discoperir re que le personas parla plus al momento. Nulle hashtags es monstrate publicamente usque tu los approba. listable: Pote esser suggerite no_tag_selected: Nulle placas era cambiate perque nulle era seligite not_listable: Non sera suggerite @@ -940,21 +942,47 @@ ia: webhooks: add_new: Adder terminal delete: Deler + description_html: Un croc web habilita Mastodon a transmitter notificationes in tempore real re eventos seligite pro tu pro activar application, assi tu application pote automaticamente discatenar reactiones. disable: Disactivar disabled: Disactivate edit: Rediger terminal + empty: Tu ancora non ha configurate alcun punctos final de web croc. enable: Activar enabled: Active enabled_events: one: 1 evento activate other: "%{count} eventos activate" events: Eventos + new: Nove croc web + rotate_secret: Rotar secrete + secret: Firmante secrete status: Stato + title: Crocs web + webhook: Crocs web admin_mailer: + auto_close_registrations: + subject: Le registrationes pro %{instance} ha essite automaticamente mutate a besoniante de approbation + new_appeal: + actions: + delete_statuses: pro deler lor messages + disable: pro gelar lor conto + mark_statuses_as_sensitive: pro marcar lor messages como sensibile + none: pro advertir + sensitive: a marcar lor conto como sensibile + silence: pro limitar lor conto + suspend: pro suspender lor conto + body: "%{target} appella un decision de moderation per %{action_taken_by} ab le %{date}, que era %{type}. Ille scribeva:" new_critical_software_updates: subject: Actualisationes critic de Mastodon es disponibile pro %{instance}! new_software_updates: subject: Nove versiones de Mastodon es disponibile pro %{instance}! + new_trends: + new_trending_links: + title: Ligamines de tendentia + new_trending_statuses: + title: Messages de tendentia + new_trending_tags: + title: Hashtags de tendentia aliases: add_new: Crear alias appearance: @@ -962,6 +990,7 @@ ia: confirmation_dialogs: Dialogos de confirmation discovery: Discoperta localization: + body: Mastodon es traducite per voluntarios. guide_link: https://crowdin.com/project/mastodon guide_link_text: Totes pote contribuer. sensitive_content: Contento sensibile @@ -1026,8 +1055,16 @@ ia: account_status: Stato del conto view_strikes: Examinar le admonitiones passate contra tu conto challenge: + confirm: Continuar invalid_password: Contrasigno non valide prompt: Confirma le contrasigno pro continuar + datetime: + distance_in_words: + half_a_minute: Justo ora + less_than_x_seconds: Justo ora + over_x_years: "%{count}a" + x_days: "%{count}d" + x_minutes: "%{count} m" deletes: confirm_password: Insere tu contrasigno actual pro verificar tu identitate proceed: Deler le conto @@ -1206,6 +1243,10 @@ ia: activity: Activitate del conto most_recent: Plus recente status: Stato del conto + rss: + content_warning: 'Advertimento de contento:' + descriptions: + account: Messages public de @%{acct} sessions: activity: Ultime activitate browser: Navigator @@ -1253,6 +1294,7 @@ ia: delete: Deletion de conto development: Disveloppamento edit_profile: Modificar profilo + featured_tags: Hashtags eminente import: Importar migrate: Migration de conto notifications: Notificationes de e-mail @@ -1261,7 +1303,9 @@ ia: relationships: Sequites e sequitores strikes: Admonitiones de moderation severed_relationships: + download: Discargar (%{count}) event_type: + account_suspension: Suspension del conto (%{target_name}) domain_block: Suspension del servitor (%{target_name}) user_domain_block: Tu ha blocate %{target_name} preamble: Tu pote perder sequites e sequitores quando tu bloca un dominio o quando tu moderatores decide suspender un servitor remote. Quando isto occurre, tu potera discargar listas de relationes rumpite, a inspectar e eventualmente importar in un altere servitor. diff --git a/config/locales/ie.yml b/config/locales/ie.yml index 46e55b9e19feb2..2b819c53de616e 100644 --- a/config/locales/ie.yml +++ b/config/locales/ie.yml @@ -1667,8 +1667,10 @@ ie: download: Descargar (%{count}) event_type: account_suspension: Suspension del conto (%{target_name}) + domain_block: Suspension del servitor (%{target_name}) user_domain_block: Tu bloccat %{target_name} lost_followers: Perdit sequitores + lost_follows: Perdit sequetes preamble: Tu posse perdir tis queles tu seque e tui sequitores quande tu blocca un domonia o quande tui moderatores decide suspender un lontan servitor. Tande, tu va posser descargar listes de dejuntet relationes, a inspecter e possibilmen importar sur un altri servitor. type: Eveniment statuses: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 0e90cc723e9546..f3f3e3a8fba7c9 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -739,6 +739,7 @@ ko: desc_html: 이것은 hCaptcha의 외부 스크립트에 의존합니다, 이것은 개인정보 보호에 위협을 가할 수도 있습니다. 추가적으로, 이것은 몇몇 사람들(특히나 장애인들)에게 가입 절차의 접근성을 심각하게 떨어트릴 수 있습니다. 이러한 이유로, 대체제로 승인 전용이나 초대제를 통한 가입을 고려해보세요. title: 새로운 사용자가 계정 확인을 위해서는 CAPTCHA를 풀어야 하도록 합니다 content_retention: + danger_zone: 위험한 영역 preamble: 마스토돈에 저장된 사용자 콘텐츠를 어떻게 다룰지 제어합니다. title: 콘텐츠 보존기한 default_noindex: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 35111ad39643ee..b815cada5c7f74 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -535,12 +535,16 @@ lt: elasticsearch_preset_single_node: message_html: Tavo Elasticsearch klasteris turi tik vieną mazgą, ES_PRESET turėtų būti nustatyta į single_node_cluster. title: Administracija + trends: + preview_card_providers: + title: Leidėjai warning_presets: add_new: Pridėti naują delete: Ištrinti edit_preset: Keisti įspėjimo nustatymus title: Valdyti įspėjimo nustatymus webhooks: + description_html: "Webhook leidžia Mastodon siųsti realaus laiko pranešimus apie pasirinktus įvykius į tavo programą, kad programa galėtų automatiškai paleisti reakcijas." events: Įvykiai admin_mailer: auto_close_registrations: @@ -665,6 +669,7 @@ lt: invalid_context: Jokio arba netinkamas pateiktas kontekstas index: delete: Ištrinti + empty: Neturi jokių filtrų. title: Filtrai new: title: Pridėti naują filtrą diff --git a/config/locales/lv.yml b/config/locales/lv.yml index ee839540075d6a..f4f0aa9db27742 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -761,6 +761,7 @@ lv: desc_html: Tas balstās uz ārējiem skriptiem no hCaptcha, kas var radīt bažas par drošību un privātumu. Turklāt tas var padarīt reģistrācijas procesu ievērojami mazāk pieejamu dažiem cilvēkiem (īpaši invalīdiem). Šo iemeslu dēļ, lūdzu, apsver alternatīvus pasākumus, piemēram, reģistrāciju, kas balstīta uz apstiprinājumu vai uzaicinājumu. title: Pieprasīt jaunajiem lietotājiem atrisināt CAPTCHA, lai apstiprinātu savu kontu content_retention: + danger_zone: Bīstama sadaļa preamble: Kontrolē, kā Mastodon tiek glabāts lietotāju ģenerēts saturs. title: Satura saglabāšana default_noindex: @@ -1631,6 +1632,7 @@ lv: unknown_browser: Nezināms Pārlūks weibo: Weibo current_session: Pašreizējā sesija + date: Datums description: "%{browser} uz %{platform}" explanation: Šie ir tīmekļa pārlūki, kuros šobrīd esi pieteicies savā Mastodon kontā. ip: IP @@ -1667,6 +1669,7 @@ lv: import: Imports import_and_export: Imports un eksports migrate: Konta migrācija + notifications: E-pasta paziņojumi preferences: Iestatījumi profile: Profils relationships: Sekojamie un sekotāji @@ -1674,6 +1677,9 @@ lv: strikes: Moderācijas aizrādījumi two_factor_authentication: Divpakāpju autentifikācija webauthn_authentication: Drošības atslēgas + severed_relationships: + download: Lejupielādēt (%{count}) + type: Notikums statuses: attached: audio: @@ -1800,6 +1806,7 @@ lv: webauthn: Drošības atslēgas user_mailer: appeal_approved: + action: Konta iestatījumi explanation: Apelācija par brīdinājumu jūsu kontam %{strike_date}, ko iesniedzāt %{appeal_date}, ir apstiprināta. Jūsu konts atkal ir labā stāvoklī. subject: Jūsu %{date} apelācija ir apstiprināta title: Apelācija apstiprināta @@ -1849,15 +1856,28 @@ lv: silence: Konts ierobežots suspend: Konts apturēts welcome: + apps_android_action: Iegūt to Google Play + apps_title: Mastodon lietotnes edit_profile_action: Pielāgot edit_profile_title: Pielāgo savu profilu explanation: Šeit ir daži padomi, kā sākt darbu + feature_action: Uzzināt vairāk feature_creativity: Mastodon nodrošina skaņas, video un attēlu ierakstus, pieejamības aprakstus, aptaujas, satura brīdinājumus, animētus profila attēlus, pielāgotas emocijzīmes, sīktēlu apgriešanas vadīklas un vēl, lai palīdzētu Tev sevi izpaust tiešsaistē. Vai Tu izplati savu mākslu, mūziku vai aplādes, Mastodon ir šeit ar Tevi. + follow_action: Sekot follow_title: Pielāgo savu mājas barotni + follows_title: Kam sekot + follows_view_more: Rādīt vairāk cilvēku, kuriem sekot hashtags_recent_count: one: "%{people} cilvēks pēdējās 2 dienās" other: "%{people} cilvēki pēdējās 2 dienās" zero: "%{people} cilvēku pēdējās divās dienās" + post_action: Rakstīt + post_step: Pasveicini pasauli ar tekstu, fotoattēliem, video vai aptaujām! + post_title: Izveido savu pirmo ierakstu + share_action: Kopīgot + share_step: Dari saviem draugiem zināmu, kā Tevi atrast Mastodon! + share_title: Kopīgo savu Mastodon profilu + sign_in_action: Pieteikties subject: Laipni lūgts Mastodon title: Laipni lūgts uz borta, %{name}! users: @@ -1865,6 +1885,7 @@ lv: go_to_sso_account_settings: Dodies uz sava identitātes nodrošinātāja konta iestatījumiem invalid_otp_token: Nederīgs divfaktora kods otp_lost_help_html: Ja esi zaudējis piekļuvi abiem, tu vari sazināties ar %{email} + rate_limited: Pārāk daudz autentifikācijas mēģinājumu, vēlāk jāmēģina vēlreiz. seamless_external_login: Tu esi pieteicies, izmantojot ārēju pakalpojumu, tāpēc paroles un e-pasta iestatījumi nav pieejami. signed_in_as: 'Pieteicies kā:' verification: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 9cb9cadee975a4..60730d53e977a7 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -751,6 +751,7 @@ pt-BR: desc_html: Isso é baseado em scripts externos de hCaptcha, o que pode ser uma preocupação de segurança e privacidade. Além disso, isso pode tornar o processo de registro significativamente menos acessível para algumas pessoas (especialmente deficientes). Por estas razões, favor considerar medidas alternativas como o registro baseado em aprovação ou em convite. title: Exigir que novos usuários resolvam um CAPTCHA para confirmar sua conta content_retention: + danger_zone: Zona de perigo preamble: Controlar como o conteúdo gerado pelo usuário é armazenado no Mastodon. title: Retenção de conteúdo default_noindex: diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 1099e3d0d7e3c6..cd54d51051d838 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -566,6 +566,7 @@ ro: blocking: Lista de blocare domain_blocking: Listă de blocare domenii following: Lista de urmărire + lists: Liste muting: Lista de ignorare upload: Încarcă invites: @@ -622,6 +623,14 @@ ro: body: 'Postarea ta a fost impulsionată de %{name}:' subject: "%{name} ți-a impulsionat postarea" title: Impuls nou + number: + human: + decimal_units: + units: + billion: B + million: M + quadrillion: Q + thousand: K polls: errors: expired: Sondajul s-a încheiat deja diff --git a/config/locales/simple_form.ar.yml b/config/locales/simple_form.ar.yml index a1406b1ad9d2f9..370667d48ea5f8 100644 --- a/config/locales/simple_form.ar.yml +++ b/config/locales/simple_form.ar.yml @@ -77,10 +77,15 @@ ar: warn: إخفاء المحتوى الذي تم تصفيته خلف تحذير يذكر عنوان الفلتر form_admin_settings: activity_api_enabled: عدد المنشورات المحلية و المستخدمين الناشطين و التسجيلات الأسبوعية الجديدة + app_icon: WEBP أو PNG أو GIF أو JPG. يتجاوز أيقونة التطبيق الافتراضية على الجوالات مع أيقونة مخصصة. + backups_retention_period: للمستخدمين القدرة على إنشاء أرشيفات لمنشوراتهم لتحميلها في وقت لاحق. عند التعيين إلى قيمة موجبة، سيتم حذف هذه الأرشيف تلقائياً من وحدة تخزينك بعد عدد الأيام المحدد. bootstrap_timeline_accounts: سيتم تثبيت هذه الحسابات على قمة التوصيات للمستخدمين الجدد. closed_registrations_message: ما سيعرض عند إغلاق التسجيلات + content_cache_retention_period: سيتم حذف جميع المنشورات من الخوادم الأخرى (بما في ذلك التعزيزات والردود) بعد عدد الأيام المحدد، دون أي تفاعل محلي للمستخدم مع هذه المنشورات. وهذا يشمل المنشورات التي قام المستخدم المحلي بوضع علامة عليها كإشارات مرجعية أو المفضلة. وسوف تختفي أيضا الإشارات الخاصة بين المستخدمين من المثيلات المختلفة ويستحيل استعادتها. والغرض من استخدام هذا الإعداد هو مثيلات الغرض الخاص ويفسد الكثير من توقعات المستخدمين عند تنفيذها للاستخدام لأغراض عامة. custom_css: يمكنك تطبيق أساليب مخصصة على نسخة الويب من ماستدون. + favicon: WEBP أو PNG أو GIF أو JPG. يتجاوز أيقونة التطبيق المفضلة الافتراضية مع أيقونة مخصصة. mascot: تجاوز الرسوم التوضيحية في واجهة الويب المتقدمة. + media_cache_retention_period: ملفات الوسائط من المنشورات التي يقوم بها المستخدمون البعيدون يتم تخزينها في خادمك. عند التعيين إلى قيمة موجبة، سيتم حذف الوسائط بعد عدد الأيام المحدد. إذا كانت بيانات الوسائط مطلوبة بعد حذفها، فسيتم إعادة تحميلها إذا كان محتوى المصدر لا يزال متاحًا. بسبب القيود المفروضة على عدد المرات التي يتم فيها ربط بطاقات المعاينة لمواقع الطرف الثالث، يوصى بتعيين هذه القيمة إلى 14 يوماً على الأقل، أو لن يتم تحديث بطاقات معاينة الرابط عند الطلب قبل ذلك الوقت. peers_api_enabled: قائمة بأسماء النطاقات التي صادفها هذا الخادم في الفدرالية. لا توجد بيانات هنا حول ما إذا كنت تتحد مع خادم معين، فقط أن خادمك يعرف عنها. ويستخدم هذا الخدمات التي تجمع الإحصاءات المتعلقة بالاتحاد بشكل عام. profile_directory: دليل الملف الشخصي يسرد جميع المستخدمين الذين اختاروا الدخول ليكونوا قابلين للاكتشاف. require_invite_text: عندما تتطلب التسجيلات الموافقة اليدوية، اجعل إدخال النص "لماذا تريد الانضمام ؟" إلزاميا بدلا من اختياري diff --git a/config/locales/simple_form.bg.yml b/config/locales/simple_form.bg.yml index a4a2027137c4c3..f14a21b0c70036 100644 --- a/config/locales/simple_form.bg.yml +++ b/config/locales/simple_form.bg.yml @@ -77,11 +77,13 @@ bg: warn: Скриване на филтрираното съдържание зад предупреждение, споменавайки заглавието на филтъра form_admin_settings: activity_api_enabled: Броят на местните публикувани публикации, дейни потребители и нови регистрации в седмични кофи + app_icon: WEBP, PNG, GIF или JPG. Заменя подразбиращата се икона на приложението в мобилни устройства с произволна икона. backups_retention_period: Потребителите имат способността да пораждат архиви от публикациите си за по-късно изтегляне. Задавайки положителна стойност, тези архиви самодейно ще се изтрият от хранилището ви след определения брой дни. bootstrap_timeline_accounts: Тези акаунти ще се закачат в горния край на препоръките за следване на нови потребители. closed_registrations_message: Показва се, когато е затворено за регистрации content_cache_retention_period: Всички публикации от други сървъри, включително подсилвания и отговори, ще се изтрият след посочения брой дни, без да се взема предвид каквото и да е взаимодействие на местния потребител с тези публикации. Това включва публикации, които местния потребител е означил като отметки или любими. Личните споменавания между потребители от различни инстанции също ще се загубят и невъзможно да се възстановят. Употребата на тази настройка е предназначена за случаи със специално предназначение и разбива очакванията на много потребители, когато се изпълнява за употреба с общо предназначение. custom_css: Може да прилагате собствени стилове в уебверсията на Mastodon. + favicon: WEBP, PNG, GIF или JPG. Заменя стандартната сайтоикона на Mastodon с произволна икона. mascot: Замества илюстрацията в разширения уеб интерфейс. media_cache_retention_period: Мултимедийни файлове от публикации, направени от отдалечени потребители, се сринаха в сървъра ви. Задавайки положителна стойност, мултимедията ще се изтрие след посочения брой дни. Ако се искат мултимедийни данни след изтриването, то ще се изтегли пак, ако още е наличен източникът на съдържание. Поради ограниченията за това колко често картите за предварващ преглед на връзките анкетират сайтове на трети страни, се препоръчва да зададете тази стойност на поне 14 дни или картите за предварващ преглед на връзките няма да се обновяват при поискване преди този момент. peers_api_enabled: Списък от имена на домейни, с които сървърът се е свързал във федивселената. Тук не се включват данни за това дали федерирате с даден сървър, а само за това дали сървърът ви знае за него. Това се ползва от услуги, събиращи статистика за федерацията в общия смисъл. diff --git a/config/locales/simple_form.de.yml b/config/locales/simple_form.de.yml index c1056260bbf975..7d397866977712 100644 --- a/config/locales/simple_form.de.yml +++ b/config/locales/simple_form.de.yml @@ -77,13 +77,13 @@ de: warn: Den gefilterten Beitrag hinter einer Warnung, die den Filtertitel beinhaltet, ausblenden form_admin_settings: activity_api_enabled: Anzahl der wöchentlichen Beiträge, aktiven Profile und Registrierungen auf diesem Server - app_icon: WEBP, PNG, GIF oder JPG Überschreibt das Standard-App-Symbol auf mobilen Geräten mit einem benutzerdefinierten Symbol. + app_icon: WEBP, PNG, GIF oder JPG. Überschreibt das Standard-App-Symbol auf mobilen Geräten mit einem eigenen Symbol. backups_retention_period: Nutzer*innen haben die Möglichkeit, Archive ihrer Beiträge zu erstellen, die sie später herunterladen können. Wenn ein positiver Wert gesetzt ist, werden diese Archive nach der festgelegten Anzahl von Tagen automatisch aus deinem Speicher gelöscht. bootstrap_timeline_accounts: Diese Konten werden bei den Follower-Empfehlungen für neu registrierte Nutzer*innen oben angeheftet. closed_registrations_message: Wird angezeigt, wenn Registrierungen deaktiviert sind content_cache_retention_period: Sämtliche Beiträge von anderen Servern (einschließlich geteilte Beiträge und Antworten) werden, unabhängig von der Interaktion der lokalen Nutzer*innen mit diesen Beiträgen, nach der festgelegten Anzahl von Tagen gelöscht. Das betrifft auch Beiträge, die von lokalen Nutzer*innen favorisiert oder als Lesezeichen gespeichert wurden. Private Erwähnungen zwischen Nutzer*innen von verschiedenen Servern werden ebenfalls verloren gehen und können nicht wiederhergestellt werden. Das Verwenden dieser Option richtet sich ausschließlich an Server für spezielle Zwecke und wird die allgemeine Nutzungserfahrung beeinträchtigen, wenn sie für den allgemeinen Gebrauch aktiviert ist. custom_css: Du kannst benutzerdefinierte Stile auf die Web-Version von Mastodon anwenden. - favicon: WEBP, PNG, GIF oder JPG überschreibt das Standard-Mastodon favicon mit einem benutzerdefinierten Icon. + favicon: WEBP, PNG, GIF oder JPG. Überschreibt das Standard-Mastodon-Favicon mit einem eigenen Symbol. mascot: Überschreibt die Abbildung in der erweiterten Weboberfläche. media_cache_retention_period: Mediendateien aus Beiträgen von externen Nutzer*innen werden auf deinem Server zwischengespeichert. Wenn ein positiver Wert gesetzt ist, werden die Medien nach der festgelegten Anzahl von Tagen gelöscht. Sollten die Medien nach dem Löschvorgang wieder angefragt werden, werden sie erneut heruntergeladen, sofern der ursprüngliche Inhalt noch vorhanden ist. Es wird empfohlen, diesen Wert auf mindestens 14 Tage festzulegen, da die Häufigkeit der Abfrage von Linkvorschaukarten für Websites von Dritten begrenzt ist und die Linkvorschaukarten sonst nicht vor Ablauf dieser Zeit aktualisiert werden. peers_api_enabled: Eine Liste von Domains, die diesem Server im Fediverse begegnet sind. Hierbei werden keine Angaben darüber gemacht, ob du mit einem bestimmten Server föderierst, sondern nur, dass dein Server davon weiß. Dies wird von Diensten verwendet, die allgemein Statistiken übers Ferdiverse sammeln. diff --git a/config/locales/simple_form.hu.yml b/config/locales/simple_form.hu.yml index 8fee5b414d4c8a..6ccca2bc847928 100644 --- a/config/locales/simple_form.hu.yml +++ b/config/locales/simple_form.hu.yml @@ -83,7 +83,7 @@ hu: closed_registrations_message: Akkor jelenik meg, amikor a regisztráció le van zárva content_cache_retention_period: Minden más kiszolgálóról származó bejegyzés (megtolásokkal és válaszokkal együtt) törölve lesz a megadott számú nap elteltével, függetlenül a helyi felhasználók ezekkel a bejegyzésekkel történő interakcióitól. Ebben azok a bejegyzések is benne vannak, melyeket a helyi felhasználó könyvjelzőzött vagy kedvencnek jelölt. A különböző kiszolgálók felhasználói közötti privát üzenetek is el fognak veszni visszaállíthatatlanul. Ennek a beállításnak a használata különleges felhasználási esetekre javasolt, mert számos felhasználói elvárás fog eltörni, ha általános céllal használják. custom_css: A Mastodon webes verziójában használhatsz egyéni stílusokat. - favicon: WEBP, PNG, GIF vagy JPG. Az alapértelmezett Mastodon favicon felülírása egy egyéni ikonnal. + favicon: WEBP, PNG, GIF vagy JPG. Az alapértelmezett Mastodon favicont felülírja egy egyéni ikonnal. mascot: Felülbírálja a speciális webes felületen található illusztrációt. media_cache_retention_period: A távoli felhasználók bejegyzéseinek médiatartalmait a kiszolgálód gyorsítótárazza. Ha pozitív értékre állítják, ezek a médiatartalmak a megadott számú nap után törölve lesznek. Ha a médiát újra lekérik, miután törlődött, újra le fogjuk tölteni, ha az eredeti még elérhető. A hivatkozások előnézeti kártyáinak harmadik fél weboldalai felé történő hivatkozásaira alkalmazott megkötései miatt javasolt, hogy ezt az értéket legalább 14 napra állítsuk, ellenkező esetben a hivatkozások előnézeti kártyái szükség esetén nem fognak tudni frissülni ezen idő előtt. peers_api_enabled: Azon domainek listája, melyekkel ez a kiszolgáló találkozott a fediverzumban. Nem csatolunk adatot arról, hogy föderált kapcsolatban vagy-e az adott kiszolgálóval, csak arról, hogy a kiszolgálód tud a másikról. Ezt olyan szolgáltatások használják, melyek általában a föderációról készítenek statisztikákat. diff --git a/config/locales/simple_form.ia.yml b/config/locales/simple_form.ia.yml index c796cb5fac51e3..51329edd88e650 100644 --- a/config/locales/simple_form.ia.yml +++ b/config/locales/simple_form.ia.yml @@ -77,11 +77,13 @@ ia: warn: Celar le contento filtrate detra un aviso citante le titulo del filtro form_admin_settings: activity_api_enabled: Numeros de messages localmente publicate, usatores active, e nove registrationes in gruppos septimanal + app_icon: WEBP, PNG, GIF o JPG. Supplanta le icone predefinite sur apparatos mobile con un icone personalisate. backups_retention_period: Le usatores pote generar archivos de lor messages pro discargar los plus tarde. Quando predefinite a un valor positive, iste archivos sera automaticamente delite de tu immagazinage post le specificate numero de dies. bootstrap_timeline_accounts: Iste contos sera appunctate al summitate del recommendationes a sequer del nove usatores. closed_registrations_message: Monstrate quando le inscriptiones es claudite content_cache_retention_period: Tote messages de altere servitores (includite stimulos e responsas) sera delite post le specificate numero de dies, sin considerar alcun interaction de usator local con ille messages. Isto include messages ubi un usator local los ha marcate como marcapaginas o favoritos. Mentiones private inter usatores de differente instantias sera alsi perdite e impossibile a restaurar. Le uso de iste parametros es intendite pro specific instantias e infringe multe expectationes de usator quando implementate pro uso general. custom_css: Tu pote applicar stilos personalisate sur le version de web de Mastodon. + favicon: WEBP, PNG, GIF o JPG. Supplanta le favicone predefinite de Mastodon con un icone personalisate. mascot: Illo substitue le illustration in le interfacie web avantiate. media_cache_retention_period: Le files multimedial de messages producite per usatores remote es in cache sur tu servitor. Quando predefinite a un valor positive, le medios sera delite post le numero de dies specificate. Le datos multimedial requirite post que illo es delite, sera re-discargate, si le contento original sera ancora disponibile. Per limitationes sur le frequentia con que le schedas de pre-visualisation de ligamine scruta le sitos de tertie partes, il es recommendate de predefinir iste valor a al minus 14 dies, o le schedas de pre-visualisation de ligamine non sera actualisate sur demanda ante ille tempore. peers_api_enabled: Un lista de nomines de dominio que iste servitor ha incontrate in le fediverso. Nulle datos es includite ci re tu federation con un date servitor, justo que tu servitor lo cognosce. Isto es usate per servicios que collige statistica re le federation in senso general. diff --git a/config/locales/simple_form.it.yml b/config/locales/simple_form.it.yml index 5c0e6aa4e829f6..f5624344b9a3e7 100644 --- a/config/locales/simple_form.it.yml +++ b/config/locales/simple_form.it.yml @@ -77,11 +77,13 @@ it: warn: Nascondi il contenuto filtrato e mostra invece un avviso, citando il titolo del filtro form_admin_settings: activity_api_enabled: Conteggi di post pubblicati localmente, utenti attivi e nuove registrazioni in gruppi settimanali + app_icon: WEBP, PNG, GIF o JPG. Sostituisce l'icona dell'app predefinita sui dispositivi mobili con un'icona personalizzata. backups_retention_period: Gli utenti hanno la possibilità di generare archivi dei propri post da scaricare successivamente. Se impostati su un valore positivo, questi archivi verranno automaticamente eliminati dallo spazio di archiviazione dopo il numero di giorni specificato. bootstrap_timeline_accounts: Questi account verranno aggiunti in cima ai consigli da seguire dei nuovi utenti. closed_registrations_message: Visualizzato alla chiusura delle iscrizioni content_cache_retention_period: Tutti i post da altri server (inclusi booster e risposte) verranno eliminati dopo il numero specificato di giorni, senza tener conto di eventuali interazioni con gli utenti locali con tali post. Questo include i post in cui un utente locale ha contrassegnato come segnalibri o preferiti. Anche le menzioni private tra utenti di diverse istanze andranno perse e impossibile da ripristinare. L'uso di questa impostazione è inteso per casi di scopo speciale e rompe molte aspettative dell'utente quando implementato per uso generale. custom_css: È possibile applicare stili personalizzati sulla versione web di Mastodon. + favicon: WEBP, PNG, GIF o JPG. Sostituisce la favicon predefinita di Mastodon con un'icona personalizzata. mascot: Sostituisce l'illustrazione nell'interfaccia web avanzata. media_cache_retention_period: I file multimediali da post fatti da utenti remoti sono memorizzati nella cache sul tuo server. Quando impostato a un valore positivo, i media verranno eliminati dopo il numero specificato di giorni. Se i dati multimediali sono richiesti dopo che sono stati eliminati, saranno nuovamente scaricati, se il contenuto sorgente è ancora disponibile. A causa di restrizioni su quanto spesso link anteprima carte sondaggio siti di terze parti, si consiglia di impostare questo valore ad almeno 14 giorni, o le schede di anteprima link non saranno aggiornate su richiesta prima di quel tempo. peers_api_enabled: Un elenco di nomi di dominio che questo server ha incontrato nel fediverse. Qui non sono inclusi dati sul fatto se si federano con un dato server, solo che il server ne è a conoscenza. Questo viene utilizzato dai servizi che raccolgono statistiche sulla federazione in senso generale. diff --git a/config/locales/simple_form.ko.yml b/config/locales/simple_form.ko.yml index 6ab4e03222dd1d..df4755c4fbc15d 100644 --- a/config/locales/simple_form.ko.yml +++ b/config/locales/simple_form.ko.yml @@ -77,9 +77,11 @@ ko: warn: 필터 제목을 언급하는 경고 뒤에 걸러진 내용을 숨기기 form_admin_settings: activity_api_enabled: 주별 로컬에 게시된 글, 활성 사용자 및 새로운 가입자 수 + app_icon: WEBP, PNG, GIF 또는 JPG. 모바일 기기에 쓰이는 기본 아이콘을 대체합니다. bootstrap_timeline_accounts: 이 계정들은 팔로우 추천 목록 상단에 고정됩니다. closed_registrations_message: 새 가입을 차단했을 때 표시됩니다 custom_css: 사용자 지정 스타일을 웹 버전의 마스토돈에 지정할 수 있습니다. + favicon: WEBP, PNG, GIF 또는 JPG. 기본 파비콘을 대체합니다. mascot: 고급 웹 인터페이스의 그림을 대체합니다. peers_api_enabled: 이 서버가 연합우주에서 만났던 서버들에 대한 도메인 네임의 목록입니다. 해당 서버와 어떤 연합을 했는지에 대한 정보는 전혀 포함되지 않고, 단순히 그 서버를 알고 있는지에 대한 것입니다. 이것은 일반적으로 연합에 대한 통계를 수집할 때 사용됩니다. profile_directory: 프로필 책자는 발견되기를 희망하는 모든 사람들의 목록을 나열합니다. @@ -240,6 +242,7 @@ ko: backups_retention_period: 사용자 아카이브 유지 기한 bootstrap_timeline_accounts: 새로운 사용자들에게 추천할 계정들 closed_registrations_message: 가입이 불가능 할 때의 사용자 지정 메시지 + content_cache_retention_period: 리모트 콘텐츠 보유 기간 custom_css: 사용자 정의 CSS mascot: 사용자 정의 마스코트 (legacy) media_cache_retention_period: 미디어 캐시 유지 기한 diff --git a/config/locales/simple_form.lt.yml b/config/locales/simple_form.lt.yml index 1be95a9f1b471a..6631b59b19e7f0 100644 --- a/config/locales/simple_form.lt.yml +++ b/config/locales/simple_form.lt.yml @@ -49,7 +49,7 @@ lt: header: WEBP, PNG, GIF arba JPG. Ne daugiau kaip %{size}. Bus sumažintas iki %{dimensions} tšk. inbox_url: Nukopijuok URL adresą iš pradinio puslapio perdavėjo, kurį nori naudoti irreversible: Filtruoti įrašai išnyks negrįžtamai, net jei vėliau filtras bus pašalintas - locale: Naudotojo sąsajos kalba, el. laiškai ir stumiamieji pranešimai + locale: Naudotojo sąsajos kalba, el. laiškai ir tiesioginiai pranešimai password: Naudok bent 8 simbolius phrase: Bus suderinta, neatsižvelgiant į teksto lygį arba įrašo turinio įspėjimą scopes: Prie kurių API programai bus leidžiama pasiekti. Pasirinkus aukščiausio lygio sritį, atskirų sričių pasirinkti nereikia. diff --git a/config/locales/simple_form.nn.yml b/config/locales/simple_form.nn.yml index bdd3db040d1b38..a93a803221e1b9 100644 --- a/config/locales/simple_form.nn.yml +++ b/config/locales/simple_form.nn.yml @@ -77,12 +77,13 @@ nn: warn: Skjul det filtrerte innhaldet bak ei åtvaring som nemner tittelen på filteret form_admin_settings: activity_api_enabled: Tal på lokale innlegg, aktive brukarar og nyregistreringar kvar veke - app_icon: WEBP, PNG, GIF eller JPG. Overstyrer standard-ikonet på mobile einingar med eit tilpassa ikon. + app_icon: WEBP, PNG, GIF eller JPG. Overstyrer standard-app-ikonet på mobile einingar med eit eigendefinert ikon. backups_retention_period: Brukarar har moglegheit til å generere arkiv av sine innlegg for å laste ned seinare. Når sett til ein positiv verdi, blir desse arkiva automatisk sletta frå lagringa etter eit gitt antal dagar. bootstrap_timeline_accounts: Desse kontoane vil bli festa øverst på fylgjaranbefalingane til nye brukarar. closed_registrations_message: Vist når det er stengt for registrering content_cache_retention_period: Alle innlegg frå andre serverar (inkludert boostar og svar) vil bli sletta etter dei gitte antal dagar, uten hensyn til lokale brukarinteraksjonar med desse innlegga. Dette inkluderer innlegg der ein lokal brukar har merka det som bokmerker eller som favorittar. Òg private nemningar mellom brukarar frå ulike førekomstar vil gå tapt og vere umogleg å gjenskape. Bruk av denne innstillinga er rekna på spesielle førekomstar og bryt mange brukarforventingar når dette blir tatt i generell bruk. custom_css: Du kan bruka eigendefinerte stilar på nettversjonen av Mastodon. + favicon: WEBP, PNG, GIF eller JPG. Overstyrer det standarde Mastodon-favikonet med eit eigendefinert ikon. mascot: Overstyrer illustrasjonen i det avanserte webgrensesnittet. media_cache_retention_period: Mediafiler frå innlegg laga av eksterne brukarar blir bufra på serveren din. Når sett til ein positiv verdi, slettast media etter eit gitt antal dagar. Viss mediedata blir førespurt etter det er sletta, vil dei bli lasta ned på nytt viss kjelda sitt innhald framleis er tilgjengeleg. På grunn av restriksjonar på kor ofte lenkeførehandsvisningskort lastar tredjepart-nettstadar, rådast det til å setje denne verdien til minst 14 dagar, eller at førehandsvisningskort ikkje blir oppdatert på førespurnad før det tidspunktet. peers_api_enabled: Ei liste over domenenamn denne tenaren har møtt på i allheimen. Det står ingenting om tenaren din samhandlar med ein annan tenar, berre om tenaren din veit om den andre. Dette blir brukt av tenester som samlar statistikk om føderering i det heile. diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index 9044546f2b12fc..77a0d8cd6f576b 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -77,10 +77,15 @@ pt-BR: warn: Ocultar o conteúdo filtrado por trás de um aviso mencionando o título do filtro form_admin_settings: activity_api_enabled: Contagem de publicações locais, usuários ativos e novos usuários semanais + app_icon: WEBP, PNG, GIF ou JPG. Sobrescrever o ícone padrão do aplicativo em dispositivos móveis com um ícone personalizado. + backups_retention_period: Os usuários têm a capacidade de gerar arquivos de suas postagens para baixar mais tarde. Quando definido como um valor positivo, esses arquivos serão automaticamente excluídos do seu armazenamento após o número especificado de dias. bootstrap_timeline_accounts: Estas contas serão fixadas no topo das recomendações de novos usuários para seguir. closed_registrations_message: Exibido quando as inscrições estiverem fechadas + content_cache_retention_period: Todas as postagens de outros servidores (incluindo boosts e respostas) serão excluídas após o número especificado de dias, sem levar a qualquer interação do usuário local com esses posts. Isto inclui postagens onde um usuário local o marcou como favorito ou favoritos. Menções privadas entre usuários de diferentes instâncias também serão perdidas e impossíveis de restaurar. O uso desta configuração destina-se a instâncias especiais de propósitos e quebra muitas expectativas dos usuários quando implementadas para uso de propósito geral. custom_css: Você pode aplicar estilos personalizados na versão da web do Mastodon. + favicon: WEBP, PNG, GIF ou JPG. Sobrescreve o favicon padrão do Mastodon com um ícone personalizado. mascot: Substitui a ilustração na interface web avançada. + media_cache_retention_period: Arquivos de mídia de mensagens de usuários remotos são armazenados em cache no seu servidor. Quando definido como valor positivo, a mídia será excluída após o número especificado de dias. Se os dados da mídia forem solicitados depois de excluídos, eles serão baixados novamente, se o conteúdo fonte ainda estiver disponível. Devido a restrições de quantas vezes os cartões de visualização de links sondam sites de terceiros, é recomendado definir este valor em pelo menos 14 dias, ou pré-visualização de links não serão atualizados a pedido antes desse tempo. peers_api_enabled: Uma lista de nomes de domínio que este servidor encontrou no "fediverse". Nenhum dado é incluído aqui sobre se você concorda com os padroes operacionais de um determinado servidor, apenas que o seu servidor sabe disso. Esta ferramenta é utilizado por serviços que recolhem estatísticas sob as normas da federação (grupo de empresas que concordam sob paramentros operacionais específicos), em termos gerais. profile_directory: O diretório de perfis lista todos os usuários que optaram por permitir que suas contas sejam descobertas. require_invite_text: 'Quando o cadastro de novas contas exigir aprovação manual, tornar obrigatório, ao invés de opcional, o texto de solicitação de convite: "Por que você deseja ingressar nessa comunidade?"' diff --git a/config/locales/simple_form.ro.yml b/config/locales/simple_form.ro.yml index 559302270805f3..dfb44c77453e56 100644 --- a/config/locales/simple_form.ro.yml +++ b/config/locales/simple_form.ro.yml @@ -163,5 +163,6 @@ ro: 'no': Nu recommended: Recomandat required: + mark: "*" text: obligatoriu 'yes': Da diff --git a/config/locales/simple_form.sq.yml b/config/locales/simple_form.sq.yml index d545f2cd341cba..c3c3920962d635 100644 --- a/config/locales/simple_form.sq.yml +++ b/config/locales/simple_form.sq.yml @@ -77,11 +77,13 @@ sq: warn: Fshihe lëndën e filtruar pas një sinjalizimi që përmend titullin e filtrit form_admin_settings: activity_api_enabled: Numër postimesh të botuar lokalisht, përdoruesish aktiv dhe regjistrimesh të reja sipas matjesh javore + app_icon: WEBP, PNG, GIF, ose JPG. Anashkalon ikonë parazgjedhje aplikacioni në pajisje celulare me një ikonë vetjake. backups_retention_period: Përdorues kanë aftësinë të prodhojnë arkiva të postimeve të tyre për t’i shkarkuar më vonë. Kur i jepet një vlerë pozitive, këto arkiva do të fshihen automatikisht prej depozitës tuaj pas numrit të dhënë të ditëve. bootstrap_timeline_accounts: Këto llogari do të fiksohen në krye të rekomandimeve për ndjekje nga përdorues të rinj. closed_registrations_message: Shfaqur kur mbyllen dritare regjistrimesh content_cache_retention_period: Krejt postimet prej shërbyesve të tjerë (përfshi përforcime dhe përgjigje) do të fshihen pas numrit të caktuar të ditëve, pa marrë parasysh çfarëdo ndërveprimi përdoruesi me këto postime. Kjo përfshin postime kur një përdorues vendor u ka vënë shenjë si faqerojtës, ose të parapëlqyer. Do të humbin gjithashtu dhe përmendje private mes përdoruesish nga instanca të ndryshme dhe s’do të jetë e mundshme të rikthehen. Përdorimi i këtij rregullimi është menduar për instanca me qëllim të caktuar dhe ndërhyn në çka presin mjaft përdorues, kur sendërtohet për përdorim të përgjithshëm. custom_css: Stile vetjakë mund të aplikoni në versionin web të Mastodon-it. + favicon: WEBP, PNG, GIF, ose JPG. Anashkalon favikonën parazgjedhje Mastodon me një ikonë vetjake. mascot: Anashkalon ilustrimin te ndërfaqja web e thelluar. media_cache_retention_period: Kartela media nga postime të bëra nga përdorues të largët ruhen në një fshehtinë në shërbyesin tuaj. Kur i jepet një vlerë pozitive, media do të fshihet pas numrit të dhënë të ditëve. Nëse të dhënat e medias duhen pas fshirjes, do të rishkarkohen, nëse lënda burim mund të kihet ende. Për shkak kufizimesh mbi sa shpesh skeda paraparjesh lidhjesh ndërveprojnë me sajte palësh të treta, rekomandohet të vihet kjo vlerë të paktën 14 ditë, ose skedat e paraparjes së lidhje s’do të përditësohen duke e kërkuar para asaj kohe. peers_api_enabled: Një listë emrash përkatësish që ky shërbyes ka hasur në fedivers. Këtu s’jepen të dhëna nëse jeni i federuar me shërbyesin e dhënë, thjesht tregohet se shërbyesi juaj e njeh. Kjo përdoret nga shërbime që mbledhin statistika mbi federimin në kuptimin e përgjithshëm. diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 5d0ebe2de04883..71e84a1d54daf3 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -671,7 +671,7 @@ uk: delete_html: 'Ви збираєтеся вилучити деякі з дописів @%{acct}. Це буде:' mark_as_sensitive_html: 'Ви збираєтеся позначити деякі з дописів @%{acct} делікатними. Це буде:' silence_html: 'Ви збираєтеся обмежити обліковий запис @%{acct}. Це буде:' - suspend_html: 'Ви збираєтесь призупинити обліковий запис @%%{acct}. Це буде:' + suspend_html: 'Ви збираєтесь призупинити обліковий запис @%{acct}. Це буде:' actions: delete_html: Вилучити образливі дописи mark_as_sensitive_html: Позначити медіа образливих дописів делікатними From 040aaf3a48022edab19ac42980a6c5a991156ec9 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 10 May 2024 05:42:01 -0400 Subject: [PATCH 009/113] Use `default: ...` assignment for Devise config, fixes `Style/ClassVars` cop (#30214) --- .rubocop_todo.yml | 4 --- config/initializers/devise.rb | 55 ++++++++++++----------------------- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 25b573017b89bc..4d20330e0e2d71 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -54,10 +54,6 @@ Style/ClassEqualityComparison: - 'app/helpers/jsonld_helper.rb' - 'app/serializers/activitypub/outbox_serializer.rb' -Style/ClassVars: - Exclude: - - 'config/initializers/devise.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowedVars. Style/FetchEnvVar: diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index f935090efc2b9b..a95c7437fa073b 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -38,42 +38,25 @@ end module Devise - mattr_accessor :pam_authentication - @@pam_authentication = false - mattr_accessor :pam_controlled_service - @@pam_controlled_service = nil - - mattr_accessor :check_at_sign - @@check_at_sign = false - - mattr_accessor :ldap_authentication - @@ldap_authentication = false - mattr_accessor :ldap_host - @@ldap_host = nil - mattr_accessor :ldap_port - @@ldap_port = nil - mattr_accessor :ldap_method - @@ldap_method = nil - mattr_accessor :ldap_base - @@ldap_base = nil - mattr_accessor :ldap_uid - @@ldap_uid = nil - mattr_accessor :ldap_mail - @@ldap_mail = nil - mattr_accessor :ldap_bind_dn - @@ldap_bind_dn = nil - mattr_accessor :ldap_password - @@ldap_password = nil - mattr_accessor :ldap_tls_no_verify - @@ldap_tls_no_verify = false - mattr_accessor :ldap_search_filter - @@ldap_search_filter = nil - mattr_accessor :ldap_uid_conversion_enabled - @@ldap_uid_conversion_enabled = false - mattr_accessor :ldap_uid_conversion_search - @@ldap_uid_conversion_search = nil - mattr_accessor :ldap_uid_conversion_replace - @@ldap_uid_conversion_replace = nil + mattr_accessor :pam_authentication, default: false + mattr_accessor :pam_controlled_service, default: nil + + mattr_accessor :check_at_sign, default: false + + mattr_accessor :ldap_authentication, default: false + mattr_accessor :ldap_host, default: nil + mattr_accessor :ldap_port, default: nil + mattr_accessor :ldap_method, default: nil + mattr_accessor :ldap_base, default: nil + mattr_accessor :ldap_uid, default: nil + mattr_accessor :ldap_mail, default: nil + mattr_accessor :ldap_bind_dn, default: nil + mattr_accessor :ldap_password, default: nil + mattr_accessor :ldap_tls_no_verify, default: false + mattr_accessor :ldap_search_filter, default: nil + mattr_accessor :ldap_uid_conversion_enabled, default: false + mattr_accessor :ldap_uid_conversion_search, default: nil + mattr_accessor :ldap_uid_conversion_replace, default: nil module Strategies class PamAuthenticatable From fa43a6c8355ae53c0609999e1891023626ab4217 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 10 May 2024 05:43:59 -0400 Subject: [PATCH 010/113] Use more accurate `redirect_uri` in oauth spec (#30212) --- spec/system/oauth_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/oauth_spec.rb b/spec/system/oauth_spec.rb index 060978217f2721..3b98ad352b663b 100644 --- a/spec/system/oauth_spec.rb +++ b/spec/system/oauth_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' describe 'Using OAuth from an external app' do - let(:client_app) { Doorkeeper::Application.create!(name: 'test', redirect_uri: 'http://localhost/health', scopes: 'read') } + let(:client_app) { Doorkeeper::Application.create!(name: 'test', redirect_uri: about_url(host: Rails.application.config.x.local_domain), scopes: 'read') } context 'when the user is already logged in' do let!(:user) { Fabricate(:user) } From f3f63107f263db86021565dad79be497db9e5257 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 11:59:15 +0200 Subject: [PATCH 011/113] Update dependency @reduxjs/toolkit to v2.2.4 (#30223) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 28cf500466b1cf..9aa8125d58b10d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3047,13 +3047,13 @@ __metadata: linkType: hard "@reduxjs/toolkit@npm:^2.0.1": - version: 2.2.3 - resolution: "@reduxjs/toolkit@npm:2.2.3" + version: 2.2.4 + resolution: "@reduxjs/toolkit@npm:2.2.4" dependencies: immer: "npm:^10.0.3" redux: "npm:^5.0.1" redux-thunk: "npm:^3.1.0" - reselect: "npm:^5.0.1" + reselect: "npm:^5.1.0" peerDependencies: react: ^16.9.0 || ^17.0.0 || ^18 react-redux: ^7.2.1 || ^8.1.3 || ^9.0.0 @@ -3062,7 +3062,7 @@ __metadata: optional: true react-redux: optional: true - checksum: 10c0/f10f2c8f4b6c5c7a65d8d60246bdfde86b6cd2f542210ebdda8002223c7f4e99ed32964825e63f37345d9d12532671150fcec2809a40690931ae44afe8aba7f8 + checksum: 10c0/fdbf510210a5aa4864432397e1a9469367e297cd1d9c09a82e68638df7555672c2f8511fe76f933b00efbbb233c534831591772a44e8c41233e34f3cd0f54569 languageName: node linkType: hard @@ -14987,10 +14987,10 @@ __metadata: languageName: node linkType: hard -"reselect@npm:^5.0.1": - version: 5.0.1 - resolution: "reselect@npm:5.0.1" - checksum: 10c0/0724b4555cd6411849de334a75177780f127af849eb71c4b709966d07ade8090d125c0c926dc6cf936866d23ebadda6aad1da93cd8340525323b889f25d56d51 +"reselect@npm:^5.1.0": + version: 5.1.0 + resolution: "reselect@npm:5.1.0" + checksum: 10c0/b0ed789f4f6f10dfbd23741823726793384932969aa7ce8f584c882ad87620a02b09b5d1146cd2ea6eaa0953b3fd9f7df22f113893af73f35f28432a8a4294de languageName: node linkType: hard From e20f2e7300d326bd637bec691607ad4c0e70dc8f Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 10 May 2024 08:34:20 -0400 Subject: [PATCH 012/113] Update i18n to version 1.14.5 (#30198) --- Gemfile | 2 +- Gemfile.lock | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index eb507e9d1859ff..c7e07f9642a49b 100644 --- a/Gemfile +++ b/Gemfile @@ -57,7 +57,7 @@ gem 'htmlentities', '~> 4.3' gem 'http', '~> 5.2.0' gem 'http_accept_language', '~> 2.1' gem 'httplog', '~> 1.6.2' -gem 'i18n', '1.14.1' # TODO: Remove version when resolved: https://github.com/glebm/i18n-tasks/issues/552 / https://github.com/ruby-i18n/i18n/pull/688 +gem 'i18n' gem 'idn-ruby', require: 'idn' gem 'inline_svg' gem 'kaminari', '~> 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 9df960e61809b5..b4db2b9a073c34 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,14 +130,7 @@ GEM erubi (>= 1.0.0) rack (>= 0.9.0) rouge (>= 1.0.0) - better_html (2.1.1) - actionview (>= 6.0) - activesupport (>= 6.0) - ast (~> 2.0) - erubi (~> 1.4) - parser (>= 2.4) - smart_properties - bigdecimal (3.1.7) + bigdecimal (3.1.8) bindata (2.5.0) binding_of_caller (1.0.1) debug_inspector (>= 1.2.0) @@ -328,12 +321,11 @@ GEM httplog (1.6.3) rack (>= 2.0) rainbow (>= 2.0.0) - i18n (1.14.1) + i18n (1.14.5) concurrent-ruby (~> 1.0) - i18n-tasks (1.0.13) + i18n-tasks (1.0.14) activesupport (>= 4.0.2) ast (>= 2.1.0) - better_html (>= 1.0, < 3.0) erubi highline (>= 2.0.0) i18n @@ -601,7 +593,7 @@ GEM redlock (1.3.2) redis (>= 3.0.0, < 6.0) regexp_parser (2.9.0) - reline (0.5.5) + reline (0.5.6) io-console (~> 0.5) request_store (1.6.0) rack (>= 1.4) @@ -723,7 +715,6 @@ GEM simplecov-html (0.12.3) simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) - smart_properties (1.17.0) stackprof (0.2.26) statsd-ruby (1.5.0) stoplight (4.1.0) @@ -860,7 +851,7 @@ DEPENDENCIES http (~> 5.2.0) http_accept_language (~> 2.1) httplog (~> 1.6.2) - i18n (= 1.14.1) + i18n i18n-tasks (~> 1.0) idn-ruby inline_svg From 164b09bfcc7d2b8c3619411ee06f530256d9fe4b Mon Sep 17 00:00:00 2001 From: Joshua Young Date: Fri, 10 May 2024 22:34:32 +1000 Subject: [PATCH 013/113] Update README.md setup steps (#30063) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d0e75dabad762..0353a4c675455f 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Mastodon acts as an OAuth2 provider, so 3rd party apps can use the REST and Stre - **PostgreSQL** 12+ - **Redis** 4+ - **Ruby** 3.1+ -- **Node.js** 16+ +- **Node.js** 18+ The repository includes deployment configurations for **Docker and docker-compose** as well as specific platforms like **Heroku**, **Scalingo**, and **Nanobox**. For Helm charts, reference the [mastodon/chart repository](https://github.com/mastodon/chart). The [**standalone** installation guide](https://docs.joinmastodon.org/admin/install/) is available in the documentation. @@ -91,10 +91,12 @@ A **Vagrant** configuration is included for development purposes. To use it, com To set up **MacOS** for native development, complete the following steps: - Use a Ruby version manager to install the specified version from `.ruby-version` +- Run `bundle` to install required gems - Run `brew install postgresql@14 redis imagemagick libidn` to install required dependencies - Navigate to Mastodon's root directory and run `brew install nvm` then `nvm use` to use the version from `.nvmrc` +- Run `yarn` to install required packages - Run `corepack enable && corepack prepare` -- Run `bundle exec rails db:setup` (optionally prepend `RAILS_ENV=development` to target the dev environment) +- Run `RAILS_ENV=development bundle exec rails db:setup` - Finally, run `bin/dev` which will launch the local services via `overmind` (if installed) or `foreman` ### Docker From 0d397db5dd803fab2b7ddda9ae0dd5c26f4880a6 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 10 May 2024 08:36:09 -0400 Subject: [PATCH 014/113] Consolidate system specs into single directory, use rspec tags for configuration (#30206) --- .github/workflows/test-ruby.yml | 4 ++- .rubocop_todo.yml | 2 +- lib/tasks/spec.rake | 13 ------- spec/rails_helper.rb | 36 ++++++++----------- spec/requests/content_security_policy_spec.rb | 2 +- spec/support/capybara.rb | 4 +++ spec/support/javascript_errors.rb | 2 +- spec/support/streaming_server_manager.rb | 4 +-- .../admin/accounts_spec.rb | 0 .../admin/custom_emojis_spec.rb | 0 .../admin/domain_blocks_spec.rb | 0 .../admin/email_domain_blocks_spec.rb | 0 .../admin/ip_blocks_spec.rb | 0 .../admin/software_updates_spec.rb | 0 .../admin/statuses_spec.rb | 0 .../links/preview_card_providers_spec.rb | 0 .../admin/trends/links_spec.rb | 0 .../admin/trends/statuses_spec.rb | 0 .../admin/trends/tags_spec.rb | 0 spec/{features => system}/captcha_spec.rb | 0 spec/{features => system}/log_in_spec.rb | 0 spec/system/new_statuses_spec.rb | 2 +- spec/system/oauth_spec.rb | 2 +- spec/system/ocr_spec.rb | 2 +- spec/{features => system}/profile_spec.rb | 0 .../{features => system}/redirections_spec.rb | 0 spec/system/report_interface_spec.rb | 2 +- .../severed_relationships_spec.rb | 0 spec/system/share_entrypoint_spec.rb | 2 +- spec/system/unlogged_spec.rb | 2 +- 30 files changed, 32 insertions(+), 47 deletions(-) delete mode 100644 lib/tasks/spec.rake rename spec/{features => system}/admin/accounts_spec.rb (100%) rename spec/{features => system}/admin/custom_emojis_spec.rb (100%) rename spec/{features => system}/admin/domain_blocks_spec.rb (100%) rename spec/{features => system}/admin/email_domain_blocks_spec.rb (100%) rename spec/{features => system}/admin/ip_blocks_spec.rb (100%) rename spec/{features => system}/admin/software_updates_spec.rb (100%) rename spec/{features => system}/admin/statuses_spec.rb (100%) rename spec/{features => system}/admin/trends/links/preview_card_providers_spec.rb (100%) rename spec/{features => system}/admin/trends/links_spec.rb (100%) rename spec/{features => system}/admin/trends/statuses_spec.rb (100%) rename spec/{features => system}/admin/trends/tags_spec.rb (100%) rename spec/{features => system}/captcha_spec.rb (100%) rename spec/{features => system}/log_in_spec.rb (100%) rename spec/{features => system}/profile_spec.rb (100%) rename spec/{features => system}/redirections_spec.rb (100%) rename spec/{features => system}/severed_relationships_spec.rb (100%) diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index 84b907570837f2..45dc8a0deb816e 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -186,6 +186,8 @@ jobs: DISABLE_SIMPLECOV: true RAILS_ENV: test BUNDLE_WITH: test + LOCAL_DOMAIN: localhost:3000 + LOCAL_HTTPS: false strategy: fail-fast: false @@ -215,7 +217,7 @@ jobs: - name: Load database schema run: './bin/rails db:create db:schema:load db:seed' - - run: bundle exec rake spec:system + - run: bin/rspec spec/system --tag streaming --tag js - name: Archive logs uses: actions/upload-artifact@v4 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4d20330e0e2d71..91e666d7f47446 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -70,7 +70,7 @@ Style/FetchEnvVar: - 'config/initializers/vapid.rb' - 'lib/mastodon/redis_config.rb' - 'lib/tasks/repo.rake' - - 'spec/features/profile_spec.rb' + - 'spec/system/profile_spec.rb' # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns. diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake deleted file mode 100644 index d505a471953096..00000000000000 --- a/lib/tasks/spec.rake +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -if Rake::Task.task_defined?('spec:system') - namespace :spec do - task :enable_system_specs do # rubocop:disable Rails/RakeEnvironment - ENV['LOCAL_DOMAIN'] = 'localhost:3000' - ENV['LOCAL_HTTPS'] = 'false' - ENV['RUN_SYSTEM_SPECS'] = 'true' - end - end - - Rake::Task['spec:system'].enhance ['spec:enable_system_specs'] -end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 89fc25bcbdfb09..d8eb561d42446d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -3,12 +3,8 @@ ENV['RAILS_ENV'] ||= 'test' # This needs to be defined before Rails is initialized -RUN_SYSTEM_SPECS = ENV.fetch('RUN_SYSTEM_SPECS', false) - -if RUN_SYSTEM_SPECS - STREAMING_PORT = ENV.fetch('TEST_STREAMING_PORT', '4020') - ENV['STREAMING_API_BASE_URL'] = "http://localhost:#{STREAMING_PORT}" -end +STREAMING_PORT = ENV.fetch('TEST_STREAMING_PORT', '4020') +ENV['STREAMING_API_BASE_URL'] = "http://localhost:#{STREAMING_PORT}" require File.expand_path('../config/environment', __dir__) @@ -26,10 +22,12 @@ Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f } ActiveRecord::Migration.maintain_test_schema! -WebMock.disable_net_connect!(allow: Chewy.settings[:host], allow_localhost: RUN_SYSTEM_SPECS) +WebMock.disable_net_connect!( + allow_localhost: true, + allow: Chewy.settings[:host] +) Sidekiq.logger = nil -# System tests config DatabaseCleaner.strategy = [:deletion] Devise::Test::ControllerHelpers.module_eval do @@ -49,16 +47,14 @@ def sign_in(resource, _deprecated = nil, scope: nil) end RSpec.configure do |config| - # This is set before running spec:system, see lib/tasks/tests.rake - config.filter_run_excluding type: lambda { |type| - case type - when :system - !RUN_SYSTEM_SPECS - end - } + # By default, skip specs that need full JS browser + config.filter_run_excluding :js - # By default, skip the elastic search integration specs - config.filter_run_excluding search: true + # By default, skip specs that need elastic search server + config.filter_run_excluding :search + + # By default, skip specs that need the streaming server + config.filter_run_excluding :streaming config.fixture_paths = [ Rails.root.join('spec', 'fixtures'), @@ -81,7 +77,7 @@ def sign_in(resource, _deprecated = nil, scope: nil) config.include Devise::Test::ControllerHelpers, type: :controller config.include Devise::Test::ControllerHelpers, type: :helper config.include Devise::Test::ControllerHelpers, type: :view - config.include Devise::Test::IntegrationHelpers, type: :feature + config.include Devise::Test::IntegrationHelpers, type: :system config.include Devise::Test::IntegrationHelpers, type: :request config.include ActionMailer::TestHelper config.include Paperclip::Shoulda::Matchers @@ -111,10 +107,6 @@ def sign_in(resource, _deprecated = nil, scope: nil) stub_reset_connection_pools end - config.before :each, type: :feature do - Capybara.current_driver = :rack_test - end - config.before do |example| allow(Resolv::DNS).to receive(:open).and_raise('Real DNS queries are disabled, stub Resolv::DNS as needed') unless example.metadata[:type] == :system end diff --git a/spec/requests/content_security_policy_spec.rb b/spec/requests/content_security_policy_spec.rb index d4447dca4befc5..ba6fe47741665b 100644 --- a/spec/requests/content_security_policy_spec.rb +++ b/spec/requests/content_security_policy_spec.rb @@ -23,7 +23,7 @@ def expected_csp_headers <<~CSP.split("\n").map(&:strip) base-uri 'none' child-src 'self' blob: https://cb6e6126.ngrok.io - connect-src 'self' data: blob: https://cb6e6126.ngrok.io ws://cb6e6126.ngrok.io:4000 + connect-src 'self' data: blob: https://cb6e6126.ngrok.io #{Rails.configuration.x.streaming_api_base_url} default-src 'none' font-src 'self' https://cb6e6126.ngrok.io form-action 'self' diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index d4f27e209e11a6..be1378ffac73b2 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -26,6 +26,10 @@ RSpec.configure do |config| config.before(:each, type: :system) do + driven_by :rack_test + end + + config.before(:each, :js, type: :system) do driven_by Capybara.javascript_driver end end diff --git a/spec/support/javascript_errors.rb b/spec/support/javascript_errors.rb index a36bf6017e3233..28a43b3b8a59aa 100644 --- a/spec/support/javascript_errors.rb +++ b/spec/support/javascript_errors.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.configure do |config| - config.after(:each, type: :system) do + config.after(:each, :js, type: :system) do errors = page.driver.browser.logs.get(:browser) if errors.present? aggregate_failures 'javascript errrors' do diff --git a/spec/support/streaming_server_manager.rb b/spec/support/streaming_server_manager.rb index b702fc77cef597..3facf16b8ebab2 100644 --- a/spec/support/streaming_server_manager.rb +++ b/spec/support/streaming_server_manager.rb @@ -95,7 +95,7 @@ def stop end end - config.around :each, type: :system do |example| + config.around :each, :streaming, type: :system do |example| # Streaming server needs DB access but `use_transactional_tests` rolls back # every transaction. Disable this feature for streaming tests, and use # DatabaseCleaner to clean the database tables between each test. @@ -125,6 +125,6 @@ def streaming_server_manager end def streaming_examples_present? - RUN_SYSTEM_SPECS + RSpec.world.filtered_examples.values.flatten.any? { |example| example.metadata[:streaming] == true } end end diff --git a/spec/features/admin/accounts_spec.rb b/spec/system/admin/accounts_spec.rb similarity index 100% rename from spec/features/admin/accounts_spec.rb rename to spec/system/admin/accounts_spec.rb diff --git a/spec/features/admin/custom_emojis_spec.rb b/spec/system/admin/custom_emojis_spec.rb similarity index 100% rename from spec/features/admin/custom_emojis_spec.rb rename to spec/system/admin/custom_emojis_spec.rb diff --git a/spec/features/admin/domain_blocks_spec.rb b/spec/system/admin/domain_blocks_spec.rb similarity index 100% rename from spec/features/admin/domain_blocks_spec.rb rename to spec/system/admin/domain_blocks_spec.rb diff --git a/spec/features/admin/email_domain_blocks_spec.rb b/spec/system/admin/email_domain_blocks_spec.rb similarity index 100% rename from spec/features/admin/email_domain_blocks_spec.rb rename to spec/system/admin/email_domain_blocks_spec.rb diff --git a/spec/features/admin/ip_blocks_spec.rb b/spec/system/admin/ip_blocks_spec.rb similarity index 100% rename from spec/features/admin/ip_blocks_spec.rb rename to spec/system/admin/ip_blocks_spec.rb diff --git a/spec/features/admin/software_updates_spec.rb b/spec/system/admin/software_updates_spec.rb similarity index 100% rename from spec/features/admin/software_updates_spec.rb rename to spec/system/admin/software_updates_spec.rb diff --git a/spec/features/admin/statuses_spec.rb b/spec/system/admin/statuses_spec.rb similarity index 100% rename from spec/features/admin/statuses_spec.rb rename to spec/system/admin/statuses_spec.rb diff --git a/spec/features/admin/trends/links/preview_card_providers_spec.rb b/spec/system/admin/trends/links/preview_card_providers_spec.rb similarity index 100% rename from spec/features/admin/trends/links/preview_card_providers_spec.rb rename to spec/system/admin/trends/links/preview_card_providers_spec.rb diff --git a/spec/features/admin/trends/links_spec.rb b/spec/system/admin/trends/links_spec.rb similarity index 100% rename from spec/features/admin/trends/links_spec.rb rename to spec/system/admin/trends/links_spec.rb diff --git a/spec/features/admin/trends/statuses_spec.rb b/spec/system/admin/trends/statuses_spec.rb similarity index 100% rename from spec/features/admin/trends/statuses_spec.rb rename to spec/system/admin/trends/statuses_spec.rb diff --git a/spec/features/admin/trends/tags_spec.rb b/spec/system/admin/trends/tags_spec.rb similarity index 100% rename from spec/features/admin/trends/tags_spec.rb rename to spec/system/admin/trends/tags_spec.rb diff --git a/spec/features/captcha_spec.rb b/spec/system/captcha_spec.rb similarity index 100% rename from spec/features/captcha_spec.rb rename to spec/system/captcha_spec.rb diff --git a/spec/features/log_in_spec.rb b/spec/system/log_in_spec.rb similarity index 100% rename from spec/features/log_in_spec.rb rename to spec/system/log_in_spec.rb diff --git a/spec/system/new_statuses_spec.rb b/spec/system/new_statuses_spec.rb index 5a3f1b406bef29..725ea8fe5209d4 100644 --- a/spec/system/new_statuses_spec.rb +++ b/spec/system/new_statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'NewStatuses', :sidekiq_inline do +describe 'NewStatuses', :js, :sidekiq_inline, :streaming do include ProfileStories subject { page } diff --git a/spec/system/oauth_spec.rb b/spec/system/oauth_spec.rb index 3b98ad352b663b..1c9aca3114113c 100644 --- a/spec/system/oauth_spec.rb +++ b/spec/system/oauth_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Using OAuth from an external app' do +describe 'Using OAuth from an external app', :js, :streaming do let(:client_app) { Doorkeeper::Application.create!(name: 'test', redirect_uri: about_url(host: Rails.application.config.x.local_domain), scopes: 'read') } context 'when the user is already logged in' do diff --git a/spec/system/ocr_spec.rb b/spec/system/ocr_spec.rb index 254efa71370aff..4f4941adca581c 100644 --- a/spec/system/ocr_spec.rb +++ b/spec/system/ocr_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OCR', :paperclip_processing, :sidekiq_inline do +describe 'OCR', :js, :paperclip_processing, :sidekiq_inline, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/features/profile_spec.rb b/spec/system/profile_spec.rb similarity index 100% rename from spec/features/profile_spec.rb rename to spec/system/profile_spec.rb diff --git a/spec/features/redirections_spec.rb b/spec/system/redirections_spec.rb similarity index 100% rename from spec/features/redirections_spec.rb rename to spec/system/redirections_spec.rb diff --git a/spec/system/report_interface_spec.rb b/spec/system/report_interface_spec.rb index 6eba5525594f39..f82604aae89643 100644 --- a/spec/system/report_interface_spec.rb +++ b/spec/system/report_interface_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'report interface', :paperclip_processing do +describe 'report interface', :js, :paperclip_processing, :streaming do include ProfileStories let(:email) { 'admin@example.com' } diff --git a/spec/features/severed_relationships_spec.rb b/spec/system/severed_relationships_spec.rb similarity index 100% rename from spec/features/severed_relationships_spec.rb rename to spec/system/severed_relationships_spec.rb diff --git a/spec/system/share_entrypoint_spec.rb b/spec/system/share_entrypoint_spec.rb index 126a816bcc3cef..5fdbeacefa407a 100644 --- a/spec/system/share_entrypoint_spec.rb +++ b/spec/system/share_entrypoint_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'ShareEntrypoint' do +describe 'ShareEntrypoint', :js, :streaming do include ProfileStories subject { page } diff --git a/spec/system/unlogged_spec.rb b/spec/system/unlogged_spec.rb index c3ebf51d7fb098..417ccdaeb65668 100644 --- a/spec/system/unlogged_spec.rb +++ b/spec/system/unlogged_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'UnloggedBrowsing' do +describe 'UnloggedBrowsing', :js, :streaming do subject { page } before do From 68b9fe824d6cc8154efe46829fa0fcd26a5b9a5d Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Fri, 10 May 2024 14:40:20 +0200 Subject: [PATCH 015/113] Add OpenTelemetry instrumentation (#30130) Co-authored-by: Juliano Costa Co-authored-by: Robb Kidd --- Gemfile | 18 +++++ Gemfile.lock | 108 +++++++++++++++++++++++++++ config/initializers/opentelemetry.rb | 63 ++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 config/initializers/opentelemetry.rb diff --git a/Gemfile b/Gemfile index c7e07f9642a49b..247865aacfd5f5 100644 --- a/Gemfile +++ b/Gemfile @@ -103,6 +103,24 @@ gem 'rdf-normalize', '~> 0.5' gem 'private_address_check', '~> 0.5' +group :opentelemetry do + gem 'opentelemetry-exporter-otlp', '~> 0.26.3', require: false + gem 'opentelemetry-instrumentation-active_job', '~> 0.7.1', require: false + gem 'opentelemetry-instrumentation-active_model_serializers', '~> 0.20.1', require: false + gem 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.21.2', require: false + gem 'opentelemetry-instrumentation-excon', '~> 0.22.0', require: false + gem 'opentelemetry-instrumentation-faraday', '~> 0.24.1', require: false + gem 'opentelemetry-instrumentation-http', '~> 0.23.2', require: false + gem 'opentelemetry-instrumentation-http_client', '~> 0.22.3', require: false + gem 'opentelemetry-instrumentation-net_http', '~> 0.22.4', require: false + gem 'opentelemetry-instrumentation-pg', '~> 0.27.1', require: false + gem 'opentelemetry-instrumentation-rack', '~> 0.24.1', require: false + gem 'opentelemetry-instrumentation-rails', '~> 0.30.0', require: false + gem 'opentelemetry-instrumentation-redis', '~> 0.25.3', require: false + gem 'opentelemetry-instrumentation-sidekiq', '~> 0.25.2', require: false + gem 'opentelemetry-sdk', '~> 1.4', require: false +end + group :test do # Adds RSpec Error/Warning annotations to GitHub PRs on the Files tab gem 'rspec-github', '~> 2.4', require: false diff --git a/Gemfile.lock b/Gemfile.lock index b4db2b9a073c34..b96afef2cc341d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -284,6 +284,9 @@ GEM ruby-progressbar (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) + google-protobuf (3.25.3) + googleapis-common-protos-types (1.14.0) + google-protobuf (~> 3.18) haml (6.3.0) temple (>= 0.8.2) thor @@ -483,6 +486,96 @@ GEM openssl (3.2.0) openssl-signature_algorithm (1.3.0) openssl (> 2.0) + opentelemetry-api (1.2.5) + opentelemetry-common (0.20.1) + opentelemetry-api (~> 1.0) + opentelemetry-exporter-otlp (0.26.3) + google-protobuf (~> 3.14) + googleapis-common-protos-types (~> 1.3) + opentelemetry-api (~> 1.1) + opentelemetry-common (~> 0.20) + opentelemetry-sdk (~> 1.2) + opentelemetry-semantic_conventions + opentelemetry-helpers-sql-obfuscation (0.1.0) + opentelemetry-common (~> 0.20) + opentelemetry-instrumentation-action_pack (0.9.0) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-rack (~> 0.21) + opentelemetry-instrumentation-action_view (0.7.0) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-active_support (~> 0.1) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-active_job (0.7.1) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-active_model_serializers (0.20.1) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-active_record (0.7.1) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-active_support (0.5.1) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-base (0.22.3) + opentelemetry-api (~> 1.0) + opentelemetry-registry (~> 0.1) + opentelemetry-instrumentation-concurrent_ruby (0.21.2) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-excon (0.22.0) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-faraday (0.24.1) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-http (0.23.2) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-http_client (0.22.3) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-net_http (0.22.4) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-pg (0.27.1) + opentelemetry-api (~> 1.0) + opentelemetry-helpers-sql-obfuscation + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-rack (0.24.1) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-rails (0.30.0) + opentelemetry-api (~> 1.0) + opentelemetry-instrumentation-action_pack (~> 0.9.0) + opentelemetry-instrumentation-action_view (~> 0.7.0) + opentelemetry-instrumentation-active_job (~> 0.7.0) + opentelemetry-instrumentation-active_record (~> 0.7.0) + opentelemetry-instrumentation-active_support (~> 0.5.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-redis (0.25.3) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-sidekiq (0.25.2) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-registry (0.3.1) + opentelemetry-api (~> 1.1) + opentelemetry-sdk (1.4.1) + opentelemetry-api (~> 1.1) + opentelemetry-common (~> 0.20) + opentelemetry-registry (~> 0.2) + opentelemetry-semantic_conventions + opentelemetry-semantic_conventions (1.10.0) + opentelemetry-api (~> 1.0) orm_adapter (0.5.0) ox (2.14.18) parallel (1.24.0) @@ -880,6 +973,21 @@ DEPENDENCIES omniauth-rails_csrf_protection (~> 1.0) omniauth-saml (~> 2.0) omniauth_openid_connect (~> 0.6.1) + opentelemetry-exporter-otlp (~> 0.26.3) + opentelemetry-instrumentation-active_job (~> 0.7.1) + opentelemetry-instrumentation-active_model_serializers (~> 0.20.1) + opentelemetry-instrumentation-concurrent_ruby (~> 0.21.2) + opentelemetry-instrumentation-excon (~> 0.22.0) + opentelemetry-instrumentation-faraday (~> 0.24.1) + opentelemetry-instrumentation-http (~> 0.23.2) + opentelemetry-instrumentation-http_client (~> 0.22.3) + opentelemetry-instrumentation-net_http (~> 0.22.4) + opentelemetry-instrumentation-pg (~> 0.27.1) + opentelemetry-instrumentation-rack (~> 0.24.1) + opentelemetry-instrumentation-rails (~> 0.30.0) + opentelemetry-instrumentation-redis (~> 0.25.3) + opentelemetry-instrumentation-sidekiq (~> 0.25.2) + opentelemetry-sdk (~> 1.4) ox (~> 2.14) parslet pg (~> 1.5) diff --git a/config/initializers/opentelemetry.rb b/config/initializers/opentelemetry.rb new file mode 100644 index 00000000000000..e50132d4617385 --- /dev/null +++ b/config/initializers/opentelemetry.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Set OTEL_* environment variables according to OTel docs: +# https://opentelemetry.io/docs/concepts/sdk-configuration/ + +if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) } + require 'opentelemetry/sdk' + require 'opentelemetry/exporter/otlp' + + require 'opentelemetry/instrumentation/active_job' + require 'opentelemetry/instrumentation/active_model_serializers' + require 'opentelemetry/instrumentation/concurrent_ruby' + require 'opentelemetry/instrumentation/excon' + require 'opentelemetry/instrumentation/faraday' + require 'opentelemetry/instrumentation/http' + require 'opentelemetry/instrumentation/http_client' + require 'opentelemetry/instrumentation/net/http' + require 'opentelemetry/instrumentation/pg' + require 'opentelemetry/instrumentation/rack' + require 'opentelemetry/instrumentation/rails' + require 'opentelemetry/instrumentation/redis' + require 'opentelemetry/instrumentation/sidekiq' + + OpenTelemetry::SDK.configure do |c| + # use_all() attempts to load ALL the auto-instrumentations + # currently loaded by Ruby requires. + # + # Load attempts will emit an INFO or WARN to the console + # about the success/failure to wire up an auto-instrumentation. + # "WARN -- : Instrumentation: failed to install" is most + # likely caused by not being a Ruby library loaded by + # the application or the instrumentation has been explicitly + # disabled. + # + # To disable an instrumentation, set an environment variable + # along this pattern: + # + # OTEL_RUBY_INSTRUMENTATION__ENABLED=false + # + # For example, PostgreSQL and Redis produce a lot of child spans + # in the course of this application doing its business. To turn + # them off, set the env vars below, but recognize that you will + # be missing details about what particular calls to the + # datastores are slow. + # + # OTEL_RUBY_INSTRUMENTATION_PG_ENABLED=false + # OTEL_RUBY_INSTRUMENTATION_REDIS_ENABLED=false + + c.use_all({ + 'OpenTelemetry::Instrumentation::Rack' => { + use_rack_events: false, # instead of events, use middleware; allows for untraced_endpoints to ignore child spans + untraced_endpoints: ['/health'], + }, + }) + + c.service_name = case $PROGRAM_NAME + when /puma/ then 'mastodon/web' + else + "mastodon/#{$PROGRAM_NAME.split('/').last}" + end + c.service_version = Mastodon::Version.to_s + end +end From ded11eca4fe2d89d986663d6f6a8dd5284e4604a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 15:15:54 +0200 Subject: [PATCH 016/113] Update dependency pundit to v2.3.2 (#30222) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b96afef2cc341d..114abcb7b387df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -607,7 +607,7 @@ GEM public_suffix (5.0.5) puma (6.4.2) nio4r (~> 2.0) - pundit (2.3.1) + pundit (2.3.2) activesupport (>= 3.0.0) raabro (1.4.0) racc (1.7.3) From d933e6b6aeda9fad6af712e084cdb5c25bdc2cbe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 15:16:02 +0200 Subject: [PATCH 017/113] Update dependency opentelemetry-instrumentation-concurrent_ruby to v0.21.3 (#30235) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 114abcb7b387df..3e2af23fec42a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -521,7 +521,7 @@ GEM opentelemetry-instrumentation-base (0.22.3) opentelemetry-api (~> 1.0) opentelemetry-registry (~> 0.1) - opentelemetry-instrumentation-concurrent_ruby (0.21.2) + opentelemetry-instrumentation-concurrent_ruby (0.21.3) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-excon (0.22.0) From af71f236a2e4565619871bfb72d64ca39411d365 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 15:16:05 +0200 Subject: [PATCH 018/113] Update dependency opentelemetry-instrumentation-excon to v0.22.2 (#30236) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e2af23fec42a9..fda00ca467e509 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -524,7 +524,7 @@ GEM opentelemetry-instrumentation-concurrent_ruby (0.21.3) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-excon (0.22.0) + opentelemetry-instrumentation-excon (0.22.1) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) From 482d1087c57553f551cf495f62d9b7fccf649271 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 16:19:41 +0200 Subject: [PATCH 019/113] Update dependency opentelemetry-instrumentation-faraday to v0.24.3 (#30237) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index fda00ca467e509..5669cf96a76ebd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -528,7 +528,7 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-faraday (0.24.1) + opentelemetry-instrumentation-faraday (0.24.2) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) From d09b02efb653e59488cac530db8ae2757ad0cd02 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Fri, 10 May 2024 18:33:10 +0200 Subject: [PATCH 020/113] Group Ruby OTEL packages in Renovate PRs (#30242) --- .github/renovate.json5 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index e92608a43711ed..378d4fc83ca86c 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -141,6 +141,13 @@ matchUpdateTypes: ['patch', 'minor'], groupName: 'RSpec (non-major)', }, + { + // Group all opentelemetry-ruby packages in the same PR + matchManagers: ['bundler'], + matchPackagePrefixes: ['opentelemetry-'], + matchUpdateTypes: ['patch', 'minor'], + groupName: 'opentelemetry-ruby (non-major)', + }, // Add labels depending on package manager { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] }, { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] }, From 9920f41c0fd8ad0030d2818c8271aa3cf24b4391 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 21:18:53 +0200 Subject: [PATCH 021/113] Update opentelemetry-ruby (non-major) (#30249) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5669cf96a76ebd..3f4b1088ada8fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -512,7 +512,7 @@ GEM opentelemetry-instrumentation-active_model_serializers (0.20.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-active_record (0.7.1) + opentelemetry-instrumentation-active_record (0.7.2) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-active_support (0.5.1) @@ -532,10 +532,10 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-http (0.23.2) + opentelemetry-instrumentation-http (0.23.3) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-http_client (0.22.3) + opentelemetry-instrumentation-http_client (0.22.4) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) @@ -543,15 +543,15 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-pg (0.27.1) + opentelemetry-instrumentation-pg (0.27.2) opentelemetry-api (~> 1.0) opentelemetry-helpers-sql-obfuscation opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-rack (0.24.1) + opentelemetry-instrumentation-rack (0.24.3) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-rails (0.30.0) + opentelemetry-instrumentation-rails (0.30.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-action_pack (~> 0.9.0) opentelemetry-instrumentation-action_view (~> 0.7.0) @@ -559,11 +559,11 @@ GEM opentelemetry-instrumentation-active_record (~> 0.7.0) opentelemetry-instrumentation-active_support (~> 0.5.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-redis (0.25.3) + opentelemetry-instrumentation-redis (0.25.4) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-sidekiq (0.25.2) + opentelemetry-instrumentation-sidekiq (0.25.3) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) From 346530732cce54c3e690486aca256bc0aae26d17 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 21:19:47 +0200 Subject: [PATCH 022/113] Update dependency utf-8-validate to v6.0.4 (#30248) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9aa8125d58b10d..4f99844d64c3bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17397,12 +17397,12 @@ __metadata: linkType: hard "utf-8-validate@npm:^6.0.3": - version: 6.0.3 - resolution: "utf-8-validate@npm:6.0.3" + version: 6.0.4 + resolution: "utf-8-validate@npm:6.0.4" dependencies: node-gyp: "npm:latest" node-gyp-build: "npm:^4.3.0" - checksum: 10c0/2ca08b07f4070540b33ff15f3f0632fa30baaee8a766fff993be47b4829b4fb30fd36fdf1270336324d03f65e0936c4608ee719d862230d75311751dcfe27a83 + checksum: 10c0/f7042d94aec6ca02461b64e725bdc7262266610dbb787331e5bbd49374ef6f75fe9900600df3fc63d97906c23614a965c8989b4bf95d70bf35dc617da99215e7 languageName: node linkType: hard From 1959365c2f410aa82874c5c05ab92c4eca4c4055 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 10 May 2024 22:00:25 +0200 Subject: [PATCH 023/113] Add missing `on_delete: :cascade` on `notification_policies` (#30251) --- ...3_fix_notification_policies_foreign_key.rb | 28 +++++++++++++++++++ db/schema.rb | 4 +-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20240510192043_fix_notification_policies_foreign_key.rb diff --git a/db/migrate/20240510192043_fix_notification_policies_foreign_key.rb b/db/migrate/20240510192043_fix_notification_policies_foreign_key.rb new file mode 100644 index 00000000000000..7bb134ecffd600 --- /dev/null +++ b/db/migrate/20240510192043_fix_notification_policies_foreign_key.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class FixNotificationPoliciesForeignKey < ActiveRecord::Migration[7.1] + def up + safety_assured do + execute <<~SQL.squish + ALTER TABLE notification_policies + DROP CONSTRAINT fk_rails_506d62f0da, + ADD CONSTRAINT fk_rails_506d62f0da + FOREIGN KEY (account_id) + REFERENCES accounts(id) + ON DELETE CASCADE + SQL + end + end + + def down + safety_assured do + execute <<~SQL.squish + ALTER TABLE notification_policies + DROP CONSTRAINT fk_rails_506d62f0da, + ADD CONSTRAINT fk_rails_506d62f0da + FOREIGN KEY (account_id) + REFERENCES accounts(id) + SQL + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 11f1a202f79e95..ad58604928d38e 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[7.1].define(version: 2024_03_22_161611) do +ActiveRecord::Schema[7.1].define(version: 2024_05_10_192043) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -1335,7 +1335,7 @@ add_foreign_key "mutes", "accounts", name: "fk_b8d8daf315", on_delete: :cascade add_foreign_key "notification_permissions", "accounts" add_foreign_key "notification_permissions", "accounts", column: "from_account_id" - add_foreign_key "notification_policies", "accounts" + add_foreign_key "notification_policies", "accounts", on_delete: :cascade add_foreign_key "notification_requests", "accounts", column: "from_account_id", on_delete: :cascade add_foreign_key "notification_requests", "accounts", on_delete: :cascade add_foreign_key "notification_requests", "statuses", column: "last_status_id", on_delete: :nullify From 807cf354fcf2706bd24890acb875fa85b097164a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:09:39 +0200 Subject: [PATCH 024/113] Update dependency eslint-plugin-jsdoc to v48.2.4 (#30274) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4f99844d64c3bd..f6166cccf9a068 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2132,14 +2132,17 @@ __metadata: languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.42.0": - version: 0.42.0 - resolution: "@es-joy/jsdoccomment@npm:0.42.0" +"@es-joy/jsdoccomment@npm:~0.43.0": + version: 0.43.0 + resolution: "@es-joy/jsdoccomment@npm:0.43.0" dependencies: + "@types/eslint": "npm:^8.56.5" + "@types/estree": "npm:^1.0.5" + "@typescript-eslint/types": "npm:^7.2.0" comment-parser: "npm:1.4.1" esquery: "npm:^1.5.0" jsdoc-type-pratt-parser: "npm:~4.0.0" - checksum: 10c0/a8122762d2df3c6501a9c459e2822315a23c0078c4aeb0b40fb3c84b99e21a78e85e67f962d6b5dde5eb751792a1c67c6a170b619573db7151098a19950abe35 + checksum: 10c0/862294ed89772a231f309edd68405ece00f6aaf43103210f28410da894a6b697bc1f281c59e813dd37d5b7294f633ee7b874e07a0aa3d72f49504089fc9cb2c4 languageName: node linkType: hard @@ -3520,17 +3523,17 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:7 || 8": - version: 8.44.6 - resolution: "@types/eslint@npm:8.44.6" +"@types/eslint@npm:7 || 8, @types/eslint@npm:^8.56.5": + version: 8.56.10 + resolution: "@types/eslint@npm:8.56.10" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: 10c0/fc449107eb186bdc5d30149bbcb4e673af8530afdeacca3b89f14deefcbfc67463157d6a81b42cd9df92ddeafda5351853d13310ff7ac6ab0d9769ac7cc0cc3a + checksum: 10c0/674349d6c342c3864d70f4d5a9965f96fb253801532752c8c500ad6a1c2e8b219e01ccff5dc8791dcb58b5483012c495708bb9f3ff929f5c9322b3da126c15d3 languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:^1.0.0": +"@types/estree@npm:*, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" checksum: 10c0/b3b0e334288ddb407c7b3357ca67dbee75ee22db242ca7c56fe27db4e1a31989cb8af48a84dd401deb787fe10cc6b2ab1ee82dc4783be87ededbe3d53c79c70d @@ -4193,7 +4196,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:7.8.0": +"@typescript-eslint/types@npm:7.8.0, @typescript-eslint/types@npm:^7.2.0": version: 7.8.0 resolution: "@typescript-eslint/types@npm:7.8.0" checksum: 10c0/b2fdbfc21957bfa46f7d8809b607ad8c8b67c51821d899064d09392edc12f28b2318a044f0cd5d523d782e84e8f0558778877944964cf38e139f88790cf9d466 @@ -7820,10 +7823,10 @@ __metadata: linkType: hard "eslint-plugin-jsdoc@npm:^48.0.0": - version: 48.2.3 - resolution: "eslint-plugin-jsdoc@npm:48.2.3" + version: 48.2.4 + resolution: "eslint-plugin-jsdoc@npm:48.2.4" dependencies: - "@es-joy/jsdoccomment": "npm:~0.42.0" + "@es-joy/jsdoccomment": "npm:~0.43.0" are-docs-informative: "npm:^0.0.2" comment-parser: "npm:1.4.1" debug: "npm:^4.3.4" @@ -7834,7 +7837,7 @@ __metadata: spdx-expression-parse: "npm:^4.0.0" peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/e755923d96118890c6fd28b1c2298e1fe67ccbce08060ffc091b29ced59d0058ad8820323c56eef6f85c2954c783fc4076e78c0e5bc64838ae099b4e62ea702e + checksum: 10c0/601c9d6ee41de56102c7813106ceb0b8b8342223670f7add010a8f89753c250cde4cc93e353e3911b7b29677f2634f3f4be45f27abb7a95c6fdbd058adfa3343 languageName: node linkType: hard From ab4efa3bf89358a110f91af87055e1fc5d610d94 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:10:09 +0200 Subject: [PATCH 025/113] Update dependency @testing-library/react to v15.0.7 (#30273) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f6166cccf9a068..a7f8c0a61b2b72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3391,8 +3391,8 @@ __metadata: linkType: hard "@testing-library/react@npm:^15.0.0": - version: 15.0.6 - resolution: "@testing-library/react@npm:15.0.6" + version: 15.0.7 + resolution: "@testing-library/react@npm:15.0.7" dependencies: "@babel/runtime": "npm:^7.12.5" "@testing-library/dom": "npm:^10.0.0" @@ -3404,7 +3404,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/3705a2272f929f2f848f5d7e6ac9829bf7ecc1725a35733ffae7e7a261d4bdab470b080558e8544edb1f9ba25db9fbc4232527df9b4ec6ab6ae4462a902a7f95 + checksum: 10c0/ac8ee8968e81949ecb35f7ee34741c2c043f73dd7fee2247d56f6de6a30de4742af94f25264356863974e54387485b46c9448ecf3f6ca41cf4339011c369f2d4 languageName: node linkType: hard From 471728d6ddb2bbc3579adde36942cbee622a3930 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:10:26 +0200 Subject: [PATCH 026/113] Update DefinitelyTyped types (non-major) (#30272) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index a7f8c0a61b2b72..269ea79e88ed97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3926,12 +3926,12 @@ __metadata: linkType: hard "@types/react@npm:*, @types/react@npm:16 || 17 || 18, @types/react@npm:>=16.9.11, @types/react@npm:^18.2.7": - version: 18.3.1 - resolution: "@types/react@npm:18.3.1" + version: 18.3.2 + resolution: "@types/react@npm:18.3.2" dependencies: "@types/prop-types": "npm:*" csstype: "npm:^3.0.2" - checksum: 10c0/18d856c12a4ec93f3cda2d58ef3d77a9480818afd3af895f812896fb82cfca1f35a692ab1add4ce826a4eb58a071624c7d1c8c6c4ccfb81c100d2916dc607614 + checksum: 10c0/9fb2f1fcf7e889ee4ea7c3c5978df595c66e770e5fd3a245dbdd2589b9b911524c11dab25a6275d8af4e336e4cb5fa850d447884b84c335a187a338c89df99ba languageName: node linkType: hard @@ -4053,9 +4053,9 @@ __metadata: linkType: hard "@types/webpack-env@npm:^1.18.4": - version: 1.18.4 - resolution: "@types/webpack-env@npm:1.18.4" - checksum: 10c0/3fa77dbff0ed71685404576b0a1cf74587567fe2ee1cfd11d56d6eefcab7a61e4c9ead0eced264e289d2cf0fc74296dbd55ed6c95774fe0fd6264d156c5a59f0 + version: 1.18.5 + resolution: "@types/webpack-env@npm:1.18.5" + checksum: 10c0/b9e4876e8c7cae419896249f9ed795db283c008fe1d38efa679cbbf05194fc2eea2a5bfb4ff4393d109e3a9895416dadf5f3ddd5c22931b678062230f860454e languageName: node linkType: hard From 5e7d88a85d400423bb21986a6a6dbef0d89135c5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 09:10:53 +0000 Subject: [PATCH 027/113] Update dependency glob to v10.3.15 (#30263) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 269ea79e88ed97..2ddd1a6426134c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8885,8 +8885,8 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.2.6, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.3.14 - resolution: "glob@npm:10.3.14" + version: 10.3.15 + resolution: "glob@npm:10.3.15" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^2.3.6" @@ -8895,7 +8895,7 @@ __metadata: path-scurry: "npm:^1.11.0" bin: glob: dist/esm/bin.mjs - checksum: 10c0/19126e53b99c94dea9b3509500e22b325e24d2674523fc95b9fe710f1549ad7e091fbb0704c325c53d3a172fc21a8251acce5395c4f3efd872a2e65a376c82a1 + checksum: 10c0/cda748ddc181b31b3df9548c0991800406d5cc3b3f8110e37a8751ec1e39f37cdae7d7782d5422d7df92775121cdf00599992dff22f7ff1260344843af227c2b languageName: node linkType: hard From 123108b1ccf3e516be80f92f816def1ede77ee11 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:11:39 +0200 Subject: [PATCH 028/113] Update dependency postcss-preset-env to v9.5.12 (#30256) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2ddd1a6426134c..ed5c4fb33ef32d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1617,15 +1617,15 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-cascade-layers@npm:^4.0.4": - version: 4.0.4 - resolution: "@csstools/postcss-cascade-layers@npm:4.0.4" +"@csstools/postcss-cascade-layers@npm:^4.0.5": + version: 4.0.5 + resolution: "@csstools/postcss-cascade-layers@npm:4.0.5" dependencies: - "@csstools/selector-specificity": "npm:^3.0.3" + "@csstools/selector-specificity": "npm:^3.1.0" postcss-selector-parser: "npm:^6.0.13" peerDependencies: postcss: ^8.4 - checksum: 10c0/87fdd1e3d846e45c2e415f24f66076e04c3c4539e8b802f1114b2a0fef9421d562d9eb61464ba3599d73805555ad8e95c51a8827cb3ddacfda01ec0df4afbfe0 + checksum: 10c0/2b6dd33b51df349dd89b12ebe3240d65accb0ba03e40288a72e26cf2307a7bdd742c42d9ff7a3f886cab19b2f8813978075f6ee61a985b0b7ceac7e2cbb29e04 languageName: node linkType: hard @@ -1749,15 +1749,15 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-is-pseudo-class@npm:^4.0.6": - version: 4.0.6 - resolution: "@csstools/postcss-is-pseudo-class@npm:4.0.6" +"@csstools/postcss-is-pseudo-class@npm:^4.0.7": + version: 4.0.7 + resolution: "@csstools/postcss-is-pseudo-class@npm:4.0.7" dependencies: - "@csstools/selector-specificity": "npm:^3.0.3" + "@csstools/selector-specificity": "npm:^3.1.0" postcss-selector-parser: "npm:^6.0.13" peerDependencies: postcss: ^8.4 - checksum: 10c0/aa071954e08dc9368fbeddbec6a8da2dea3a771b33bad53f67f3bc5a6b2f0a270909948f3e7b29ec885f4cceee245f16388809aeb0620284a1d66ad1f2026f28 + checksum: 10c0/43668987df4608f822dbc323d3ac567fa7c192235b55933fd5d1855977ead80184512eb64a3f45a020fdd93711952ba8e9f9a280f4e981625b68a9ff074f9a01 languageName: node linkType: hard @@ -1983,12 +1983,12 @@ __metadata: languageName: node linkType: hard -"@csstools/selector-specificity@npm:^3.0.3": - version: 3.0.3 - resolution: "@csstools/selector-specificity@npm:3.0.3" +"@csstools/selector-specificity@npm:^3.0.3, @csstools/selector-specificity@npm:^3.1.0": + version: 3.1.0 + resolution: "@csstools/selector-specificity@npm:3.1.0" peerDependencies: postcss-selector-parser: ^6.0.13 - checksum: 10c0/e4f0355165882ddde8bd4a2f0252868150e67b9fae927fd2d94a91cee31e438e7041059f20b9c755a93b0bd8e527a9f78b01168fe67b3539be32091240aa63bf + checksum: 10c0/7f77f8377b637dcca7f7a9d6ace3329cf60f02cbd75f14241de30b1f5d00c961ec167572bc93517cdb2f106405a91119f026389a0f96dabae8dd67d1c7710e60 languageName: node linkType: hard @@ -6577,16 +6577,16 @@ __metadata: languageName: node linkType: hard -"css-has-pseudo@npm:^6.0.3": - version: 6.0.3 - resolution: "css-has-pseudo@npm:6.0.3" +"css-has-pseudo@npm:^6.0.4": + version: 6.0.4 + resolution: "css-has-pseudo@npm:6.0.4" dependencies: - "@csstools/selector-specificity": "npm:^3.0.3" + "@csstools/selector-specificity": "npm:^3.1.0" postcss-selector-parser: "npm:^6.0.13" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/bbe663eff5256233c7bcce256cd8de7d93d82f2d4f2ca104af8e39e2159170d67746d3a2954385d03ec4ea7ef2728fe9a7d8cb62c52c0a6df1ad3d3bb1e3439d + checksum: 10c0/e9d440de483e15092ebaadb483502243f43e0457d4214c8012ebdba7a959e74d40714254bf97247780e65735512f248a55feda0b3975d9a5eaea9c746f7518f0 languageName: node linkType: hard @@ -13548,16 +13548,16 @@ __metadata: languageName: node linkType: hard -"postcss-nesting@npm:^12.1.2": - version: 12.1.2 - resolution: "postcss-nesting@npm:12.1.2" +"postcss-nesting@npm:^12.1.3": + version: 12.1.3 + resolution: "postcss-nesting@npm:12.1.3" dependencies: "@csstools/selector-resolve-nested": "npm:^1.1.0" - "@csstools/selector-specificity": "npm:^3.0.3" + "@csstools/selector-specificity": "npm:^3.1.0" postcss-selector-parser: "npm:^6.0.13" peerDependencies: postcss: ^8.4 - checksum: 10c0/39d1d100f61863f904393b17169be83cdf82bd50d530efb3e3ae0c7b0f838b254e10e5d12e25119cf31dce9e351a2b770a03f9b2029ff33bef0ec924c0d2f642 + checksum: 10c0/6b2d3a4823e85592965c6c11f749c5357703256e7334388147d6a3bb72a3abbe47789afaa8535bdd7a9bd6d0099eb12ffec6c154050d8e8b8286b1adbed5b397 languageName: node linkType: hard @@ -13712,10 +13712,10 @@ __metadata: linkType: hard "postcss-preset-env@npm:^9.5.2": - version: 9.5.11 - resolution: "postcss-preset-env@npm:9.5.11" + version: 9.5.12 + resolution: "postcss-preset-env@npm:9.5.12" dependencies: - "@csstools/postcss-cascade-layers": "npm:^4.0.4" + "@csstools/postcss-cascade-layers": "npm:^4.0.5" "@csstools/postcss-color-function": "npm:^3.0.16" "@csstools/postcss-color-mix-function": "npm:^2.0.16" "@csstools/postcss-exponential-functions": "npm:^1.0.7" @@ -13725,7 +13725,7 @@ __metadata: "@csstools/postcss-hwb-function": "npm:^3.0.15" "@csstools/postcss-ic-unit": "npm:^3.0.6" "@csstools/postcss-initial": "npm:^1.0.1" - "@csstools/postcss-is-pseudo-class": "npm:^4.0.6" + "@csstools/postcss-is-pseudo-class": "npm:^4.0.7" "@csstools/postcss-light-dark-function": "npm:^1.0.5" "@csstools/postcss-logical-float-and-clear": "npm:^2.0.1" "@csstools/postcss-logical-overflow": "npm:^1.0.1" @@ -13747,7 +13747,7 @@ __metadata: autoprefixer: "npm:^10.4.19" browserslist: "npm:^4.22.3" css-blank-pseudo: "npm:^6.0.2" - css-has-pseudo: "npm:^6.0.3" + css-has-pseudo: "npm:^6.0.4" css-prefers-color-scheme: "npm:^9.0.1" cssdb: "npm:^8.0.0" postcss-attribute-case-insensitive: "npm:^6.0.3" @@ -13767,7 +13767,7 @@ __metadata: postcss-image-set-function: "npm:^6.0.3" postcss-lab-function: "npm:^6.0.16" postcss-logical: "npm:^7.0.1" - postcss-nesting: "npm:^12.1.2" + postcss-nesting: "npm:^12.1.3" postcss-opacity-percentage: "npm:^2.0.0" postcss-overflow-shorthand: "npm:^5.0.1" postcss-page-break: "npm:^3.0.4" @@ -13777,7 +13777,7 @@ __metadata: postcss-selector-not: "npm:^7.0.2" peerDependencies: postcss: ^8.4 - checksum: 10c0/9460f4ce18cf1af7582d0a1f366151f59b6e9b0c7cbb62e59081dc91da14760a749f59fa52bc190e5e2c8fd531952c647719d19c4740aa1a0ebcb93f075ad931 + checksum: 10c0/3e0276b2061baa396547f9c0090fcb0c6149d3735c7aefa99a8e520701aae0b7265578b59d5e4efa9f5e61659c161e39590a5d63bac49469b99da1c549b63231 languageName: node linkType: hard From f66c9faca02018a3aa6140506a15d685b89dfed2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:11:55 +0200 Subject: [PATCH 029/113] Update dependency sass to v1.77.1 (#30252) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ed5c4fb33ef32d..f2d29065370b2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15323,15 +15323,15 @@ __metadata: linkType: hard "sass@npm:^1.62.1": - version: 1.77.0 - resolution: "sass@npm:1.77.0" + version: 1.77.1 + resolution: "sass@npm:1.77.1" dependencies: chokidar: "npm:>=3.0.0 <4.0.0" immutable: "npm:^4.0.0" source-map-js: "npm:>=0.6.2 <2.0.0" bin: sass: sass.js - checksum: 10c0/bce0e5f5b535491e4e775045a79f19cbe10d800ef53b5f7698958d2992505d7b124c968169b05a0190842d8e0a24c2aa6d75dfbdd7c213820d9d59e227009c19 + checksum: 10c0/edcfc7d038234b1198c3ddcac5963fcd1e17a9c1ee0f9bd09784ab5353b60ff50b189b4c9154b34f5da9ca0eaab8b189fd3e83a4b43a494151ad4735f8e5f364 languageName: node linkType: hard From cb93c1edf08865b1ac528a9a4cb747dab3d57e8d Mon Sep 17 00:00:00 2001 From: David Lapshin Date: Mon, 13 May 2024 12:19:42 +0300 Subject: [PATCH 030/113] Add active animation to header settings button (#30221) --- app/javascript/styles/mastodon/components.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 12c987a02f39d0..927c57d990b63b 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4365,12 +4365,20 @@ a.status-card { outline: $ui-button-focus-outline; } + .no-reduce-motion .icon { + transition: transform 0.15s ease-in-out; + } + &.active { color: $primary-text-color; &:hover { color: $primary-text-color; } + + .icon { + transform: rotate(60deg); + } } &:disabled { From c66fdb3dff7f9313ff610a6b6e97ee22e3b3c7e1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:39:06 +0200 Subject: [PATCH 031/113] Update dependency immutable to v4.3.6 (#30276) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f2d29065370b2a..f6dc8f161a813b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9495,9 +9495,9 @@ __metadata: linkType: hard "immutable@npm:^4.0.0, immutable@npm:^4.0.0-rc.1, immutable@npm:^4.3.0": - version: 4.3.5 - resolution: "immutable@npm:4.3.5" - checksum: 10c0/63d2d7908241a955d18c7822fd2215b6e89ff5a1a33cc72cd475b013cbbdef7a705aa5170a51ce9f84a57f62fdddfaa34e7b5a14b33d8a43c65cc6a881d6e894 + version: 4.3.6 + resolution: "immutable@npm:4.3.6" + checksum: 10c0/7d0952a768b4fadcee47230ed86dc9505a4517095eceaf5a47e65288571c42400c6e4a2ae21eca4eda957cb7bc50720213135b62cf6a181639111f8acae128c3 languageName: node linkType: hard From b429c9b8a7848097a1c86edda465629a11267696 Mon Sep 17 00:00:00 2001 From: Jeen Broekstra Date: Mon, 13 May 2024 21:40:14 +1200 Subject: [PATCH 032/113] fix(bin/dev): makes conditional for launching overmind POSIX-compliant (#30271) --- bin/dev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dev b/bin/dev index 9b1d3ac6fcc164..0911bae55813d2 100755 --- a/bin/dev +++ b/bin/dev @@ -6,7 +6,7 @@ export PORT="${PORT:-3000}" # Get around our boot.rb ENV check export RAILS_ENV="${RAILS_ENV:-development}" -if command -v overmind &> /dev/null +if command -v overmind 1> /dev/null 2>&1 then overmind start -f Procfile.dev "$@" exit $? From 6e1b8b33f55de9fdfcd4ce3a8fcc965c1b5c6601 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 11:42:08 +0200 Subject: [PATCH 033/113] Update opentelemetry-ruby (non-major) (#30262) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3f4b1088ada8fc..efc99eb23d0c47 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -543,7 +543,7 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-pg (0.27.2) + opentelemetry-instrumentation-pg (0.27.3) opentelemetry-api (~> 1.0) opentelemetry-helpers-sql-obfuscation opentelemetry-instrumentation-base (~> 0.22.1) From 9ec7c1f89256cf3c658a67c3cf8b956fd4dab265 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 13 May 2024 05:42:47 -0400 Subject: [PATCH 034/113] Fix i18n:extract flags (#30261) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d8848833311297..79544229df956c 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "fix": "yarn fix:js && yarn fix:css", "format": "prettier --write --log-level warn .", "format:check": "prettier --check --ignore-unknown .", - "i18n:extract": "formatjs extract 'app/javascript/**/*.{js,jsx,ts,tsx}' '--ignore=**/*.d.ts' --out-file app/javascript/mastodon/locales/en.json --format config/formatjs-formatter.js", + "i18n:extract": "formatjs extract 'app/javascript/**/*.{js,jsx,ts,tsx}' --ignore '**/*.d.ts' --out-file app/javascript/mastodon/locales/en.json --format config/formatjs-formatter.js", "jest": "cross-env NODE_ENV=test jest", "lint:js": "eslint . --ext=.js,.jsx,.ts,.tsx --cache --report-unused-disable-directives", "lint:css": "stylelint \"**/*.{css,scss}\"", From 13fb54920b1c1e8dd59798dd9fc3466c5a446898 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 13 May 2024 05:54:15 -0400 Subject: [PATCH 035/113] Enable Style/IfUnlessModifier RuboCop (#30260) --- .rubocop_todo.yml | 9 +-------- config/environments/production.rb | 4 +--- config/initializers/devise.rb | 4 +--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 91e666d7f47446..b47d682f3e683c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.62.1. +# using RuboCop version 1.63.5. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -122,13 +122,6 @@ Style/HashTransformValues: - 'app/serializers/rest/web_push_subscription_serializer.rb' - 'app/services/import_service.rb' -# This cop supports safe autocorrection (--autocorrect). -Style/IfUnlessModifier: - Exclude: - - 'config/environments/production.rb' - - 'config/initializers/devise.rb' - - 'config/initializers/ffmpeg.rb' - # This cop supports unsafe autocorrection (--autocorrect-all). Style/MapToHash: Exclude: diff --git a/config/environments/production.rb b/config/environments/production.rb index 6b1101ea1ba9f9..a39843e9562d1f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -86,9 +86,7 @@ config.lograge.enabled = true config.lograge.custom_payload do |controller| - if controller.respond_to?(:signed_request?) && controller.signed_request? - { key: controller.signature_key_id } - end + { key: controller.signature_key_id } if controller.respond_to?(:signed_request?) && controller.signed_request? end # Use a different logger for distributed setups. diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index a95c7437fa073b..5c88c4cd5f6222 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -79,9 +79,7 @@ def authenticate! return pass end - if validate(resource) - success!(resource) - end + success!(resource) if validate(resource) end private From 3a7aec2807089a004db90851c66db0a007a18a48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 13:30:41 +0200 Subject: [PATCH 036/113] New Crowdin Translations (automated) (#30254) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/cy.json | 1 - app/javascript/mastodon/locales/es-MX.json | 6 +- app/javascript/mastodon/locales/es.json | 6 +- app/javascript/mastodon/locales/fo.json | 4 +- app/javascript/mastodon/locales/gl.json | 1 - app/javascript/mastodon/locales/ia.json | 2 +- app/javascript/mastodon/locales/ie.json | 4 + app/javascript/mastodon/locales/ja.json | 2 +- app/javascript/mastodon/locales/lt.json | 5 +- app/javascript/mastodon/locales/pt-BR.json | 1 - app/javascript/mastodon/locales/sl.json | 1 - app/javascript/mastodon/locales/sq.json | 2 +- app/javascript/mastodon/locales/sv.json | 2 +- app/javascript/mastodon/locales/vi.json | 2 +- app/javascript/mastodon/locales/zh-HK.json | 1 - config/locales/doorkeeper.vi.yml | 4 +- config/locales/fo.yml | 4 +- config/locales/ia.yml | 106 +++++++++++++++++++++ config/locales/ie.yml | 3 + config/locales/lt.yml | 53 ++++++++++- config/locales/simple_form.cs.yml | 2 + config/locales/simple_form.es-MX.yml | 2 + config/locales/simple_form.es.yml | 2 + config/locales/simple_form.ie.yml | 6 ++ config/locales/simple_form.ja.yml | 2 + config/locales/simple_form.ko.yml | 3 + config/locales/simple_form.lt.yml | 5 + config/locales/th.yml | 3 + 28 files changed, 208 insertions(+), 27 deletions(-) diff --git a/app/javascript/mastodon/locales/cy.json b/app/javascript/mastodon/locales/cy.json index fd8fc74be88788..925b7710e008d2 100644 --- a/app/javascript/mastodon/locales/cy.json +++ b/app/javascript/mastodon/locales/cy.json @@ -474,7 +474,6 @@ "notification.follow_request": "Mae {name} wedi gwneud cais i'ch dilyn", "notification.mention": "Crybwyllodd {name} amdanoch chi", "notification.moderation-warning.learn_more": "Dysgu mwy", - "notification.moderation_warning": "Rydych wedi derbyn rhybudd cymedroli", "notification.moderation_warning.action_delete_statuses": "Mae rhai o'ch postiadau wedi'u dileu.", "notification.moderation_warning.action_disable": "Mae eich cyfrif wedi'i analluogi.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Mae rhai o'ch postiadau wedi'u marcio'n sensitif.", diff --git a/app/javascript/mastodon/locales/es-MX.json b/app/javascript/mastodon/locales/es-MX.json index b529f48ebe17dc..1a99d1d4b45e0a 100644 --- a/app/javascript/mastodon/locales/es-MX.json +++ b/app/javascript/mastodon/locales/es-MX.json @@ -476,12 +476,12 @@ "notification.moderation-warning.learn_more": "Saber más", "notification.moderation_warning": "Has recibido una advertencia de moderación", "notification.moderation_warning.action_delete_statuses": "Se han eliminado algunas de tus publicaciones.", - "notification.moderation_warning.action_disable": "Se ha desactivado su cuenta.", + "notification.moderation_warning.action_disable": "Tu cuenta ha sido desactivada.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Se han marcado como sensibles algunas de tus publicaciones.", "notification.moderation_warning.action_none": "Tu cuenta ha recibido un aviso de moderación.", "notification.moderation_warning.action_sensitive": "De ahora en adelante, todas tus publicaciones se marcarán como sensibles.", - "notification.moderation_warning.action_silence": "Se ha limitado tu cuenta.", - "notification.moderation_warning.action_suspend": "Se ha suspendido tu cuenta.", + "notification.moderation_warning.action_silence": "Tu cuenta ha sido limitada.", + "notification.moderation_warning.action_suspend": "Tu cuenta ha sido suspendida.", "notification.own_poll": "Tu encuesta ha terminado", "notification.poll": "Una encuesta en la que has votado ha terminado", "notification.reblog": "{name} ha retooteado tu estado", diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json index ed01a333750151..1782a3a1fee792 100644 --- a/app/javascript/mastodon/locales/es.json +++ b/app/javascript/mastodon/locales/es.json @@ -476,12 +476,12 @@ "notification.moderation-warning.learn_more": "Saber más", "notification.moderation_warning": "Has recibido una advertencia de moderación", "notification.moderation_warning.action_delete_statuses": "Se han eliminado algunas de tus publicaciones.", - "notification.moderation_warning.action_disable": "Se ha desactivado su cuenta.", + "notification.moderation_warning.action_disable": "Tu cuenta ha sido desactivada.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Se han marcado como sensibles algunas de tus publicaciones.", "notification.moderation_warning.action_none": "Tu cuenta ha recibido un aviso de moderación.", "notification.moderation_warning.action_sensitive": "De ahora en adelante, todas tus publicaciones se marcarán como sensibles.", - "notification.moderation_warning.action_silence": "Se ha limitado tu cuenta.", - "notification.moderation_warning.action_suspend": "Se ha suspendido tu cuenta.", + "notification.moderation_warning.action_silence": "Tu cuenta ha sido limitada.", + "notification.moderation_warning.action_suspend": "Tu cuenta ha sido suspendida.", "notification.own_poll": "Tu encuesta ha terminado", "notification.poll": "Una encuesta en la que has votado ha terminado", "notification.reblog": "{name} ha impulsado tu publicación", diff --git a/app/javascript/mastodon/locales/fo.json b/app/javascript/mastodon/locales/fo.json index 77257413fdf54e..f22a829c0cf5d9 100644 --- a/app/javascript/mastodon/locales/fo.json +++ b/app/javascript/mastodon/locales/fo.json @@ -474,11 +474,11 @@ "notification.follow_request": "{name} biður um at fylgja tær", "notification.mention": "{name} nevndi teg", "notification.moderation-warning.learn_more": "Lær meira", - "notification.moderation_warning": "Tú hevur móttikið eina umsjónarávarðing", + "notification.moderation_warning": "Tú hevur móttikið eina umsjónarávaring", "notification.moderation_warning.action_delete_statuses": "Onkrir av tínum postum eru strikaðir.", "notification.moderation_warning.action_disable": "Konta tín er gjørd óvirkin.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Nakrir av postum tínum eru merktir sum viðkvæmir.", - "notification.moderation_warning.action_none": "Konta tín hevur móttikið eina umsjónarávarðing.", + "notification.moderation_warning.action_none": "Konta tín hevur móttikið eina umsjónarávaring.", "notification.moderation_warning.action_sensitive": "Postar tínir verða merktir sum viðkvæmir frá nú av.", "notification.moderation_warning.action_silence": "Konta tín er avmarkað.", "notification.moderation_warning.action_suspend": "Konta tín er ógildað.", diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json index 88d4f5f60e059a..b2a50ebb811976 100644 --- a/app/javascript/mastodon/locales/gl.json +++ b/app/javascript/mastodon/locales/gl.json @@ -474,7 +474,6 @@ "notification.follow_request": "{name} solicitou seguirte", "notification.mention": "{name} mencionoute", "notification.moderation-warning.learn_more": "Saber máis", - "notification.moderation_warning": "Recibiches unha advertencia da moderación", "notification.moderation_warning.action_delete_statuses": "Algunha das túas publicacións foron eliminadas.", "notification.moderation_warning.action_disable": "A túa conta foi desactivada.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Algunha das túas publicacións foron marcadas como sensibles.", diff --git a/app/javascript/mastodon/locales/ia.json b/app/javascript/mastodon/locales/ia.json index d30038d9ccef6a..313563bdfe3294 100644 --- a/app/javascript/mastodon/locales/ia.json +++ b/app/javascript/mastodon/locales/ia.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name} ha requestate de sequer te", "notification.mention": "{name} te ha mentionate", "notification.moderation-warning.learn_more": "Apprender plus", - "notification.moderation_warning": "Tu ha recipite un advertimento de moderation", + "notification.moderation_warning": "Tu ha recepite un aviso de moderation", "notification.moderation_warning.action_delete_statuses": "Alcunes de tu messages ha essite removite.", "notification.moderation_warning.action_disable": "Tu conto ha essite disactivate.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Alcunes de tu messages ha essite marcate como sensibile.", diff --git a/app/javascript/mastodon/locales/ie.json b/app/javascript/mastodon/locales/ie.json index 7bd91ca0f9032e..1921509478c105 100644 --- a/app/javascript/mastodon/locales/ie.json +++ b/app/javascript/mastodon/locales/ie.json @@ -89,6 +89,7 @@ "announcement.announcement": "Proclamation", "attachments_list.unprocessed": "(íntractat)", "audio.hide": "Celar audio", + "block_modal.remote_users_caveat": "Noi va petir que li servitor {domain} mey respecter tui decision. Támen, obedientie ne es garantit pro que chascun servitor gere bloccas diferentmen. Possibilmen public postas va restar visibil a usatores de inloggat.", "block_modal.show_less": "Monstrar minu", "block_modal.show_more": "Monstrar plu", "block_modal.they_cant_mention": "Ne posse mentionar ni sequer te.", @@ -224,7 +225,10 @@ "domain_pill.their_username": "Su unic identificator sur su servitor. It es possibil que altri servitores va haver usatores con li sam nómine.", "domain_pill.username": "Usator-nómine", "domain_pill.whats_in_a_handle": "Ex quo consiste un identificator?", + "domain_pill.who_they_are": "Pro que identificatores informa qui e u un person is, tu posse interacter con persones tra li rete social de .", + "domain_pill.who_you_are": "Pro que tui identificator informa qui e u tu es, persones posse interacter con te tra li rete social de .", "domain_pill.your_handle": "Tui identificator:", + "domain_pill.your_server": "Tui digital hem, u trova se omni tui postas. Si it ne plese te, tu posse transferer ad un altri servitor quandecunc e tui sequitores con te.", "domain_pill.your_username": "Tui unic identificator sur ti-ci servitor. It es possibil que altri servitores va haver usatores con li sam nómine.", "embed.instructions": "Inbedar ti-ci posta per copiar li code in infra.", "embed.preview": "Vi qualmen it va aspecter:", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index 6e590678fb3cb3..eea06fff590708 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name}さんがあなたにフォローリクエストしました", "notification.mention": "{name}さんがあなたに返信しました", "notification.moderation-warning.learn_more": "さらに詳しく", - "notification.moderation_warning": "あなたは管理者からの警告を受けています。", + "notification.moderation_warning": "管理者から警告が来ています", "notification.moderation_warning.action_delete_statuses": "あなたによるいくつかの投稿が削除されました。", "notification.moderation_warning.action_disable": "あなたのアカウントは無効になりました。", "notification.moderation_warning.action_mark_statuses_as_sensitive": "あなたの投稿のいくつかは閲覧注意として判定されています。", diff --git a/app/javascript/mastodon/locales/lt.json b/app/javascript/mastodon/locales/lt.json index 798b24569f135a..0f42e97fcff7fc 100644 --- a/app/javascript/mastodon/locales/lt.json +++ b/app/javascript/mastodon/locales/lt.json @@ -256,7 +256,7 @@ "empty_column.community": "Vietinė laiko skalė yra tuščia. Parašyk ką nors viešai, kad pradėtum sąveikauti.", "empty_column.direct": "Dar neturi jokių privačių paminėjimų. Kai išsiųsi arba gausi vieną iš jų, jis bus rodomas čia.", "empty_column.domain_blocks": "Dar nėra užblokuotų domenų.", - "empty_column.explore_statuses": "Šiuo metu niekas nėra tendencinga. Patikrink vėliau.", + "empty_column.explore_statuses": "Šiuo metu niekas nėra tendencinga. Patikrink vėliau!", "empty_column.favourited_statuses": "Dar neturi mėgstamų įrašų. Kai vieną iš jų pamėgsi, jis bus rodomas čia.", "empty_column.favourites": "Šio įrašo dar niekas nepamėgo. Kai kas nors tai padarys, jie bus rodomi čia.", "empty_column.follow_requests": "Dar neturi jokių sekimo prašymų. Kai gausi tokį prašymą, jis bus rodomas čia.", @@ -466,7 +466,6 @@ "notification.follow_request": "{name} paprašė tave sekti", "notification.mention": "{name} paminėjo tave", "notification.moderation-warning.learn_more": "Sužinoti daugiau", - "notification.moderation_warning": "Gavai prižiūrėjimo įspėjimą", "notification.moderation_warning.action_delete_statuses": "Kai kurie tavo įrašai buvo pašalintos.", "notification.moderation_warning.action_disable": "Tavo paskyra buvo išjungta.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Kai kurie tavo įrašai buvo pažymėtos kaip jautrios.", @@ -536,7 +535,7 @@ "onboarding.follows.lead": "Tavo pagrindinis srautas – pagrindinis būdas patirti Mastodon. Kuo daugiau žmonių seksi, tuo jis bus aktyvesnis ir įdomesnis. Norint pradėti, pateikiame keletą pasiūlymų:", "onboarding.follows.title": "Suasmenink savo pagrindinį srautą", "onboarding.profile.discoverable": "Padaryti mano profilį atrandamą", - "onboarding.profile.discoverable_hint": "Kai pasirenki Mastodon atrandamumą, tavo įrašai gali būti rodomi paieškos rezultatuose ir tendencijose, o profilis gali būti siūlomas panašių pomėgių turintiems žmonėms.", + "onboarding.profile.discoverable_hint": "Kai sutinki su Mastodon atrandamumu, tavo įrašai gali būti rodomi paieškos rezultatuose ir tendencijose, o profilis gali būti siūlomas panašių pomėgių turintiems žmonėms.", "onboarding.profile.display_name": "Rodomas vardas", "onboarding.profile.display_name_hint": "Tavo pilnas vardas arba linksmas vardas…", "onboarding.profile.lead": "Gali visada tai užbaigti vėliau nustatymuose, kur yra dar daugiau pritaikymo parinkčių.", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index b11daeaaa7e7b5..1a6de083593bc2 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -474,7 +474,6 @@ "notification.follow_request": "{name} quer te seguir", "notification.mention": "{name} te mencionou", "notification.moderation-warning.learn_more": "Aprender mais", - "notification.moderation_warning": "Você recebeu um aviso de moderação", "notification.moderation_warning.action_delete_statuses": "Algumas das suas publicações foram removidas.", "notification.moderation_warning.action_disable": "Sua conta foi desativada.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Algumas de suas publicações foram marcadas por ter conteúdo sensível.", diff --git a/app/javascript/mastodon/locales/sl.json b/app/javascript/mastodon/locales/sl.json index 7806abc6b55fbb..459d05ce3ecfe8 100644 --- a/app/javascript/mastodon/locales/sl.json +++ b/app/javascript/mastodon/locales/sl.json @@ -474,7 +474,6 @@ "notification.follow_request": "{name} vam želi slediti", "notification.mention": "{name} vas je omenil/a", "notification.moderation-warning.learn_more": "Več o tem", - "notification.moderation_warning": "Prejeli ste opozorilo moderatorjev", "notification.moderation_warning.action_delete_statuses": "Nekatere vaše objave so odstranjene.", "notification.moderation_warning.action_disable": "Vaš račun je bil onemogočen.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Nekatere vaše objave so bile označene kot občutljive.", diff --git a/app/javascript/mastodon/locales/sq.json b/app/javascript/mastodon/locales/sq.json index a25eab9cbfe66e..b496f8e20385a5 100644 --- a/app/javascript/mastodon/locales/sq.json +++ b/app/javascript/mastodon/locales/sq.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name} ka kërkuar t’ju ndjekë", "notification.mention": "{name} ju ka përmendur", "notification.moderation-warning.learn_more": "Mësoni më tepër", - "notification.moderation_warning": "Keni marrë një sinjalizim moderimi", + "notification.moderation_warning": "Ju është dhënë një sinjalizim moderimi", "notification.moderation_warning.action_delete_statuses": "Disa nga postimet tuaja janë hequr.", "notification.moderation_warning.action_disable": "Llogaria juaj është çaktivizuar.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Disa prej postimeve tuaja u është vënë shenjë si me spec.", diff --git a/app/javascript/mastodon/locales/sv.json b/app/javascript/mastodon/locales/sv.json index 5ac4b4648ff410..ba3a6b2f51ebda 100644 --- a/app/javascript/mastodon/locales/sv.json +++ b/app/javascript/mastodon/locales/sv.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name} har begärt att följa dig", "notification.mention": "{name} nämnde dig", "notification.moderation-warning.learn_more": "Läs mer", - "notification.moderation_warning": "Du har mottagit en modereringsvarning", + "notification.moderation_warning": "Du har fått en moderationsvarning", "notification.moderation_warning.action_delete_statuses": "Några av dina inlägg har tagits bort.", "notification.moderation_warning.action_disable": "Ditt konto har inaktiverats.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Några av dina inlägg har markerats som känsliga.", diff --git a/app/javascript/mastodon/locales/vi.json b/app/javascript/mastodon/locales/vi.json index b188488f0b135b..102f1c3b4b329a 100644 --- a/app/javascript/mastodon/locales/vi.json +++ b/app/javascript/mastodon/locales/vi.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name} yêu cầu theo dõi bạn", "notification.mention": "{name} nhắc đến bạn", "notification.moderation-warning.learn_more": "Tìm hiểu", - "notification.moderation_warning": "Bạn đã nhận một cảnh báo kiểm duyệt", + "notification.moderation_warning": "Bạn vừa nhận một cảnh báo kiểm duyệt", "notification.moderation_warning.action_delete_statuses": "Một vài tút của bạn bị gỡ.", "notification.moderation_warning.action_disable": "Tài khoản của bạn đã bị vô hiệu hóa.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Vài tút bạn bị đánh dấu nhạy cảm.", diff --git a/app/javascript/mastodon/locales/zh-HK.json b/app/javascript/mastodon/locales/zh-HK.json index 6b08e40284b177..eaa5dabe93134b 100644 --- a/app/javascript/mastodon/locales/zh-HK.json +++ b/app/javascript/mastodon/locales/zh-HK.json @@ -474,7 +474,6 @@ "notification.follow_request": "{name} 要求追蹤你", "notification.mention": "{name} 提及你", "notification.moderation-warning.learn_more": "了解更多", - "notification.moderation_warning": "你收到一則審核警告", "notification.moderation_warning.action_delete_statuses": "你的部份帖文已被刪除。", "notification.moderation_warning.action_disable": "你的帳號已被停用。", "notification.moderation_warning.action_mark_statuses_as_sensitive": "你某些帖文已被標記為敏感內容。", diff --git a/config/locales/doorkeeper.vi.yml b/config/locales/doorkeeper.vi.yml index 84684d24ca7e59..624db9aff7eb4f 100644 --- a/config/locales/doorkeeper.vi.yml +++ b/config/locales/doorkeeper.vi.yml @@ -61,7 +61,7 @@ vi: title: Một lỗi đã xảy ra new: prompt_html: "%{client_name} yêu cầu truy cập tài khoản của bạn. Đây là ứng dụng của bên thứ ba. Nếu không tin tưởng, đừng cho phép nó." - review_permissions: Xem lại quyền cho phép + review_permissions: Quyền truy cập title: Yêu cầu truy cập show: title: Sao chép mã này và dán nó vào ứng dụng. @@ -122,7 +122,7 @@ vi: admin/accounts: Quản trị tài khoản admin/all: Mọi chức năng quản trị admin/reports: Quản trị báo cáo - all: Toàn quyền truy cập vào tài khoản Mastodon của bạn + all: Toàn quyền truy cập tài khoản Mastodon blocks: Chặn bookmarks: Tút đã lưu conversations: Thảo luận diff --git a/config/locales/fo.yml b/config/locales/fo.yml index 15c9c7dc043e65..f7303c512ac686 100644 --- a/config/locales/fo.yml +++ b/config/locales/fo.yml @@ -235,7 +235,7 @@ fo: change_email_user_html: "%{name} broytti teldupost addressuna hjá %{target}" change_role_user_html: "%{name} broytti leiklutin hjá %{target}" confirm_user_html: "%{name} góðtók teldupost addressuna hjá %{target}" - create_account_warning_html: "%{name} sendi eina ávarðing til %{target}" + create_account_warning_html: "%{name} sendi eina ávaring til %{target}" create_announcement_html: "%{name} stovnaði eina fráboðan %{target}" create_canonical_email_block_html: "%{name} forðaði telduposti við hash'inum %{target}" create_custom_emoji_html: "%{name} legði upp nýtt kenslutekn %{target}" @@ -1835,7 +1835,7 @@ fo: delete_statuses: Summir av postum tínum eru staðfestir at vera í stríði við eina ella fleiri av leiðreglunum og eru tí strikaðir av umsjónarfólkunum á %{instance}. disable: Tú kanst ikki longur brúka tína kontu, men vangi tín og aðrar dátur eru óskalað. Tú kanst biðja um trygdaravrit av tínum dátum, broyta kontustillingar ella strika tína kontu. mark_statuses_as_sensitive: Summir av postum tínum eru merktir sum viðkvæmir av umsjónarfólkunum á %{instance}. Hetta merkir, at fólk mugu trýsta á miðilin í postinum, áðrenn ein undanvísing verður víst. Tú kanst sjálv/ur merkja miðlar viðkvæmar, tá tú postar í framtíðini. - sensitive: Frá nú av, so verða allar miðlafílur, sum tú leggur upp, merktar sum viðkvæmar og fjaldar aftan fyri eina ávarðing. + sensitive: Frá nú av, so verða allar miðlafílur, sum tú leggur upp, merktar sum viðkvæmar og fjaldar aftan fyri eina ávaring. silence: Tú kanst framvegis brúka kontu tína, men einans fólk, sum longu fylgja tær, fara at síggja tínar postar á hesum ambætaranum, og tú kanst vera hildin uttanfyri ymiskar leitihentleikar. Tó so, onnur kunnu framvegis fylgja tær beinleiðis. suspend: Tú kanst ikki longur brúka kontu tína og vangin og aðrar dátur eru ikki longur atkomulig. Tú kanst enn rita inn fyri at biðja um eitt trygdaravrit av tínum dátum, inntil dáturnar eru heilt burturbeindar um umleið 30 dagar, men vit varðveita nakrar grundleggjandi dátur fyri at forða tær í at støkka undan ógildingini. reason: 'Grund:' diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 712328deb83144..46cdcd3c68348f 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -350,6 +350,18 @@ ia: media_storage: Immagazinage de medios new_users: nove usatores opened_reports: reportos aperte + pending_appeals_html: + one: "%{count} appello pendente" + other: "%{count} appellos pendente" + pending_reports_html: + one: "%{count} reporto pendente" + other: "%{count} reportos pendente" + pending_tags_html: + one: "%{count} hashtag pendente" + other: "%{count} hashtags pendente" + pending_users_html: + one: "%{count} usator pendente" + other: "%{count} usatores pendente" resolved_reports: reportos resolvite software: Software sources: Fontes de inscription @@ -972,21 +984,40 @@ ia: silence: pro limitar lor conto suspend: pro suspender lor conto body: "%{target} appella un decision de moderation per %{action_taken_by} ab le %{date}, que era %{type}. Ille scribeva:" + next_steps: Tu pote approbar le appello a disfacer le decision de moderation, o ignorar lo. + subject: "%{username} appella un decision de moderation sur %{instance}" new_critical_software_updates: + body: Nove versiones critic de Mastodon ha essite publicate, tu poterea voler actualisar al plus tosto possibile! subject: Actualisationes critic de Mastodon es disponibile pro %{instance}! + new_pending_account: + body: Le detalios del nove conto es infra. + subject: Nove conto preste a revider sur %{instance} (%{username}) + new_report: + body: "%{reporter} ha reportate %{target}" + body_remote: Alcuno de %{domain} ha reportate %{target} + subject: Nove reporto pro %{instance} (#%{id}) new_software_updates: subject: Nove versiones de Mastodon es disponibile pro %{instance}! new_trends: + body: 'Le sequente elementos besoniar de un recension ante que illos pote esser monstrate publicamente:' new_trending_links: title: Ligamines de tendentia new_trending_statuses: title: Messages de tendentia new_trending_tags: title: Hashtags de tendentia + subject: Nove tendentias pro recenser sur %{instance} aliases: add_new: Crear alias + created_msg: Create con successo un nove alias. Ora tu pote initiar le motion ab le vetere conto. + deleted_msg: Removite con successo le alias. Mover de ille conto a isto non sera plus possibile. + empty: Tu non ha aliases. + hint_html: Si tu desira mover ab un altere conto a isto, ci tu pote crear un alias, que es requirite ante que tu pote continuar con mover sequaces ab le vetere conto a isto. Iste action per se mesme es innocue e reversibile. Le migration de conto es initiate ab le vetere conto. + remove: Disligar alias appearance: advanced_web_interface: Interfacie web avantiate + advanced_web_interface_hint: 'Si tu desira facer uso de tu integre largessa de schermo, le interfacie web avantiate te permitte de configurar plure columnas differente pro vider al mesme tempore tante informationes como tu vole: pagina principal, notificationes, chronogramma federate, ulle numero de listas e hashtags.' + animations_and_accessibility: Animationes e accessibilitate confirmation_dialogs: Dialogos de confirmation discovery: Discoperta localization: @@ -1013,6 +1044,7 @@ ia: auth: apply_for_account: Peter un conto captcha_confirmation: + help_html: Si tu ha problemas a solver le CAPTCHA, tu pote contactar nos per %{email} e nos pote assister te. hint_html: Justo un altere cosa! Nos debe confirmar que tu es un human (isto es assi proque nos pote mantener foras le spam!). Solve le CAPTCHA infra e clicca "Continuar". title: Controlo de securitate confirmations: @@ -1054,6 +1086,7 @@ ia: status: account_status: Stato del conto view_strikes: Examinar le admonitiones passate contra tu conto + use_security_key: Usar clave de securitate challenge: confirm: Continuar invalid_password: Contrasigno non valide @@ -1066,13 +1099,22 @@ ia: x_days: "%{count}d" x_minutes: "%{count} m" deletes: + challenge_not_passed: Le informationes que tu ha inserite non era correcte confirm_password: Insere tu contrasigno actual pro verificar tu identitate + confirm_username: Insere tu actual contrasigno pro verificar tu identitate proceed: Deler le conto success_msg: Tu conto esseva delite con successo warning: + before: 'Insere tu nomine de usator pro confirmar le procedura:' + caches: Contente que ha essite in cache per altere servitores pote persister data_removal: Tu messages e altere datos essera removite permanentemente email_change_html: Tu pote cambiar tu adresse de e-mail sin deler tu conto + email_contact_html: Si illo ancora non arriva, tu pote inviar email a %{email} pro peter adjuta + email_reconfirmation_html: Si tu non recipe le email de confirmation, tu pote politica de confidentialitate. username_available: Tu nomine de usator essera disponibile novemente + username_unavailable: Tu nomine de usator remanera indisponibile disputes: strikes: action_taken: Action prendite @@ -1103,24 +1145,41 @@ ia: your_appeal_approved: Tu appello ha essite approbate your_appeal_pending: Tu ha submittite un appello your_appeal_rejected: Tu appello ha essite rejectate + domain_validator: + invalid_domain: non es un nomine de dominio valide edit_profile: basic_information: Information basic other: Alteres errors: + '400': Le requesta que tu inviava era non valide o mal formate. + '403': Tu non ha le permisso pro acceder a iste pagina. + '404': Le pagina que tu cerca non es ci. + '406': Iste pagina non es disponibile in le formato requirite. + '410': Le pagina que tu cercava non plus existe ci. '422': content: Le verification de securitate ha fallite. Bloca tu le cookies? title: Falleva le verification de securitate + '429': Troppe requestas + '500': + content: Nos lo regretta, ma alco errate eveniva sur nostre extremo. + title: Iste pagina non es correcte + '503': Le pagina non poteva esser servite per un panna de servitor temporari. + noscript_html: A usar le application web Mastodon, activa JavaScript. In alternativa, tenta un del apps native de Mastodon pro tu platteforma. existing_username_validator: + not_found: impossibile trovar un usator local con ille nomine de usator not_found_multiple: non poteva trovar %{usernames} exports: archive_takeout: date: Data download: Discargar tu archivo + hint_html: Tu pote requirer un archivo de tu messages e medios cargate. Le datos exportate sera in le formato ActivityPub, legibile per ulle software conforme. + in_progress: Compilante tu archivo... size: Dimension blocks: Tu ha blocate bookmarks: Marcapaginas csv: CSV domain_blocks: Blocadas de dominio + lists: Listas mutes: Tu ha silentiate storage: Immagazinage de medios featured_tags: @@ -1146,6 +1205,9 @@ ia: new: save: Salveguardar nove filtro title: Adder nove filtro + statuses: + index: + title: Messages filtrate generic: all: Toto cancel: Cancellar @@ -1153,6 +1215,7 @@ ia: confirm: Confirmar copy: Copiar delete: Deler + none: Nemo order_by: Ordinar per save_changes: Salvar le cambios today: hodie @@ -1162,6 +1225,8 @@ ia: invalid_csv_file: 'File CSV non valide. Error: %{error}' too_large: Le file es troppo longe failures: Fallimentos + modes: + overwrite_long: Reimplaciar registros actual con le noves overwrite_preambles: blocking_html: Tu es sur le puncto de reimplaciar tu lista de blocadas per usque a %{total_items} contos proveniente de %{filename}. domain_blocking_html: Tu es sur le puncto de reimplaciar tu lista de blocadas de dominio per usque a %{total_items} dominios proveniente de %{filename}. @@ -1170,7 +1235,14 @@ ia: domain_blocking_html: Tu es sur le puncto de blocar usque a %{total_items} dominios a partir de %{filename}. preface: Tu pote importar datos que tu ha exportate de un altere servitor, como un lista de personas que tu seque o bloca. recent_imports: Importationes recente + states: + finished: Terminate + in_progress: In curso + scheduled: Planificate + unconfirmed: Non confirmate status: Stato + success: Tu datos era cargate con successo e sera processate in tempore debite + time_started: Initiate le titles: blocking: Importation de contos blocate bookmarks: Importation de marcapaginas @@ -1186,7 +1258,9 @@ ia: blocking: Lista de blocadas bookmarks: Marcapaginas domain_blocking: Lista de dominios blocate + following: Sequente lista lists: Listas + muting: Lista del silentiates upload: Incargar invites: delete: Disactivar @@ -1199,10 +1273,16 @@ ia: '604800': 1 septimana '86400': 1 die expires_in_prompt: Nunquam + generate: Generar ligamine de invitation + invalid: Iste invitation non es valide + max_uses: + one: un uso + other: "%{count} usos" title: Invitar personas login_activities: authentication_methods: password: contrasigno + webauthn: claves de securitate mail_subscriptions: unsubscribe: action: Si, desubscriber @@ -1220,10 +1300,16 @@ ia: title: Desubcriber migrations: errors: + move_to_self: non pote esser le conto actual not_found: non poterea esser trovate + moderation: + title: Moderation move_handler: carry_blocks_over_text: Iste usator ha cambiate de conto desde %{acct}, que tu habeva blocate. notification_mailer: + admin: + sign_up: + subject: "%{name} se ha inscribite" follow: title: Nove sequitor follow_request: @@ -1232,16 +1318,25 @@ ia: action: Responder poll: subject: Un inquesta de %{name} ha finite + otp_authentication: + enable: Activar pagination: next: Sequente preferences: other: Altere public_timelines: Chronologias public + privacy: + privacy: Confidentialitate + search: Cercar privacy_policy: title: Politica de confidentialitate relationships: activity: Activitate del conto + invited: Invitate most_recent: Plus recente + moved: Movite + mutual: Mutue + primary: Primari status: Stato del conto rss: content_warning: 'Advertimento de contento:' @@ -1273,6 +1368,7 @@ ia: current_session: Session actual date: Data description: "%{browser} sur %{platform}" + ip: IP platforms: adobe_air: Adobe Air android: Android @@ -1287,6 +1383,7 @@ ia: windows: Windows windows_mobile: Windows Mobile windows_phone: Windows Phone + title: Sessiones settings: account: Conto account_settings: Parametros de conto @@ -1316,6 +1413,7 @@ ia: vote: Votar show_more: Monstrar plus visibilities: + direct: Directe private_long: Solmente monstrar a sequitores public: Public statuses_cleanup: @@ -1342,6 +1440,7 @@ ia: add: Adder disable: Disactivar 2FA edit: Modificar + generate_recovery_codes: Generar codices de recuperation user_mailer: appeal_approved: action: Parametros de conto @@ -1350,8 +1449,11 @@ ia: explanation: Le appello contra le admonition contra tu conto del %{strike_date}, que tu ha submittite le %{appeal_date}, ha essite rejectate. warning: appeal: Submitter un appello + categories: + spam: Spam subject: disable: Tu conto %{acct} ha essite gelate + mark_statuses_as_sensitive: Tu messages sur %{acct} ha essite marcate como sensibile none: Advertimento pro %{acct} sensitive: Tu messages sur %{acct} essera marcate como sensibile a partir de ora silence: Tu conto %{acct} ha essite limitate @@ -1370,8 +1472,12 @@ ia: apps_step: Discarga nostre applicationes official. apps_title: Applicationes de Mastodon edit_profile_action: Personalisar + edit_profile_step: Impulsa tu interactiones con un profilo comprehensive. edit_profile_title: Personalisar tu profilo + explanation: Ecce alcun consilios pro initiar feature_action: Apprender plus + feature_audience_title: Crea tu auditorio in fiducia + feature_moderation_title: Moderation como deberea esser follow_action: Sequer post_title: Face tu prime message share_action: Compartir diff --git a/config/locales/ie.yml b/config/locales/ie.yml index 2b819c53de616e..473d7b750f6741 100644 --- a/config/locales/ie.yml +++ b/config/locales/ie.yml @@ -751,6 +751,7 @@ ie: desc_html: To ci usa extern scrites de hCaptcha, quel posse esser ínquietant pro rasones de securitá e privatie. In plu, it posse far li processu de registration mult plu desfacil (particularimen por tis con deshabilitás). Pro ti rasones, ples considerar alternativ mesuras, tales quam registration per aprobation o invitation. title: Exige que nov usatores solue un CAPTCHA por confirmar lor conto content_retention: + danger_zone: Zone de dangere preamble: Decider qualmen usator-generat contenete es inmagasinat in Mastodon. title: Retention de contenete default_noindex: @@ -1659,6 +1660,7 @@ ie: preferences: Preferenties profile: Public profil relationships: Sequetes e sequitores + severed_relationships: Detranchat relationes statuses_cleanup: Automatisat deletion de postas strikes: Admonimentes moderatori two_factor_authentication: 2-factor autentication @@ -1672,6 +1674,7 @@ ie: lost_followers: Perdit sequitores lost_follows: Perdit sequetes preamble: Tu posse perdir tis queles tu seque e tui sequitores quande tu blocca un domonia o quande tui moderatores decide suspender un lontan servitor. Tande, tu va posser descargar listes de dejuntet relationes, a inspecter e possibilmen importar sur un altri servitor. + purged: Information pri ti-ci servitor ha esset purgat per li administratores de tui servitor. type: Eveniment statuses: attached: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index b815cada5c7f74..552afa83014561 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -507,6 +507,8 @@ lt: roles: everyone: Numatytieji leidimai everyone_full_description_html: Tai – bazinis vaidmuo, turintis įtakos visiems naudotojams, net ir tiems, kurie neturi priskirto vaidmens. Visi kiti vaidmenys iš jo paveldi teises. + privileges: + manage_taxonomies_description: Leidžia naudotojams peržiūrėti tendencingą turinį ir atnaujinti saitažodžių nustatymus settings: captcha_enabled: desc_html: Tai priklauso nuo hCaptcha išorinių skriptų, kurie gali kelti susirūpinimą dėl saugumo ir privatumo. Be to, dėl to registracijos procesas kai kuriems žmonėms (ypač neįgaliesiems) gali būti gerokai sunkiau prieinami. Dėl šių priežasčių apsvarstyk alternatyvias priemones, pavyzdžiui, patvirtinimu arba kvietimu grindžiamą registraciją. @@ -514,6 +516,7 @@ lt: danger_zone: Pavojinga zona discovery: public_timelines: Viešieji laiko skalės + trends: Tendencijos domain_blocks: all: Visiems registrations: @@ -526,6 +529,7 @@ lt: title: Medija no_status_selected: Jokie statusai nebuvo pakeisti, nes niekas nepasirinkta title: Paskyros statusai + trending: Tendencinga with_media: Su medija system_checks: elasticsearch_health_yellow: @@ -536,8 +540,45 @@ lt: message_html: Tavo Elasticsearch klasteris turi tik vieną mazgą, ES_PRESET turėtų būti nustatyta į single_node_cluster. title: Administracija trends: + allow: Leisti + approved: Patvirtinta + disallow: Neleisti + links: + allow: Leisti nuorodą + allow_provider: Leisti leidėją + description_html: Tai – nuorodos, kuriomis šiuo metu daug bendrinasi paskyros, iš kurių tavo serveris mato įrašus. Tai gali padėti naudotojams sužinoti, kas vyksta pasaulyje. Jokios nuorodos nerodomos viešai, kol nepatvirtinai leidėjo. Taip pat gali leisti arba atmesti atskiras nuorodas. + disallow: Neleisti nuorodą + disallow_provider: Neleisti leidėją + no_link_selected: Jokios nuorodos nebuvo pakeistos, nes nebuvo pasirinkta nė viena + publishers: + no_publisher_selected: Jokie leidėjai nebuvo pakeisti, nes nė vienas nebuvo pasirinktas + title: Tendencingos nuorodos + usage_comparison: Bendrinta %{today} kartų šiandien, palyginti su %{yesterday} vakar + not_allowed_to_trend: Neleidžiama tendencinguoti + only_allowed: Leidžiama tik + pending_review: Laukiama peržiūros preview_card_providers: + allowed: Nuorodos iš šio leidėjo gali tendencinguoti + description_html: Tai – domenai, iš kurių dažnai bendrinamos nuorodos tavo serveryje. Nuorodos netendencinguos, nebent nuorodos domenas yra patvirtintas. Tavo patvirtinimas (arba atmetimas) apima ir subdomenus. + rejected: Nuorodos iš šio leidėjo netendencinguos title: Leidėjai + rejected: Atmesta + statuses: + allow: Leisti įrašą + allow_account: Leisti autorių (-ę) + description_html: Tai – įrašai, apie kuriuos žino tavo serveris ir kuriais šiuo metu daug bendrinamasi ir kurie yra mėgstami. Tai gali padėti naujiems ir grįžtantiems naudotojams rasti daugiau žmonių, kuriuos galima sekti. Jokie įrašai nerodomi viešai, kol nepatvirtinai autoriaus (-ės), o autorius (-ė) leidžia savo paskyrą siūlyti kitiems. Taip pat gali leisti arba atmesti atskirus įrašus. + disallow: Neleisti įrašą + disallow_account: Neleisti autorių (-ę) + no_status_selected: Jokie tendencingi įrašai nebuvo pakeisti, nes nė vienas iš jų nebuvo pasirinktas + not_discoverable: Autorius (-ė) nesutiko, kad būtų galima juos atrasti + title: Tendencingi įrašai + tags: + not_trendable: Nepasirodys tendencijose + title: Tendencingos saitažodžiai + trendable: Gali pasirodyti tendencijose + trending_rank: 'Tendencinga #%{rank}' + title: Tendencijos + trending: Tendencinga warning_presets: add_new: Pridėti naują delete: Ištrinti @@ -554,6 +595,14 @@ lt: body: "%{reporter} parašė skundą apie %{target}" body_remote: Kažkas iš %{domain} parašė skundą apie %{target} subject: Naujas skundas %{instance} (#%{id}) + new_trends: + new_trending_links: + title: Tendencingos nuorodos + new_trending_statuses: + title: Tendencingi įrašai + new_trending_tags: + title: Tendencingos saitažodžiai + subject: Naujos tendencijos peržiūrimos %{instance} appearance: advanced_web_interface: Išplėstinė žiniatinklio sąsaja advanced_web_interface_hint: 'Jei nori išnaudoti visą ekrano plotį, išplėstinė žiniatinklio sąsaja leidžia sukonfigūruoti daug skirtingų stulpelių, kad vienu metu matytum tiek informacijos, kiek tik nori: Pagrindinis, pranešimai, federacinė laiko skalė, bet kokie sąrašai ir saitažodžiai.' @@ -925,8 +974,8 @@ lt: follows_subtitle: Sek gerai žinomas paskyras. follows_title: Ką sekti follows_view_more: Peržiūrėti daugiau sekamų žmonių - hashtags_subtitle: Naršyk, kas tendencinga per pastarąsias 2 dienas. - hashtags_title: Trendingiausi saitažodžiai + hashtags_subtitle: Naršyk, kas tendencinga per pastarąsias 2 dienas + hashtags_title: Tendencingos saitažodžiai hashtags_view_more: Peržiūrėti daugiau tendencingų saitažodžių post_action: Sukurti post_step: Sakyk labas pasauliui tekstu, nuotraukomis, vaizdo įrašais arba apklausomis. diff --git a/config/locales/simple_form.cs.yml b/config/locales/simple_form.cs.yml index 54edc4149df4a6..0b1a34e1b99dec 100644 --- a/config/locales/simple_form.cs.yml +++ b/config/locales/simple_form.cs.yml @@ -77,11 +77,13 @@ cs: warn: Schovat filtrovaný obsah za varováním zmiňujicím název filtru form_admin_settings: activity_api_enabled: Počty lokálně zveřejnělých příspěvků, aktivních uživatelů a nových registrací v týdenních intervalech + app_icon: WEBP, PNG, GIF nebo JPG. Nahradí výchozí ikonu aplikace v mobilních zařízeních vlastní ikonou. backups_retention_period: Uživatelé mají možnost vytvářet archivy svých příspěvků, které si mohou stáhnout později. Pokud je nastaveno na kladnou hodnotu, budou tyto archivy po zadaném počtu dní automaticky odstraněny z úložiště. bootstrap_timeline_accounts: Tyto účty budou připnuty na vrchol nových uživatelů podle doporučení. closed_registrations_message: Zobrazeno při zavření registrace content_cache_retention_period: Všechny příspěvky z jiných serverů (včetně boostů a odpovědí) budou po uplynutí stanoveného počtu dní smazány bez ohledu na interakci místního uživatele s těmito příspěvky. To se týká i příspěvků, které místní uživatel přidal do záložek nebo oblíbených. Soukromé zmínky mezi uživateli z různých instancí budou rovněž ztraceny a nebude možné je obnovit. Použití tohoto nastavení je určeno pro instance pro speciální účely a při implementaci pro obecné použití porušuje mnohá očekávání uživatelů. custom_css: Můžete použít vlastní styly ve verzi Mastodonu. + favicon: WEBP, PNG, GIF nebo JPG. Nahradí výchozí favicon Mastodonu vlastní ikonou. mascot: Přepíše ilustraci v pokročilém webovém rozhraní. media_cache_retention_period: Mediální soubory z příspěvků vzdálených uživatelů se ukládají do mezipaměti na vašem serveru. Pokud je nastaveno na kladnou hodnotu, budou média po zadaném počtu dní odstraněna. Pokud jsou mediální data vyžádána po jejich odstranění, budou znovu stažena, pokud je zdrojový obsah stále k dispozici. Vzhledem k omezením týkajícím se četnosti dotazů karet náhledů odkazů na weby třetích stran se doporučuje nastavit tuto hodnotu alespoň na 14 dní, jinak nebudou karty náhledů odkazů na vyžádání aktualizovány dříve. peers_api_enabled: Seznam názvů domén se kterými se tento server setkal ve fediversu. Neobsahuje žádná data o tom, zda jste federovali s daným serverem, pouze že o něm váš server ví. Toto je využíváno službami, které sbírají o federování statistiku v obecném smyslu. diff --git a/config/locales/simple_form.es-MX.yml b/config/locales/simple_form.es-MX.yml index 90e223dec3edfc..b3c8a857e83411 100644 --- a/config/locales/simple_form.es-MX.yml +++ b/config/locales/simple_form.es-MX.yml @@ -77,11 +77,13 @@ es-MX: warn: Ocultar el contenido filtrado detrás de una advertencia mencionando el título del filtro form_admin_settings: activity_api_enabled: Conteo de publicaciones publicadas localmente, usuarios activos, y nuevos registros en periodos semanales + app_icon: WEBP, PNG, GIF o JPG. Reemplaza el icono de aplicación predeterminado en dispositivos móviles con un icono personalizado. backups_retention_period: Los usuarios tienen la capacidad de generar archivos de sus mensajes para descargar más adelante. Cuando se establece un valor positivo, estos archivos se eliminarán automáticamente del almacenamiento después del número de días especificado. bootstrap_timeline_accounts: Estas cuentas aparecerán en la parte superior de las recomendaciones de los nuevos usuarios. closed_registrations_message: Mostrado cuando los registros están cerrados content_cache_retention_period: Todas las publicaciones de otros servidores (incluso impulsos y respuestas) se eliminarán después del número de días especificado, sin tener en cuenta la interacción del usuario local con esos mensajes. Esto incluye mensajes donde un usuario local los ha marcado como marcadores o favoritos. Las menciones privadas entre usuarios de diferentes instancias también se perderán sin posibilidad de recuperación. El uso de esta configuración está destinado a instancias de propósito especial, y rompe muchas expectativas de los usuarios cuando se implementa para un uso de propósito general. custom_css: Puedes aplicar estilos personalizados a la versión web de Mastodon. + favicon: WEBP, PNG, GIF o JPG. Reemplaza el favicon predeterminado de Mastodon con un icono personalizado. mascot: Reemplaza la ilustración en la interfaz web avanzada. media_cache_retention_period: Los archivos multimedia de las publicaciones creadas por usuarios remotos se almacenan en caché en tu servidor. Cuando se establece un valor positivo, estos archivos se eliminarán después del número especificado de días. Si los datos multimedia se solicitan después de eliminarse, se volverán a descargar, si el contenido fuente todavía está disponible. Debido a restricciones en la frecuencia con la que las tarjetas de previsualización de enlaces realizan peticiones a sitios de terceros, se recomienda establecer este valor a al menos 14 días, o las tarjetas de previsualización de enlaces no se actualizarán bajo demanda antes de ese momento. peers_api_enabled: Una lista de nombres de dominio que este servidor ha encontrado en el fediverso. Aquí no se incluye ningún dato sobre si usted federa con un servidor determinado, sólo que su servidor lo sabe. Esto es utilizado por los servicios que recopilan estadísticas sobre la federación en un sentido general. diff --git a/config/locales/simple_form.es.yml b/config/locales/simple_form.es.yml index 1d75bc4234ea0c..2fb5cab987f793 100644 --- a/config/locales/simple_form.es.yml +++ b/config/locales/simple_form.es.yml @@ -77,11 +77,13 @@ es: warn: Ocultar el contenido filtrado detrás de una advertencia mencionando el título del filtro form_admin_settings: activity_api_enabled: Conteo de publicaciones publicadas localmente, usuarios activos y registros nuevos cada semana + app_icon: WEBP, PNG, GIF o JPG. Reemplaza el icono de aplicación predeterminado en dispositivos móviles con un icono personalizado. backups_retention_period: Los usuarios tienen la capacidad de generar archivos de sus mensajes para descargar más adelante. Cuando se establece un valor positivo, estos archivos se eliminarán automáticamente del almacenamiento después del número de días especificado. bootstrap_timeline_accounts: Estas cuentas aparecerán en la parte superior de las recomendaciones de los nuevos usuarios. closed_registrations_message: Mostrado cuando los registros están cerrados content_cache_retention_period: Todas las publicaciones de otros servidores (incluso impulsos y respuestas) se eliminarán después del número de días especificado, sin tener en cuenta la interacción del usuario local con esos mensajes. Esto incluye mensajes donde un usuario local los ha marcado como marcadores o favoritos. Las menciones privadas entre usuarios de diferentes instancias también se perderán sin posibilidad de recuperación. El uso de esta configuración está destinado a instancias de propósito especial, y rompe muchas expectativas de los usuarios cuando se implementa para un uso de propósito general. custom_css: Puedes aplicar estilos personalizados a la versión web de Mastodon. + favicon: WEBP, PNG, GIF o JPG. Reemplaza el favicon predeterminado de Mastodon con un icono personalizado. mascot: Reemplaza la ilustración en la interfaz web avanzada. media_cache_retention_period: Los archivos multimedia de las publicaciones creadas por usuarios remotos se almacenan en caché en tu servidor. Cuando se establece un valor positivo, estos archivos se eliminarán después del número especificado de días. Si los datos multimedia se solicitan después de eliminarse, se volverán a descargar, si el contenido fuente todavía está disponible. Debido a restricciones en la frecuencia con la que las tarjetas de previsualización de enlaces realizan peticiones a sitios de terceros, se recomienda establecer este valor a al menos 14 días, o las tarjetas de previsualización de enlaces no se actualizarán bajo demanda antes de ese momento. peers_api_enabled: Una lista de nombres de dominio que este servidor ha encontrado en el Fediverso. Aquí no se incluye ningún dato sobre si federas con un servidor determinado, solo que tu servidor lo conoce. Esto es utilizado por los servicios que recopilan estadísticas sobre la federación en un sentido general. diff --git a/config/locales/simple_form.ie.yml b/config/locales/simple_form.ie.yml index e482bd828c899b..2b995e7efa5e8a 100644 --- a/config/locales/simple_form.ie.yml +++ b/config/locales/simple_form.ie.yml @@ -77,10 +77,15 @@ ie: warn: Celar li contenete filtrat detra un avise mentionant li titul del filtre form_admin_settings: activity_api_enabled: Númeres de postas publicat localmen, activ usatores, e nov adhesiones in periodes semanal + app_icon: WEBP, PNG, GIF o JPG. Remplazza li predenifit favicon Mastodon sur mobiles con un icon customisat. + backups_retention_period: Usatores posse generar archives de lor postas por adcargar plu tard. Si on specifica un valore positiv, li archives va esser automaticmen deletet de tui magazinage pos li specificat quantitá de dies. bootstrap_timeline_accounts: Ti-ci contos va esser pinglat al parte superiori del recomandationes por nov usatores. closed_registrations_message: Monstrat quande adhesiones es cludet + content_cache_retention_period: Omni postas de altri servitores (includente boosts e responses) va esser deletet pos li specificat quantitá de dies, sin egard a local usator-interactiones con les. To vale anc por postas queles un local usator ha marcat o favoritat it. Anc privat mentiones ínter usatores de diferent instanties va esser perdit e ínrestorabil. Talmen, ti-ci parametre es intentet por scopes special pro que it posse ruptes li expectationes de usatores. custom_css: On posse aplicar customisat stiles al web-version de Mastodon. + favicon: WEBP, PNG, GIF oo JPG. Remplazza li predenifit favicon Mastodon con in icon customisat. mascot: Substitue li ilustration in li avansat interfacie web. + media_cache_retention_period: Files de medie de postas creat de lontan usatores es cachat sur tui servitor. Si on specifica un valore positiv, ili va esser automaticmen deletet pos li specificat quantitá de dies. Si on peti li data del medie pos deletion, it va esser re-descargat si li original fonte es disponibil. Restrictiones pri li frequentie de ligament-previsiones posse exister sur altri situs, e pro to it es recomandat que on usa un valore de adminim 14 dies; altrimen, li ligament-previsiones ne va esser actualisat secun demande ante ti témpor. peers_api_enabled: Un liste de nómines de dominia queles ti-ci servitor ha incontrat in li fediverse. Ci null data es includet pri ca tu confedera con un cert servitor o ne; it indica solmen que tui servitor conosse it. Usat per servicies colectent general statisticas pri federation. profile_directory: Li profilarium monstra omni usatores volent esser decovribil. require_invite_text: Quande registrationes besona manual aprobation, fa que li textu "Pro quo tu vole registrar te?" es obligatori vice facultativ @@ -240,6 +245,7 @@ ie: backups_retention_period: Periode de retener archives de usator bootstrap_timeline_accounts: Sempre recomandar ti-ci contos a nov usatores closed_registrations_message: Customisat missage quande registration ne disponibil + content_cache_retention_period: Periode de retention por contenete lontan custom_css: Custom CSS mascot: Customisat mascot (hereditat) media_cache_retention_period: Periode de retention por cachat medie diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index caf4c5429965b2..c0698c3f7a755c 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -77,11 +77,13 @@ ja: warn: フィルタに一致した投稿を非表示にし、フィルタのタイトルを含む警告を表示します form_admin_settings: activity_api_enabled: 週単位でローカルで公開された投稿数、アクティブユーザー数、新規登録者数を表示します + app_icon: モバイル端末で表示されるデフォルトのアプリアイコンを独自のアイコンで上書きします。WEBP、PNG、GIF、JPGが利用可能です。 backups_retention_period: ユーザーには、後でダウンロードするために投稿のアーカイブを生成する機能があります。正の値に設定すると、これらのアーカイブは指定された日数後に自動的にストレージから削除されます。 bootstrap_timeline_accounts: これらのアカウントは、新しいユーザー向けのおすすめユーザーの一番上にピン留めされます。 closed_registrations_message: アカウント作成を停止している時に表示されます content_cache_retention_period: 他のサーバーからのすべての投稿(ブーストや返信を含む)は、指定された日数が経過すると、ローカルユーザーとのやりとりに関係なく削除されます。これには、ローカルユーザーがブックマークやお気に入りとして登録した投稿も含まれます。異なるサーバーのユーザー間の非公開な変身も失われ、復元することは不可能です。この設定の使用は特別な目的のインスタンスのためのものであり、一般的な目的のサーバーで使用するした場合、多くのユーザーの期待を裏切ることになります。 custom_css: ウェブ版のMastodonでカスタムスタイルを適用できます。 + favicon: デフォルトのMastodonのブックマークアイコンを独自のアイコンで上書きします。WEBP、PNG、GIF、JPGが利用可能です。 mascot: 上級者向けWebインターフェースのイラストを上書きします。 media_cache_retention_period: リモートユーザーが投稿したメディアファイルは、あなたのサーバーにキャッシュされます。正の値を設定すると、メディアは指定した日数後に削除されます。削除後にメディアデータが要求された場合、ソースコンテンツがまだ利用可能であれば、再ダウンロードされます。リンクプレビューカードがサードパーティのサイトを更新する頻度に制限があるため、この値を少なくとも14日に設定することをお勧めします。 peers_api_enabled: このサーバーが Fediverse で遭遇したドメイン名のリストです。このサーバーが知っているだけで、特定のサーバーと連合しているかのデータは含まれません。これは一般的に Fediverse に関する統計情報を収集するサービスによって使用されます。 diff --git a/config/locales/simple_form.ko.yml b/config/locales/simple_form.ko.yml index df4755c4fbc15d..54d36eafe0393f 100644 --- a/config/locales/simple_form.ko.yml +++ b/config/locales/simple_form.ko.yml @@ -78,11 +78,14 @@ ko: form_admin_settings: activity_api_enabled: 주별 로컬에 게시된 글, 활성 사용자 및 새로운 가입자 수 app_icon: WEBP, PNG, GIF 또는 JPG. 모바일 기기에 쓰이는 기본 아이콘을 대체합니다. + backups_retention_period: 사용자들은 나중에 다운로드하기 위해 게시물 아카이브를 생성할 수 있습니다. 양수로 설정된 경우 이 아카이브들은 지정된 일수가 지난 후에 저장소에서 자동으로 삭제될 것입니다. bootstrap_timeline_accounts: 이 계정들은 팔로우 추천 목록 상단에 고정됩니다. closed_registrations_message: 새 가입을 차단했을 때 표시됩니다 + content_cache_retention_period: 다른 서버의 모든 게시물(부스트 및 답글 포함)은 해당 게시물에 대한 로컬 사용자의 상호 작용과 관계없이 지정된 일수가 지나면 삭제됩니다. 여기에는 로컬 사용자가 북마크 또는 즐겨찾기로 표시한 게시물도 포함됩니다. 다른 인스턴스 사용자와 주고 받은 비공개 멘션도 손실되며 복원할 수 없습니다. 이 설정은 특수 목적의 인스턴스를 위한 것이며 일반적인 용도의 많은 사용자의 예상이 빗나가게 됩니다. custom_css: 사용자 지정 스타일을 웹 버전의 마스토돈에 지정할 수 있습니다. favicon: WEBP, PNG, GIF 또는 JPG. 기본 파비콘을 대체합니다. mascot: 고급 웹 인터페이스의 그림을 대체합니다. + media_cache_retention_period: 원격 사용자가 작성한 글의 미디어 파일은 이 서버에 캐시됩니다. 양수로 설정하면 지정된 일수 후에 미디어가 삭제됩니다. 삭제된 후에 미디어 데이터를 요청하면 원본 콘텐츠를 사용할 수 있는 경우 다시 다운로드됩니다. 링크 미리 보기 카드가 타사 사이트를 폴링하는 빈도에 제한이 있으므로 이 값을 최소 14일로 설정하는 것이 좋으며, 그렇지 않으면 그 이전에는 링크 미리 보기 카드가 제때 업데이트되지 않을 것입니다. peers_api_enabled: 이 서버가 연합우주에서 만났던 서버들에 대한 도메인 네임의 목록입니다. 해당 서버와 어떤 연합을 했는지에 대한 정보는 전혀 포함되지 않고, 단순히 그 서버를 알고 있는지에 대한 것입니다. 이것은 일반적으로 연합에 대한 통계를 수집할 때 사용됩니다. profile_directory: 프로필 책자는 발견되기를 희망하는 모든 사람들의 목록을 나열합니다. require_invite_text: 가입이 수동 승인을 필요로 할 때, "왜 가입하려고 하나요?" 항목을 선택사항으로 두는 것보다는 필수로 두는 것이 낫습니다 diff --git a/config/locales/simple_form.lt.yml b/config/locales/simple_form.lt.yml index 6631b59b19e7f0..1c73ce0a842a56 100644 --- a/config/locales/simple_form.lt.yml +++ b/config/locales/simple_form.lt.yml @@ -85,6 +85,7 @@ lt: thumbnail: Maždaug 2:1 dydžio vaizdas, rodomas šalia tavo serverio informacijos. timeline_preview: Atsijungę lankytojai galės naršyti naujausius viešus įrašus, esančius serveryje. trends: Trendai rodo, kurios įrašai, saitažodžiai ir naujienų istorijos tavo serveryje sulaukia didžiausio susidomėjimo. + trends_as_landing_page: Rodyti tendencingą turinį atsijungusiems naudotojams ir lankytojams vietoj šio serverio aprašymo. Reikia, kad tendencijos būtų įjungtos. rule: hint: Pasirinktinai. Pateik daugiau informacijos apie taisyklę. sessions: @@ -169,6 +170,9 @@ lt: site_title: Serverio pavadinimas theme: Numatytoji tema thumbnail: Serverio miniatūra + trendable_by_default: Leisti tendencijas be išankstinės peržiūros + trends: Įjungti tendencijas + trends_as_landing_page: Naudoti tendencijas kaip nukreipimo puslapį invite_request: text: Kodėl nori prisijungti? notification_emails: @@ -181,6 +185,7 @@ lt: software_updates: label: Yra nauja Mastodon versija patch: Pranešti apie klaidų ištaisymo atnaujinimus + trending_tag: Reikia peržiūros naujam tendencijai rule: hint: Papildoma informacija text: Taisyklė diff --git a/config/locales/th.yml b/config/locales/th.yml index 8a001d875581c5..56b7bea69a8ad8 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1838,6 +1838,9 @@ th: feature_action: เรียนรู้เพิ่มเติม feature_audience: Mastodon มีความพิเศษที่ให้คุณจัดการผู้รับสารของคุณได้โดยไม่มีตัวกลาง นอกจากนี้ การติดตั้ง Mastodon บนโครงสร้างพื้นฐานของคุณจะทำให้คุณสามารถติดตาม (และติดตามโดย) เซิร์ฟเวอร์ Mastodon แห่งไหนก็ได้ที่ทำงานอยู่ โดยไม่มีใครสามารถควบคุมได้นอกจากคุณ feature_audience_title: สร้างผู้ชมของคุณด้วยความมั่นใจ + feature_control_title: การควบคุมเส้นเวลาของคุณเอง + feature_creativity_title: ความคิดสร้างสรรค์ที่ไม่มีใครเทียบได้ + feature_moderation_title: การกลั่นกรองในแบบที่ควรจะเป็น follow_action: ติดตาม follow_step: การติดตามผู้คนที่น่าสนใจคือสิ่งที่ Mastodon ให้ความสำคัญ follow_title: ปรับแต่งฟีดหน้าแรกของคุณ From b5b84fad65f927a1bf55538be4a4763199724a6e Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 14 May 2024 19:54:28 +0200 Subject: [PATCH 037/113] Fix OpenSearch compatibility issue (#30278) --- .github/workflows/test-ruby.yml | 20 ++++++++++++++++++-- config/application.rb | 1 + lib/elasticsearch/client_extensions.rb | 11 +++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 lib/elasticsearch/client_extensions.rb diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index 45dc8a0deb816e..2bfa59e6b12177 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -264,8 +264,8 @@ jobs: ports: - 6379:6379 - search: - image: ${{ matrix.search-image }} + elasticsearch: + image: ${{ contains(matrix.search-image, 'elasticsearch') && matrix.search-image || '' }} env: discovery.type: single-node xpack.security.enabled: false @@ -277,6 +277,20 @@ jobs: ports: - 9200:9200 + opensearch: + image: ${{ contains(matrix.search-image, 'opensearch') && matrix.search-image || '' }} + env: + discovery.type: single-node + DISABLE_INSTALL_DEMO_CONFIG: true + DISABLE_SECURITY_PLUGIN: true + options: >- + --health-cmd "curl http://localhost:9200/_cluster/health" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + ports: + - 9200:9200 + env: DB_HOST: localhost DB_USER: postgres @@ -300,6 +314,8 @@ jobs: include: - ruby-version: '.ruby-version' search-image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2 + - ruby-version: '.ruby-version' + search-image: opensearchproject/opensearch:2 steps: - uses: actions/checkout@v4 diff --git a/config/application.rb b/config/application.rb index 402c7f0614de22..07b50ca036ba99 100644 --- a/config/application.rb +++ b/config/application.rb @@ -40,6 +40,7 @@ require_relative '../lib/public_file_server_middleware' require_relative '../lib/devise/strategies/two_factor_ldap_authenticatable' require_relative '../lib/devise/strategies/two_factor_pam_authenticatable' +require_relative '../lib/elasticsearch/client_extensions' require_relative '../lib/chewy/settings_extensions' require_relative '../lib/chewy/index_extensions' require_relative '../lib/chewy/strategy/mastodon' diff --git a/lib/elasticsearch/client_extensions.rb b/lib/elasticsearch/client_extensions.rb new file mode 100644 index 00000000000000..700bfa4a1c6bca --- /dev/null +++ b/lib/elasticsearch/client_extensions.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Elasticsearch + module ClientExtensions + def verify_elasticsearch + @verified = true + end + end +end + +Elasticsearch::Client.prepend(Elasticsearch::ClientExtensions) From 1bf661cddbc614d4076e9d9e855575fc29e976c0 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Tue, 14 May 2024 20:15:42 +0200 Subject: [PATCH 038/113] Fix missing prop warning for `` (#30291) --- app/javascript/mastodon/components/account.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/javascript/mastodon/components/account.jsx b/app/javascript/mastodon/components/account.jsx index 3282696d341b17..18a31cba244867 100644 --- a/app/javascript/mastodon/components/account.jsx +++ b/app/javascript/mastodon/components/account.jsx @@ -172,7 +172,6 @@ Account.propTypes = { onBlock: PropTypes.func, onMute: PropTypes.func, onMuteNotifications: PropTypes.func, - intl: PropTypes.object.isRequired, hidden: PropTypes.bool, minimal: PropTypes.bool, defaultAction: PropTypes.string, From 38a330f96328091fe39dd212ec053d5df3e2e36e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 10:25:34 +0200 Subject: [PATCH 039/113] fix(deps): update dependency core-js to v3.37.1 (#30293) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index f6dc8f161a813b..90a7791e26a314 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6381,9 +6381,9 @@ __metadata: linkType: hard "core-js@npm:^3.30.2": - version: 3.37.0 - resolution: "core-js@npm:3.37.0" - checksum: 10c0/7e00331f346318ca3f595c08ce9e74ddae744715aef137486c1399163afd79792fb94c3161280863adfdc3e30f8026912d56bd3036f93cacfc689d33e185f2ee + version: 3.37.1 + resolution: "core-js@npm:3.37.1" + checksum: 10c0/440eb51a7a39128a320225fe349f870a3641b96c9ecd26470227db730ef8c161ea298eaea621db66ec0ff622a85299efb4e23afebf889c0a1748616102307675 languageName: node linkType: hard From 508e93eb649fb490ea98904e2f64b372ec2ff610 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 10:25:50 +0200 Subject: [PATCH 040/113] chore(deps): update dependency fog-openstack to v1.1.1 (#30295) 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 efc99eb23d0c47..37910be8d3810f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -272,7 +272,7 @@ GEM fog-json (1.2.0) fog-core multi_json (~> 1.10) - fog-openstack (1.1.0) + fog-openstack (1.1.1) fog-core (~> 2.1) fog-json (>= 1.0) formatador (1.1.0) @@ -422,7 +422,7 @@ GEM memory_profiler (1.0.1) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0305) + mime-types-data (3.2024.0507) mini_mime (1.1.5) mini_portile2 (2.8.6) minitest (5.22.3) From 44e855db7830ab803820a9534f543702b9e9dca9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 08:26:22 +0000 Subject: [PATCH 041/113] chore(deps): update dependency nokogiri to v1.16.5 [security] (#30289) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 37910be8d3810f..95ab6f08f53015 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -445,7 +445,7 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.1) - nokogiri (1.16.4) + nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) nsa (0.3.0) From 40639510f88442f9e21f9400931038cce7a0518c Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Wed, 15 May 2024 10:27:34 +0200 Subject: [PATCH 042/113] Retain unconfirmed users longer (1 week) (#30285) --- app/workers/scheduler/user_cleanup_scheduler.rb | 7 +++++-- spec/workers/scheduler/user_cleanup_scheduler_spec.rb | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/workers/scheduler/user_cleanup_scheduler.rb b/app/workers/scheduler/user_cleanup_scheduler.rb index 2d2efc731a3908..63ea876e5078dc 100644 --- a/app/workers/scheduler/user_cleanup_scheduler.rb +++ b/app/workers/scheduler/user_cleanup_scheduler.rb @@ -3,6 +3,9 @@ class Scheduler::UserCleanupScheduler include Sidekiq::Worker + UNCONFIRMED_ACCOUNTS_MAX_AGE_DAYS = 7 + DISCARDED_STATUSES_MAX_AGE_DAYS = 30 + sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 1.day.to_i def perform @@ -13,7 +16,7 @@ def perform private def clean_unconfirmed_accounts! - User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 2.days.ago).reorder(nil).find_in_batches do |batch| + User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', UNCONFIRMED_ACCOUNTS_MAX_AGE_DAYS.days.ago).reorder(nil).find_in_batches do |batch| # We have to do it separately because of missing database constraints AccountModerationNote.where(target_account_id: batch.map(&:account_id)).delete_all Account.where(id: batch.map(&:account_id)).delete_all @@ -22,7 +25,7 @@ def clean_unconfirmed_accounts! end def clean_discarded_statuses! - Status.unscoped.discarded.where('deleted_at <= ?', 30.days.ago).find_in_batches do |statuses| + Status.unscoped.discarded.where('deleted_at <= ?', DISCARDED_STATUSES_MAX_AGE_DAYS.days.ago).find_in_batches do |statuses| RemovalWorker.push_bulk(statuses) do |status| [status.id, { 'immediate' => true, 'skip_streaming' => true }] end diff --git a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb index 8fda246ba81b8c..c3940901d4e2c8 100644 --- a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb @@ -14,7 +14,7 @@ before do # Need to update the already-existing users because their initialization overrides confirmation_sent_at new_unconfirmed_user.update!(confirmed_at: nil, confirmation_sent_at: Time.now.utc) - old_unconfirmed_user.update!(confirmed_at: nil, confirmation_sent_at: 1.week.ago) + old_unconfirmed_user.update!(confirmed_at: nil, confirmation_sent_at: 10.days.ago) confirmed_user.update!(confirmed_at: 1.day.ago) end From 7f7eba875376a44e01d4446902888e6afdd88908 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 10:34:50 +0200 Subject: [PATCH 043/113] chore(deps): update dependency letter_opener_web to v3 (#30296) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 247865aacfd5f5..b9baef7036cddc 100644 --- a/Gemfile +++ b/Gemfile @@ -178,7 +178,7 @@ group :development do # Preview mail in the browser gem 'letter_opener', '~> 1.8' - gem 'letter_opener_web', '~> 2.0' + gem 'letter_opener_web', '~> 3.0' # Security analysis CLI tools gem 'brakeman', '~> 6.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 95ab6f08f53015..2854528b737c44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -389,10 +389,10 @@ GEM addressable (~> 2.8) letter_opener (1.10.0) launchy (>= 2.2, < 4) - letter_opener_web (2.0.0) - actionmailer (>= 5.2) - letter_opener (~> 1.7) - railties (>= 5.2) + letter_opener_web (3.0.0) + actionmailer (>= 6.1) + letter_opener (~> 1.9) + railties (>= 6.1) rexml link_header (0.0.8) llhttp-ffi (0.5.0) @@ -434,7 +434,7 @@ GEM uri net-http-persistent (4.0.2) connection_pool (~> 2.2) - net-imap (0.4.10) + net-imap (0.4.11) date net-protocol net-ldap (0.19.0) @@ -686,7 +686,7 @@ GEM redlock (1.3.2) redis (>= 3.0.0, < 6.0) regexp_parser (2.9.0) - reline (0.5.6) + reline (0.5.7) io-console (~> 0.5) request_store (1.6.0) rack (>= 1.4) @@ -893,7 +893,7 @@ GEM xorcist (1.1.3) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.13) + zeitwerk (2.6.14) PLATFORMS ruby @@ -955,7 +955,7 @@ DEPENDENCIES kaminari (~> 1.2) kt-paperclip (~> 7.2) letter_opener (~> 1.8) - letter_opener_web (~> 2.0) + letter_opener_web (~> 3.0) link_header (~> 0.0) lograge (~> 0.12) mail (~> 2.8) From 78a8263f73ed8b07a1528e716f28858e0d817603 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 10:34:58 +0200 Subject: [PATCH 044/113] fix(deps): update dependency postcss-preset-env to v9.5.13 (#30286) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/yarn.lock b/yarn.lock index 90a7791e26a314..3741a541958f4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1617,15 +1617,15 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-cascade-layers@npm:^4.0.5": - version: 4.0.5 - resolution: "@csstools/postcss-cascade-layers@npm:4.0.5" +"@csstools/postcss-cascade-layers@npm:^4.0.6": + version: 4.0.6 + resolution: "@csstools/postcss-cascade-layers@npm:4.0.6" dependencies: - "@csstools/selector-specificity": "npm:^3.1.0" + "@csstools/selector-specificity": "npm:^3.1.1" postcss-selector-parser: "npm:^6.0.13" peerDependencies: postcss: ^8.4 - checksum: 10c0/2b6dd33b51df349dd89b12ebe3240d65accb0ba03e40288a72e26cf2307a7bdd742c42d9ff7a3f886cab19b2f8813978075f6ee61a985b0b7ceac7e2cbb29e04 + checksum: 10c0/134019e9b3f71de39034658e2a284f549883745a309f774d8d272871f9e65680e0981c893766537a8a56ed7f41dba2d0f9fc3cb4fa4057c227bc193976a2ec79 languageName: node linkType: hard @@ -1749,15 +1749,15 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-is-pseudo-class@npm:^4.0.7": - version: 4.0.7 - resolution: "@csstools/postcss-is-pseudo-class@npm:4.0.7" +"@csstools/postcss-is-pseudo-class@npm:^4.0.8": + version: 4.0.8 + resolution: "@csstools/postcss-is-pseudo-class@npm:4.0.8" dependencies: - "@csstools/selector-specificity": "npm:^3.1.0" + "@csstools/selector-specificity": "npm:^3.1.1" postcss-selector-parser: "npm:^6.0.13" peerDependencies: postcss: ^8.4 - checksum: 10c0/43668987df4608f822dbc323d3ac567fa7c192235b55933fd5d1855977ead80184512eb64a3f45a020fdd93711952ba8e9f9a280f4e981625b68a9ff074f9a01 + checksum: 10c0/82f191571c3e0973354a54ef15feeb17f9408b4abbefad19fc0f087683b1212fc854cdf09a47324267dd47be4c5cb47d63b8d083695a67c3f8f3e53df3d561f6 languageName: node linkType: hard @@ -1983,12 +1983,12 @@ __metadata: languageName: node linkType: hard -"@csstools/selector-specificity@npm:^3.0.3, @csstools/selector-specificity@npm:^3.1.0": - version: 3.1.0 - resolution: "@csstools/selector-specificity@npm:3.1.0" +"@csstools/selector-specificity@npm:^3.0.3, @csstools/selector-specificity@npm:^3.1.1": + version: 3.1.1 + resolution: "@csstools/selector-specificity@npm:3.1.1" peerDependencies: postcss-selector-parser: ^6.0.13 - checksum: 10c0/7f77f8377b637dcca7f7a9d6ace3329cf60f02cbd75f14241de30b1f5d00c961ec167572bc93517cdb2f106405a91119f026389a0f96dabae8dd67d1c7710e60 + checksum: 10c0/1d4a3f8015904d6aeb3203afe0e1f6db09b191d9c1557520e3e960c9204ad852df9db4cbde848643f78a26f6ea09101b4e528dbb9193052db28258dbcc8a6e1d languageName: node linkType: hard @@ -6577,16 +6577,16 @@ __metadata: languageName: node linkType: hard -"css-has-pseudo@npm:^6.0.4": - version: 6.0.4 - resolution: "css-has-pseudo@npm:6.0.4" +"css-has-pseudo@npm:^6.0.5": + version: 6.0.5 + resolution: "css-has-pseudo@npm:6.0.5" dependencies: - "@csstools/selector-specificity": "npm:^3.1.0" + "@csstools/selector-specificity": "npm:^3.1.1" postcss-selector-parser: "npm:^6.0.13" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/e9d440de483e15092ebaadb483502243f43e0457d4214c8012ebdba7a959e74d40714254bf97247780e65735512f248a55feda0b3975d9a5eaea9c746f7518f0 + checksum: 10c0/946930b7e699d6dbcb8426ebcd593228ee0e2143a148fb2399111ea4c9ed8d6eb3447e944251f1be44ae987d5ab16e450b0b006ca197f318c2a3760ba431fbb9 languageName: node linkType: hard @@ -13548,16 +13548,16 @@ __metadata: languageName: node linkType: hard -"postcss-nesting@npm:^12.1.3": - version: 12.1.3 - resolution: "postcss-nesting@npm:12.1.3" +"postcss-nesting@npm:^12.1.4": + version: 12.1.4 + resolution: "postcss-nesting@npm:12.1.4" dependencies: "@csstools/selector-resolve-nested": "npm:^1.1.0" - "@csstools/selector-specificity": "npm:^3.1.0" + "@csstools/selector-specificity": "npm:^3.1.1" postcss-selector-parser: "npm:^6.0.13" peerDependencies: postcss: ^8.4 - checksum: 10c0/6b2d3a4823e85592965c6c11f749c5357703256e7334388147d6a3bb72a3abbe47789afaa8535bdd7a9bd6d0099eb12ffec6c154050d8e8b8286b1adbed5b397 + checksum: 10c0/b3408de4c04b58a88a56fa81aeff59b12615c78d4f5a57e09c1ee47e74cff51f8c9cad1684da0059067303cf65b4b688f85f0c5ca8d54af8c4ab998f727ab9fd languageName: node linkType: hard @@ -13712,10 +13712,10 @@ __metadata: linkType: hard "postcss-preset-env@npm:^9.5.2": - version: 9.5.12 - resolution: "postcss-preset-env@npm:9.5.12" + version: 9.5.13 + resolution: "postcss-preset-env@npm:9.5.13" dependencies: - "@csstools/postcss-cascade-layers": "npm:^4.0.5" + "@csstools/postcss-cascade-layers": "npm:^4.0.6" "@csstools/postcss-color-function": "npm:^3.0.16" "@csstools/postcss-color-mix-function": "npm:^2.0.16" "@csstools/postcss-exponential-functions": "npm:^1.0.7" @@ -13725,7 +13725,7 @@ __metadata: "@csstools/postcss-hwb-function": "npm:^3.0.15" "@csstools/postcss-ic-unit": "npm:^3.0.6" "@csstools/postcss-initial": "npm:^1.0.1" - "@csstools/postcss-is-pseudo-class": "npm:^4.0.7" + "@csstools/postcss-is-pseudo-class": "npm:^4.0.8" "@csstools/postcss-light-dark-function": "npm:^1.0.5" "@csstools/postcss-logical-float-and-clear": "npm:^2.0.1" "@csstools/postcss-logical-overflow": "npm:^1.0.1" @@ -13747,7 +13747,7 @@ __metadata: autoprefixer: "npm:^10.4.19" browserslist: "npm:^4.22.3" css-blank-pseudo: "npm:^6.0.2" - css-has-pseudo: "npm:^6.0.4" + css-has-pseudo: "npm:^6.0.5" css-prefers-color-scheme: "npm:^9.0.1" cssdb: "npm:^8.0.0" postcss-attribute-case-insensitive: "npm:^6.0.3" @@ -13767,7 +13767,7 @@ __metadata: postcss-image-set-function: "npm:^6.0.3" postcss-lab-function: "npm:^6.0.16" postcss-logical: "npm:^7.0.1" - postcss-nesting: "npm:^12.1.3" + postcss-nesting: "npm:^12.1.4" postcss-opacity-percentage: "npm:^2.0.0" postcss-overflow-shorthand: "npm:^5.0.1" postcss-page-break: "npm:^3.0.4" @@ -13777,7 +13777,7 @@ __metadata: postcss-selector-not: "npm:^7.0.2" peerDependencies: postcss: ^8.4 - checksum: 10c0/3e0276b2061baa396547f9c0090fcb0c6149d3735c7aefa99a8e520701aae0b7265578b59d5e4efa9f5e61659c161e39590a5d63bac49469b99da1c549b63231 + checksum: 10c0/5bbb6e87b1b3acc816ef445836f85df5f50ac96bdc3d571952a83794c80863c652d27ab14c66f6b88f86f5664119d49b357e4184162022cc3436676f3fbe833b languageName: node linkType: hard From aad5e841b59691f001132a9cf96487db8389c77e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 10:53:57 +0200 Subject: [PATCH 045/113] New Crowdin Translations (automated) (#30290) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/cy.json | 1 + app/javascript/mastodon/locales/en-GB.json | 13 ++ app/javascript/mastodon/locales/gl.json | 1 + app/javascript/mastodon/locales/sk.json | 4 + config/locales/devise.ia.yml | 4 + config/locales/doorkeeper.en-GB.yml | 1 + config/locales/doorkeeper.ia.yml | 21 +++ config/locales/en-GB.yml | 1 + config/locales/ia.yml | 141 +++++++++++++++++++++ config/locales/simple_form.cy.yml | 2 + config/locales/simple_form.en-GB.yml | 6 + 11 files changed, 195 insertions(+) diff --git a/app/javascript/mastodon/locales/cy.json b/app/javascript/mastodon/locales/cy.json index 925b7710e008d2..2c597699591674 100644 --- a/app/javascript/mastodon/locales/cy.json +++ b/app/javascript/mastodon/locales/cy.json @@ -474,6 +474,7 @@ "notification.follow_request": "Mae {name} wedi gwneud cais i'ch dilyn", "notification.mention": "Crybwyllodd {name} amdanoch chi", "notification.moderation-warning.learn_more": "Dysgu mwy", + "notification.moderation_warning": "Rydych wedi derbyn rhybudd gan gymedrolwr", "notification.moderation_warning.action_delete_statuses": "Mae rhai o'ch postiadau wedi'u dileu.", "notification.moderation_warning.action_disable": "Mae eich cyfrif wedi'i analluogi.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Mae rhai o'ch postiadau wedi'u marcio'n sensitif.", diff --git a/app/javascript/mastodon/locales/en-GB.json b/app/javascript/mastodon/locales/en-GB.json index 6c24d5a2615c7e..e70348e0b2beff 100644 --- a/app/javascript/mastodon/locales/en-GB.json +++ b/app/javascript/mastodon/locales/en-GB.json @@ -308,6 +308,8 @@ "follow_requests.unlocked_explanation": "Even though your account is not locked, the {domain} staff thought you might want to review follow requests from these accounts manually.", "follow_suggestions.curated_suggestion": "Staff pick", "follow_suggestions.dismiss": "Don't show again", + "follow_suggestions.featured_longer": "Hand-picked by the {domain} team", + "follow_suggestions.friends_of_friends_longer": "Popular among people you follow", "follow_suggestions.hints.featured": "This profile has been hand-picked by the {domain} team.", "follow_suggestions.hints.friends_of_friends": "This profile is popular among the people you follow.", "follow_suggestions.hints.most_followed": "This profile is one of the most followed on {domain}.", @@ -315,6 +317,8 @@ "follow_suggestions.hints.similar_to_recently_followed": "This profile is similar to the profiles you have most recently followed.", "follow_suggestions.personalized_suggestion": "Personalised suggestion", "follow_suggestions.popular_suggestion": "Popular suggestion", + "follow_suggestions.popular_suggestion_longer": "Popular on {domain}", + "follow_suggestions.similar_to_recently_followed_longer": "Similar to profiles you recently followed", "follow_suggestions.view_all": "View all", "follow_suggestions.who_to_follow": "Who to follow", "followed_tags": "Followed hashtags", @@ -469,6 +473,15 @@ "notification.follow": "{name} followed you", "notification.follow_request": "{name} has requested to follow you", "notification.mention": "{name} mentioned you", + "notification.moderation-warning.learn_more": "Learn more", + "notification.moderation_warning": "You have received a moderation warning", + "notification.moderation_warning.action_delete_statuses": "Some of your posts have been removed.", + "notification.moderation_warning.action_disable": "Your account has been disabled.", + "notification.moderation_warning.action_mark_statuses_as_sensitive": "Some of your posts have been marked as sensitive.", + "notification.moderation_warning.action_none": "Your account has received a moderation warning.", + "notification.moderation_warning.action_sensitive": "Your posts will be marked as sensitive from now on.", + "notification.moderation_warning.action_silence": "Your account has been limited.", + "notification.moderation_warning.action_suspend": "Your account has been suspended.", "notification.own_poll": "Your poll has ended", "notification.poll": "A poll you have voted in has ended", "notification.reblog": "{name} boosted your status", diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json index b2a50ebb811976..88d4f5f60e059a 100644 --- a/app/javascript/mastodon/locales/gl.json +++ b/app/javascript/mastodon/locales/gl.json @@ -474,6 +474,7 @@ "notification.follow_request": "{name} solicitou seguirte", "notification.mention": "{name} mencionoute", "notification.moderation-warning.learn_more": "Saber máis", + "notification.moderation_warning": "Recibiches unha advertencia da moderación", "notification.moderation_warning.action_delete_statuses": "Algunha das túas publicacións foron eliminadas.", "notification.moderation_warning.action_disable": "A túa conta foi desactivada.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Algunha das túas publicacións foron marcadas como sensibles.", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index 2863442415cf1d..0c76467419f292 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -295,6 +295,7 @@ "follow_suggestions.personalized_suggestion": "Prispôsobený návrh", "follow_suggestions.popular_suggestion": "Obľúbený návrh", "follow_suggestions.popular_suggestion_longer": "Populárne na {domain}", + "follow_suggestions.similar_to_recently_followed_longer": "Podobné profilom ktoré si nedávno nasledoval/a", "follow_suggestions.view_all": "Zobraziť všetky", "follow_suggestions.who_to_follow": "Koho sledovať", "followed_tags": "Sledované hashtagy", @@ -445,10 +446,13 @@ "notification.follow_request": "{name} vás žiada sledovať", "notification.mention": "{name} vás spomína", "notification.moderation-warning.learn_more": "Zisti viac", + "notification.moderation_warning.action_silence": "Tvoj účet bol obmedzený.", + "notification.moderation_warning.action_suspend": "Tvoj účet bol pozastavený.", "notification.own_poll": "Vaša anketa sa skončila", "notification.poll": "Anketa, v ktorej ste hlasovali, sa skončila", "notification.reblog": "{name} zdieľa váš príspevok", "notification.relationships_severance_event": "Stratené prepojenia s {name}", + "notification.relationships_severance_event.account_suspension": "Správca z {from} pozastavil/a {target}, čo znamená, že od nich viac nemôžeš dostávať aktualizácie, alebo s nimi interaktovať.", "notification.relationships_severance_event.learn_more": "Zisti viac", "notification.status": "{name} uverejňuje niečo nové", "notification.update": "{name} upravuje príspevok", diff --git a/config/locales/devise.ia.yml b/config/locales/devise.ia.yml index d83c708647718a..c68efddd07880f 100644 --- a/config/locales/devise.ia.yml +++ b/config/locales/devise.ia.yml @@ -86,9 +86,13 @@ ia: destroyed: A revider! Tu conto esseva cancellate con successo. Nos spera vider te novemente tosto. signed_up_but_pending: Un message con un ligamine de confirmation esseva inviate a tu conto de email. Post que tu clicca le ligamine, nos revidera tu application. Tu essera notificate si illo es approbate. updated: Tu conto ha essite actualisate con successo. + sessions: + signed_in: Connexe con successo. + signed_out: Disconnexe con successo. unlocks: unlocked: Tu conto ha essite disblocate con successo. Initia session a continuar. errors: messages: already_confirmed: jam esseva confirmate, tenta initiar session not_found: non trovate + not_locked: non era blocate diff --git a/config/locales/doorkeeper.en-GB.yml b/config/locales/doorkeeper.en-GB.yml index b3ceffb13f7544..2e537c5301937e 100644 --- a/config/locales/doorkeeper.en-GB.yml +++ b/config/locales/doorkeeper.en-GB.yml @@ -174,6 +174,7 @@ en-GB: read:filters: see your filters read:follows: see your follows read:lists: see your lists + read:me: read only your account's basic information read:mutes: see your mutes read:notifications: see your notifications read:reports: see your reports diff --git a/config/locales/doorkeeper.ia.yml b/config/locales/doorkeeper.ia.yml index b5bd6cc5369fbb..dc965996810817 100644 --- a/config/locales/doorkeeper.ia.yml +++ b/config/locales/doorkeeper.ia.yml @@ -4,6 +4,7 @@ ia: attributes: doorkeeper/application: name: Nomine de application + scopes: Ambitos website: Sito web de application errors: models: @@ -28,12 +29,14 @@ ia: empty: Tu non ha applicationes. name: Nomine new: Nove application + scopes: Ambitos show: Monstrar title: Tu applicationes new: title: Nove application show: actions: Actiones + application_id: Clave del cliente scopes: Ambitos title: 'Application: %{name}' authorizations: @@ -42,13 +45,20 @@ ia: deny: Negar error: title: Ocurreva un error + new: + review_permissions: Revisionar le permissos + title: Autorisation necessari authorized_applications: + buttons: + revoke: Revocar confirmations: revoke: Es tu secur? index: + authorized_at: Autorisate le %{date} last_used_at: Ultime uso in %{date} never_used: Nunquam usate scopes: Permissiones + superapp: Interne title: Tu applicationes autorisate flash: applications: @@ -58,12 +68,21 @@ ia: notice: Application delite. update: notice: Application actualisate. + authorized_applications: + destroy: + notice: Application revocate. grouped_scopes: + access: + read: Accesso de sol lectura + read/write: Accesso de lectura e scriptura + write: Accesso de sol scriptura title: accounts: Contos admin/accounts: Gestion de contos + admin/all: Tote le functiones administrative admin/reports: Gestion de reportos all: Accesso plen a tu conto de Mastodon + blocks: Blocadas bookmarks: Marcapaginas conversations: Conversationes favourites: Favoritos @@ -84,7 +103,9 @@ ia: oauth2_provider: Fornitor OAuth2 scopes: admin:read: leger tote le datos in le servitor + admin:read:accounts: leger information sensibile de tote le contos admin:write: modificar tote le datos in le servitor + follow: modificar relationes del contos read: leger tote le datos de tu conto read:accounts: vider informationes de conto read:bookmarks: vider tu marcapaginas diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index df956902a6e904..7e31080dfa2c10 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -751,6 +751,7 @@ en-GB: desc_html: This relies on external scripts from hCaptcha, which may be a security and privacy concern. In addition, this can make the registration process significantly less accessible to some (especially disabled) people. For these reasons, please consider alternative measures such as approval-based or invite-based registration. title: Require new users to solve a CAPTCHA to confirm their account content_retention: + danger_zone: Danger zone preamble: Control how user-generated content is stored in Mastodon. title: Content retention default_noindex: diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 46cdcd3c68348f..68676a09f73957 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -997,6 +997,7 @@ ia: body_remote: Alcuno de %{domain} ha reportate %{target} subject: Nove reporto pro %{instance} (#%{id}) new_software_updates: + body: Nove versiones de Mastodon ha essite publicate, tu poterea voler actualisar! subject: Nove versiones de Mastodon es disponibile pro %{instance}! new_trends: body: 'Le sequente elementos besoniar de un recension ante que illos pote esser monstrate publicamente:' @@ -1048,6 +1049,7 @@ ia: hint_html: Justo un altere cosa! Nos debe confirmar que tu es un human (isto es assi proque nos pote mantener foras le spam!). Solve le CAPTCHA infra e clicca "Continuar". title: Controlo de securitate confirmations: + awaiting_review: Tu adresse email es confirmate! Le personal de %{domain} ora revide tu registration. Tu recipera un email si illes approba tu conto! awaiting_review_title: Tu registration es revidite clicking_this_link: cliccante iste ligamine login_link: acceder @@ -1066,6 +1068,7 @@ ia: logout: Clauder le session migrate_account: Move a un conto differente or_log_in_with: O accede con + privacy_policy_agreement_html: Io ha legite e acceptar le politica de confidentialitate progress: confirm: Confirma le email details: Tu detalios @@ -1075,29 +1078,69 @@ ia: cas: CAS saml: SAML register: Inscribe te + registration_closed: "%{instance} non accepta nove membros" resend_confirmation: Reinviar ligamine de confirmation reset_password: Remontar le contrasigno rules: accept: Acceptar back: Retro + invited_by: 'Tu pote junger te a %{domain} gratias al invitation que tu ha recipite de:' + preamble: Illos es predefinite e fortiarte per le moderatores de %{domain}. + preamble_invited: Ante que tu continua, considera le regulas base definite per le moderatores de %{domain}. title: Alcun regulas base. + title_invited: Tu ha essite invitate. security: Securitate set_new_password: Definir un nove contrasigno + setup: + email_below_hint_html: Verifica tu plica de spam, o pete un altero. Tu pote corriger tu adresse email si illo es errate. + email_settings_hint_html: Clicca le ligamine que nos te inviava pro verificar %{email}. + link_not_received: Non obteneva tu un ligamine? + new_confirmation_instructions_sent: Tu recipera un nove email con le ligamine de confirmation in alcun minutas! + title: Verifica tu cassa de ingresso + sign_in: + preamble_html: Accede con tu %{domain} credentiales. Si tu conto es hospite sur un differente servitor, tu non potera authenticar te ci. + title: Acceder a %{domain} + sign_up: + manual_review: Le inscriptiones sur %{domain} passa per revision manual de nostre moderatores. Pro adjutar nos a processar tu registration, scribe un poco re te mesme e perque tu vole un conto sur %{domain}. + preamble: Con un conto sur iste servitor de Mastodon, tu potera sequer ulle altere persona in rete, sin reguardo de ubi lor conto es hospite. + title: Lassa que nos te configura sur %{domain}. status: account_status: Stato del conto + confirming: Attendente esser completate email de confirmation. + functional: Tu conto es plenmente operative. + pending: Tu application es pendente de revision per nostre personal. Isto pote prender alcun tempore. Tu recipera un email si tu application es approbate. + redirecting_to: Tu conto es inactive perque illo es actualmente re-adressa a %{acct}. + self_destruct: Dum %{domain} va clauder, tu solo habera accesso limitate a tu conto. view_strikes: Examinar le admonitiones passate contra tu conto + too_fast: Formulario inviate troppo velocemente, retenta. use_security_key: Usar clave de securitate challenge: confirm: Continuar + hint_html: "Consilio: Nos non te demandara tu contrasigno ancora pro le proxime hora." invalid_password: Contrasigno non valide prompt: Confirma le contrasigno pro continuar + crypto: + errors: + invalid_key: non es un clave Ed25519 o Curve25519 valide + invalid_signature: non es un valide firma Ed25519 + date: + formats: + default: "%b %d, %Y" + with_month_name: "%B %d, %Y" datetime: distance_in_words: + about_x_hours: "%{count}h" + about_x_months: "%{count}me" + about_x_years: "%{count}a" + almost_x_years: "%{count}a" half_a_minute: Justo ora + less_than_x_minutes: "%{count} m" less_than_x_seconds: Justo ora over_x_years: "%{count}a" x_days: "%{count}d" x_minutes: "%{count} m" + x_months: "%{count}me" + x_seconds: "%{count}s" deletes: challenge_not_passed: Le informationes que tu ha inserite non era correcte confirm_password: Insere tu contrasigno actual pro verificar tu identitate @@ -1174,6 +1217,7 @@ ia: download: Discargar tu archivo hint_html: Tu pote requirer un archivo de tu messages e medios cargate. Le datos exportate sera in le formato ActivityPub, legibile per ulle software conforme. in_progress: Compilante tu archivo... + request: Pete tu archivo size: Dimension blocks: Tu ha blocate bookmarks: Marcapaginas @@ -1184,6 +1228,8 @@ ia: storage: Immagazinage de medios featured_tags: add_new: Adder nove + errors: + limit: Tu ha jam consiliate le maxime numero de hashtags filters: contexts: account: Profilos @@ -1196,17 +1242,33 @@ ia: keywords: Parolas clave statuses: Messages individual title: Modificar filtro + errors: + invalid_context: Nulle o non valide contexto supplite index: + contexts: Filtros in %{contexts} delete: Deler + empty: Tu non ha filtros. + expires_in: Expira in %{distance} + expires_on: Expira le %{date} + keywords: + one: "%{count} parola clave" + other: "%{count} parolas clave" statuses: one: "%{count} message" other: "%{count} messages" + statuses_long: + one: "%{count} singule message celate" + other: "%{count} singule messages celate" title: Filtros new: save: Salveguardar nove filtro title: Adder nove filtro statuses: + back_to_filter: Retro al filtro + batch: + remove: Remover ab filtro index: + hint: Iste filtro se applica pro seliger messages singule sin reguardo de altere criterios. Tu pote adder altere messages a iste filtro ab le interfacie web. title: Messages filtrate generic: all: Toto @@ -1215,16 +1277,27 @@ ia: confirm: Confirmar copy: Copiar delete: Deler + deselect: Deseliger toto none: Nemo order_by: Ordinar per save_changes: Salvar le cambios + select_all_matching_items: + one: Selige %{count} elemento concordante tu recerca. + other: Selige %{count} elementos concordante tu recerca. today: hodie + validation_errors: + one: Alco non es multo bon ancora! Controla le error infra + other: Alco non es multo bon ancora! Controla %{count} errores infra imports: errors: empty: File CSV vacue + incompatible_type: Incompatibile con le typo de importation seligite invalid_csv_file: 'File CSV non valide. Error: %{error}' + over_rows_processing_limit: contine plus que %{count} rangos too_large: Le file es troppo longe failures: Fallimentos + imported: Importate + mismatched_types_warning: Il appare que tu pote haber seligite le typo errate pro iste importation, controla duo vices. modes: overwrite_long: Reimplaciar registros actual con le noves overwrite_preambles: @@ -1278,6 +1351,8 @@ ia: max_uses: one: un uso other: "%{count} usos" + table: + expires_at: Expira title: Invitar personas login_activities: authentication_methods: @@ -1316,32 +1391,84 @@ ia: title: Nove requesta de sequimento mention: action: Responder + title: Nove mention poll: subject: Un inquesta de %{name} ha finite otp_authentication: enable: Activar + setup: Configurar pagination: next: Sequente + prev: Previe + truncate: "…" + polls: + errors: + already_voted: Tu jam ha votate in iste sondage + duplicate_options: contine elementos duplicate + duration_too_long: il es troppo lontan in le futuro + duration_too_short: il es troppo tosto + expired: Le sondage ha jam finite + invalid_choice: Le option de voto eligite non existe + over_character_limit: non pote esser plus longe que %{max} characteres cata un + self_vote: Tu non pote vota in tu proprie sondages + too_few_options: debe haber plus que un elemento + too_many_options: non pote continer plus que %{max} elementos preferences: other: Altere + posting_defaults: Publicationes predefinite public_timelines: Chronologias public privacy: privacy: Confidentialitate + reach: Portata search: Cercar + title: Confidentialitate e portata privacy_policy: title: Politica de confidentialitate + reactions: + errors: + limit_reached: Limite de reactiones differente attingite + unrecognized_emoji: non es un emoticone recognoscite + redirects: + prompt: Si tu te fide de iste ligamine, clicca lo pro continuar. + title: Tu va lassar %{instance}. relationships: activity: Activitate del conto + confirm_follow_selected_followers: Desira tu vermente remover le sequaces seligite? + confirm_remove_selected_followers: Desira tu vermente remover le sequaces seligite? + confirm_remove_selected_follows: Desira tu vermente remover le sequaces seligite? + dormant: Dormiente + follow_failure: Impossibile sequer alcun del contos seligite. + follow_selected_followers: Sequer le sequaces seligite + followers: Sequaces + following: Sequente invited: Invitate + last_active: Ultimo active most_recent: Plus recente moved: Movite mutual: Mutue primary: Primari + relationship: Relation + remove_selected_domains: Remover tote le sequaces ab le dominios seligite + remove_selected_followers: Remover le sequaces seligite + remove_selected_follows: Non plus sequer le usatores seligite status: Stato del conto + remote_follow: + missing_resource: Impossibile trovar le requirite re-adresse URL pro tu conto + reports: + errors: + invalid_rules: non referentia regulas valide rss: content_warning: 'Advertimento de contento:' descriptions: account: Messages public de @%{acct} + tag: 'Messages public plachettate #%{hashtag}' + scheduled_statuses: + over_daily_limit: Tu ha excedite le limite de %{limit} messages programmate pro hodie + over_total_limit: Tu ha excedite le limite de %{limit} messages programmate + too_soon: Le data programmate debe esser in le futuro + self_destruct: + lead_html: Infortunatemente, %{domain} va clauder permanentemente. Si tu habeva un conto illac, tu non potera continuar a usar lo, ma tu pote ancora peter un salveguarda de tu datos. + title: Iste servitor va clauder sessions: activity: Ultime activitate browser: Navigator @@ -1368,6 +1495,7 @@ ia: current_session: Session actual date: Data description: "%{browser} sur %{platform}" + explanation: Il ha navigatores del web actualmente connexe a tu conto Mastodon. ip: IP platforms: adobe_air: Adobe Air @@ -1383,11 +1511,16 @@ ia: windows: Windows windows_mobile: Windows Mobile windows_phone: Windows Phone + revoke: Revocar + revoke_success: Session revocate con successo title: Sessiones + view_authentication_history: Vider chronologia de authentication de tu conto settings: account: Conto account_settings: Parametros de conto + aliases: Aliases de conto appearance: Apparentia + authorized_apps: Apps autorisate delete: Deletion de conto development: Disveloppamento edit_profile: Modificar profilo @@ -1417,6 +1550,13 @@ ia: private_long: Solmente monstrar a sequitores public: Public statuses_cleanup: + keep_pinned_hint: Non dele alcuno de tu messages appunctate + keep_polls: Mantener sondages + keep_polls_hint: Non dele ulle de tu sondages + keep_self_bookmark: Mantener messages que tu marcava con marcapaginas + keep_self_bookmark_hint: Non dele tu proprie messages si tu los ha marcate con marcapaginas + keep_self_fav: Mantene messages que tu favoriva + keep_self_fav_hint: Non dele tu proprie messages si tu los ha favorite min_age: '1209600': 2 septimanas '15778476': 6 menses @@ -1426,6 +1566,7 @@ ia: '604800': 1 septimana '63113904': 2 annos '7889238': 3 menses + min_age_label: Limine de etate stream_entries: sensitive_content: Contento sensibile strikes: diff --git a/config/locales/simple_form.cy.yml b/config/locales/simple_form.cy.yml index 51a3aac273c07c..5e8fd85293f75a 100644 --- a/config/locales/simple_form.cy.yml +++ b/config/locales/simple_form.cy.yml @@ -77,11 +77,13 @@ cy: warn: Cuddiwch y cynnwys wedi'i hidlo y tu ôl i rybudd sy'n sôn am deitl yr hidlydd form_admin_settings: activity_api_enabled: Cyfrif o bostiadau a gyhoeddir yn lleol, defnyddwyr gweithredol, a chofrestriadau newydd mewn bwcedi wythnosol + app_icon: WEBP, PNG, GIF neu JPG. Yn diystyru'r eicon ap rhagosodedig ar ddyfeisiau symudol gydag eicon cyfaddas. backups_retention_period: Mae gan ddefnyddwyr y gallu i gynhyrchu archifau o'u postiadau i'w llwytho i lawr yn ddiweddarach. Pan gânt eu gosod i werth positif, bydd yr archifau hyn yn cael eu dileu'n awtomatig o'ch storfa ar ôl y nifer penodedig o ddyddiau. bootstrap_timeline_accounts: Bydd y cyfrifon hyn yn cael eu pinio i frig argymhellion dilynol defnyddwyr newydd. closed_registrations_message: Yn cael eu dangos pan fydd cofrestriadau wedi cau content_cache_retention_period: Bydd yr holl bostiadau gan weinyddion eraill (gan gynnwys hwb ac atebion) yn cael eu dileu ar ôl y nifer penodedig o ddyddiau, heb ystyried unrhyw ryngweithio defnyddiwr lleol â'r postiadau hynny. Mae hyn yn cynnwys postiadau lle mae defnyddiwr lleol wedi ei farcio fel nodau tudalen neu ffefrynnau. Bydd cyfeiriadau preifat rhwng defnyddwyr o wahanol achosion hefyd yn cael eu colli ac yn amhosibl eu hadfer. Mae'r defnydd o'r gosodiad hwn wedi'i fwriadu ar gyfer achosion pwrpas arbennig ac mae'n torri llawer o ddisgwyliadau defnyddwyr pan gaiff ei weithredu at ddibenion cyffredinol. custom_css: Gallwch gymhwyso arddulliau cyfaddas ar fersiwn gwe Mastodon. + favicon: WEBP, PNG, GIF neu JPG. Yn diystyru'r favicon Mastodon rhagosodedig gydag eicon cyfaddas. mascot: Yn diystyru'r darlun yn y rhyngwyneb gwe uwch. media_cache_retention_period: Mae ffeiliau cyfryngau o bostiadau a wneir gan ddefnyddwyr o bell yn cael eu storio ar eich gweinydd. Pan gaiff ei osod i werth positif, bydd y cyfryngau yn cael eu dileu ar ôl y nifer penodedig o ddyddiau. Os gofynnir am y data cyfryngau ar ôl iddo gael ei ddileu, caiff ei ail-lwytho i lawr, os yw'r cynnwys ffynhonnell yn dal i fod ar gael. Oherwydd cyfyngiadau ar ba mor aml y mae cardiau rhagolwg cyswllt yn pleidleisio i wefannau trydydd parti, argymhellir gosod y gwerth hwn i o leiaf 14 diwrnod, neu ni fydd cardiau rhagolwg cyswllt yn cael eu diweddaru ar alw cyn yr amser hwnnw. peers_api_enabled: Rhestr o enwau parth y mae'r gweinydd hwn wedi dod ar eu traws yn y ffediws. Nid oes unrhyw ddata wedi'i gynnwys yma ynghylch a ydych chi'n ffedereiddio â gweinydd penodol, dim ond bod eich gweinydd yn gwybod amdano. Defnyddir hwn gan wasanaethau sy'n casglu ystadegau ar ffedereiddio mewn ystyr cyffredinol. diff --git a/config/locales/simple_form.en-GB.yml b/config/locales/simple_form.en-GB.yml index f4668ccada1c38..eaf0501a27ba9e 100644 --- a/config/locales/simple_form.en-GB.yml +++ b/config/locales/simple_form.en-GB.yml @@ -77,10 +77,15 @@ en-GB: warn: Hide the filtered content behind a warning mentioning the filter's title form_admin_settings: activity_api_enabled: Counts of locally published posts, active users, and new registrations in weekly buckets + app_icon: WEBP, PNG, GIF or JPG. Overrides the default app icon on mobile devices with a custom icon. + backups_retention_period: Users have the ability to generate archives of their posts to download later. When set to a positive value, these archives will be automatically deleted from your storage after the specified number of days. bootstrap_timeline_accounts: These accounts will be pinned to the top of new users' follow recommendations. closed_registrations_message: Displayed when sign-ups are closed + content_cache_retention_period: All posts from other servers (including boosts and replies) will be deleted after the specified number of days, without regard to any local user interaction with those posts. This includes posts where a local user has marked it as bookmarks or favorites. Private mentions between users from different instances will also be lost and impossible to restore. Use of this setting is intended for special purpose instances and breaks many user expectations when implemented for general purpose use. custom_css: You can apply custom styles on the web version of Mastodon. + favicon: WEBP, PNG, GIF or JPG. Overrides the default Mastodon favicon with a custom icon. mascot: Overrides the illustration in the advanced web interface. + media_cache_retention_period: Media files from posts made by remote users are cached on your server. When set to a positive value, media will be deleted after the specified number of days. If the media data is requested after it is deleted, it will be re-downloaded, if the source content is still available. Due to restrictions on how often link preview cards poll third-party sites, it is recommended to set this value to at least 14 days, or link preview cards will not be updated on demand before that time. peers_api_enabled: A list of domain names this server has encountered in the fediverse. No data is included here about whether you federate with a given server, just that your server knows about it. This is used by services that collect statistics on federation in a general sense. profile_directory: The profile directory lists all users who have opted-in to be discoverable. require_invite_text: When sign-ups require manual approval, make the “Why do you want to join?” text input mandatory rather than optional @@ -240,6 +245,7 @@ en-GB: backups_retention_period: User archive retention period bootstrap_timeline_accounts: Always recommend these accounts to new users closed_registrations_message: Custom message when sign-ups are not available + content_cache_retention_period: Remote content retention period custom_css: Custom CSS mascot: Custom mascot (legacy) media_cache_retention_period: Media cache retention period From 6beead38678d6a25adc94ee82ed07974e3e20147 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 15 May 2024 05:33:36 -0400 Subject: [PATCH 046/113] Move `simplecov` config into `rails_helper` (#30302) --- .simplecov | 22 ---------------- config/initializers/simple_cov_source_file.rb | 19 ++++++++++++++ spec/rails_helper.rb | 25 +++++++++++++++++++ spec/spec_helper.rb | 4 --- 4 files changed, 44 insertions(+), 26 deletions(-) delete mode 100644 .simplecov create mode 100644 config/initializers/simple_cov_source_file.rb diff --git a/.simplecov b/.simplecov deleted file mode 100644 index fbd0207bec51ce..00000000000000 --- a/.simplecov +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -if ENV['CI'] - require 'simplecov-lcov' - SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true - SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter -else - SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter -end - -SimpleCov.start 'rails' do - enable_coverage :branch - - add_filter 'lib/linter' - - add_group 'Libraries', 'lib' - add_group 'Policies', 'app/policies' - add_group 'Presenters', 'app/presenters' - add_group 'Serializers', 'app/serializers' - add_group 'Services', 'app/services' - add_group 'Validators', 'app/validators' -end diff --git a/config/initializers/simple_cov_source_file.rb b/config/initializers/simple_cov_source_file.rb new file mode 100644 index 00000000000000..c6b3586c82583f --- /dev/null +++ b/config/initializers/simple_cov_source_file.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# TODO: https://github.com/simplecov-ruby/simplecov/pull/1084 +# Patches this missing condition, monitor for upstream fix + +module SimpleCov + module SourceFileExtensions + def build_branches + coverage_branch_data = coverage_data.fetch('branches', {}) || {} # Add the final empty hash in case where 'branches' is present, but returns nil + branches = coverage_branch_data.flat_map do |condition, coverage_branches| + build_branches_from(condition, coverage_branches) + end + + process_skipped_branches(branches) + end + end +end + +SimpleCov::SourceFile.prepend(SimpleCov::SourceFileExtensions) if defined?(SimpleCov::SourceFile) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index d8eb561d42446d..38aa711089e325 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -2,6 +2,31 @@ ENV['RAILS_ENV'] ||= 'test' +unless ENV['DISABLE_SIMPLECOV'] == 'true' + require 'simplecov' + + SimpleCov.start 'rails' do + if ENV['CI'] + require 'simplecov-lcov' + formatter SimpleCov::Formatter::LcovFormatter + formatter.config.report_with_single_file = true + else + formatter SimpleCov::Formatter::HTMLFormatter + end + + enable_coverage :branch + + add_filter 'lib/linter' + + add_group 'Libraries', 'lib' + add_group 'Policies', 'app/policies' + add_group 'Presenters', 'app/presenters' + add_group 'Serializers', 'app/serializers' + add_group 'Services', 'app/services' + add_group 'Validators', 'app/validators' + end +end + # This needs to be defined before Rails is initialized STREAMING_PORT = ENV.fetch('TEST_STREAMING_PORT', '4020') ENV['STREAMING_API_BASE_URL'] = "http://localhost:#{STREAMING_PORT}" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8a01792a19910b..1f9cc40f12afd4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -unless ENV['DISABLE_SIMPLECOV'] == 'true' - require 'simplecov' # Configuration details loaded from .simplecov -end - RSpec.configure do |config| config.example_status_persistence_file_path = 'tmp/rspec/examples.txt' config.expect_with :rspec do |expectations| From 85c625d31974e411666812468ddfd7760ab67d4a Mon Sep 17 00:00:00 2001 From: Jason Punyon Date: Wed, 15 May 2024 05:38:16 -0400 Subject: [PATCH 047/113] Fix repetitive database queries from #30040 (#30259) --- app/helpers/application_helper.rb | 13 +++++++++---- app/presenters/instance_presenter.rb | 12 ++++++++++++ app/serializers/manifest_serializer.rb | 2 +- app/views/layouts/application.html.haml | 6 +++--- spec/helpers/application_helper_spec.rb | 15 ++++++++++----- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ff351429e0a238..eb03f1e4ba2ced 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -240,11 +240,16 @@ def prerender_custom_emojis(html, custom_emojis, other_options = {}) EmojiFormatter.new(html, custom_emojis, other_options.merge(animate: prefers_autoplay?)).to_s end - def site_icon_path(type, size = '48') - icon = SiteUpload.find_by(var: type) - return nil unless icon + def instance_presenter + @instance_presenter ||= InstancePresenter.new + end + + def favicon_path(size = '48') + instance_presenter.favicon&.file&.url(size) + end - icon.file.url(size) + def app_icon_path(size = '48') + instance_presenter.app_icon&.file&.url(size) end private diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index 25df4d85aa45af..92415a69030af9 100644 --- a/app/presenters/instance_presenter.rb +++ b/app/presenters/instance_presenter.rb @@ -81,4 +81,16 @@ def thumbnail def mascot @mascot ||= Rails.cache.fetch('site_uploads/mascot') { SiteUpload.find_by(var: 'mascot') } end + + def favicon + return @favicon if defined?(@favicon) + + @favicon ||= Rails.cache.fetch('site_uploads/favicon') { SiteUpload.find_by(var: 'favicon') } + end + + def app_icon + return @app_icon if defined?(@app_icon) + + @app_icon ||= Rails.cache.fetch('site_uploads/app_icon') { SiteUpload.find_by(var: 'app_icon') } + end end diff --git a/app/serializers/manifest_serializer.rb b/app/serializers/manifest_serializer.rb index 759490228c04bf..a39fb5ef540765 100644 --- a/app/serializers/manifest_serializer.rb +++ b/app/serializers/manifest_serializer.rb @@ -27,7 +27,7 @@ def short_name def icons SiteUpload::ANDROID_ICON_SIZES.map do |size| - src = site_icon_path('app_icon', size.to_i) + src = app_icon_path(size.to_i) src = URI.join(root_url, src).to_s if src.present? { diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e3d05226eefad0..5957d1dbf59813 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,13 +11,13 @@ - if storage_host? %link{ rel: 'dns-prefetch', href: storage_host }/ - %link{ rel: 'icon', href: site_icon_path('favicon', 'ico') || '/favicon.ico', type: 'image/x-icon' }/ + %link{ rel: 'icon', href: favicon_path('ico') || '/favicon.ico', type: 'image/x-icon' }/ - SiteUpload::FAVICON_SIZES.each do |size| - %link{ rel: 'icon', sizes: "#{size}x#{size}", href: site_icon_path('favicon', size.to_i) || frontend_asset_path("icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/ + %link{ rel: 'icon', sizes: "#{size}x#{size}", href: favicon_path(size.to_i) || frontend_asset_path("icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/ - SiteUpload::APPLE_ICON_SIZES.each do |size| - %link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: site_icon_path('app_icon', size.to_i) || frontend_asset_path("icons/apple-touch-icon-#{size}x#{size}.png") }/ + %link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: app_icon_path(size.to_i) || frontend_asset_path("icons/apple-touch-icon-#{size}x#{size}.png") }/ %link{ rel: 'mask-icon', href: frontend_asset_path('images/logo-symbol-icon.svg'), color: '#6364FF' }/ %link{ rel: 'manifest', href: manifest_path(format: :json) }/ diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 56501034b2ddd8..56974513bef162 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -286,26 +286,31 @@ def current_theme = 'default' end end - describe '#site_icon_path' do + describe 'favicon' do context 'when an icon exists' do let!(:favicon) { Fabricate(:site_upload, var: 'favicon') } + let!(:app_icon) { Fabricate(:site_upload, var: 'app_icon') } it 'returns the URL of the icon' do - expect(helper.site_icon_path('favicon')).to eq(favicon.file.url('48')) + expect(helper.favicon_path).to eq(favicon.file.url('48')) + expect(helper.app_icon_path).to eq(app_icon.file.url('48')) end it 'returns the URL of the icon with size parameter' do - expect(helper.site_icon_path('favicon', 16)).to eq(favicon.file.url('16')) + expect(helper.favicon_path(16)).to eq(favicon.file.url('16')) + expect(helper.app_icon_path(16)).to eq(app_icon.file.url('16')) end end context 'when an icon does not exist' do it 'returns nil' do - expect(helper.site_icon_path('favicon')).to be_nil + expect(helper.favicon_path).to be_nil + expect(helper.app_icon_path).to be_nil end it 'returns nil with size parameter' do - expect(helper.site_icon_path('favicon', 16)).to be_nil + expect(helper.favicon_path(16)).to be_nil + expect(helper.app_icon_path(16)).to be_nil end end end From 4e085dff52f88a4bb81f4f6cbe4c7a37ebfb2390 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 15:05:05 +0200 Subject: [PATCH 048/113] chore(deps): update dependency aws-sdk-s3 to v1.151.0 (#30287) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2854528b737c44..d34d634f58284a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,16 +100,16 @@ GEM attr_required (1.0.2) awrence (1.2.1) aws-eventstream (1.3.0) - aws-partitions (1.922.0) - aws-sdk-core (3.194.1) + aws-partitions (1.929.0) + aws-sdk-core (3.196.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.80.0) + aws-sdk-kms (1.81.0) aws-sdk-core (~> 3, >= 3.193.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.149.1) + aws-sdk-s3 (1.151.0) aws-sdk-core (~> 3, >= 3.194.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.8) From c2ca3d152f1dda0f4f5d2455ae9c550779a2c10e Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 15 May 2024 15:11:13 +0200 Subject: [PATCH 049/113] Fix off-by-one in `tootctl media` commands (#30306) --- lib/mastodon/cli/media.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mastodon/cli/media.rb b/lib/mastodon/cli/media.rb index e26b4f24afa272..509d11a8198948 100644 --- a/lib/mastodon/cli/media.rb +++ b/lib/mastodon/cli/media.rb @@ -128,7 +128,7 @@ def remove_orphans model_name = path_segments.first.classify attachment_name = path_segments[1].singularize - record_id = path_segments[2..-2].join.to_i + record_id = path_segments[2...-2].join.to_i file_name = path_segments.last record = record_map.dig(model_name, record_id) attachment = record&.public_send(attachment_name) @@ -172,7 +172,7 @@ def remove_orphans end model_name = path_segments.first.classify - record_id = path_segments[2..-2].join.to_i + record_id = path_segments[2...-2].join.to_i attachment_name = path_segments[1].singularize file_name = path_segments.last @@ -297,7 +297,7 @@ def lookup(url) fail_with_message 'Not a media URL' unless VALID_PATH_SEGMENTS_SIZE.include?(path_segments.size) model_name = path_segments.first.classify - record_id = path_segments[2..-2].join.to_i + record_id = path_segments[2...-2].join.to_i fail_with_message "Cannot find corresponding model: #{model_name}" unless PRELOAD_MODEL_WHITELIST.include?(model_name) @@ -353,7 +353,7 @@ def preload_records_from_mixed_objects(objects) next unless VALID_PATH_SEGMENTS_SIZE.include?(segments.size) model_name = segments.first.classify - record_id = segments[2..-2].join.to_i + record_id = segments[2...-2].join.to_i next unless PRELOAD_MODEL_WHITELIST.include?(model_name) From 5fd56512de244263b4b0df998b8a83c303c3d1c5 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Wed, 15 May 2024 15:38:36 +0200 Subject: [PATCH 050/113] Improve Report Notes and Account Moderation Notes (#30288) --- app/models/account_moderation_note.rb | 2 +- app/models/report_note.rb | 2 +- app/views/admin/accounts/show.html.haml | 10 ++++---- app/views/admin/reports/show.html.haml | 14 ++++++----- config/navigation.rb | 4 ++-- ...ccount_moderation_notes_controller_spec.rb | 13 ++++++++-- .../admin/report_notes_controller_spec.rb | 24 ++++++++++++++----- 7 files changed, 47 insertions(+), 22 deletions(-) diff --git a/app/models/account_moderation_note.rb b/app/models/account_moderation_note.rb index ad49b24229f2de..79b8b4d25ee033 100644 --- a/app/models/account_moderation_note.rb +++ b/app/models/account_moderation_note.rb @@ -13,7 +13,7 @@ # class AccountModerationNote < ApplicationRecord - CONTENT_SIZE_LIMIT = 500 + CONTENT_SIZE_LIMIT = 2_000 belongs_to :account belongs_to :target_account, class_name: 'Account' diff --git a/app/models/report_note.rb b/app/models/report_note.rb index b5c40a18b1487e..7361c97e670a5e 100644 --- a/app/models/report_note.rb +++ b/app/models/report_note.rb @@ -13,7 +13,7 @@ # class ReportNote < ApplicationRecord - CONTENT_SIZE_LIMIT = 500 + CONTENT_SIZE_LIMIT = 2_000 belongs_to :account belongs_to :report, inverse_of: :notes, touch: true diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index 41fcafa29d5af8..bcf7c073141543 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -62,14 +62,16 @@ .report-notes = render partial: 'admin/report_notes/report_note', collection: @moderation_notes - = simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |f| - = f.hidden_field :target_account_id + = simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |form| + = form.hidden_field :target_account_id + + = render 'shared/error_messages', object: @account_moderation_note .field-group - = f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6 + = form.input :content, input_html: { placeholder: t('admin.reports.notes.placeholder'), maxlength: AccountModerationNote::CONTENT_SIZE_LIMIT, rows: 6, autofocus: @account_moderation_note.errors.any? } .actions - = f.button :button, t('admin.account_moderation_notes.create'), type: :submit + = form.button :button, t('admin.account_moderation_notes.create'), type: :submit %hr.spacer/ diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index c880021cffbcaf..842aa51597023e 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -83,15 +83,17 @@ .report-notes = render @report_notes -= simple_form_for @report_note, url: admin_report_notes_path do |f| - = f.input :report_id, as: :hidden += simple_form_for @report_note, url: admin_report_notes_path do |form| + = form.input :report_id, as: :hidden + + = render 'shared/error_messages', object: @report_note .field-group - = f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6 + = form.input :content, input_html: { placeholder: t('admin.reports.notes.placeholder'), maxlength: ReportNote::CONTENT_SIZE_LIMIT, rows: 6, autofocus: @report_note.errors.any? } .actions - if @report.unresolved? - = f.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit + = form.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit - else - = f.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit - = f.button :button, t('admin.reports.notes.create'), type: :submit + = form.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit + = form.button :button, t('admin.reports.notes.create'), type: :submit diff --git a/config/navigation.rb b/config/navigation.rb index 791025d526a68f..b6e3f495056f49 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -45,8 +45,8 @@ end n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), nil, if: -> { current_user.can?(:manage_reports, :view_audit_log, :manage_users, :manage_invites, :manage_taxonomies, :manage_federation, :manage_blocks) && !self_destruct } do |s| - s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_path, highlights_on: %r{/admin/reports}, if: -> { current_user.can?(:manage_reports) } - s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_path(origin: 'local'), highlights_on: %r{/admin/accounts|/admin/pending_accounts|/admin/disputes|/admin/users}, if: -> { current_user.can?(:manage_users) } + s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_path, highlights_on: %r{/admin/reports|admin/report_notes}, if: -> { current_user.can?(:manage_reports) } + s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_path(origin: 'local'), highlights_on: %r{/admin/accounts|admin/account_moderation_notes|/admin/pending_accounts|/admin/disputes|/admin/users}, if: -> { current_user.can?(:manage_users) } s.item :invites, safe_join([fa_icon('user-plus fw'), t('admin.invites.title')]), admin_invites_path, if: -> { current_user.can?(:manage_invites) } s.item :follow_recommendations, safe_join([fa_icon('user-plus fw'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations}, if: -> { current_user.can?(:manage_taxonomies) } s.item :instances, safe_join([fa_icon('cloud fw'), t('admin.instances.title')]), admin_instances_path(limited: limited_federation_mode? ? nil : '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks|/admin/domain_allows}, if: -> { current_user.can?(:manage_federation) } diff --git a/spec/controllers/admin/account_moderation_notes_controller_spec.rb b/spec/controllers/admin/account_moderation_notes_controller_spec.rb index 8d24a7af37383b..5ea546f4180c08 100644 --- a/spec/controllers/admin/account_moderation_notes_controller_spec.rb +++ b/spec/controllers/admin/account_moderation_notes_controller_spec.rb @@ -24,10 +24,19 @@ end end - context 'when parameters are invalid' do + context 'when the content is too short' do let(:params) { { account_moderation_note: { target_account_id: target_account.id, content: '' } } } - it 'falls to create a note' do + it 'fails to create a note' do + expect { subject }.to_not change(AccountModerationNote, :count) + expect(response).to render_template 'admin/accounts/show' + end + end + + context 'when the content is too long' do + let(:params) { { account_moderation_note: { target_account_id: target_account.id, content: 'test' * AccountModerationNote::CONTENT_SIZE_LIMIT } } } + + it 'fails to create a note' do expect { subject }.to_not change(AccountModerationNote, :count) expect(response).to render_template 'admin/accounts/show' end diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb index 4ddf4a4e2476cc..8d5b5c7aecf871 100644 --- a/spec/controllers/admin/report_notes_controller_spec.rb +++ b/spec/controllers/admin/report_notes_controller_spec.rb @@ -22,7 +22,7 @@ let(:account_id) { nil } context 'when create_and_resolve flag is on' do - let(:params) { { report_note: { content: 'test content', report_id: report.id }, create_and_resolve: nil } } + let(:params) { { report_note: { report_id: report.id, content: 'test content' }, create_and_resolve: nil } } it 'creates a report note and resolves report' do expect { subject }.to change(ReportNote, :count).by(1) @@ -32,7 +32,7 @@ end context 'when create_and_resolve flag is false' do - let(:params) { { report_note: { content: 'test content', report_id: report.id } } } + let(:params) { { report_note: { report_id: report.id, content: 'test content' } } } it 'creates a report note and does not resolve report' do expect { subject }.to change(ReportNote, :count).by(1) @@ -47,7 +47,7 @@ let(:account_id) { user.account.id } context 'when create_and_unresolve flag is on' do - let(:params) { { report_note: { content: 'test content', report_id: report.id }, create_and_unresolve: nil } } + let(:params) { { report_note: { report_id: report.id, content: 'test content' }, create_and_unresolve: nil } } it 'creates a report note and unresolves report' do expect { subject }.to change(ReportNote, :count).by(1) @@ -57,7 +57,7 @@ end context 'when create_and_unresolve flag is false' do - let(:params) { { report_note: { content: 'test content', report_id: report.id } } } + let(:params) { { report_note: { report_id: report.id, content: 'test content' } } } it 'creates a report note and does not unresolve report' do expect { subject }.to change(ReportNote, :count).by(1) @@ -68,12 +68,24 @@ end end - context 'when parameter is invalid' do - let(:params) { { report_note: { content: '', report_id: report.id } } } + context 'when content is too short' do + let(:params) { { report_note: { report_id: report.id, content: '' } } } let(:action_taken) { nil } let(:account_id) { nil } it 'renders admin/reports/show' do + expect { subject }.to_not change(ReportNote, :count) + expect(subject).to render_template 'admin/reports/show' + end + end + + context 'when content is too long' do + let(:params) { { report_note: { report_id: report.id, content: 'test' * ReportNote::CONTENT_SIZE_LIMIT } } } + let(:action_taken) { nil } + let(:account_id) { nil } + + it 'renders admin/reports/show' do + expect { subject }.to_not change(ReportNote, :count) expect(subject).to render_template 'admin/reports/show' end end From d5d3a0fc57ff712061a3bd18736d68851f04f86c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 15:38:51 +0200 Subject: [PATCH 051/113] fix(deps): update dependency pino to v9.1.0 (#30283) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3741a541958f4b..3d85014d4996f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13042,13 +13042,6 @@ __metadata: languageName: node linkType: hard -"pino-std-serializers@npm:^6.0.0": - version: 6.2.2 - resolution: "pino-std-serializers@npm:6.2.2" - checksum: 10c0/8f1c7f0f0d8f91e6c6b5b2a6bfb48f06441abeb85f1c2288319f736f9c6d814fbeebe928d2314efc2ba6018fa7db9357a105eca9fc99fc1f28945a8a8b28d3d5 - languageName: node - linkType: hard - "pino-std-serializers@npm:^7.0.0": version: 7.0.0 resolution: "pino-std-serializers@npm:7.0.0" @@ -13057,23 +13050,23 @@ __metadata: linkType: hard "pino@npm:^9.0.0": - version: 9.0.0 - resolution: "pino@npm:9.0.0" + version: 9.1.0 + resolution: "pino@npm:9.1.0" dependencies: atomic-sleep: "npm:^1.0.0" fast-redact: "npm:^3.1.1" on-exit-leak-free: "npm:^2.1.0" pino-abstract-transport: "npm:^1.2.0" - pino-std-serializers: "npm:^6.0.0" + pino-std-serializers: "npm:^7.0.0" process-warning: "npm:^3.0.0" quick-format-unescaped: "npm:^4.0.3" real-require: "npm:^0.2.0" safe-stable-stringify: "npm:^2.3.1" - sonic-boom: "npm:^3.7.0" - thread-stream: "npm:^2.6.0" + sonic-boom: "npm:^4.0.1" + thread-stream: "npm:^3.0.0" bin: pino: bin.js - checksum: 10c0/10ef10aee0cf80af8ed83468cff2e29d642b6794b53cf641e1abcaf9e9958d8bcbc6e09d62757054aef3b4415c45d66a5018da11d43b81a23ba299ef5dc4e8b1 + checksum: 10c0/d060530ae2e4e8f21d04bb0f44f009f94d207d7f4337f508f618416514214ddaf1b29f8c5c265153a19ce3b6480b451461f40020f916ace9d53a5aa07624b79c languageName: node linkType: hard @@ -15822,7 +15815,7 @@ __metadata: languageName: node linkType: hard -"sonic-boom@npm:^3.0.0, sonic-boom@npm:^3.7.0": +"sonic-boom@npm:^3.0.0": version: 3.7.0 resolution: "sonic-boom@npm:3.7.0" dependencies: @@ -15831,6 +15824,15 @@ __metadata: languageName: node linkType: hard +"sonic-boom@npm:^4.0.1": + version: 4.0.1 + resolution: "sonic-boom@npm:4.0.1" + dependencies: + atomic-sleep: "npm:^1.0.0" + checksum: 10c0/7b467f2bc8af7ff60bf210382f21c59728cc4b769af9b62c31dd88723f5cc472752d2320736cc366acc7c765ddd5bec3072c033b0faf249923f576a7453ba9d3 + languageName: node + linkType: hard + "source-list-map@npm:^2.0.0": version: 2.0.1 resolution: "source-list-map@npm:2.0.1" @@ -16776,12 +16778,12 @@ __metadata: languageName: node linkType: hard -"thread-stream@npm:^2.6.0": - version: 2.6.0 - resolution: "thread-stream@npm:2.6.0" +"thread-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "thread-stream@npm:3.0.0" dependencies: real-require: "npm:^0.2.0" - checksum: 10c0/276e2545b33273232eb2c22c53fc11844951c1322f8a78c522477af716ebcfe0d106ccf1fbc455f6e48d928e93231fed6377ce91fdcb3885086e8ffa1f011c88 + checksum: 10c0/1f4da5a8c93b170cdc7c1ad774af49bb2af43f73cfd9a7f8fb02b766255b483eb6d0b734502c880397baa95c0ce3490088b9a487cff32d4e481aab6fe76560f5 languageName: node linkType: hard From ca560c10958d3ad96736c974c778380c2adacef2 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 15 May 2024 09:57:13 -0400 Subject: [PATCH 052/113] Disable `Style/RedundantFetchBlock` cop (#30207) --- .rubocop.yml | 5 +++++ .rubocop_todo.yml | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 542e90b5e337c1..cbc0afd2815c53 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -211,6 +211,11 @@ Style/PercentLiteralDelimiters: Style/RedundantBegin: Enabled: false +# Reason: Prevailing style choice +# https://docs.rubocop.org/rubocop/cops_style.html#styleredundantfetchblock +Style/RedundantFetchBlock: + Enabled: false + # Reason: Overridden to reduce implicit StandardError rescues # https://docs.rubocop.org/rubocop/cops_style.html#stylerescuestandarderror Style/RescueStandardError: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b47d682f3e683c..064f622085af6f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -169,16 +169,6 @@ Style/RedundantConstantBase: - 'config/environments/production.rb' - 'config/initializers/sidekiq.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: SafeForConstants. -Style/RedundantFetchBlock: - Exclude: - - 'config/initializers/1_hosts.rb' - - 'config/initializers/chewy.rb' - - 'config/initializers/devise.rb' - - 'config/initializers/paperclip.rb' - - 'config/puma.rb' - # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. # AllowedMethods: present?, blank?, presence, try, try! From 94493cff925ee9b9cb4ebc7cc20081ab20521b85 Mon Sep 17 00:00:00 2001 From: David Lapshin Date: Thu, 16 May 2024 10:33:29 +0300 Subject: [PATCH 053/113] Fix incorrect element selector from #30221 (#30307) --- app/javascript/styles/mastodon/components.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 927c57d990b63b..f377eed95cba3d 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4365,10 +4365,6 @@ a.status-card { outline: $ui-button-focus-outline; } - .no-reduce-motion .icon { - transition: transform 0.15s ease-in-out; - } - &.active { color: $primary-text-color; @@ -4387,6 +4383,10 @@ a.status-card { } } +.no-reduce-motion .column-header__button .icon { + transition: transform 150ms ease-in-out; +} + .column-header__collapsible { max-height: 70vh; overflow: hidden; From 60b423b3f72feea31e0d22b02b948848819ad601 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 09:43:31 +0200 Subject: [PATCH 054/113] chore(deps): update dependency rspec-sidekiq to v5 (#30314) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index b9baef7036cddc..240dcce95ac6a8 100644 --- a/Gemfile +++ b/Gemfile @@ -132,7 +132,7 @@ group :test do gem 'email_spec' # Extra RSpec extension methods and helpers for sidekiq - gem 'rspec-sidekiq', '~> 4.0' + gem 'rspec-sidekiq', '~> 5.0' # Browser integration testing gem 'capybara', '~> 3.39' diff --git a/Gemfile.lock b/Gemfile.lock index d34d634f58284a..a20ac79aea6b6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -708,7 +708,7 @@ GEM rspec-support (~> 3.13.0) rspec-github (2.4.0) rspec-core (~> 3.0) - rspec-mocks (3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (6.1.2) @@ -719,7 +719,7 @@ GEM rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-sidekiq (4.2.0) + rspec-sidekiq (5.0.0) rspec-core (~> 3.0) rspec-expectations (~> 3.0) rspec-mocks (~> 3.0) @@ -1012,7 +1012,7 @@ DEPENDENCIES rqrcode (~> 2.2) rspec-github (~> 2.4) rspec-rails (~> 6.0) - rspec-sidekiq (~> 4.0) + rspec-sidekiq (~> 5.0) rubocop rubocop-capybara rubocop-performance From c9ee1437c0a12bea5fbafb7efbb8e87e4eb6fe0e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 16 May 2024 03:43:35 -0400 Subject: [PATCH 055/113] Use ruby language constants to build version string in software version dimension (#30309) --- .../admin/metrics/dimension/software_versions_dimension.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/lib/admin/metrics/dimension/software_versions_dimension.rb b/app/lib/admin/metrics/dimension/software_versions_dimension.rb index ccf556eae0864a..97cdaf589e8c5e 100644 --- a/app/lib/admin/metrics/dimension/software_versions_dimension.rb +++ b/app/lib/admin/metrics/dimension/software_versions_dimension.rb @@ -25,14 +25,11 @@ def mastodon_version end def ruby_version - yjit = defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? - value = "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}#{yjit ? ' +YJIT' : ''}" - { key: 'ruby', human_key: 'Ruby', - value: value, - human_value: value, + value: "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}", + human_value: RUBY_DESCRIPTION, } end From cdb042ae860c79d47920f30a3ba8b7625e7de56d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 09:50:19 +0200 Subject: [PATCH 056/113] New Crowdin Translations (automated) (#30319) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/gl.json | 2 +- app/javascript/mastodon/locales/sk.json | 3 ++- app/javascript/mastodon/locales/tr.json | 2 +- config/locales/sk.yml | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json index 88d4f5f60e059a..98cc3139485ac0 100644 --- a/app/javascript/mastodon/locales/gl.json +++ b/app/javascript/mastodon/locales/gl.json @@ -92,7 +92,7 @@ "block_modal.remote_users_caveat": "Ímoslle pedir ao servidor {domain} que respecte a túa decisión. Emporiso, non hai garantía de que atenda a petición xa que os servidores xestionan os bloqueos de formas diferentes. As publicacións públicas poderían aínda ser visibles para usuarias que non iniciaron sesión.", "block_modal.show_less": "Mostrar menos", "block_modal.show_more": "Mostrar máis", - "block_modal.they_cant_mention": "Non te pode seguir nin mencionar.", + "block_modal.they_cant_mention": "Non te poden seguir nin mencionar.", "block_modal.they_cant_see_posts": "Non pode ver as túas publicacións nin ti as de ela.", "block_modal.they_will_know": "Pode ver que a bloqueaches.", "block_modal.title": "Bloquear usuaria?", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index 0c76467419f292..c583b58220ead8 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -295,7 +295,7 @@ "follow_suggestions.personalized_suggestion": "Prispôsobený návrh", "follow_suggestions.popular_suggestion": "Obľúbený návrh", "follow_suggestions.popular_suggestion_longer": "Populárne na {domain}", - "follow_suggestions.similar_to_recently_followed_longer": "Podobné profilom ktoré si nedávno nasledoval/a", + "follow_suggestions.similar_to_recently_followed_longer": "Podobné profilom, ktoré si nedávno nasledoval/a", "follow_suggestions.view_all": "Zobraziť všetky", "follow_suggestions.who_to_follow": "Koho sledovať", "followed_tags": "Sledované hashtagy", @@ -446,6 +446,7 @@ "notification.follow_request": "{name} vás žiada sledovať", "notification.mention": "{name} vás spomína", "notification.moderation-warning.learn_more": "Zisti viac", + "notification.moderation_warning.action_disable": "Tvoj účet bol vypnutý.", "notification.moderation_warning.action_silence": "Tvoj účet bol obmedzený.", "notification.moderation_warning.action_suspend": "Tvoj účet bol pozastavený.", "notification.own_poll": "Vaša anketa sa skončila", diff --git a/app/javascript/mastodon/locales/tr.json b/app/javascript/mastodon/locales/tr.json index c46080cfb226a1..6c011065932473 100644 --- a/app/javascript/mastodon/locales/tr.json +++ b/app/javascript/mastodon/locales/tr.json @@ -474,7 +474,7 @@ "notification.follow_request": "{name} size takip isteği gönderdi", "notification.mention": "{name} senden bahsetti", "notification.moderation-warning.learn_more": "Daha fazlası", - "notification.moderation_warning": "Bir denetim uyarısı aldınız", + "notification.moderation_warning": "Hesabınız bir denetim uyarısı aldı", "notification.moderation_warning.action_delete_statuses": "Bazı gönderileriniz kaldırıldı.", "notification.moderation_warning.action_disable": "Hesabınız devre dışı bırakıldı.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Bazı gönderileriniz hassas olarak işaretlendi.", diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 78e7bdb25eafc1..f05887dc33cc0c 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -254,9 +254,12 @@ sk: destroy_status_html: "%{name} zmazal/a príspevok od %{target}" destroy_unavailable_domain_html: "%{name} znova spustil/a doručovanie pre doménu %{target}" destroy_user_role_html: "%{name} vymazal/a rolu pre %{target}" + enable_custom_emoji_html: "%{name} povolil/a emotikonu %{target}" enable_user_html: "%{name} povolil/a prihlásenie pre používateľa %{target}" memorialize_account_html: "%{name} zmenil/a účet %{target} na pamätnú stránku" + promote_user_html: "%{name} povýšil/a užívateľa %{target}" reject_appeal_html: "%{name} zamietol/la námietku moderovacieho rozhodnutia od %{target}" + reject_user_html: "%{name} odmietol/la registráciu od %{target}" remove_avatar_user_html: "%{name} vymazal/a %{target}/ov/in avatar" reopen_report_html: "%{name} znovu otvoril/a nahlásenie %{target}" resend_user_html: "%{name} znovu odoslal/a potvrdzovací email pre %{target}" @@ -266,7 +269,9 @@ sk: silence_account_html: "%{name} obmedzil/a účet %{target}" suspend_account_html: "%{name} zablokoval/a účet používateľa %{target}" unassigned_report_html: "%{name} odobral/a report od %{target}" + unblock_email_account_html: "%{name} odblokoval/a %{target}ovu/inu emailovú adresu" unsensitive_account_html: "%{name} odznačil/a médium od %{target} ako chúlostivé" + unsilence_account_html: "%{name} zrušil/a obmedzenie %{target}ovho/inho účtu" unsuspend_account_html: "%{name} spojazdnil/a účet %{target}" update_announcement_html: "%{name} aktualizoval/a oboznámenie %{target}" update_custom_emoji_html: "%{name} aktualizoval/a emotikonu %{target}" @@ -529,6 +534,9 @@ sk: actions: suspend_description_html: Tento účet a všetok jeho obsah bude nedostupný a nakoniec zmazaný, interaktovať s ním bude nemožné. Zvrátiteľné v rámci 30 dní. Uzatvára všetky hlásenia voči tomuto účtu. add_to_report: Pridaj viac do hlásenia + already_suspended_badges: + local: Na tomto serveri už vylúčený/á + remote: Už vylúčený/á na ich serveri are_you_sure: Si si istý/á? assign_to_self: Priraď sebe assigned: Priradený moderátor @@ -538,6 +546,7 @@ sk: comment: none: Žiadne confirm: Potvrď + confirm_action: Potvrď moderovací úkon proti @%{acct} created_at: Nahlásené delete_and_resolve: Vymaž príspevky forwarded: Preposlané @@ -592,8 +601,14 @@ sk: delete: Vymaž edit: Uprav postavenie %{name} everyone: Východzie oprávnenia + permissions_count: + few: "%{count} povolení" + many: "%{count} povolení" + one: "%{count} povolenie" + other: "%{count} povolenia" privileges: administrator: Správca + administrator_description: Užívatelia s týmto povolením, obídu všetky povolenia delete_user_data: Vymaž užívateľské dáta invite_users: Pozvi užívateľov manage_announcements: Spravuj oboznámenia From 356bbbaa7f903b7849af1bb78a7954c250c00d46 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 09:57:19 +0200 Subject: [PATCH 057/113] fix(deps): update dependency @reduxjs/toolkit to v2.2.5 (#30320) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3d85014d4996f2..07c89a5298081f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3050,8 +3050,8 @@ __metadata: linkType: hard "@reduxjs/toolkit@npm:^2.0.1": - version: 2.2.4 - resolution: "@reduxjs/toolkit@npm:2.2.4" + version: 2.2.5 + resolution: "@reduxjs/toolkit@npm:2.2.5" dependencies: immer: "npm:^10.0.3" redux: "npm:^5.0.1" @@ -3065,7 +3065,7 @@ __metadata: optional: true react-redux: optional: true - checksum: 10c0/fdbf510210a5aa4864432397e1a9469367e297cd1d9c09a82e68638df7555672c2f8511fe76f933b00efbbb233c534831591772a44e8c41233e34f3cd0f54569 + checksum: 10c0/be0593bf26852482fb8716b9248531466c6e8782a3114b823ae680fce90267d8c5512a3231cfecc30b17eff81a4604112772b49ad7ca6a3366ddd4f2a838e53c languageName: node linkType: hard From f0d6dc4519cc0311583f139834fbbbcd64e82d7a Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Thu, 16 May 2024 09:59:46 +0200 Subject: [PATCH 058/113] Fix: Mark redirect uris field in Development > Application form as required (#30311) --- app/controllers/settings/applications_controller.rb | 2 +- app/views/settings/applications/_fields.html.haml | 1 + config/navigation.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/settings/applications_controller.rb b/app/controllers/settings/applications_controller.rb index d4b72056817372..6849979b115233 100644 --- a/app/controllers/settings/applications_controller.rb +++ b/app/controllers/settings/applications_controller.rb @@ -13,7 +13,7 @@ def show; end def new @application = Doorkeeper::Application.new( redirect_uri: Doorkeeper.configuration.native_redirect_uri, - scopes: 'read write follow' + scopes: 'read:me' ) end diff --git a/app/views/settings/applications/_fields.html.haml b/app/views/settings/applications/_fields.html.haml index ed97e880fc8de0..d5398489526b01 100644 --- a/app/views/settings/applications/_fields.html.haml +++ b/app/views/settings/applications/_fields.html.haml @@ -11,6 +11,7 @@ .fields-group = f.input :redirect_uri, label: t('activerecord.attributes.doorkeeper/application.redirect_uri'), hint: t('doorkeeper.applications.help.redirect_uri'), + required: true, wrapper: :with_block_label %p.hint= t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: content_tag(:code, Doorkeeper.configuration.native_redirect_uri)).html_safe diff --git a/config/navigation.rb b/config/navigation.rb index b6e3f495056f49..efac96d46e6a1a 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -36,7 +36,7 @@ end n.item :invites, safe_join([fa_icon('user-plus fw'), t('invites.title')]), invites_path, if: -> { current_user.can?(:invite_users) && current_user.functional? && !self_destruct } - n.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_path, if: -> { current_user.functional? && !self_destruct } + n.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_path, highlights_on: %r{/settings/applications}, if: -> { current_user.functional? && !self_destruct } n.item :trends, safe_join([fa_icon('fire fw'), t('admin.trends.title')]), admin_trends_statuses_path, if: -> { current_user.can?(:manage_taxonomies) && !self_destruct } do |s| s.item :statuses, safe_join([fa_icon('comments-o fw'), t('admin.trends.statuses.title')]), admin_trends_statuses_path, highlights_on: %r{/admin/trends/statuses} From 65e82211cdaffa3132832dc42756913d668985c3 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 16 May 2024 04:03:46 -0400 Subject: [PATCH 059/113] Rename `cache_*` methods to `preload_*` in controller concern (#30209) --- app/controllers/accounts_controller.rb | 2 +- .../activitypub/collections_controller.rb | 2 +- .../activitypub/outboxes_controller.rb | 2 +- .../api/v1/accounts/statuses_controller.rb | 6 +++--- app/controllers/api/v1/bookmarks_controller.rb | 6 +++--- app/controllers/api/v1/favourites_controller.rb | 6 +++--- .../api/v1/notifications/requests_controller.rb | 2 +- .../api/v1/notifications_controller.rb | 2 +- app/controllers/api/v1/statuses_controller.rb | 8 ++++---- .../api/v1/timelines/home_controller.rb | 6 +++--- .../api/v1/timelines/list_controller.rb | 6 +++--- .../api/v1/timelines/public_controller.rb | 6 +++--- .../api/v1/timelines/tag_controller.rb | 6 +++--- .../api/v1/trends/statuses_controller.rb | 2 +- app/controllers/application_controller.rb | 1 + app/controllers/concerns/cache_concern.rb | 16 ---------------- app/controllers/concerns/preloading_concern.rb | 17 +++++++++++++++++ app/controllers/tags_controller.rb | 2 +- ...ncern_spec.rb => preloading_concern_spec.rb} | 12 ++++++------ 19 files changed, 56 insertions(+), 54 deletions(-) create mode 100644 app/controllers/concerns/preloading_concern.rb rename spec/controllers/concerns/{cache_concern_spec.rb => preloading_concern_spec.rb} (79%) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 32549e15169e5f..c3131edce939fd 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -25,7 +25,7 @@ def show limit = params[:limit].present? ? [params[:limit].to_i, PAGE_SIZE_MAX].min : PAGE_SIZE @statuses = filtered_statuses.without_reblogs.limit(limit) - @statuses = cache_collection(@statuses, Status) + @statuses = preload_collection(@statuses, Status) end format.json do diff --git a/app/controllers/activitypub/collections_controller.rb b/app/controllers/activitypub/collections_controller.rb index d5632902fe974b..c25362c9bc056f 100644 --- a/app/controllers/activitypub/collections_controller.rb +++ b/app/controllers/activitypub/collections_controller.rb @@ -18,7 +18,7 @@ def show def set_items case params[:id] when 'featured' - @items = for_signed_account { cache_collection(@account.pinned_statuses, Status) } + @items = for_signed_account { preload_collection(@account.pinned_statuses, Status) } @items = @items.map { |item| item.distributable? ? item : ActivityPub::TagManager.instance.uri_for(item) } when 'tags' @items = for_signed_account { @account.featured_tags } diff --git a/app/controllers/activitypub/outboxes_controller.rb b/app/controllers/activitypub/outboxes_controller.rb index 8079e011dd0084..b8baf64e1a59a8 100644 --- a/app/controllers/activitypub/outboxes_controller.rb +++ b/app/controllers/activitypub/outboxes_controller.rb @@ -60,7 +60,7 @@ def prev_page def set_statuses return unless page_requested? - @statuses = cache_collection_paginated_by_id( + @statuses = preload_collection_paginated_by_id( AccountStatusesFilter.new(@account, signed_request_account).results, Status, LIMIT, diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 35ea9c8ec12d5d..c42f27776ca807 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -19,11 +19,11 @@ def set_account end def load_statuses - @account.unavailable? ? [] : cached_account_statuses + @account.unavailable? ? [] : preloaded_account_statuses end - def cached_account_statuses - cache_collection_paginated_by_id( + def preloaded_account_statuses + preload_collection_paginated_by_id( AccountStatusesFilter.new(@account, current_account, params).results, Status, limit_param(DEFAULT_STATUSES_LIMIT), diff --git a/app/controllers/api/v1/bookmarks_controller.rb b/app/controllers/api/v1/bookmarks_controller.rb index b6bb987b6bccc6..f7671a9032c066 100644 --- a/app/controllers/api/v1/bookmarks_controller.rb +++ b/app/controllers/api/v1/bookmarks_controller.rb @@ -13,11 +13,11 @@ def index private def load_statuses - cached_bookmarks + preloaded_bookmarks end - def cached_bookmarks - cache_collection(results.map(&:status), Status) + def preloaded_bookmarks + preload_collection(results.map(&:status), Status) end def results diff --git a/app/controllers/api/v1/favourites_controller.rb b/app/controllers/api/v1/favourites_controller.rb index 73da538f5c80ad..18ca9ab8661a0c 100644 --- a/app/controllers/api/v1/favourites_controller.rb +++ b/app/controllers/api/v1/favourites_controller.rb @@ -13,11 +13,11 @@ def index private def load_statuses - cached_favourites + preloaded_favourites end - def cached_favourites - cache_collection(results.map(&:status), Status) + def preloaded_favourites + preload_collection(results.map(&:status), Status) end def results diff --git a/app/controllers/api/v1/notifications/requests_controller.rb b/app/controllers/api/v1/notifications/requests_controller.rb index 6a26cc0e8abf07..0e58379a382e85 100644 --- a/app/controllers/api/v1/notifications/requests_controller.rb +++ b/app/controllers/api/v1/notifications/requests_controller.rb @@ -41,7 +41,7 @@ def load_requests ) NotificationRequest.preload_cache_collection(requests) do |statuses| - cache_collection(statuses, Status) + preload_collection(statuses, Status) end end diff --git a/app/controllers/api/v1/notifications_controller.rb b/app/controllers/api/v1/notifications_controller.rb index c41a0bb05d11f8..1d0aa10d2e70cd 100644 --- a/app/controllers/api/v1/notifications_controller.rb +++ b/app/controllers/api/v1/notifications_controller.rb @@ -41,7 +41,7 @@ def load_notifications ) Notification.preload_cache_collection_target_statuses(notifications) do |target_statuses| - cache_collection(target_statuses, Status) + preload_collection(target_statuses, Status) end end diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 36a9ec6325b11e..5f7e66617d2b7e 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -26,13 +26,13 @@ class Api::V1::StatusesController < Api::BaseController DESCENDANTS_DEPTH_LIMIT = 20 def index - @statuses = cache_collection(@statuses, Status) + @statuses = preload_collection(@statuses, Status) render json: @statuses, each_serializer: REST::StatusSerializer end def show cache_if_unauthenticated! - @status = cache_collection([@status], Status).first + @status = preload_collection([@status], Status).first render json: @status, serializer: REST::StatusSerializer end @@ -51,8 +51,8 @@ def context ancestors_results = @status.in_reply_to_id.nil? ? [] : @status.ancestors(ancestors_limit, current_account) descendants_results = @status.descendants(descendants_limit, current_account, descendants_depth_limit) - loaded_ancestors = cache_collection(ancestors_results, Status) - loaded_descendants = cache_collection(descendants_results, Status) + loaded_ancestors = preload_collection(ancestors_results, Status) + loaded_descendants = preload_collection(descendants_results, Status) @context = Context.new(ancestors: loaded_ancestors, descendants: loaded_descendants) statuses = [@status] + @context.ancestors + @context.descendants diff --git a/app/controllers/api/v1/timelines/home_controller.rb b/app/controllers/api/v1/timelines/home_controller.rb index 36fdbea6471200..d5d18286665268 100644 --- a/app/controllers/api/v1/timelines/home_controller.rb +++ b/app/controllers/api/v1/timelines/home_controller.rb @@ -21,11 +21,11 @@ def show private def load_statuses - cached_home_statuses + preloaded_home_statuses end - def cached_home_statuses - cache_collection home_statuses, Status + def preloaded_home_statuses + preload_collection home_statuses, Status end def home_statuses diff --git a/app/controllers/api/v1/timelines/list_controller.rb b/app/controllers/api/v1/timelines/list_controller.rb index 14b884ecd95bf1..d8cdbdb74cf194 100644 --- a/app/controllers/api/v1/timelines/list_controller.rb +++ b/app/controllers/api/v1/timelines/list_controller.rb @@ -21,11 +21,11 @@ def set_list end def set_statuses - @statuses = cached_list_statuses + @statuses = preloaded_list_statuses end - def cached_list_statuses - cache_collection list_statuses, Status + def preloaded_list_statuses + preload_collection list_statuses, Status end def list_statuses diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index 35af8dc4b50192..d164854d6a3753 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -18,11 +18,11 @@ def require_auth? end def load_statuses - cached_public_statuses_page + preloaded_public_statuses_page end - def cached_public_statuses_page - cache_collection(public_statuses, Status) + def preloaded_public_statuses_page + preload_collection(public_statuses, Status) end def public_statuses diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index 4ba439dbb202ce..3bf8f374e196f3 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -23,11 +23,11 @@ def load_tag end def load_statuses - cached_tagged_statuses + preloaded_tagged_statuses end - def cached_tagged_statuses - @tag.nil? ? [] : cache_collection(tag_timeline_statuses, Status) + def preloaded_tagged_statuses + @tag.nil? ? [] : preload_collection(tag_timeline_statuses, Status) end def tag_timeline_statuses diff --git a/app/controllers/api/v1/trends/statuses_controller.rb b/app/controllers/api/v1/trends/statuses_controller.rb index 48bfe119918b20..c6fbbce16778f8 100644 --- a/app/controllers/api/v1/trends/statuses_controller.rb +++ b/app/controllers/api/v1/trends/statuses_controller.rb @@ -20,7 +20,7 @@ def enabled? def set_statuses @statuses = if enabled? - cache_collection(statuses_from_trends.offset(offset_param).limit(limit_param(DEFAULT_STATUSES_LIMIT)), Status) + preload_collection(statuses_from_trends.offset(offset_param).limit(limit_param(DEFAULT_STATUSES_LIMIT)), Status) else [] end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8ba10d64c006f4..66e0f7e3051d56 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base include UserTrackingConcern include SessionTrackingConcern include CacheConcern + include PreloadingConcern include DomainControlHelper include DatabaseHelper include AuthorizedFetchHelper diff --git a/app/controllers/concerns/cache_concern.rb b/app/controllers/concerns/cache_concern.rb index 4656539f85ee23..1823b5b8edacf9 100644 --- a/app/controllers/concerns/cache_concern.rb +++ b/app/controllers/concerns/cache_concern.rb @@ -45,20 +45,4 @@ def render_with_cache(**options) Rails.cache.write(key, response.body, expires_in: expires_in, raw: true) end end - - # TODO: Rename this method, as it does not perform any caching anymore. - def cache_collection(raw, klass) - return raw unless klass.respond_to?(:preload_cacheable_associations) - - records = raw.to_a - - klass.preload_cacheable_associations(records) - - records - end - - # TODO: Rename this method, as it does not perform any caching anymore. - def cache_collection_paginated_by_id(raw, klass, limit, options) - cache_collection raw.to_a_paginated_by_id(limit, options), klass - end end diff --git a/app/controllers/concerns/preloading_concern.rb b/app/controllers/concerns/preloading_concern.rb new file mode 100644 index 00000000000000..61e22136498048 --- /dev/null +++ b/app/controllers/concerns/preloading_concern.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module PreloadingConcern + extend ActiveSupport::Concern + + def preload_collection(scope, klass) + return scope unless klass.respond_to?(:preload_cacheable_associations) + + scope.to_a.tap do |records| + klass.preload_cacheable_associations(records) + end + end + + def preload_collection_paginated_by_id(scope, klass, limit, options) + preload_collection scope.to_a_paginated_by_id(limit, options), klass + end +end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index b0bdbde95662b8..d6c0d872c8bfcd 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -45,7 +45,7 @@ def set_local end def set_statuses - @statuses = cache_collection(TagFeed.new(@tag, nil, local: @local).get(limit_param), Status) + @statuses = preload_collection(TagFeed.new(@tag, nil, local: @local).get(limit_param), Status) end def limit_param diff --git a/spec/controllers/concerns/cache_concern_spec.rb b/spec/controllers/concerns/preloading_concern_spec.rb similarity index 79% rename from spec/controllers/concerns/cache_concern_spec.rb rename to spec/controllers/concerns/preloading_concern_spec.rb index fffd2b266e1fa9..795afbc45e2e4f 100644 --- a/spec/controllers/concerns/cache_concern_spec.rb +++ b/spec/controllers/concerns/preloading_concern_spec.rb @@ -2,20 +2,20 @@ require 'rails_helper' -RSpec.describe CacheConcern do +RSpec.describe PreloadingConcern do controller(ApplicationController) do - include CacheConcern + include PreloadingConcern def empty_array - render plain: cache_collection([], Status).size + render plain: preload_collection([], Status).size end def empty_relation - render plain: cache_collection(Status.none, Status).size + render plain: preload_collection(Status.none, Status).size end def account_statuses_favourites - render plain: cache_collection(Status.where(account_id: params[:id]), Status).map(&:favourites_count) + render plain: preload_collection(Status.where(account_id: params[:id]), Status).map(&:favourites_count) end end @@ -27,7 +27,7 @@ def account_statuses_favourites end end - describe '#cache_collection' do + describe '#preload_collection' do context 'when given an empty array' do it 'returns an empty array' do get :empty_array From 283a891e9290fc9fdbfd082f3bde48863f1c6f45 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 16 May 2024 11:28:10 +0200 Subject: [PATCH 060/113] Allow to customise the OTEL service name prefix (#30322) --- config/initializers/opentelemetry.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/initializers/opentelemetry.rb b/config/initializers/opentelemetry.rb index e50132d4617385..9af0ab89c8698a 100644 --- a/config/initializers/opentelemetry.rb +++ b/config/initializers/opentelemetry.rb @@ -53,10 +53,12 @@ }, }) + prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon') + c.service_name = case $PROGRAM_NAME - when /puma/ then 'mastodon/web' + when /puma/ then "#{prefix}/web" else - "mastodon/#{$PROGRAM_NAME.split('/').last}" + "#{prefix}/#{$PROGRAM_NAME.split('/').last}" end c.service_version = Mastodon::Version.to_s end From 1b6eb2c7f0425a20f9bd823419138bf8adfa18f4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 16 May 2024 05:56:48 -0400 Subject: [PATCH 061/113] Enable YJIT when available (#30310) --- config/initializers/enable_yjit.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config/initializers/enable_yjit.rb diff --git a/config/initializers/enable_yjit.rb b/config/initializers/enable_yjit.rb new file mode 100644 index 00000000000000..7b1053ec114b7d --- /dev/null +++ b/config/initializers/enable_yjit.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# Automatically enable YJIT as of Ruby 3.3, as it brings very +# sizeable performance improvements. + +# If you are deploying to a memory constrained environment +# you may want to delete this file, but otherwise it's free +# performance. +if defined?(RubyVM::YJIT.enable) + Rails.application.config.after_initialize do + RubyVM::YJIT.enable + end +end From 66906a1bc1fb3934dc101e1d8d7ec4a9ce54a12e Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 16 May 2024 15:01:01 +0200 Subject: [PATCH 062/113] Fix Web UI trying to save user settings when logged out (#30324) --- app/javascript/mastodon/actions/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/settings.js b/app/javascript/mastodon/actions/settings.js index 3685b0684e0b83..fbd89f9d4b0b52 100644 --- a/app/javascript/mastodon/actions/settings.js +++ b/app/javascript/mastodon/actions/settings.js @@ -20,7 +20,7 @@ export function changeSetting(path, value) { } const debouncedSave = debounce((dispatch, getState) => { - if (getState().getIn(['settings', 'saved'])) { + if (getState().getIn(['settings', 'saved']) || !getState().getIn(['meta', 'me'])) { return; } From b2388be71eb0031ef9e47c492b1c038231cd8bc0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:45:17 +0200 Subject: [PATCH 063/113] chore(deps): update dependency selenium-webdriver to v4.21.0 (#30325) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a20ac79aea6b6b..6001c73db498e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -693,7 +693,8 @@ GEM responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) rotp (6.3.0) rouge (4.2.1) rpam2 (4.0.2) @@ -774,7 +775,7 @@ GEM scenic (1.8.0) activerecord (>= 4.0.0) railties (>= 4.0.0) - selenium-webdriver (4.20.1) + selenium-webdriver (4.21.0) base64 (~> 0.2) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) @@ -815,6 +816,7 @@ GEM stringio (3.1.0) strong_migrations (1.8.0) activerecord (>= 5.2) + strscan (3.1.0) swd (1.3.0) activesupport (>= 3) attr_required (>= 0.0.5) From 0a9e0943c04593ea376ee0692477fd0ceb01e73b Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 09:01:13 +0900 Subject: [PATCH 064/113] Fix test/lint --- app/javascript/mastodon/features/list_timeline/index.jsx | 2 +- .../features/notifications/components/notification.jsx | 6 +++--- app/lib/chewy_config.rb | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/javascript/mastodon/features/list_timeline/index.jsx b/app/javascript/mastodon/features/list_timeline/index.jsx index 4cc4d40fc2472e..a97e93471304b9 100644 --- a/app/javascript/mastodon/features/list_timeline/index.jsx +++ b/app/javascript/mastodon/features/list_timeline/index.jsx @@ -223,7 +223,7 @@ class ListTimeline extends PureComponent {
diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index 9f9157b1300a86..f697a7f211f7a7 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -41,8 +41,8 @@ const messages = defineMessages({ poll: { id: 'notification.poll', defaultMessage: 'A poll you have voted in has ended' }, reblog: { id: 'notification.reblog', defaultMessage: '{name} boosted your status' }, status: { id: 'notification.status', defaultMessage: '{name} just posted' }, - listStatus: { id: 'notification.list_status', defaultMessage: '{name} post is added on {listName}' }, - statusReference: { id: 'notification.status_reference', defaultMessage: '{name} refered your post' }, + listStatus: { id: 'notification.list_status', defaultMessage: '{name} post is added to {listName}' }, + statusReference: { id: 'notification.status_reference', defaultMessage: '{name} quoted your post' }, update: { id: 'notification.update', defaultMessage: '{name} edited a post' }, adminSignUp: { id: 'notification.admin.sign_up', defaultMessage: '{name} signed up' }, adminReport: { id: 'notification.admin.report', defaultMessage: '{name} reported {target}' }, @@ -305,7 +305,7 @@ class Notification extends ImmutablePureComponent { - + diff --git a/app/lib/chewy_config.rb b/app/lib/chewy_config.rb index efd0cc695e1cf7..9de69b514758a9 100644 --- a/app/lib/chewy_config.rb +++ b/app/lib/chewy_config.rb @@ -19,7 +19,6 @@ def initialize default_config = YAML.load_file(default_config_file) @config = default_config.merge(custom_config || {}) - @config = @config.merge(YAML.load_file(Rails.root.join('config', 'elasticsearch.default-ja-sudachi.yml'))) if Rails.env.test? raise InvalidElasticSearchVersionError, "ElasticSearch config version is missmatch. expected version=#{CONFIG_VERSION} actual version=#{@config['version']}" if @config['version'] != CONFIG_VERSION end From c07986f93395dfec77ac7bfa0f3a32a4ee44927e Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 09:22:40 +0900 Subject: [PATCH 065/113] Fix lint --- config/locales/en.yml | 101 ++++---- config/locales/ja.yml | 228 +++++++++--------- config/locales/simple_form.en.yml | 18 +- config/locales/simple_form.ja.yml | 39 ++- .../services/statuses_search_service_spec.rb | 34 +-- 5 files changed, 204 insertions(+), 216 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 7fb2f30ef2e294..25ae2324328cd6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -462,8 +462,8 @@ en: reject_new_follow: Reject follows reject_new_follow_hint: Reject follows in the future reject_reply_exclude_followers: Reject mentions/quotes exclude followers - reject_reply_hint: Reject replies in the future reject_reply_exclude_followers_hint: Reject replies exclude followers in the future + reject_reply_hint: Reject replies in the future reject_reports: Reject reports reject_reports_hint: Ignore all reports coming from this domain. Irrelevant for suspensions reject_send_sensitive: Do not deliver sensitive postings @@ -520,7 +520,7 @@ en: accept: Accept add_new: Add and make a new application delete: Delete - description_html: Friend server is a system for exchanging posts with each other's local public and local search permissions as they are. + description_html: "Friend server is a system for exchanging posts with each other's local public and local search permissions as they are." disabled: Disabled domain: Domain edit: @@ -576,9 +576,9 @@ en: reject_hashtag: Reject hashtags reject_media: Reject media reject_new_follow: Reject follows - reject_straight_follow: Reject straight follow reject_reply_exclude_followers: Reject reply/quote exclude followers reject_reports: Reject reports + reject_straight_follow: Reject straight follow silence: Limit suspend: Suspend policy: Policy @@ -649,6 +649,24 @@ en: title: IP rules media_attachments: title: Media attachments + ng_rule_histories: + back_to_ng_rule: Back to NG rule + back_to_ng_rules: Back to index + data: + media_count: "%{count} medias" + poll_count: "%{count} polls" + from_local_user: Local user + hidden: Private post + moderate_account: Moderate account + reason_actions: + reaction_emoji_reaction: Emoji reaction + reaction_favourite: Favourite + reaction_follow: Follow request + reaction_reblog: Boost + reaction_vote: Vote + status_create: Post + status_edit: Edit post + title: NG Rule History %{title} ng_rules: account_avatar_state: Has avatar or not account_display_name: Name @@ -690,6 +708,8 @@ en: new: save: Save new NG rule title: Add new NG Rule + reaction_allow_follower: Allow all reactions targeted at followers + reaction_allow_follower_hint: If enabled, reactions between other servers are unconditionally allowed reaction_type: Reaction type reaction_types: emoji_reaction: Emoji reaction @@ -697,8 +717,6 @@ en: follow: Follow reblog: Boost vote: Vote - reaction_allow_follower: Allow all reactions targeted at followers - reaction_allow_follower_hint: If enabled, reactions between other servers are unconditionally allowed record_history_also_local: Local users are also subject to history recording rubular: Regular Expression Checker states: @@ -726,24 +744,6 @@ en: status_visibility: Visibility test_error: Regular expression syntax is incorrect. title: NG Rule - ng_rule_histories: - back_to_ng_rule: Back to NG rule - back_to_ng_rules: Back to index - data: - media_count: "%{count} medias" - poll_count: "%{count} polls" - from_local_user: Local user - hidden: Private post - moderate_account: Moderate account - reason_actions: - reaction_emoji_reaction: Emoji reaction - reaction_favourite: Favourite - reaction_follow: Follow request - reaction_reblog: Boost - reaction_vote: Vote - status_create: Post - status_edit: Edit post - title: NG Rule History %{title} ng_words: block_unfollow_account_mention: Reject all mentions/quotes from all accounts that do not have followers on your server block_unfollow_account_mention_hint: This setting will be removed. After the setting is removed, the behavior will always be the same as if it were unchecked; please use NG rules instead. @@ -755,17 +755,17 @@ en: hide_local_users_for_anonymous_hint: This setting will be removed. After the setting is removed, the behavior will always be the same as if it were unchecked. It can be replaced, though not completely, by "Allow unauthorized access to public timelines" in the "Find" section of the server settings. hold_remote_new_accounts: Hold new remote accounts keywords: Reject keywords - preamble: This setting is useful for solving problems related to spam that are difficult to address with domain blocking. You can reject posts that meet certain criteria, such as the inclusion of specific keywords. Please consider your settings carefully and check your history regularly to ensure that problem-free posts are not deleted. - post_hash_tags_max: Hash tags limit of a post - post_mentions_max: Mentions limit of a post - post_stranger_mentions_max: Mentions limit of a post phrases: - regexp_html: Reg - If the Reg checkbox is checked, the comparison is performed using regular expressions. + regexp_html: "Reg - If the Reg checkbox is checked, the comparison is performed using regular expressions." regexp_short: Reg - stranger_html: UE - Items checked under Uem apply only to mentions, replies, quotes, etc. from accounts with which you have no follow relationship. + stranger_html: "UE - Items checked under Uem apply only to mentions, replies, quotes, etc. from accounts with which you have no follow relationship." stranger_short: Uem - remote_approval_list: List of remote accounts awaiting approval + post_hash_tags_max: Hash tags limit of a post + post_mentions_max: Mentions limit of a post + post_stranger_mentions_max: Mentions limit of a post + preamble: This setting is useful for solving problems related to spam that are difficult to address with domain blocking. You can reject posts that meet certain criteria, such as the inclusion of specific keywords. Please consider your settings carefully and check your history regularly to ensure that problem-free posts are not deleted. remote_approval_hint: Newly recognized accounts with unspecified domains will be placed in Suspended status. You can review that list and approve them if necessary. If this setting is not enabled, all remote accounts will be approved immediately. + remote_approval_list: List of remote accounts awaiting approval settings: Settings stranger_mention_from_local_ng: NG words for Mention to accounts you do not follow are also applied to posts by local users. stranger_mention_from_local_ng_hint: This setting will be removed. After the setting is removed, the behavior will be the same as if it is always checked. If you do not wish this behavior, please use NG rules instead. @@ -971,11 +971,11 @@ en: auto_warning_text_hint: If not specified, the default warning text is used. hint: This keywords is applied to public posts only.. phrases: - remote_html: Rem ote checked applies to remote posts as well. - remote_short: Rem - regexp_html: Reg Exp checked items are compared using regular expressions. + regexp_html: "Reg Exp checked items are compared using regular expressions." regexp_short: Reg - spoiler_html: War ning checked will also be applied to the content warning statement. + remote_html: "Rem ote checked applies to remote posts as well." + remote_short: Rem + spoiler_html: "War ning checked will also be applied to the content warning statement." spoiler_short: War title: Sensitive words settings: @@ -1083,8 +1083,8 @@ en: original_status: Original post reblogs: Reblogs remove: Remove post - remove_media: Remove medias remove_history: Remove edit history + remove_media: Remove medias searchability: Searchability status_changed: Post changed title: Account posts @@ -1293,17 +1293,6 @@ en: domain: Domains keyword: Keywords tag: Tags - errors: - duplicate_account: Duplicate account - duplicate_domain: Duplicate domain - duplicate_keyword: Duplicate keyword - duplicate_tag: Duplicate tag - limit: - accounts: 登録できるアカウント数の上限に達しています - domains: 登録できるドメイン数の上限に達しています - keywords: 登録できるキーワード数の上限に達しています - tags: 登録できるタグ数の上限に達しています - too_short_keyword: Too short keyword! must 2 and more letters edit: available: Available description: Antenna is for all public and local public posts recognized by the server, from all accounts that have not refused to subscribe. Detected posts will be added to the specified list. @@ -1690,13 +1679,13 @@ en: delete: Deactivate expired: Expired expires_in: + '1209600': 2 weeks '1800': 30 minutes '21600': 6 hours + '2629746': 1 month '3600': 1 hour '43200': 12 hours '604800': 1 week - '1209600': 2 weeks - '2629746': 1 month '7889238': 3 months '86400': 1 day expires_in_prompt: Never @@ -1791,14 +1780,14 @@ en: subject: "%{name} submitted a report" sign_up: subject: "%{name} signed up" - favourite: - body: 'Your post was favorited by %{name}:' - subject: "%{name} favorited your post" - title: New favorite emoji_reaction: body: 'Your post was reacted with emoji by %{name}:' subject: "%{name} reacted your post with emoji" title: New emoji reaction + favourite: + body: 'Your post was favorited by %{name}:' + subject: "%{name} favorited your post" + title: New favorite follow: body: "%{name} is now following you!" subject: "%{name} is now following you" @@ -1867,7 +1856,7 @@ en: preferences: does_not_search: The full-text search feature is not available on this server. Instead, your posts will be searched according to this setting on other kmyblue servers. dtl: Deep timeline - dtl_hint: "You can join deep timeline with #%{tag} tag. Following settings make convenient to use deep timeline." + dtl_hint: 'You can join deep timeline with #%{tag} tag. Following settings make convenient to use deep timeline.' emoji_reaction_permitting: Receiving emoji reactions other: Other posting_defaults: Posting defaults @@ -1883,13 +1872,13 @@ en: reach: Reach reach_hint_html: Control whether you want to be discovered and followed by new people. Do you want your posts to appear on the Explore screen? Do you want other people to see you in their follow recommendations? Do you want to accept all new followers automatically, or have granular control over each one? search: Search - search_kmyblue_hint_html: "There are two types of post search settings in kmyblue: 'Indexable' and 'Searchability'. indexable allows all public posts of an account to be searchable by other standard Mastodon, and changes to the setting are retroactive to past posts. Searchability can be specified on a per-post basis, and on kmyblue and Fedibird, this setting takes precedence over Indexable. Past posts cannot be changed." search_hint_html: Control how you want to be found. Do you want people to find you by what you've publicly posted about? Do you want people outside Mastodon to find your profile when searching the web? Please mind that total exclusion from all search engines cannot be guaranteed for public information. + search_kmyblue_hint_html: 'There are two types of post search settings in kmyblue: ''Indexable'' and ''Searchability''. indexable allows all public posts of an account to be searchable by other standard Mastodon, and changes to the setting are retroactive to past posts. Searchability can be specified on a per-post basis, and on kmyblue and Fedibird, this setting takes precedence over Indexable. Past posts cannot be changed.' title: Privacy and reach privacy_extra: hint_html: These settings are kmyblue original. You will receive additional privacy benefits by doing this setting. - post_processing_hint_html: Controls additional operations that the system may perform on the information you post. These include settings that involve sending information about your submission to third party sites. post_processing: Processing posts + post_processing_hint_html: Controls additional operations that the system may perform on the information you post. These include settings that involve sending information about your submission to third party sites. stop_deliver: Stop delivery stop_deliver_hint_html: Mastodon posts can be freely searched by other software; privacy settings made within Mastodon will be ignored and your posts may be found by unintended people. Here, you can set up your posts so that they will not be found by other servers or software. However, there is a risk involved. title: Privacy extra settings @@ -2078,7 +2067,7 @@ en: public_search_long: You can search all posts permitted to search public_unlisted: Local and followers public_unlisted_long: Local users and followers can find - unset: (Unsupported servers) + unset: "(Unsupported servers)" show_more: Show more show_thread: Show thread title: '%{name}: "%{quote}"' diff --git a/config/locales/ja.yml b/config/locales/ja.yml index a4143be060bbae..5801e9931ce1f1 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1,7 +1,7 @@ --- ja: about: - about_mastodon_html: 'Mastodonは、オープンなウェブプロトコルを採用した、自由でオープンソースなソーシャルネットワークです。電子メールのような分散型の仕組みを採っています。' + about_mastodon_html: Mastodonは、オープンなウェブプロトコルを採用した、自由でオープンソースなソーシャルネットワークです。電子メールのような分散型の仕組みを採っています。 contact_missing: 未設定 contact_unavailable: N/A hosted_on: Mastodon hosted on %{domain} @@ -23,7 +23,7 @@ ja: admin: account_actions: action: アクションを実行 - title: '%{acct}さんに対してアクションを実行' + title: "%{acct}さんに対してアクションを実行" account_moderation_notes: create: 書き込む created_msg: モデレーションメモを書き込みました! @@ -33,7 +33,7 @@ ja: approve: 承認 approve_domain: ドメインを承認 approve_remote: リモートアカウントを承認 - approved_msg: '%{username}さんの登録申請を承認しました' + approved_msg: "%{username}さんの登録申請を承認しました" are_you_sure: 本当に実行しますか? avatar: アイコン by_domain: ドメイン @@ -43,12 +43,12 @@ ja: label: メールアドレスを変更 new_email: 新しいメールアドレス submit: メールアドレスの変更 - title: '%{username}さんのメールアドレスを変更' + title: "%{username}さんのメールアドレスを変更" change_role: changed_msg: ロールを変更しました! label: ロールを変更 no_role: ロールがありません - title: '%{username}さんのロールを変更' + title: "%{username}さんのロールを変更" confirm: 確認 confirmed: 確認済み confirming: 確認中 @@ -69,7 +69,7 @@ ja: enable: 有効化 enable_sign_in_token_auth: メールトークン認証を有効にする enabled: 有効 - enabled_msg: '%{username}の無効化を解除しました' + enabled_msg: "%{username}の無効化を解除しました" followers: フォロワー数 follows: フォロー数 header: ヘッダー @@ -87,7 +87,7 @@ ja: media_attachments: 添付されたメディア memorialize: 追悼アカウント化 memorialized: 追悼化済み - memorialized_msg: '%{username} を追悼アカウント化しました' + memorialized_msg: "%{username} を追悼アカウント化しました" moderation: active: アクティブ all: すべて @@ -108,23 +108,23 @@ ja: perform_full_suspension: 活動を完全に停止させる previous_strikes: 以前のストライク previous_strikes_description_html: - other: %{count} ストライクがあります。 + other: "%{count} ストライクがあります。" promote: 昇格 protocol: プロトコル public: パブリック push_subscription_expires: PuSH購読期限 redownload: プロフィールを更新 - redownloaded_msg: '%{username}のプロフィールを正常に更新しました' + redownloaded_msg: "%{username}のプロフィールを正常に更新しました" reject: 却下 reject_remote: リモートアカウントを却下 - rejected_msg: '%{username}さんの登録申請を却下しました' + rejected_msg: "%{username}さんの登録申請を却下しました" remote_pending_hint_html: このアカウントは現在保留中で、一時的にサスペンド状態になっています。このサーバーで利用可能にするためには、アカウントを承認する必要があります。 remote_suspension_irreversible: このアカウントのデータは不可逆的に削除されました。 remote_suspension_reversible_hint_html: このアカウントは停止されており、データは%{date} 日で完全に削除されます。それまでは悪影響なしにアカウントを復旧させることができます。アカウントを即座に削除したい場合は、以下から行うことができます。 remove_avatar: アイコンを削除 remove_header: ヘッダーを削除 - removed_avatar_msg: '%{username}さんのアバター画像を削除しました' - removed_header_msg: '%{username}さんのヘッダー画像を削除しました' + removed_avatar_msg: "%{username}さんのアバター画像を削除しました" + removed_header_msg: "%{username}さんのヘッダー画像を削除しました" resend_confirmation: already_confirmed: メールアドレスは確認済みです send: 確認メールを再送 @@ -157,14 +157,14 @@ ja: suspension_reversible_hint_html: アカウントは停止されており、データは%{date}に完全に削除されます。それまではアカウントを元に戻すことができます。今すぐ完全に削除したい場合は以下から行うことができます。 title: アカウント unblock_email: メールアドレスのブロックを解除 - unblocked_email_msg: '%{username}さんのメールアドレスのブロックを解除しました' + unblocked_email_msg: "%{username}さんのメールアドレスのブロックを解除しました" unconfirmed_email: 確認待ちのメールアドレス undo_sensitized: 閲覧注意から戻す undo_silenced: サイレンスから戻す undo_suspension: 停止から戻す - unsilenced_msg: '%{username}さんのサイレンス解除に成功しました' + unsilenced_msg: "%{username}さんのサイレンス解除に成功しました" unsubscribe: 購読の解除 - unsuspended_msg: '%{username}さんの無効化を解除しました' + unsuspended_msg: "%{username}さんの無効化を解除しました" username: ユーザー名 view_domain: ドメインの概要を表示 warn: 警告 @@ -316,7 +316,7 @@ ja: title: お知らせを追加 publish: 公開する published_msg: お知らせを掲載しました - scheduled_for: '%{time}に予約' + scheduled_for: "%{time}に予約" scheduled_msg: お知らせの掲載を予約しました title: お知らせ unpublish: 非公開にする @@ -346,7 +346,7 @@ ja: enable: 有効化 enabled: 有効 enabled_msg: 絵文字を有効化しました - image_hint: '%{size}までのPNGまたはGIF画像を利用できます' + image_hint: "%{size}までのPNGまたはGIF画像を利用できます" license: ライセンス license_hint: カスタム絵文字のライセンス情報を設定します。ただしライセンス情報の連合に対応していないサーバーも多く、Misskeyもローカル絵文字のライセンス情報には対応しますが他のサーバーのライセンス情報は参照しません。ライセンスは無視される場合があることを考慮してください。 list: 表示 @@ -373,13 +373,13 @@ ja: new_users: 新規ユーザー opened_reports: 新規通報 pending_appeals_html: - other: "保留中の抗議 %{count}件" + other: 保留中の抗議 %{count}件 pending_reports_html: - other: "保留中の通報 %{count}件" + other: 保留中の通報 %{count}件 pending_tags_html: - other: "保留中のハッシュタグ %{count}件" + other: 保留中のハッシュタグ %{count}件 pending_users_html: - other: "保留中のユーザー %{count}件" + other: 保留中のユーザー %{count}件 resolved_reports: 解決済みの通報 software: ソフトウェア sources: サインアップソース @@ -457,8 +457,8 @@ ja: reject_new_follow: 新規フォローを拒否 reject_new_follow_hint: 今後の新規フォローを拒否します。停止とは無関係です reject_reply_exclude_followers: フォロー相手以外からのメンションと引用を拒否 - reject_reply_hint: 今後のリプライを拒否します。停止とは無関係です reject_reply_exclude_followers_hint: 今後のリプライを拒否します。停止とは無関係です + reject_reply_hint: 今後のリプライを拒否します。停止とは無関係です reject_reports: 通報を拒否 reject_reports_hint: このドメインからの通報をすべて無視します。停止とは無関係です reject_send_sensitive: センシティブな投稿を配送しない @@ -471,7 +471,7 @@ ja: add_new: 新規追加 allow_registrations_with_approval: 承認制での新規登録を可能にする attempts_over_week: - other: "先週は%{count}回サインアップが試みられました" + other: 先週は%{count}回サインアップが試みられました created_msg: メールドメインブロックに追加しました delete: 消去 dns: @@ -485,7 +485,7 @@ ja: no_email_domain_block_selected: 何も選択されていないためメールドメインブロックを変更しませんでした not_permitted: 権限がありません resolved_dns_records_hint_html: ドメイン名はDNSでMXドメインに名前解決され、最終的にメールを受け付ける役割を担います。目に見えるドメイン名が異なっていても、同じMXドメインを使用するメールアドレスからのアカウント登録がブロックされます。主要なメールプロバイダーをブロックしないように注意して下さい。 - resolved_through_html: '%{domain}を通して解決しました' + resolved_through_html: "%{domain}を通して解決しました" title: メールドメインブロック export_domain_allows: new: @@ -496,7 +496,7 @@ ja: description_html: ドメインブロックのリストをインポートしようとしています。このリストを自分で作成していない場合は、慎重に確認してください。 existing_relationships_warning: 既存のフォロー関係 private_comment_description_html: 'ブロックのインポート元を判別できるようにするため、ブロックは次のプライベートコメントを追加してインポートされます: %{comment}' - private_comment_template: '%{source} から %{date} にインポートしました' + private_comment_template: "%{source} から %{date} にインポートしました" title: ドメインブロックをインポート invalid_domain_block: 'エラーが発生したため、ブロックできなかったドメインがあります: %{error}' new: @@ -514,7 +514,7 @@ ja: accept: 相手の申請を承認する add_new: フレンドサーバーを追加・申請 delete: 削除 - description_html: フレンドサーバーとは、お互いのローカル公開・ローカル検索許可の投稿をそのまま交換するシステムです。 + description_html: "フレンドサーバーとは、お互いのローカル公開・ローカル検索許可の投稿をそのまま交換するシステムです。" disabled: 無効 domain: ドメイン edit: @@ -546,9 +546,9 @@ ja: availability: description_html: other: ドメインへの配信が %{count} 日失敗した場合、そのドメインからの配信を受信しない限り、それ以上の配信を行いません。 - failure_threshold_reached: '%{date}に失敗のしきい値に達しました。' + failure_threshold_reached: "%{date}に失敗のしきい値に達しました。" failures_recorded: - other: '%{count}日間試行に失敗しました。' + other: "%{count}日間試行に失敗しました。" no_failures_recorded: 失敗は記録されていません。 title: 可用性 warning: このサーバーへの最後の接続試行に失敗しました @@ -596,11 +596,11 @@ ja: unavailable: 配送不可 delivery_available: 配送可能 delivery_error_days: 配送エラー発生日 - delivery_error_hint: '%{count}日間配送ができない場合は、自動的に配送不可としてマークされます。' - destroyed_msg: '%{domain}からのデータは、すぐに削除されるように、キューに追加されました。' + delivery_error_hint: "%{count}日間配送ができない場合は、自動的に配送不可としてマークされます。" + destroyed_msg: "%{domain}からのデータは、すぐに削除されるように、キューに追加されました。" empty: ドメインが見つかりませんでした。 known_accounts: - other: "既知のアカウント数 %{count}" + other: 既知のアカウント数 %{count} moderation: all: すべて limited: 制限あり @@ -642,6 +642,24 @@ ja: title: IPルール media_attachments: title: 投稿された画像 + ng_rule_histories: + back_to_ng_rule: NGルール設定に戻る + back_to_ng_rules: 一覧に戻る + data: + media_count: "%{count} のメディア" + poll_count: 項目 %{count} の投票 + from_local_user: ローカルユーザー + hidden: 非公開投稿 + moderate_account: アカウントをモデレートする + reason_actions: + reaction_emoji_reaction: 絵文字リアクション + reaction_favourite: お気に入りに登録 + reaction_follow: フォローリクエスト + reaction_reblog: ブースト + reaction_vote: 投票 + status_create: 投稿 + status_edit: 投稿を編集 + title: NGルール「%{title}」の履歴 ng_rules: account_allow_followed_by_local: ローカルユーザーからフォローされていないアカウントのみチェックする account_allow_followed_by_local_hint: 1以上のフォローを持つ全てのローカルユーザーが信頼できる場合にのみこのオプションを使用してください @@ -665,8 +683,8 @@ ja: status: 投稿 helps: generic: 全ての項目が条件にマッチしている場合のみ、制限が有効になります。 - textarea_html: 複数行入力可能な箇所では、改行区切りで条件を入力します。複数行のうちどれか1つが含まれている場合、条件にマッチしたと判断されます。行頭を「?」で始めると正規表現を利用できます。 - threshold_html: 上限の指定では、「-1」を指定すると上限チェックが無効になります。「0」を指定した場合、その対象が全く無い状態に限りチェックを通過します。例えばメディア数の上限「0」は、「メディア無し」と等価ではありません。 + textarea_html: "複数行入力可能な箇所では、改行区切りで条件を入力します。複数行のうちどれか1つが含まれている場合、条件にマッチしたと判断されます。行頭を「?」で始めると正規表現を利用できます。" + threshold_html: "上限の指定では、「-1」を指定すると上限チェックが無効になります。「0」を指定した場合、その対象が全く無い状態に限りチェックを通過します。例えばメディア数の上限「0」は、「メディア無し」と等価ではありません。" history: このルールが適用された履歴を確認する summary: account: アカウントの条件を設定します。ここでマッチしたアカウントが投稿・リアクションする場合に、このNGルールのチェックが行われます。アカウント作成時のチェックは行いません。初期状態では全てのアカウントが対象になります。 @@ -684,7 +702,7 @@ ja: empty: NGルールが空です empty_title: 空のタイトル hit_count: ここ一週間で %{count} 件の検出 - preamble: 「NGワードとスパム」機能においてどうしても緩すぎる条件を指定しなければならず、他の正常な投稿が規制に巻き込まれやすくなる場合があります。NGルールではアカウントや投稿の特徴などを詳細に指定して、巻き込まれる投稿を少しでも減らすことができます。設定は慎重に検討し、正常な投稿の巻き込みが最小限になるよう定期的に履歴を確認してください。 + preamble: "「NGワードとスパム」機能においてどうしても緩すぎる条件を指定しなければならず、他の正常な投稿が規制に巻き込まれやすくなる場合があります。NGルールではアカウントや投稿の特徴などを詳細に指定して、巻き込まれる投稿を少しでも減らすことができます。設定は慎重に検討し、正常な投稿の巻き込みが最小限になるよう定期的に履歴を確認してください。" title: NGルール new: save: 新規NGルールを保存 @@ -725,24 +743,6 @@ ja: status_visibility: 公開範囲 test_error: 正規表現の文法が誤っています title: NGルール - ng_rule_histories: - back_to_ng_rule: NGルール設定に戻る - back_to_ng_rules: 一覧に戻る - data: - media_count: "%{count} のメディア" - poll_count: 項目 %{count} の投票 - from_local_user: ローカルユーザー - hidden: 非公開投稿 - moderate_account: アカウントをモデレートする - reason_actions: - reaction_emoji_reaction: 絵文字リアクション - reaction_favourite: お気に入りに登録 - reaction_follow: フォローリクエスト - reaction_reblog: ブースト - reaction_vote: 投票 - status_create: 投稿 - status_edit: 投稿を編集 - title: NGルール「%{title}」の履歴 ng_words: block_unfollow_account_mention: 自分のサーバーのフォロワーを持たない全てのアカウントからのメンション・引用を全て拒否する block_unfollow_account_mention_hint: この設定は削除予定です。設定削除後は、常にチェックをつけていない場合と同じ挙動になります。NGルールで代替してください。 @@ -755,16 +755,16 @@ ja: hold_remote_new_accounts: リモートの新規アカウントを保留する keywords: 拒否するキーワード phrases: - regexp_html: 正規 表現 にチェックの入っている項目は、正規表現を用いての比較となります。 + regexp_html: "正規 表現 にチェックの入っている項目は、正規表現を用いての比較となります。" regexp_short: 正規 - stranger_html: 無関 係のフォロワーからのメンション にチェックの入っている項目は、フォロー関係にないアカウントからのメンション、返信、引用などのみに適用されます。 + stranger_html: "無関 係のフォロワーからのメンション にチェックの入っている項目は、フォロー関係にないアカウントからのメンション、返信、引用などのみに適用されます。" stranger_short: 無関 - preamble: ドメインブロックでは対処の難しいスパムに関する問題の解決に、この設定が役に立ちます。特定キーワードが含まれているなどの条件を満たした投稿を拒否することができます。問題のない投稿が削除されないよう設定は慎重に検討し、定期的に履歴を確認してください。 post_hash_tags_max: 投稿に設定可能なハッシュタグの最大数 post_mentions_max: 投稿に設定可能なメンションの最大数 post_stranger_mentions_max: 投稿に設定可能なメンションの最大数 (メンション先にフォロワー以外を1人でも含む場合) - remote_approval_list: 承認待ちのリモートアカウント一覧 + preamble: ドメインブロックでは対処の難しいスパムに関する問題の解決に、この設定が役に立ちます。特定キーワードが含まれているなどの条件を満たした投稿を拒否することができます。問題のない投稿が削除されないよう設定は慎重に検討し、定期的に履歴を確認してください。 remote_approval_hint: 指定されていないドメインで新しく認識されたアカウントはサスペンド状態になります。その一覧を確認し、必要であれば承認を行うことができます。この設定が有効でない場合、全てのリモートアカウントが即座に承認されます。 + remote_approval_list: 承認待ちのリモートアカウント一覧 settings: 詳細設定 stranger_mention_from_local_ng: フォローしていないアカウントへのメンションのNGワードを、ローカルユーザーによる投稿にも適用する stranger_mention_from_local_ng_hint: この設定は削除予定です。設定削除後は、常にチェックをつけている場合と同じ挙動になります。この動作を希望しない場合は、NGルールで代替してください。 @@ -785,7 +785,7 @@ ja: relays: add_new: リレーを追加 delete: 削除 - description_html: 連合リレーとは、登録しているサーバー間の公開投稿を仲介するサーバーです。中小規模のサーバーが連合のコンテンツを見つけるのを助けます。これを使用しない場合、ローカルユーザーがリモートユーザーを手動でフォローする必要があります。 + description_html: "連合リレーとは、登録しているサーバー間の公開投稿を仲介するサーバーです。中小規模のサーバーが連合のコンテンツを見つけるのを助けます。これを使用しない場合、ローカルユーザーがリモートユーザーを手動でフォローする必要があります。" disable: 無効化 disabled: 無効 enable: 有効化 @@ -830,9 +830,9 @@ ja: category_description_html: 選択した理由は通報されたアカウントへの連絡時に引用されます comment: none: なし - comment_description_html: '%{name}からの詳細情報:' + comment_description_html: "%{name}からの詳細情報:" confirm: 確認 - confirm_action: '@%{acct} さんに対するアクション' + confirm_action: "@%{acct} さんに対するアクション" created_at: 通報日時 delete_and_resolve: 投稿を削除 force_cw: 強制的にCWにする @@ -853,7 +853,7 @@ ja: notes_description_html: 他のモデレーターと将来の自分にメモを残してください processed_msg: '通報 #%{id} が正常に処理されました' quick_actions_description_html: 'クイックアクションを実行するかスクロールして報告された通報を確認してください:' - remote_user_placeholder: '%{instance}からのリモートユーザー' + remote_user_placeholder: "%{instance}からのリモートユーザー" reopen: 未解決に戻す report: '通報 #%{id}' reported_account: 報告対象アカウント @@ -878,11 +878,11 @@ ja: silence_html: "@%{acct}さんのプロフィールとコンテンツの表示範囲をフォロー中の人や意図的にプロフィールにアクセスした人のみに制限することで、アカウントを発見されにくくします" suspend_html: "@%{acct}さんのアカウントが凍結され、プロフィールとコンテンツへのアクセス、および投稿ができなくなります" close_report: '通報 #%{id} を解決済みにします' - close_reports_html: @%{acct}さんに対するすべての通報を解決済みにします + close_reports_html: "@%{acct}さんに対するすべての通報を解決済みにします" delete_data_html: 停止が解除されないまま30日経過すると、@%{acct}さんのプロフィールとコンテンツは削除されます preview_preamble_html: "@%{acct}さんに次の内容の警告を通知します:" record_strike_html: 今後、@%{acct}さんが違反行為をしたときにエスカレーションできるように、このアカウントに対するストライクを記録します - send_email_html: @%{acct}さんに警告メールを送信します + send_email_html: "@%{acct}さんに警告メールを送信します" warning_placeholder: アクションを行使する追加の理由(オプション) target_origin: 報告されたアカウントの起源 title: 通報 @@ -902,8 +902,8 @@ ja: moderation: モデレーション special: スペシャル delete: 削除 - description_html: ユーザー ロールを使用すると、ユーザーがアクセスできる Mastodon の機能や領域をカスタマイズできます。 - edit: '『%{name}』のロールを編集' + description_html: "ユーザー ロールを使用すると、ユーザーがアクセスできる Mastodon の機能や領域をカスタマイズできます。" + edit: "『%{name}』のロールを編集" everyone: デフォルトの権限 everyone_full_description_html: これは、割り当てられたロールを持っていないものであっても、 すべてのユーザー に影響を与える 基本ロールです。 他のすべてのロールは、そこから権限を継承します。 permissions_count: @@ -967,11 +967,11 @@ ja: auto_warning_text_hint: 指定しなかった場合は、各言語のデフォルト警告文が使用されます hint: センシティブなキーワードの設定は、当サーバーのローカルユーザーによる公開範囲「公開」「ローカル公開」「ログインユーザーのみ」に対して適用されます。 phrases: - remote_html: リモ ート にチェックの入っている項目は、リモートからの投稿にも適用されます。 - remote_short: リモ - regexp_html: 正規 表現 にチェックの入っている項目は、正規表現を用いての比較となります。 + regexp_html: "正規 表現 にチェックの入っている項目は、正規表現を用いての比較となります。" regexp_short: 正規 - spoiler_html: 警告 文 にチェックの入っている項目は、コンテンツ警告文にも適用されます。 + remote_html: "リモ ート にチェックの入っている項目は、リモートからの投稿にも適用されます。" + remote_short: リモ + spoiler_html: "警告 文 にチェックの入っている項目は、コンテンツ警告文にも適用されます。" spoiler_short: 警告 title: センシティブ単語と設定 settings: @@ -1079,8 +1079,8 @@ ja: original_status: オリジナルの投稿 reblogs: ブースト remove: 投稿を削除 - remove_media: メディアを削除 remove_history: 編集履歴を削除 + remove_media: メディアを削除 searchability: 検索許可 status_changed: 投稿を変更しました title: 投稿一覧 @@ -1193,7 +1193,7 @@ ja: not_listable: おすすめに表示しない not_trendable: トレンドに表示しない not_usable: 使用を禁止 - peaked_on_and_decaying: '%{date}以降、しばらく使われていません' + peaked_on_and_decaying: "%{date}以降、しばらく使われていません" title: トレンドタグ trendable: トレンドに表示する trending_rank: '人気: %{rank}位' @@ -1215,7 +1215,7 @@ ja: webhooks: add_new: エンドポイントを追加 delete: 削除 - description_html: Webhook により、Mastodon は選択されたイベントのリアルタイム通知をアプリケーションにプッシュします。これにより、アプリケーションは自動的に処理を行うことができます。 + description_html: "Webhook により、Mastodon は選択されたイベントのリアルタイム通知をアプリケーションにプッシュします。これにより、アプリケーションは自動的に処理を行うことができます。" disable: 無効化 disabled: 無効 edit: エンドポイントを編集 @@ -1252,10 +1252,10 @@ ja: subject: 緊急のMastodonアップデートがあります[%{instance}] new_pending_account: body: 新しいアカウントの詳細は以下の通りです。この申請を承認または却下することができます。 - subject: '%{instance}で新しいアカウント (%{username}) が承認待ちです' + subject: "%{instance}で新しいアカウント (%{username}) が承認待ちです" new_pending_friend_server: body: 新しいフレンドサーバー %{domain} の申請が届いています。この申請を承認または却下することができます。 - subject: '%{instance}で新しいフレンドサーバー (%{domain}) が承認待ちです' + subject: "%{instance}で新しいフレンドサーバー (%{domain}) が承認待ちです" new_report: body: "%{reporter}さんが%{target}さんを通報しました" body_remote: "%{domain}の誰かが%{target}さんを通報しました" @@ -1264,14 +1264,14 @@ ja: body: Mastodonの新しいアップデートがリリースされました。 subject: Mastodonのアップデートがあります[%{instance}] new_trends: - body: '以下の項目は、公開する前に審査が必要です。' + body: 以下の項目は、公開する前に審査が必要です。 new_trending_links: title: トレンドリンク new_trending_statuses: title: トレンド投稿 new_trending_tags: title: トレンドハッシュタグ - subject: '%{instance}で新しいトレンドが審査待ちです' + subject: "%{instance}で新しいトレンドが審査待ちです" aliases: add_new: エイリアスを作成 created_msg: エイリアスを作成しました。これで以前のアカウントから引っ越しを開始できます。 @@ -1285,6 +1285,10 @@ ja: domain: ドメイン keyword: キーワード tag: ハッシュタグ + edit: + available: 有効 + description: アンテナは、サーバーが認識した全ての公開・ローカル公開投稿のうち、購読を拒否していないすべてのアカウントからの投稿が対象です。検出された投稿は、指定したリストに追加されます。 + title: アンテナを編集 errors: empty_contexts: 絞り込み条件が1つも指定されていないため無効です(除外条件はカウントされません) invalid_list_owner: これはあなたのリストではありません @@ -1297,10 +1301,6 @@ ja: over_ltl_limit: 所持できるLTLモード付きアンテナ数 (ホーム/リストそれぞれにつき%{limit}) を超えています over_stl_limit: 所持できるSTLモード付きアンテナ数 (ホーム/リストそれぞれにつき%{limit}) を超えています too_short_keyword: キーワードが短すぎます - edit: - available: 有効 - description: アンテナは、サーバーが認識した全ての公開・ローカル公開投稿のうち、購読を拒否していないすべてのアカウントからの投稿が対象です。検出された投稿は、指定したリストに追加されます。 - title: アンテナを編集 index: accounts: other: "%{count}件のアカウント" @@ -1320,7 +1320,7 @@ ja: title: アンテナ appearance: advanced_web_interface: 上級者向けUI - advanced_web_interface_hint: 'ディスプレイを幅いっぱいまで活用したい場合、上級者向け UI をおすすめします。ホーム、通知、連合タイムライン、更にはリストやハッシュタグなど、様々な異なるカラムから望む限りの情報を一度に受け取れるような設定が可能になります。' + advanced_web_interface_hint: ディスプレイを幅いっぱいまで活用したい場合、上級者向け UI をおすすめします。ホーム、通知、連合タイムライン、更にはリストやハッシュタグなど、様々な異なるカラムから望む限りの情報を一度に受け取れるような設定が可能になります。 animations_and_accessibility: アニメーションとアクセシビリティー confirmation_dialogs: 確認ダイアログ custom_emoji_and_emoji_reactions: カスタム絵文字と絵文字リアクション @@ -1419,10 +1419,10 @@ ja: new_confirmation_instructions_sent: 確認用のリンクを記載した新しいメールを送信しました title: 確認メールを送信しました sign_in: - preamble_html: %{domain} の資格情報でサインインします。 あなたのアカウントが別のサーバーでホストされている場合は、ここでログインすることはできません。 - title: '%{domain}にログイン' + preamble_html: "%{domain} の資格情報でサインインします。 あなたのアカウントが別のサーバーでホストされている場合は、ここでログインすることはできません。" + title: "%{domain}にログイン" sign_up: - manual_review: '%{domain} への登録にはモデレーターによる承認が必要です。審査の参考になるように、簡単な自己紹介や %{domain} に登録したい理由などを記入してください。' + manual_review: "%{domain} への登録にはモデレーターによる承認が必要です。審査の参考になるように、簡単な自己紹介や %{domain} に登録したい理由などを記入してください。" preamble: この Mastodon サーバーのアカウントがあれば、ネットワーク上の他の人のアカウントがどこでホストされているかに関係なく、その人をフォローすることができます。 title: さあ %{domain} でセットアップしましょう. status: @@ -1437,7 +1437,7 @@ ja: use_security_key: セキュリティキーを使用 challenge: confirm: 続ける - hint_html: "以後1時間はパスワードの再入力を求めません" + hint_html: 以後1時間はパスワードの再入力を求めません invalid_password: パスワードが間違っています prompt: 続行するにはパスワードを入力してください crypto: @@ -1533,12 +1533,12 @@ ja: noscript_html: Mastodonのウェブアプリケーションを利用する場合はJavaScriptを有効にしてください。またはあなたのプラットフォーム向けのMastodonネイティブアプリを探すことができます。 existing_username_validator: not_found: そのようなユーザー名はローカルに見つかりませんでした - not_found_multiple: '%{usernames}さんは見つかりませんでした' + not_found_multiple: "%{usernames}さんは見つかりませんでした" exports: archive_takeout: date: 日時 download: ダウンロード - hint_html: 投稿本文とメディアのアーカイブをリクエストできます。 データはActivityPub形式で、対応しているソフトウェアで読み込むことができます。7日毎にアーカイブをリクエストできます。 + hint_html: "投稿本文とメディアのアーカイブをリクエストできます。 データはActivityPub形式で、対応しているソフトウェアで読み込むことができます。7日毎にアーカイブをリクエストできます。" in_progress: 準備中... request: アーカイブをリクエスト size: 容量 @@ -1572,10 +1572,10 @@ ja: deprecated_api_multiple_keywords: これらのパラメータは複数のフィルタキーワードに適用されるため、このアプリケーションから変更できません。 最新のアプリケーションまたはWebインターフェースを使用してください。 invalid_context: 対象がないか無効です index: - contexts: '%{contexts}のフィルター' + contexts: "%{contexts}のフィルター" delete: 削除 empty: フィルターはありません。 - expires_in: '%{distance}で期限切れ' + expires_in: "%{distance}で期限切れ" expires_on: 有効期限 %{date} keywords: other: "%{count}件のキーワード" @@ -1676,13 +1676,13 @@ ja: delete: 無効化 expired: 期限切れ expires_in: + '1209600': 2週間 '1800': 30分 '21600': 6時間 + '2629746': 1ヶ月 '3600': 1時間 '43200': 12時間 '604800': 1週間 - '1209600': 2週間 - '2629746': 1ヶ月 '7889238': 3ヶ月 '86400': 1日 expires_in_prompt: 無期限 @@ -1708,8 +1708,8 @@ ja: webauthn: セキュリティキー description_html: 認識できないアクティビティが表示された場合は、パスワードの変更と二要素認証の有効化を検討してください。 empty: 利用可能な認証履歴がありません - failed_sign_in_html: '%{ip} (%{browser}) から%{method}を利用したサインインに失敗しました。' - successful_sign_in_html: '%{ip} (%{browser}) から%{method}を利用したサインインに成功しました' + failed_sign_in_html: "%{ip} (%{browser}) から%{method}を利用したサインインに失敗しました。" + successful_sign_in_html: "%{ip} (%{browser}) から%{method}を利用したサインインに成功しました" title: 認証履歴 mail_subscriptions: unsubscribe: @@ -1767,7 +1767,7 @@ ja: move_handler: carry_blocks_over_text: このユーザーは、あなたがブロックしていた%{acct}から引っ越しました。 carry_mutes_over_text: このユーザーは、あなたがミュートしていた%{acct}から引っ越しました。 - copy_account_note_text: 'このユーザーは%{acct}から引っ越しました。これは以前のメモです。' + copy_account_note_text: このユーザーは%{acct}から引っ越しました。これは以前のメモです。 navigation: toggle_menu: メニューを表示 / 非表示 notification_mailer: @@ -1776,14 +1776,14 @@ ja: subject: "%{name}さんがレポートを送信しました" sign_up: subject: "%{name}さんがサインアップしました" - favourite: - body: '%{name}さんにお気に入り登録された、あなたの投稿があります:' - subject: "%{name}さんにお気に入りに登録されました" - title: 新たなお気に入り登録 emoji_reaction: body: "%{name}さんに絵文字をつけられた、あなたの投稿があります:" subject: "%{name}さんに絵文字をつけられました" title: 新たな絵文字リアクション + favourite: + body: "%{name}さんにお気に入り登録された、あなたの投稿があります:" + subject: "%{name}さんにお気に入りに登録されました" + title: 新たなお気に入り登録 follow: body: "%{name}さんにフォローされています!" subject: "%{name}さんにフォローされています" @@ -1791,17 +1791,17 @@ ja: follow_request: action: フォローリクエストの管理 body: "%{name}さんがあなたにフォローをリクエストしました" - subject: '%{name}さんからのフォローリクエスト' + subject: "%{name}さんからのフォローリクエスト" title: 新たなフォローリクエスト mention: action: 返信 - body: '%{name}さんから返信がありました:' - subject: '%{name}さんに返信されました' + body: "%{name}さんから返信がありました:" + subject: "%{name}さんに返信されました" title: 新たな返信 poll: - subject: '%{name} さんの投票が終了しました' + subject: "%{name} さんの投票が終了しました" reblog: - body: '%{name}さんにブーストされた、あなたの投稿があります:' + body: "%{name}さんにブーストされた、あなたの投稿があります:" subject: "%{name}さんにブーストされました" title: 新たなブースト status: @@ -1824,7 +1824,7 @@ ja: trillion: T otp_authentication: code_hint: 続行するには認証アプリで表示されたコードを入力してください - description_html: 二要素認証を有効にすると、ログイン時に認証アプリからコードを入力する必要があります。 + description_html: "二要素認証を有効にすると、ログイン時に認証アプリからコードを入力する必要があります。" enable: 有効化 instructions_html: "Google Authenticatorか、もしくはほかのTOTPアプリでこのQRコードをスキャンしてください。これ以降、ログインするときはそのアプリで生成されるコードが必要になります。" manual_instructions: 'QRコードがスキャンできず、手動での登録を希望の場合はこのシークレットコードを利用してください。:' @@ -1867,13 +1867,13 @@ ja: reach: つながりやすさ reach_hint_html: ほかのユーザーからの見つかりやすさと、フォローされる方法についての設定項目です。「エクスプローラー」やおすすめのユーザーに掲載するか、また新しいフォロワーをどのように受け入れるかをここで変更できます。 search: 被検索性 - search_kmyblue_hint_html: kmyblueの投稿検索設定には「Indexable」と「検索許可」の2種類があります。Indexableはアカウントのすべての公開投稿を他の標準のMastodonで検索できるようにするもので、設定変更は過去投稿に遡及します。検索許可は投稿ごとに指定可能なもので、kmyblue・Fedibirdではこの設定がIndexableより優先されます。過去の投稿を変更することはできません。 search_hint_html: 検索での見つかりやすさに関する設定項目です。公開投稿を検索できるようにするかや、Mastodonの外からweb検索でたどり着けるようにするかをここで変更できます。ただし検索エンジンのなかには、この設定に従わずに公開されている情報を利用するものがあるかもしれません。 + search_kmyblue_hint_html: kmyblueの投稿検索設定には「Indexable」と「検索許可」の2種類があります。Indexableはアカウントのすべての公開投稿を他の標準のMastodonで検索できるようにするもので、設定変更は過去投稿に遡及します。検索許可は投稿ごとに指定可能なもので、kmyblue・Fedibirdではこの設定がIndexableより優先されます。過去の投稿を変更することはできません。 title: プライバシーとつながりやすさ privacy_extra: hint_html: これらはkmyblue独自のプライバシー設定項目です。この機能を利用することで、あなたは追加の恩恵を受けることができます。なおこれらの設定の一部は他のサーバーにも送信されますが、kmyblue以外で対応するソフトウェアは現在確認できていません。他のサーバーではこれらの設定は無視されること、ご了承ください。 - post_processing_hint_html: 投稿された情報に対して、システムが追加で行うことができる操作を制御します。これらには、第三者のサイトへあなたの投稿に関する情報の送信を伴う設定も含まれます。 post_processing: 投稿の処理 + post_processing_hint_html: 投稿された情報に対して、システムが追加で行うことができる操作を制御します。これらには、第三者のサイトへあなたの投稿に関する情報の送信を伴う設定も含まれます。 stop_deliver: 配送制限 stop_deliver_hint_html: Mastodonの投稿を、他のソフトウェアでは自由に検索することができます。Mastodon内で行ったプライバシーの設定は無視され、あなたの投稿が意図しない人に見つかるおそれがあります。ここでは、他のサーバーやソフトウェアであなたの投稿が見つからないようにする設定が可能です。ただしリスクは伴います。 title: プライバシー追加設定 @@ -1920,8 +1920,8 @@ ja: rss: content_warning: '閲覧注意:' descriptions: - account: '@%{acct}からの公開投稿' - tag: '#%{hashtag}が付けられた公開投稿' + account: "@%{acct}からの公開投稿" + tag: "#%{hashtag}が付けられた公開投稿" scheduled_statuses: over_daily_limit: その日予約できる投稿数 %{limit}を超えています over_total_limit: 予約できる投稿数 %{limit}を超えています @@ -2019,13 +2019,13 @@ ja: other: "%{count}枚の画像" video: other: "%{count}本の動画" - boosted_from_html: '%{acct_link}からブースト' + boosted_from_html: "%{acct_link}からブースト" contains_ng_words: 投稿できない単語が含まれています content_warning: '閲覧注意: %{warning}' default_language: UIの表示言語 disallowed_hashtags: other: '許可されていないハッシュタグが含まれています: %{tags}' - edited_at_html: '%{date} 編集済み' + edited_at_html: "%{date} 編集済み" errors: in_reply_not_found: あなたが返信しようとしている投稿は存在しないようです。 open_in_web: Webで開く @@ -2056,7 +2056,7 @@ ja: public_search_long: 検索が許可された全ての投稿が検索できます public_unlisted: ローカルとフォロワー public_unlisted_long: ローカル・フォロワー・反応者のみが検索できます - unset: (未対応サーバー) + unset: "(未対応サーバー)" show_more: もっと見る show_thread: スレッドを表示 title: '%{name}: "%{quote}"' @@ -2206,11 +2206,11 @@ ja: reason: '理由:' statuses: '投稿:' subject: - delete_statuses: '%{acct}さんの投稿が削除されました' + delete_statuses: "%{acct}さんの投稿が削除されました" disable: あなたのアカウント %{acct}は凍結されました force_cw: あなたの%{acct}の投稿はCWとして警告文が追加されました mark_statuses_as_sensitive: あなたの%{acct}の投稿は閲覧注意としてマークされました - none: '%{acct}に対する警告' + none: "%{acct}に対する警告" sensitive: あなたの%{acct}の投稿はこれから閲覧注意としてマークされます silence: あなたのアカウント %{acct}はサイレンスにされました suspend: あなたのアカウント %{acct}は停止されました @@ -2285,7 +2285,7 @@ ja: success: セキュリティキーを追加しました。 delete: 削除 delete_confirmation: 本当にこのセキュリティキーを削除しますか? - description_html: セキュリティキーによる認証を有効にすると、ログイン時にセキュリティキーを要求するようにできます。 + description_html: "セキュリティキーによる認証を有効にすると、ログイン時にセキュリティキーを要求するようにできます。" destroy: error: セキュリティキーの削除中に問題が発生しました。もう一度お試しください。 success: セキュリティキーを削除しました。 @@ -2294,4 +2294,4 @@ ja: not_enabled: まだセキュリティキーを有効にしていません not_supported: このブラウザはセキュリティキーに対応していないようです otp_required: セキュリティキーを使用するには、まず二要素認証を有効にしてください。 - registered_on: '%{date}に登録' + registered_on: "%{date}に登録" diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 73cb9ee36e8eb0..7c0e748c6ec486 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -60,15 +60,15 @@ en: setting_allow_quote: Subdued quotes are allowed regardless of this setting; you can quote freely from any source except kmyblue! setting_always_send_emails: Normally e-mail notifications won't be sent when you are actively using Mastodon setting_bookmark_category_needed: When removing from all category, unbookmarked automatically - setting_default_searchability: On kmyblue and Fedibird, the search is based on the search permission setting; on Misskey, all public, local public, and non-public posts are searched regardless of this setting; on Mastodon and Firefish, instead of search permission, the "Make public posts freely searchable on other servers" setting in the profile settings is applied. In Mastodon and Firefish, the "Make public posts freely searchable on other servers" setting in the profile settings is applied instead of the search permission. + setting_default_searchability: On kmyblue and Fedibird, the search is based on the search permission setting; on Misskey, all public, local public, and non-public posts are searched regardless of this setting; on Mastodon and Firefish, instead of search permission, the "Make public posts freely searchable on other servers" setting in the profile settings is applied. In Mastodon and Firefish, the "Make public posts freely searchable on other servers" setting in the profile settings is applied instead of the search permission. setting_default_sensitive: Sensitive media is hidden by default and can be revealed with a click setting_display_media_default: Hide media marked as sensitive setting_display_media_expand: Misskey and others can submit more than 4. The additions will be displayed up to 16. kmyblue will not allow uploading from kmyblue. setting_display_media_hide_all: Always hide media setting_display_media_show_all: Always show media + setting_dtl_force_searchability: 'With using #%{tag} tag, your post settings will be changed forcibly' setting_dtl_force_subscribable: Your post can be detected local user's antenna to subscribe deep timeline - setting_dtl_force_searchability: "With using #%{tag} tag, your post settings will be changed forcibly" - setting_dtl_force_visibility: "With using #%{tag} tag, your post settings will be changed forcibly" + setting_dtl_force_visibility: 'With using #%{tag} tag, your post settings will be changed forcibly' setting_emoji_reaction_policy: Even with this setting, users on other servers are free to put their emoji reaction on the post and share it within the same server. If you simply want to remove the emoji reaction from your own screen, you can disable it from the appearance settings setting_enable_emoji_reaction: If turn off, other users still can react your posts setting_enabled_visibilities: If turn off, you cannot select and post the privacy. @@ -266,13 +266,10 @@ en: setting_display_media_expand: Show more medias setting_display_media_hide_all: Hide all setting_display_media_show_all: Show all - setting_dtl_force_subscribable: Ignore your subscribability setting when using the DTL tag setting_dtl_force_searchability: Post searchability + setting_dtl_force_subscribable: Ignore your subscribability setting when using the DTL tag setting_dtl_force_visibility: Post visibility setting_dtl_menu: Show DTL menu on web - setting_emoji_reaction_streaming_notify_impl2: Enable emoji reaction notification compat with Nyastodon, Catstodon, glitch-soc - setting_enable_emoji_reaction: Use emoji reaction function - setting_enabled_visibilities: Enabled visibilities setting_emoji_reaction_policy: Emoji reaction receive/display policy setting_emoji_reaction_policy_items: allow: Allow all @@ -281,6 +278,9 @@ en: following_only: Followings only mutuals_only: Mutuals only outside_only: Followings or followers only + setting_emoji_reaction_streaming_notify_impl2: Enable emoji reaction notification compat with Nyastodon, Catstodon, glitch-soc + setting_enable_emoji_reaction: Use emoji reaction function + setting_enabled_visibilities: Enabled visibilities setting_expand_spoilers: Always expand posts marked with content warnings setting_hide_emoji_reaction_unavailable_server: Hide emoji reaction button from unavailable server setting_hide_network: Hide your social graph @@ -370,14 +370,14 @@ en: profile_directory: Enable profile directory receive_other_servers_emoji_reaction: Receive emoji reaction between other server users registration_button_message: Register button message + registrations_end_hour: Registration-without-approval end hour (UTC 0-24) registrations_limit: User registration limit registrations_limit_per_day: User registration limit per day registrations_mode: Who can sign-up - registrations_end_hour: Registration-without-approval end hour (UTC 0-24) - registrations_start_hour: Registration-without-approval start hour (UTC 0-24) registrations_secondary_end_hour: Secondary registration end hour (UTC 0-24) registrations_secondary_end_hour_hint: If input 0, secondary hour is disabled. registrations_secondary_start_hour: Secondary registration start hour (UTC 0-24) + registrations_start_hour: Registration-without-approval start hour (UTC 0-24) require_invite_text: Require a reason to join show_domain_blocks: Show domain blocks show_domain_blocks_rationale: Show why domains were blocked diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index 6d3bde4a571e1f..2669cb0d4986ba 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -23,7 +23,7 @@ ja: include_statuses: ユーザーは取られた制限や警告の原因となった投稿を確認できるようになります send_email_notification: ユーザーは自分のアカウントに何が起こったのか説明を受け取ります text_html: オプションです。投稿に用いる構文を使うことができます。簡略化のためプリセット警告文を追加することができます - type_html: %{acct}さんに対し、何を行うか選択してください + type_html: "%{acct}さんに対し、何を行うか選択してください" types: disable: ユーザーが自分のアカウントを使用できないようにします。コンテンツを削除したり非表示にすることはありません。 none: これを使用すると、他の操作をせずにユーザーに警告を送信できます。 @@ -69,9 +69,9 @@ ja: setting_display_media_expand: Misskeyなどは4個を超えて投稿可能です。その追加分を最大16個まで表示します。kmyblueからアップロードはできません setting_display_media_hide_all: メディアを常に隠す setting_display_media_show_all: メディアを常に表示する + setting_dtl_force_searchability: 'ハッシュタグ #%{tag} をつけて投稿するとき、検索許可を強制的に置き換えるかを設定します' setting_dtl_force_subscribable: 購読拒否設定に関係なく、ディープタイムラインに向けた投稿はアンテナに掲載されます。ディープタイムラインをアンテナ経由で閲覧している人にあなたの発言が届きます - setting_dtl_force_searchability: "ハッシュタグ #%{tag} をつけて投稿するとき、検索許可を強制的に置き換えるかを設定します" - setting_dtl_force_visibility: "ハッシュタグ #%{tag} をつけて投稿するとき、公開範囲を強制的に置き換えるかを設定します" + setting_dtl_force_visibility: 'ハッシュタグ #%{tag} をつけて投稿するとき、公開範囲を強制的に置き換えるかを設定します' setting_emoji_reaction_policy: この設定をしても他のサーバーのユーザーはその投稿に自由に絵文字をつけ、同じサーバーの中で共有できます。単にあなた自身の画面から絵文字リアクションを除去したいだけなら、外観設定から絵文字リアクションを無効にすることができます setting_emoji_reaction_streaming_notify_impl2: 当該サーバーの独自機能に対応したアプリを利用時に、絵文字リアクション機能を利用できます。動作確認していないため(そもそもそのようなアプリ自体を確認できていないため)正しく動かない場合があります setting_enable_emoji_reaction: この機能を無効にしても、他の人はあなたの投稿に絵文字をつけられます @@ -94,7 +94,7 @@ ja: domain: 電子メールアドレスのドメイン名、または使用されるMXレコードを指定できます。新規登録時にチェックされます。 with_dns_records: 指定したドメインのDNSレコードを取得し、その結果もメールドメインブロックに登録されます featured_tag: - name: '最近使用したハッシュタグ' + name: 最近使用したハッシュタグ filters: action: 投稿がフィルタに一致したときに実行するアクションを選択 actions: @@ -119,9 +119,9 @@ ja: peers_api_enabled: このサーバーが Fediverse で遭遇したドメイン名のリストです。このサーバーが知っているだけで、特定のサーバーと連合しているかのデータは含まれません。これは一般的に Fediverse に関する統計情報を収集するサービスによって使用されます。 profile_directory: ディレクトリには、掲載する設定をしたすべてのユーザーが一覧表示されます。 receive_other_servers_emoji_reaction: 負荷の原因になります。人が少ない場合にのみ有効にすることをおすすめします。 + registrations_end_hour: 新規登録が承認なしで可能な時間帯の開始時間を指定します。これより前の時間に登録することはできません。終了時間より後にすることはできません。この時間帯から外れた新規登録には、別途承認が必要となります。 registrations_limit: 現在のユーザー数がこれを超過すると、管理者がこの数値を増やさない限り新規登録できません。0を指定すると、この制限を無効化します。 registrations_limit_per_day: 本日登録されたユーザー数がこれを超過すると、UTC時刻で翌日0時にならない限り新規登録できません。0を指定すると、この制限を無効化します。 - registrations_end_hour: 新規登録が承認なしで可能な時間帯の開始時間を指定します。これより前の時間に登録することはできません。終了時間より後にすることはできません。この時間帯から外れた新規登録には、別途承認が必要となります。 registrations_start_hour: 新規登録が承認なしで可能な時間帯の終了時間を指定します。これより後の時間に登録することはできません。開始時間より前にすることはできません。この時間帯から外れた新規登録には、別途承認が必要となります。 require_invite_text: アカウント登録が承認制の場合、登録の際の申請事由の入力を必須にします site_contact_email: 法律またはサポートに関する問い合わせ先 @@ -273,11 +273,10 @@ ja: setting_display_media_expand: 5個目以降のメディアも表示する (最大16) setting_display_media_hide_all: 非表示 setting_display_media_show_all: 表示 - setting_dtl_force_subscribable: ディープタイムライン用のハッシュタグを購読するアンテナに限り、購読拒否設定を無視する setting_dtl_force_searchability: DTL投稿の検索許可 + setting_dtl_force_subscribable: ディープタイムライン用のハッシュタグを購読するアンテナに限り、購読拒否設定を無視する setting_dtl_force_visibility: DTL投稿の公開範囲 setting_dtl_menu: Webクライアントのメニューにディープタイムラインを追加する - setting_enabled_visibilities: 投稿を有効にする公開範囲 setting_emoji_reaction_policy: 絵文字リアクション受け入れと表示設定 setting_emoji_reaction_policy_items: allow: 全員に許可 @@ -288,14 +287,23 @@ ja: outside_only: フォロー中、またはフォロワーのみに許可 setting_emoji_reaction_streaming_notify_impl2: Nyastodon, Catstodon, glitch-soc互換の絵文字リアクション機能を有効にする setting_enable_emoji_reaction: 絵文字リアクション機能を使用する + setting_enabled_visibilities: 投稿を有効にする公開範囲 setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する setting_hide_emoji_reaction_unavailable_server: 絵文字リアクションに対応していないと思われるサーバーの投稿から絵文字リアクション機能を隠す setting_hide_network: 繋がりを隠す setting_hide_quote_unavailable_server: 引用に対応していないと思われるサーバーの投稿からメニューを隠す setting_hide_status_reference_unavailable_server: ひかえめな引用(Fedibirdの参照)に対応していないと思われるサーバーの投稿からメニューを隠す setting_lock_follow_from_bot: botからのフォローを承認制にする + setting_public_post_to_unlisted: サードパーティから公開範囲「公開」で投稿した場合、「ローカル公開」に変更する + setting_reduce_motion: アニメーションの動きを減らす + setting_reject_public_unlisted_subscription: Misskey系サーバーに「ローカル公開」かつ検索許可「誰でも以外」の投稿を「フォロワーのみ」に変換して配送する + setting_reject_send_limited_to_suspects: Misskey系サーバーに「相互のみ」投稿を配送しない + setting_reject_unlisted_subscription: Misskey系サーバーに「非収載」かつ検索許可「誰でも以外」の投稿を「フォロワーのみ」に変換して配送する + setting_reverse_search_quote: ダブルクオートで囲まず検索した時、単語単位で検索する + setting_show_application: 送信したアプリを開示する setting_show_blocking_quote: ブロックしたユーザーの投稿を引用した投稿を表示する setting_show_emoji_reaction_count: 投稿につけられた各絵文字の数を表示する + setting_show_emoji_reaction_on_timeline: タイムライン上の投稿に他の人のつけた絵文字を表示する setting_show_favourite_menu: 右サイドメニューに「お気に入り」を表示する setting_show_followers_count: フォロワー数を公開する setting_show_following_count: フォロー数を公開する @@ -304,15 +312,6 @@ ja: setting_show_recent_emojis: 絵文字ピッカーで絵文字デッキと一緒に、絵文字の使用履歴も表示する setting_show_relationships: アカウント詳細ベージで、相手からのフォロー状況を表示する setting_show_statuses_count: 投稿数を公開する - setting_stay_privacy: 投稿時に公開範囲を保存する - setting_public_post_to_unlisted: サードパーティから公開範囲「公開」で投稿した場合、「ローカル公開」に変更する - setting_reduce_motion: アニメーションの動きを減らす - setting_reject_public_unlisted_subscription: Misskey系サーバーに「ローカル公開」かつ検索許可「誰でも以外」の投稿を「フォロワーのみ」に変換して配送する - setting_reject_send_limited_to_suspects: Misskey系サーバーに「相互のみ」投稿を配送しない - setting_reject_unlisted_subscription: Misskey系サーバーに「非収載」かつ検索許可「誰でも以外」の投稿を「フォロワーのみ」に変換して配送する - setting_reverse_search_quote: ダブルクオートで囲まず検索した時、単語単位で検索する - setting_show_application: 送信したアプリを開示する - setting_show_emoji_reaction_on_timeline: タイムライン上の投稿に他の人のつけた絵文字を表示する setting_simple_timeline_menu: タイムライン上でメニューの項目を減らす setting_slip_local_emoji_reaction: ローカルユーザーに限って上記設定を無視して絵文字リアクションを許可する setting_stay_privacy: 投稿時に公開範囲を保存する @@ -378,14 +377,14 @@ ja: profile_directory: プロフィール一覧を有効にする receive_other_servers_emoji_reaction: 他のサーバーのユーザーが他のサーバーの投稿につけた絵文字リアクションを受け入れる registration_button_message: 新規登録ボタンの直上に表示するメッセージ + registrations_end_hour: 登録に承認を必要としない時間帯の終了時刻 A (UTC 0〜24) registrations_limit: 登録ユーザー数上限 (現在 %{count} 名) registrations_limit_per_day: 1日あたり登録ユーザー数上限 (現在 %{count} 名) registrations_mode: 新規登録が可能な人 - registrations_end_hour: 登録に承認を必要としない時間帯の終了時刻 A (UTC 0〜24) - registrations_start_hour: 登録に承認を必要としない時間帯の開始時刻 A (UTC 0〜24) registrations_secondary_end_hour: 登録に承認を必要としない時間帯の終了時刻 B (UTC 0〜24) registrations_secondary_end_hour_hint: ここで0を指定した場合、時間Bの設定は無効化されます registrations_secondary_start_hour: 登録に承認を必要としない時間帯の開始時刻 B (UTC 0〜24) + registrations_start_hour: 登録に承認を必要としない時間帯の開始時刻 A (UTC 0〜24) require_invite_text: 申請事由の入力を必須にする show_domain_blocks: ドメインブロックを表示 show_domain_blocks_rationale: ドメインがブロックされた理由を表示 @@ -467,7 +466,7 @@ ja: events: 有効なイベント template: ペイロードテンプレート url: エンドポイントURL - 'no': 'いいえ' + 'no': いいえ not_recommended: 非推奨 overridden: 上書き済み recommended: おすすめ @@ -477,4 +476,4 @@ ja: title: sessions: webauthn: セキュリティキーを使用してサインインする - 'yes': 'はい' + 'yes': はい diff --git a/spec/search/services/statuses_search_service_spec.rb b/spec/search/services/statuses_search_service_spec.rb index a18f767f9475a2..2d14d94292908f 100644 --- a/spec/search/services/statuses_search_service_spec.rb +++ b/spec/search/services/statuses_search_service_spec.rb @@ -220,7 +220,7 @@ end let(:search_keyword) { 'ohagi' } - let(:status_text) { 'りんごを食べました' } + let(:status_text) { 'I ate an apple.' } let(:alice) { Fabricate(:user).account } let(:account) { alice } @@ -252,16 +252,16 @@ end end - it_behaves_like 'hit status', 'when search with word', 'りんご' - it_behaves_like 'hit status', 'when search with multiple words', 'りんご 食べる' - it_behaves_like 'does not hit status', 'when search with multiple words but does not hit half', 'りんご 茹でる' - it_behaves_like 'hit status', 'when search with letter in word', 'ご' - it_behaves_like 'does not hit status', 'when double quote search with letter in word', '"ご"' - it_behaves_like 'hit status', 'when search with fixed word', '"りんご"' - it_behaves_like 'hit status', 'when double quote search with multiple letter in word', 'り ご' - it_behaves_like 'does not hit status', 'when double quote search with multiple letter in word but does not contain half', 'ず ご' - it_behaves_like 'hit status', 'when specify user name', 'りんご from:alice' - it_behaves_like 'does not hit status', 'when specify not existing user name', 'りんご from:ohagi' + it_behaves_like 'hit status', 'when search with word', 'apple' + it_behaves_like 'hit status', 'when search with multiple words', 'apple ate' + it_behaves_like 'does not hit status', 'when search with multiple words but does not hit half', 'apple kill' + # it_behaves_like 'hit status', 'when search with letter in word', 'p' # available only Japanese sudachi + # it_behaves_like 'does not hit status', 'when double quote search with letter in word', '"p"' # available only Japanese sudachi + it_behaves_like 'hit status', 'when search with fixed word', '"apple"' + # it_behaves_like 'hit status', 'when double quote search with multiple letter in word', 'p e' # available only Japanese sudachi + it_behaves_like 'does not hit status', 'when double quote search with multiple letter in word but does not contain half', 'q p' + it_behaves_like 'hit status', 'when specify user name', 'apple from:alice' + it_behaves_like 'does not hit status', 'when specify not existing user name', 'apple from:ohagi' context 'when in:following is specified' do let(:following) { Fabricate(:user).account } @@ -274,19 +274,19 @@ context 'with myself' do let(:account) { alice } - it_behaves_like 'does not hit status', 'when search with following', 'in:following りんご' + it_behaves_like 'does not hit status', 'when search with following', 'in:following apple' end context 'with following' do let(:account) { following } - it_behaves_like 'hit status', 'when search with following', 'in:following りんご' + it_behaves_like 'hit status', 'when search with following', 'in:following apple' end context 'without following' do let(:account) { other } - it_behaves_like 'does not hit status', 'when search with following', 'in:following りんご' + it_behaves_like 'does not hit status', 'when search with following', 'in:following apple' end end @@ -295,9 +295,9 @@ alice.user.update!(settings: { reverse_search_quote: true }) end - it_behaves_like 'does not hit status', 'when search with letter in word', 'ご' - it_behaves_like 'hit status', 'when double quote search with letter in word', '"ご"' - it_behaves_like 'hit status', 'when search with word', 'りんご' + it_behaves_like 'does not hit status', 'when search with letter in word', 'p' + # it_behaves_like 'hit status', 'when double quote search with letter in word', '"p"' # available only Japanese sudachi + it_behaves_like 'hit status', 'when search with word', 'apple' end end end From 2399d8a67003c613afc41982d003390f99dde41f Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 09:39:11 +0900 Subject: [PATCH 066/113] fix test --- app/controllers/api/v1/emoji_reactions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/emoji_reactions_controller.rb b/app/controllers/api/v1/emoji_reactions_controller.rb index 43b39921dbc663..5e913eef2a26d0 100644 --- a/app/controllers/api/v1/emoji_reactions_controller.rb +++ b/app/controllers/api/v1/emoji_reactions_controller.rb @@ -19,7 +19,7 @@ def load_statuses end def cached_emoji_reactions - cache_collection(results.map(&:status), EmojiReaction) + preload_collection(results.map(&:status), EmojiReaction) end def results From 795c51001ba49765bb318720950319f037e2f3b3 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 09:45:26 +0900 Subject: [PATCH 067/113] Fix test --- config/locales/en.yml | 13 ------------- config/locales/ja.yml | 8 -------- config/locales/simple_form.en.yml | 1 - config/locales/simple_form.ja.yml | 1 - 4 files changed, 23 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 25ae2324328cd6..19bab9d98282b5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -463,7 +463,6 @@ en: reject_new_follow_hint: Reject follows in the future reject_reply_exclude_followers: Reject mentions/quotes exclude followers reject_reply_exclude_followers_hint: Reject replies exclude followers in the future - reject_reply_hint: Reject replies in the future reject_reports: Reject reports reject_reports_hint: Ignore all reports coming from this domain. Irrelevant for suspensions reject_send_sensitive: Do not deliver sensitive postings @@ -535,7 +534,6 @@ en: inbox_url_hint: Default value is https://domain/inbox if you input empty (For example, https://example.com/inbox) pseudo_relay: Send all public or searchable posts pseudo_relay_hint: Must be valid for both parties and "Accept submissions from this server unconditionally" must be enabled on the other side - unlocked: Approve automatically receiving new request edit_friend: Edit enabled: Enabled follow: Request @@ -544,10 +542,8 @@ en: reject: Reject save_and_enable: Save and enable setup: Add and make a new application - signatures_not_enabled: If Secure Mode or Federation Restricted Mode is enabled, the friend server may not work properly because it has not been checked status: Status title: Friend server - unfollow: Cancel request instances: availability: description_html: @@ -647,8 +643,6 @@ en: title: Create new IP rule no_ip_block_selected: No IP rules were changed as none were selected title: IP rules - media_attachments: - title: Media attachments ng_rule_histories: back_to_ng_rule: Back to NG rule back_to_ng_rules: Back to index @@ -1085,7 +1079,6 @@ en: remove: Remove post remove_history: Remove edit history remove_media: Remove medias - searchability: Searchability status_changed: Post changed title: Account posts trending: Trending @@ -1210,9 +1203,6 @@ en: other: Used by %{count} people over the last week title: Trends trending: Trending - update-pendings: - major: Major update pending - patch: Patch update pending warning_presets: add_new: Add new delete: Delete @@ -1298,9 +1288,7 @@ en: description: Antenna is for all public and local public posts recognized by the server, from all accounts that have not refused to subscribe. Detected posts will be added to the specified list. title: Edit antenna errors: - deprecated_api_multiple_keywords: These parameters cannot be changed from this application because they apply to more than one filter keyword. Use a more recent application or the web interface. empty_contexts: No contexts! You must set any context filters - invalid_context: None or invalid context supplied invalid_list_owner: This list is not yours over_limit: You have exceeded the limit of %{limit} antennas over_ltl_limit: You have exceeded the limit of %{limit} ltl antennas @@ -1353,7 +1341,6 @@ en: help_html: If you have issues solving the CAPTCHA, you can get in touch with us through %{email} and we can assist you. hint_html: Just one more thing! We need to confirm you're a human (this is so we can keep the spam out!). Solve the CAPTCHA below and click "Continue". title: Security check - cloudflare_with_registering: With cloudflare on auth confirmations: awaiting_review: Your e-mail address is confirmed! The %{domain} staff is now reviewing your registration. You will receive an e-mail if they approve your account! awaiting_review_title: Your registration is being reviewed diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 5801e9931ce1f1..4ed85212209f32 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -458,7 +458,6 @@ ja: reject_new_follow_hint: 今後の新規フォローを拒否します。停止とは無関係です reject_reply_exclude_followers: フォロー相手以外からのメンションと引用を拒否 reject_reply_exclude_followers_hint: 今後のリプライを拒否します。停止とは無関係です - reject_reply_hint: 今後のリプライを拒否します。停止とは無関係です reject_reports: 通報を拒否 reject_reports_hint: このドメインからの通報をすべて無視します。停止とは無関係です reject_send_sensitive: センシティブな投稿を配送しない @@ -529,7 +528,6 @@ ja: inbox_url_hint: 空欄にした場合、自動で「https://ドメイン名/inbox」に設定されます。(例:https://example.com/inbox)相手のサーバーがinbox URLを特別に指定している場合、入力してください。 pseudo_relay: 全ての公開・ローカル公開・非収載かつ検索可能な投稿を送信する pseudo_relay_hint: お互いに有効で、かつ相手側で「このサーバーからの投稿を無条件で受け入れる」が有効になっている必要があります - unlocked: このサーバーからの申請を自動で承認する edit_friend: 編集 enabled: 有効 follow: こちらから申請する @@ -538,10 +536,8 @@ ja: reject: 相手からの申請を却下する save_and_enable: 保存して有効にする setup: フレンドサーバーを追加・申請 - signatures_not_enabled: セキュアモードまたは連合制限モードが有効の場合、フレンドサーバーの動作を確認していないため正常に動作しない可能性があります status: ステータス title: フレンドサーバー - unfollow: こちらの申請を取り消す instances: availability: description_html: @@ -640,8 +636,6 @@ ja: title: 新規IPルール no_ip_block_selected: 何も選択されていないためIPルールを変更しませんでした title: IPルール - media_attachments: - title: 投稿された画像 ng_rule_histories: back_to_ng_rule: NGルール設定に戻る back_to_ng_rules: 一覧に戻る @@ -1081,7 +1075,6 @@ ja: remove: 投稿を削除 remove_history: 編集履歴を削除 remove_media: メディアを削除 - searchability: 検索許可 status_changed: 投稿を変更しました title: 投稿一覧 trending: トレンド @@ -1357,7 +1350,6 @@ ja: help_html: CAPTCHAの解決に問題がある場合は、 %{email} までお問い合わせください。お手伝いいたします。 hint_html: もう一つだけ!あなたが人間であることを確認する必要があります(スパムを防ぐためです!)。 以下のCAPTCHAを解き、「続ける」をクリックします。 title: セキュリティチェック - cloudflare_with_registering: 登録時にCloudflareの画面が表示されます。登録できないときは管理者へご連絡ください confirmations: awaiting_review: メールアドレスが確認できました。%{domain} のスタッフが登録審査を行います。承認されたらメールでお知らせします! awaiting_review_title: 登録の審査待ちです diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 7c0e748c6ec486..56aaf533aa130f 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -170,7 +170,6 @@ en: events: Select events to send template: Compose your own JSON payload using variable interpolation. Leave blank for default JSON. url: Where events will be sent to - kmyblue: kmyblue labels: account: discoverable: Feature profile and posts in discovery algorithms diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index 2669cb0d4986ba..ec9e691bb3b91c 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -177,7 +177,6 @@ ja: events: 送信するイベントを選択 template: 変数補完を使用して、独自のJSONペイロードを構成できます。デフォルトのJSONを使用する場合は空白のままにします。 url: イベントの送信先 - kmyblue: kmyblue labels: account: discoverable: アカウントを見つけやすくする From ba1225d4d3c26100eef04bbd692b0679e221a264 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 10:23:34 +0900 Subject: [PATCH 068/113] Fix lint --- config/locales/en.yml | 42 +++++++++++++++++++++++++++++++ config/locales/simple_form.en.yml | 15 +++++++++++ 2 files changed, 57 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 19bab9d98282b5..c0b498a1a46ad7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -433,6 +433,8 @@ en: harassment: Harassment or spam invalid_privacy: Privacy is not protected mastodon_default: Original Mastodon supports + hidden: Hide + hidden_hint: You may choose to make this domain block private if disclosure would jeopardize the security of this server. import: Import new: create: Create block @@ -567,6 +569,7 @@ en: limited_federation_mode_description_html: You can chose whether to allow federation with this domain. policies: block_trends: Reject trends + detect_invalid_subscription: No subscription privacy reject_favourite: Reject favorite reject_friend: Reject friend server application reject_hashtag: Reject hashtags @@ -574,6 +577,7 @@ en: reject_new_follow: Reject follows reject_reply_exclude_followers: Reject reply/quote exclude followers reject_reports: Reject reports + reject_send_sensitive: No Sensitive Submission Delivery reject_straight_follow: Reject straight follow silence: Limit suspend: Suspend @@ -662,6 +666,8 @@ en: status_edit: Edit post title: NG Rule History %{title} ng_rules: + account_allow_followed_by_local: Check only accounts that are not followed by local users + account_allow_followed_by_local_hint: Use this option only if all local users with more than 1 follow are trusted account_avatar_state: Has avatar or not account_display_name: Name account_domain: Domain @@ -671,6 +677,7 @@ en: account_include_local: Contains local users account_note: Account note account_username: ID + available: Available copy: Copy copy_error: Copy failed. edit: @@ -689,6 +696,9 @@ en: reaction: Set the reaction conditions. The account conditions must match at the same time. Please note that by default, not all reactions will match unless you set the "Reaction Type". status: Set the conditions of your submission. The account conditions must match at the same time. Please note that by default, not all posts will be applicable unless you set the "Visibility" and "Searchability". title: Edit NG Rule + emoji_reaction_name: Emoji reaction emoji or shortcode + emoji_reaction_origin_domain: Custom emoji origin domain + emoji_reaction_origin_domain_hint: If a pictogram from another server is used, the domain of the server where the pictogram was originally registered will be used. index: delete: Delete disabled: Disabled @@ -749,6 +759,7 @@ en: hide_local_users_for_anonymous_hint: This setting will be removed. After the setting is removed, the behavior will always be the same as if it were unchecked. It can be replaced, though not completely, by "Allow unauthorized access to public timelines" in the "Find" section of the server settings. hold_remote_new_accounts: Hold new remote accounts keywords: Reject keywords + keywords_for_stranger_mention: Keywords for stranger mention phrases: regexp_html: "Reg - If the Reg checkbox is checked, the comparison is performed using regular expressions." regexp_short: Reg @@ -760,6 +771,7 @@ en: preamble: This setting is useful for solving problems related to spam that are difficult to address with domain blocking. You can reject posts that meet certain criteria, such as the inclusion of specific keywords. Please consider your settings carefully and check your history regularly to ensure that problem-free posts are not deleted. remote_approval_hint: Newly recognized accounts with unspecified domains will be placed in Suspended status. You can review that list and approve them if necessary. If this setting is not enabled, all remote accounts will be approved immediately. remote_approval_list: List of remote accounts awaiting approval + save_error: Has save errors settings: Settings stranger_mention_from_local_ng: NG words for Mention to accounts you do not follow are also applied to posts by local users. stranger_mention_from_local_ng_hint: This setting will be removed. After the setting is removed, the behavior will be the same as if it is always checked. If you do not wish this behavior, please use NG rules instead. @@ -1203,6 +1215,9 @@ en: other: Used by %{count} people over the last week title: Trends trending: Trending + update_pendings: + major: Major update available + patch: Patch update available warning_presets: add_new: Add new delete: Delete @@ -1288,19 +1303,37 @@ en: description: Antenna is for all public and local public posts recognized by the server, from all accounts that have not refused to subscribe. Detected posts will be added to the specified list. title: Edit antenna errors: + duplicate_account: Duplicate account + duplicate_domain: Duplicate domain + duplicate_keyword: Duplicate keyword + duplicate_tag: Duplicate tag empty_contexts: No contexts! You must set any context filters invalid_list_owner: This list is not yours + limit: + accounts: 登録できるアカウント数の上限に達しています + domains: 登録できるドメイン数の上限に達しています + keywords: 登録できるキーワード数の上限に達しています + tags: 登録できるタグ数の上限に達しています over_limit: You have exceeded the limit of %{limit} antennas over_ltl_limit: You have exceeded the limit of %{limit} ltl antennas over_stl_limit: You have exceeded the limit of %{limit} stl antennas + too_short_keyword: Keyword is too short index: + accounts: + other: "%{count} accounts" contexts: Antennas in %{contexts} delete: Delete disabled: Disabled + domains: + other: "%{count} domains" empty: You have no antennas. expires_in: Expires in %{distance} expires_on: Expires on %{date} + keywords: + other: "%{count} keywords" stl: This antenna is in STL mode, ignoring reject-subscription settings. + tags: + other: "%{count} tags" title: Antennas appearance: advanced_web_interface: Advanced web interface @@ -1418,6 +1451,9 @@ en: view_strikes: View past strikes against your account too_fast: Form submitted too fast, try again. use_security_key: Use security key + bookmark_categories: + errors: + limit: Bookmark category limit challenge: confirm: Continue hint_html: "Tip: We won't ask you for your password again for the next hour." @@ -1580,6 +1616,8 @@ en: index: hint: This filter applies to select individual posts regardless of other criteria. You can add more posts to this filter from the web interface. title: Filtered posts + footer: + trending_now: Trending now generic: all: All all_items_on_page_selected_html: @@ -1914,6 +1952,9 @@ en: descriptions: account: Public posts from @%{acct} tag: 'Public posts tagged #%{hashtag}' + scheduled_expiration_statuses: + over_daily_limit: You have exceeded the limit of %{limit} scheduled expiration posts for today + over_total_limit: You have exceeded the limit of %{limit} scheduled expiration posts scheduled_statuses: over_daily_limit: You have exceeded the limit of %{limit} scheduled posts for today over_total_limit: You have exceeded the limit of %{limit} scheduled posts @@ -2129,6 +2170,7 @@ en: themes: contrast: Mastodon (High contrast) default: Mastodon (Dark) + full-dark: フルダーク mastodon-light: Mastodon (Light) system: Automatic (use system theme) time: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 56aaf533aa130f..11ac533271b9c7 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -6,7 +6,9 @@ en: discoverable: Your public posts and profile may be featured or recommended in various areas of Mastodon and your profile may be suggested to other users. display_name: Your full name or your fun name. fields: Your homepage, pronouns, age, anything you want. + hide_collections: People will not be able to browse through your follows and followers. People that you follow will see that you follow them regardless. indexable: Your public posts may appear in search results on Mastodon. People who have interacted with your posts may be able to search them regardless. + locked: People will request to follow you and you will be able to either accept or reject new followers. note: 'You can @mention other people or #hashtags.' show_collections: People will be able to browse through your follows and followers. People that you follow will see that you follow them regardless. unlocked: People will be able to follow you without requesting approval. Uncheck if you want to review follow requests and chose whether to accept or reject new followers. @@ -62,6 +64,7 @@ en: setting_bookmark_category_needed: When removing from all category, unbookmarked automatically setting_default_searchability: On kmyblue and Fedibird, the search is based on the search permission setting; on Misskey, all public, local public, and non-public posts are searched regardless of this setting; on Mastodon and Firefish, instead of search permission, the "Make public posts freely searchable on other servers" setting in the profile settings is applied. In Mastodon and Firefish, the "Make public posts freely searchable on other servers" setting in the profile settings is applied instead of the search permission. setting_default_sensitive: Sensitive media is hidden by default and can be revealed with a click + setting_disallow_unlisted_public_searchability: この設定を有効にすると、非収載投稿と検索範囲「誰でも」は両立できず不特定多数からの検索が不可になります。Fedibirdと同じ挙動になります setting_display_media_default: Hide media marked as sensitive setting_display_media_expand: Misskey and others can submit more than 4. The additions will be displayed up to 16. kmyblue will not allow uploading from kmyblue. setting_display_media_hide_all: Always hide media @@ -70,11 +73,15 @@ en: setting_dtl_force_subscribable: Your post can be detected local user's antenna to subscribe deep timeline setting_dtl_force_visibility: 'With using #%{tag} tag, your post settings will be changed forcibly' setting_emoji_reaction_policy: Even with this setting, users on other servers are free to put their emoji reaction on the post and share it within the same server. If you simply want to remove the emoji reaction from your own screen, you can disable it from the appearance settings + setting_emoji_reaction_streaming_notify_impl2: 当該サーバーの独自機能に対応したアプリを利用時に、絵文字リアクション機能を利用できます。動作確認していないため(そもそもそのようなアプリ自体を確認できていないため)正しく動かない場合があります setting_enable_emoji_reaction: If turn off, other users still can react your posts setting_enabled_visibilities: If turn off, you cannot select and post the privacy. + setting_hide_network: フォローとフォロワーの情報がプロフィールページで見られないようにします + setting_public_post_to_unlisted: 未対応のサードパーティアプリからもローカル公開で投稿できますが、公開投稿はWeb以外できなくなります setting_reject_send_limited_to_suspects: This applies to "Mutual Only" posts. Circle posts will be delivered without exception. Some Misskey servers have independently supported limited posting, but this is a setting for those who are concerned about it, as mutual-only posting exposes some of the users you are mutual with to Misskey users! setting_reject_unlisted_subscription: Misskey and its forks can **subscribe and search** for "non-following" posts from accounts they do not follow. This differs from kmyblue's behavior. It delivers posts in the specified public range to such servers as "followers only". Please understand, however, that due to its structure, it is difficult to handle perfectly and will occasionally be delivered as non-subscribed. setting_reverse_search_quote: Double-quotes will result in a search with a wider range of notation, which is the opposite of Mastodon's default behavior. + setting_show_application: 投稿するのに使用したアプリが投稿の詳細ビューに表示されるようになります setting_stop_emoji_reaction_streaming: Helps to save communication capacity. setting_use_blurhash: Gradients are based on the colors of the hidden visuals but obfuscate any details setting_use_pending_items: Hide timeline updates behind a click instead of automatically scrolling the feed @@ -112,6 +119,10 @@ en: peers_api_enabled: A list of domain names this server has encountered in the fediverse. No data is included here about whether you federate with a given server, just that your server knows about it. This is used by services that collect statistics on federation in a general sense. profile_directory: The profile directory lists all users who have opted-in to be discoverable. receive_other_servers_emoji_reaction: It can cause load. It is recommended to enable it only when there are few people. + registrations_end_hour: 新規登録が承認なしで可能な時間帯の開始時間を指定します。これより前の時間に登録することはできません。終了時間より後にすることはできません。この時間帯から外れた新規登録には、別途承認が必要となります。 + registrations_limit: 現在のユーザー数がこれを超過すると、管理者がこの数値を増やさない限り新規登録できません。0を指定すると、この制限を無効化します。 + registrations_limit_per_day: 本日登録されたユーザー数がこれを超過すると、UTC時刻で翌日0時にならない限り新規登録できません。0を指定すると、この制限を無効化します。 + registrations_start_hour: 新規登録が承認なしで可能な時間帯の終了時間を指定します。これより後の時間に登録することはできません。開始時間より前にすることはできません。この時間帯から外れた新規登録には、別途承認が必要となります。 require_invite_text: When sign-ups require manual approval, make the “Why do you want to join?” text input mandatory rather than optional site_contact_email: How people can reach you for legal or support inquiries. site_contact_username: How people can reach you on Mastodon. @@ -436,6 +447,10 @@ en: settings: indexable: Include profile page in search engines show_application: Display from which app you sent a post + subscription_policy: + allow: 全員に許可 + block: 全員拒否 + followers_only: フォロワーにのみ許可 tag: listable: Allow this hashtag to appear in searches and suggestions name: Hashtag From c46f5baa4c9f1f2fe365d81055a81a2b4005dd77 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 10:23:43 +0900 Subject: [PATCH 069/113] Fix lint --- config/locales/simple_form.en.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 11ac533271b9c7..2d9f412f1555e0 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -381,8 +381,8 @@ en: receive_other_servers_emoji_reaction: Receive emoji reaction between other server users registration_button_message: Register button message registrations_end_hour: Registration-without-approval end hour (UTC 0-24) - registrations_limit: User registration limit - registrations_limit_per_day: User registration limit per day + registrations_limit: User registration limit (Current %{count}) + registrations_limit_per_day: User registration limit per day (Current %{count}) registrations_mode: Who can sign-up registrations_secondary_end_hour: Secondary registration end hour (UTC 0-24) registrations_secondary_end_hour_hint: If input 0, secondary hour is disabled. From d28f147dfd85927c0242ed1b21f66250761f8ec1 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 17 May 2024 10:45:36 +0900 Subject: [PATCH 070/113] Fix test --- app/controllers/api/v1/timelines/antenna_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/timelines/antenna_controller.rb b/app/controllers/api/v1/timelines/antenna_controller.rb index fc54e663d4e394..69554361be0468 100644 --- a/app/controllers/api/v1/timelines/antenna_controller.rb +++ b/app/controllers/api/v1/timelines/antenna_controller.rb @@ -25,7 +25,7 @@ def set_statuses end def cached_list_statuses - cache_collection list_statuses, Status + preload_collection list_statuses, Status end def list_statuses From 226d7a7badf0d03f2c2a57fd4da72889a3563d28 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 10:27:03 +0200 Subject: [PATCH 071/113] fix(deps): update dependency sass to v1.77.2 (#30338) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 07c89a5298081f..db706f04a7bab6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15316,15 +15316,15 @@ __metadata: linkType: hard "sass@npm:^1.62.1": - version: 1.77.1 - resolution: "sass@npm:1.77.1" + version: 1.77.2 + resolution: "sass@npm:1.77.2" dependencies: chokidar: "npm:>=3.0.0 <4.0.0" immutable: "npm:^4.0.0" source-map-js: "npm:>=0.6.2 <2.0.0" bin: sass: sass.js - checksum: 10c0/edcfc7d038234b1198c3ddcac5963fcd1e17a9c1ee0f9bd09784ab5353b60ff50b189b4c9154b34f5da9ca0eaab8b189fd3e83a4b43a494151ad4735f8e5f364 + checksum: 10c0/0d292339064de3c902e209d41de9c4eb2038cff326476aeebbb5be3eee1d23400d975face2b8e124ae617b10af3e93bec01580f61912f34e4c517fe137a118b6 languageName: node linkType: hard From f7f5b9dadd9e2cee98bf8a7d41193844a37c662b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 08:27:45 +0000 Subject: [PATCH 072/113] fix(deps): update dependency @rails/ujs to v7.1.3-3 (#30337) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 79544229df956c..773f19c50d8b9b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@formatjs/intl-pluralrules": "^5.2.2", "@gamestdio/websocket": "^0.3.2", "@github/webauthn-json": "^2.1.1", - "@rails/ujs": "7.1.3-2", + "@rails/ujs": "7.1.3-3", "@reduxjs/toolkit": "^2.0.1", "@svgr/webpack": "^5.5.0", "arrow-key-navigation": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index db706f04a7bab6..efe8cc02648ab7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2758,7 +2758,7 @@ __metadata: "@formatjs/intl-pluralrules": "npm:^5.2.2" "@gamestdio/websocket": "npm:^0.3.2" "@github/webauthn-json": "npm:^2.1.1" - "@rails/ujs": "npm:7.1.3-2" + "@rails/ujs": "npm:7.1.3-3" "@reduxjs/toolkit": "npm:^2.0.1" "@svgr/webpack": "npm:^5.5.0" "@testing-library/jest-dom": "npm:^6.0.0" @@ -3042,10 +3042,10 @@ __metadata: languageName: node linkType: hard -"@rails/ujs@npm:7.1.3-2": - version: 7.1.3-2 - resolution: "@rails/ujs@npm:7.1.3-2" - checksum: 10c0/8bd5b3a409c62f53790ed7e914f1f48235f461a472da7b4ce1d9ad57356fcdeaa7891c946298f7f620ff0ff7c6d5b995bf44057929c4fce796867a8cf4f27c99 +"@rails/ujs@npm:7.1.3-3": + version: 7.1.3-3 + resolution: "@rails/ujs@npm:7.1.3-3" + checksum: 10c0/9eee95372b72d8f704b67f14a3bf9f2681ab5b11c7b79919bfde3341f2970771876af5b40de5b3e4fca6a97c76a41046eff71d96490617c1fc80ef3ad8bbac47 languageName: node linkType: hard From 3286ad5226ca220a40f12353df2237c4f822af1d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 10:28:01 +0200 Subject: [PATCH 073/113] chore(deps): update dependency selenium-webdriver to v4.21.1 (#30335) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6001c73db498e0..2f466555490848 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -775,7 +775,7 @@ GEM scenic (1.8.0) activerecord (>= 4.0.0) railties (>= 4.0.0) - selenium-webdriver (4.21.0) + selenium-webdriver (4.21.1) base64 (~> 0.2) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) From fc166d07f0b5472866e1e13a0c12d78a0c7bbcfb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 10:28:22 +0200 Subject: [PATCH 074/113] chore(deps): update dependency rails to v7.1.3.3 (#30334) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2f466555490848..eade99acfdffb8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,35 +10,35 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) + actioncable (7.1.3.3) + actionpack (= 7.1.3.3) + activesupport (= 7.1.3.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionmailbox (7.1.3.3) + actionpack (= 7.1.3.3) + activejob (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.3.2) - actionpack (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionmailer (7.1.3.3) + actionpack (= 7.1.3.3) + actionview (= 7.1.3.3) + activejob (= 7.1.3.3) + activesupport (= 7.1.3.3) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.3.2) - actionview (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionpack (7.1.3.3) + actionview (= 7.1.3.3) + activesupport (= 7.1.3.3) nokogiri (>= 1.8.5) racc rack (>= 2.2.4) @@ -46,15 +46,15 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.2) - actionpack (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + actiontext (7.1.3.3) + actionpack (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.2) - activesupport (= 7.1.3.2) + actionview (7.1.3.3) + activesupport (= 7.1.3.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) @@ -64,22 +64,22 @@ GEM activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (7.1.3.2) - activesupport (= 7.1.3.2) + activejob (7.1.3.3) + activesupport (= 7.1.3.3) globalid (>= 0.3.6) - activemodel (7.1.3.2) - activesupport (= 7.1.3.2) - activerecord (7.1.3.2) - activemodel (= 7.1.3.2) - activesupport (= 7.1.3.2) + activemodel (7.1.3.3) + activesupport (= 7.1.3.3) + activerecord (7.1.3.3) + activemodel (= 7.1.3.3) + activesupport (= 7.1.3.3) timeout (>= 0.4.0) - activestorage (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activesupport (= 7.1.3.2) + activestorage (7.1.3.3) + actionpack (= 7.1.3.3) + activejob (= 7.1.3.3) + activerecord (= 7.1.3.3) + activesupport (= 7.1.3.3) marcel (~> 1.0) - activesupport (7.1.3.2) + activesupport (7.1.3.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -444,7 +444,7 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.1) + nio4r (2.7.3) nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) @@ -634,20 +634,20 @@ GEM rackup (1.0.0) rack (< 3) webrick - rails (7.1.3.2) - actioncable (= 7.1.3.2) - actionmailbox (= 7.1.3.2) - actionmailer (= 7.1.3.2) - actionpack (= 7.1.3.2) - actiontext (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activemodel (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + rails (7.1.3.3) + actioncable (= 7.1.3.3) + actionmailbox (= 7.1.3.3) + actionmailer (= 7.1.3.3) + actionpack (= 7.1.3.3) + actiontext (= 7.1.3.3) + actionview (= 7.1.3.3) + activejob (= 7.1.3.3) + activemodel (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) bundler (>= 1.15.0) - railties (= 7.1.3.2) + railties (= 7.1.3.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -662,9 +662,9 @@ GEM rails-i18n (7.0.9) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) + railties (7.1.3.3) + actionpack (= 7.1.3.3) + activesupport (= 7.1.3.3) irb rackup (>= 1.0.0) rake (>= 12.2) From a6d12299f22e0318f0bea8b4a0192e6c07398b70 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 17 May 2024 04:29:13 -0400 Subject: [PATCH 075/113] Remove duplicate method def `ApplicationHelper#instance_presenter` (#30331) --- app/helpers/application_helper.rb | 4 ++++ app/helpers/mascot_helper.rb | 11 ----------- app/mailers/user_mailer.rb | 1 - 3 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 app/helpers/mascot_helper.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index eb03f1e4ba2ced..7563ae6105f894 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -240,6 +240,10 @@ def prerender_custom_emojis(html, custom_emojis, other_options = {}) EmojiFormatter.new(html, custom_emojis, other_options.merge(animate: prefers_autoplay?)).to_s end + def mascot_url + full_asset_url(instance_presenter.mascot&.file&.url || frontend_asset_path('images/elephant_ui_plane.svg')) + end + def instance_presenter @instance_presenter ||= InstancePresenter.new end diff --git a/app/helpers/mascot_helper.rb b/app/helpers/mascot_helper.rb deleted file mode 100644 index 34b656411ebce3..00000000000000 --- a/app/helpers/mascot_helper.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -module MascotHelper - def mascot_url - full_asset_url(instance_presenter.mascot&.file&.url || frontend_asset_path('images/elephant_ui_plane.svg')) - end - - def instance_presenter - @instance_presenter ||= InstancePresenter.new - end -end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index f8c1c9a8d0048b..81a2c0c6d04bbc 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -5,7 +5,6 @@ class UserMailer < Devise::Mailer helper :accounts helper :application - helper :mascot helper :formatting helper :instance helper :routing From bff7769f5f9a4f3995038ad759c1b48a636d303b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 10:41:35 +0200 Subject: [PATCH 076/113] New Crowdin Translations (automated) (#30336) Co-authored-by: GitHub Actions --- config/locales/simple_form.fi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 4971e250222077..2f7010bacf172e 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -81,9 +81,11 @@ fi: backups_retention_period: Käyttäjillä on mahdollisuus arkistoida julkaisujaan myöhemmin ladattaviksi. Kun tämä on asetettu positiiviseksi arvoksi, nämä arkistot poistetaan automaattisesti asetetun päivien määrän jälkeen. bootstrap_timeline_accounts: Nämä tilit kiinnitetään uusien käyttäjien seuraamissuosituslistojen alkuun. closed_registrations_message: Näkyy, kun rekisteröityminen on suljettu + content_cache_retention_period: Kaikki muiden palvelimien viestit (mukaan lukien tehostukset ja vastaukset) poistetaan määritetyn päivien lukumäärän jälkeen, ottamatta huomioon paikallisen käyttäjän vuorovaikutusta kyseisten viestien kanssa. Sisältää viestit, jossa paikallinen käyttäjä on merkinnyt kirjanmerkiksi tai suosikeiksi. Myös yksityiset maininnat eri käyttäjien välillä menetetään, eikä niitä voi palauttaa. Tämän asetuksen käyttö on tarkoitettu erityisiin tapauksiin ja se rikkoo monia käyttäjien odotuksia, kun se toteutetaan yleistarkoituksiin. custom_css: Voit käyttää mukautettuja tyylejä Mastodonin verkkoversiossa. favicon: WEBP, PNG, GIF tai JPG. Korvaa oletusarvoisen Mastodonin suosikkikuvakkeen omalla kuvakkeella. mascot: Ohittaa kuvituksen edistyneessä selainkäyttöliittymässä. + media_cache_retention_period: Mediatiedostot käyttäjien tekemistä viesteistä ovat välimuistissa palvelimellasi. Kun arvo on positiivinen, media poistetaan määritetyn ajan jälkeen. Jos mediaa pyydetään sen poistamisen jälkeen, ne ladataan uudelleen, jos lähdesisältö on vielä saatavilla. Koska linkkien katselun kyselyitä kolmansien osapuolien sivustoille on rajoitettu, on suositeltavaa asettaa tämä arvo vähintään 14 päivään tai linkkien kortteja ei päivitetä pyynnöstä ennen tätä aikaa. peers_api_enabled: Luettelo verkkotunnuksista, jotka tämä palvelin on kohdannut fediversumissa. Se ei kerro, oletko liitossa tietyn palvelimen kanssa, vaan että palvelimesi on ylipäätään tietoinen siitä. Tätä tietoa käytetään palveluissa, jotka keräävät tilastoja federoinnista yleisellä tasolla. profile_directory: Profiilihakemisto lueteloi kaikki käyttäjät, jotka ovat ilmoittaneet olevansa löydettävissä. require_invite_text: Kun rekisteröityminen vaatii manuaalisen hyväksynnän, tee ”Miksi haluat liittyä?” -tekstikentästä pakollinen vapaaehtoisen sijaan From a627219b25f1787cbee0174e37e36e440489eb66 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Fri, 17 May 2024 18:18:54 +0900 Subject: [PATCH 077/113] Fix moderation action logs (#30342) --- app/models/admin/action_log_filter.rb | 1 + config/locales/en.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/admin/action_log_filter.rb b/app/models/admin/action_log_filter.rb index f581af74e8bf8c..fc984b2445bcdc 100644 --- a/app/models/admin/action_log_filter.rb +++ b/app/models/admin/action_log_filter.rb @@ -59,6 +59,7 @@ class Admin::ActionLogFilter unsuspend_account: { target_type: 'Account', action: 'unsuspend' }.freeze, update_announcement: { target_type: 'Announcement', action: 'update' }.freeze, update_custom_emoji: { target_type: 'CustomEmoji', action: 'update' }.freeze, + update_report: { target_type: 'Report', action: 'update' }.freeze, update_status: { target_type: 'Status', action: 'update' }.freeze, update_user_role: { target_type: 'UserRole', action: 'update' }.freeze, update_ip_block: { target_type: 'IpBlock', action: 'update' }.freeze, diff --git a/config/locales/en.yml b/config/locales/en.yml index 446d06f0d1f1d5..d3704bbbcf54cb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -285,6 +285,7 @@ en: update_custom_emoji_html: "%{name} updated emoji %{target}" update_domain_block_html: "%{name} updated domain block for %{target}" update_ip_block_html: "%{name} changed rule for IP %{target}" + update_report_html: "%{name} updated report %{target}" update_status_html: "%{name} updated post by %{target}" update_user_role_html: "%{name} changed %{target} role" deleted_account: deleted account From 12472e7f407c42bcff6ee204b9f1887b5824734f Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 17 May 2024 11:28:40 +0200 Subject: [PATCH 078/113] Add emphasis on ActiveRecord Encryption configuration values being secret (#30340) --- .env.test | 9 +++++---- config/initializers/active_record_encryption.rb | 13 +++++++++++-- lib/tasks/db.rake | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.env.test b/.env.test index 9e6abea5c9a058..d2763e582ae926 100644 --- a/.env.test +++ b/.env.test @@ -4,7 +4,8 @@ NODE_ENV=production LOCAL_DOMAIN=cb6e6126.ngrok.io LOCAL_HTTPS=true -# Required by ActiveRecord encryption feature -ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=fkSxKD2bF396kdQbrP1EJ7WbU7ZgNokR -ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=r0hvVmzBVsjxC7AMlwhOzmtc36ZCOS1E -ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=PhdFyyfy5xJ7WVd2lWBpcPScRQHzRTNr +# Secret values required by ActiveRecord encryption feature +# Use `bin/rails db:encryption:init` to generate fresh secrets +ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=test_determinist_key_DO_NOT_USE_IN_PRODUCTION +ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=test_salt_DO_NOT_USE_IN_PRODUCTION +ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=test_primary_key_DO_NOT_USE_IN_PRODUCTION diff --git a/config/initializers/active_record_encryption.rb b/config/initializers/active_record_encryption.rb index 7cda8c621c2b69..777bafc2730d05 100644 --- a/config/initializers/active_record_encryption.rb +++ b/config/initializers/active_record_encryption.rb @@ -5,7 +5,7 @@ ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY ).each do |key| - ENV.fetch(key) do + value = ENV.fetch(key) do abort <<~MESSAGE Mastodon now requires that these variables are set: @@ -14,9 +14,18 @@ - ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT - ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY - Run `bin/rails db:encryption:init` to generate values and then assign the environment variables. + Run `bin/rails db:encryption:init` to generate new secrets and then assign the environment variables. MESSAGE end + + next unless Rails.env.production? && value.end_with?('DO_NOT_USE_IN_PRODUCTION') + + abort <<~MESSAGE + + It looks like you are trying to run Mastodon in production with a #{key} value from the test environment. + + Please generate fresh secrets using `bin/rails db:encryption:init` and use them instead. + MESSAGE end Rails.application.configure do diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index d6377c9c82c347..d8bc927bc495ba 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -8,7 +8,7 @@ namespace :db do desc 'Generate a set of keys for configuring Active Record encryption in a given environment' task :init do # rubocop:disable Rails/RakeEnvironment puts <<~MSG - Add these environment variables to your Mastodon environment:#{' '} + Add these secret environment variables to your Mastodon environment (e.g. .env.production):#{' '} ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=#{SecureRandom.alphanumeric(32)} ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=#{SecureRandom.alphanumeric(32)} From 2da2a1dae984f4083d1cc2f55642811c696955e6 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Fri, 17 May 2024 15:46:12 +0200 Subject: [PATCH 079/113] Support multiple redirect_uris when creating OAuth 2.0 Applications (#29192) --- .../api/v1/apps/credentials_controller.rb | 2 +- app/controllers/api/v1/apps_controller.rb | 4 +- app/lib/application_extension.rb | 6 + .../rest/application_serializer.rb | 14 +- .../rest/credential_application_serializer.rb | 13 ++ spec/requests/api/v1/apps/credentials_spec.rb | 23 ++- spec/requests/api/v1/apps_spec.rb | 164 +++++++++++++++++- 7 files changed, 201 insertions(+), 25 deletions(-) create mode 100644 app/serializers/rest/credential_application_serializer.rb diff --git a/app/controllers/api/v1/apps/credentials_controller.rb b/app/controllers/api/v1/apps/credentials_controller.rb index 6256bed64cf831..29ab9203835840 100644 --- a/app/controllers/api/v1/apps/credentials_controller.rb +++ b/app/controllers/api/v1/apps/credentials_controller.rb @@ -4,6 +4,6 @@ class Api::V1::Apps::CredentialsController < Api::BaseController def show return doorkeeper_render_error unless valid_doorkeeper_token? - render json: doorkeeper_token.application, serializer: REST::ApplicationSerializer, fields: %i(name website vapid_key client_id scopes) + render json: doorkeeper_token.application, serializer: REST::ApplicationSerializer end end diff --git a/app/controllers/api/v1/apps_controller.rb b/app/controllers/api/v1/apps_controller.rb index 97177547a2b9ae..50feaf185470fa 100644 --- a/app/controllers/api/v1/apps_controller.rb +++ b/app/controllers/api/v1/apps_controller.rb @@ -5,7 +5,7 @@ class Api::V1::AppsController < Api::BaseController def create @app = Doorkeeper::Application.create!(application_options) - render json: @app, serializer: REST::ApplicationSerializer + render json: @app, serializer: REST::CredentialApplicationSerializer end private @@ -24,6 +24,6 @@ def app_scopes_or_default end def app_params - params.permit(:client_name, :redirect_uris, :scopes, :website) + params.permit(:client_name, :scopes, :website, :redirect_uris, redirect_uris: []) end end diff --git a/app/lib/application_extension.rb b/app/lib/application_extension.rb index 400c51a023d09b..2fea1057cb6db3 100644 --- a/app/lib/application_extension.rb +++ b/app/lib/application_extension.rb @@ -23,6 +23,12 @@ def confirmation_redirect_uri redirect_uri.lines.first.strip end + def redirect_uris + # Doorkeeper stores the redirect_uri value as a newline delimeted list in + # the database: + redirect_uri.split + end + def push_to_streaming_api # TODO: #28793 Combine into a single topic payload = Oj.dump(event: :kill) diff --git a/app/serializers/rest/application_serializer.rb b/app/serializers/rest/application_serializer.rb index 635508a17cbe64..1a7b9265f192f2 100644 --- a/app/serializers/rest/application_serializer.rb +++ b/app/serializers/rest/application_serializer.rb @@ -1,24 +1,18 @@ # frozen_string_literal: true class REST::ApplicationSerializer < ActiveModel::Serializer - attributes :id, :name, :website, :scopes, :redirect_uri, - :client_id, :client_secret + attributes :id, :name, :website, :scopes, :redirect_uris # NOTE: Deprecated in 4.3.0, needs to be removed in 5.0.0 attribute :vapid_key + # We should consider this property deprecated for 4.3.0 + attribute :redirect_uri + def id object.id.to_s end - def client_id - object.uid - end - - def client_secret - object.secret - end - def website object.website.presence end diff --git a/app/serializers/rest/credential_application_serializer.rb b/app/serializers/rest/credential_application_serializer.rb new file mode 100644 index 00000000000000..bfec7d03e80afa --- /dev/null +++ b/app/serializers/rest/credential_application_serializer.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class REST::CredentialApplicationSerializer < REST::ApplicationSerializer + attributes :client_id, :client_secret + + def client_id + object.uid + end + + def client_secret + object.secret + end +end diff --git a/spec/requests/api/v1/apps/credentials_spec.rb b/spec/requests/api/v1/apps/credentials_spec.rb index e1455fe799a068..6e6970ce53f03d 100644 --- a/spec/requests/api/v1/apps/credentials_spec.rb +++ b/spec/requests/api/v1/apps/credentials_spec.rb @@ -20,14 +20,26 @@ expect(body_as_json).to match( a_hash_including( + id: token.application.id.to_s, name: token.application.name, website: token.application.website, - vapid_key: Rails.configuration.x.vapid_public_key, scopes: token.application.scopes.map(&:to_s), - client_id: token.application.uid + redirect_uris: token.application.redirect_uris, + # Deprecated properties as of 4.3: + redirect_uri: token.application.redirect_uri.split.first, + vapid_key: Rails.configuration.x.vapid_public_key ) ) end + + it 'does not expose the client_id or client_secret' do + subject + + expect(response).to have_http_status(200) + + expect(body_as_json[:client_id]).to_not be_present + expect(body_as_json[:client_secret]).to_not be_present + end end context 'with a non-read scoped oauth token' do @@ -46,11 +58,14 @@ expect(body_as_json).to match( a_hash_including( + id: token.application.id.to_s, name: token.application.name, website: token.application.website, - vapid_key: Rails.configuration.x.vapid_public_key, scopes: token.application.scopes.map(&:to_s), - client_id: token.application.uid + redirect_uris: token.application.redirect_uris, + # Deprecated properties as of 4.3: + redirect_uri: token.application.redirect_uri.split.first, + vapid_key: Rails.configuration.x.vapid_public_key ) ) end diff --git a/spec/requests/api/v1/apps_spec.rb b/spec/requests/api/v1/apps_spec.rb index acabbc93f0bbd3..1f01bddf3caed2 100644 --- a/spec/requests/api/v1/apps_spec.rb +++ b/spec/requests/api/v1/apps_spec.rb @@ -9,8 +9,9 @@ end let(:client_name) { 'Test app' } - let(:scopes) { nil } - let(:redirect_uris) { 'urn:ietf:wg:oauth:2.0:oob' } + let(:scopes) { 'read write' } + let(:redirect_uri) { 'urn:ietf:wg:oauth:2.0:oob' } + let(:redirect_uris) { [redirect_uri] } let(:website) { nil } let(:params) do @@ -26,13 +27,63 @@ it 'creates an OAuth app', :aggregate_failures do subject + expect(response).to have_http_status(200) + + app = Doorkeeper::Application.find_by(name: client_name) + + expect(app).to be_present + expect(app.scopes.to_s).to eq scopes + expect(app.redirect_uris).to eq redirect_uris + + expect(body_as_json).to match( + a_hash_including( + id: app.id.to_s, + client_id: app.uid, + client_secret: app.secret, + name: client_name, + website: website, + scopes: ['read', 'write'], + redirect_uris: redirect_uris, + # Deprecated properties as of 4.3: + redirect_uri: redirect_uri, + vapid_key: Rails.configuration.x.vapid_public_key + ) + ) + end + end + + context 'without scopes being supplied' do + let(:scopes) { nil } + + it 'creates an OAuth App with the default scope' do + subject + expect(response).to have_http_status(200) expect(Doorkeeper::Application.find_by(name: client_name)).to be_present body = body_as_json - expect(body[:client_id]).to be_present - expect(body[:client_secret]).to be_present + expect(body[:scopes]).to eq Doorkeeper.config.default_scopes.to_a + end + end + + # FIXME: This is a bug: https://github.com/mastodon/mastodon/issues/30152 + context 'with scopes as an array' do + let(:scopes) { %w(read write follow) } + + it 'creates an OAuth App with the default scope' do + subject + + expect(response).to have_http_status(200) + + app = Doorkeeper::Application.find_by(name: client_name) + + expect(app).to be_present + expect(app.scopes.to_s).to eq 'read' + + body = body_as_json + + expect(body[:scopes]).to eq ['read'] end end @@ -77,8 +128,8 @@ end end - context 'with a too-long redirect_uris' do - let(:redirect_uris) { "https://foo.bar/#{'hoge' * 2_000}" } + context 'with a too-long redirect_uri' do + let(:redirect_uris) { "https://app.example/#{'hoge' * 2_000}" } it 'returns http unprocessable entity' do subject @@ -87,8 +138,80 @@ end end - context 'without required params' do - let(:client_name) { '' } + # NOTE: This spec currently tests the same as the "with a too-long redirect_uri test case" + context 'with too many redirect_uris' do + let(:redirect_uris) { (0...500).map { |i| "https://app.example/#{i}/callback" } } + + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) + end + end + + context 'with multiple redirect_uris as a string' do + let(:redirect_uris) { "https://redirect1.example/\napp://redirect2.example/" } + + it 'creates an OAuth application with multiple redirect URIs' do + subject + + expect(response).to have_http_status(200) + + app = Doorkeeper::Application.find_by(name: client_name) + + expect(app).to be_present + expect(app.redirect_uri).to eq redirect_uris + expect(app.redirect_uris).to eq redirect_uris.split + + body = body_as_json + + expect(body[:redirect_uri]).to eq redirect_uris + expect(body[:redirect_uris]).to eq redirect_uris.split + end + end + + context 'with multiple redirect_uris as an array' do + let(:redirect_uris) { ['https://redirect1.example/', 'app://redirect2.example/'] } + + it 'creates an OAuth application with multiple redirect URIs' do + subject + + expect(response).to have_http_status(200) + + app = Doorkeeper::Application.find_by(name: client_name) + + expect(app).to be_present + expect(app.redirect_uri).to eq redirect_uris.join "\n" + expect(app.redirect_uris).to eq redirect_uris + + body = body_as_json + + expect(body[:redirect_uri]).to eq redirect_uris.join "\n" + expect(body[:redirect_uris]).to eq redirect_uris + end + end + + context 'with an empty redirect_uris array' do + let(:redirect_uris) { [] } + + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) + end + end + + context 'with just a newline as the redirect_uris string' do + let(:redirect_uris) { "\n" } + + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) + end + end + + context 'with an empty redirect_uris string' do let(:redirect_uris) { '' } it 'returns http unprocessable entity' do @@ -97,5 +220,30 @@ expect(response).to have_http_status(422) end end + + context 'without a required param' do + let(:client_name) { '' } + + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) + end + end + + context 'with a website' do + let(:website) { 'https://app.example/' } + + it 'creates an OAuth application with the website specified' do + subject + + expect(response).to have_http_status(200) + + app = Doorkeeper::Application.find_by(name: client_name) + + expect(app).to be_present + expect(app.website).to eq website + end + end end end From 6282b6da7753b0feaafd9d15e12bbc8dd6958c8f Mon Sep 17 00:00:00 2001 From: Joshua Byrd Date: Mon, 20 May 2024 02:30:05 +1000 Subject: [PATCH 080/113] Fix og:image requests when html in a web page is over 1.megabyte (#30362) --- app/services/fetch_link_card_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index c6b600dd7cd6bf..36e866b6ce9b8a 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -56,7 +56,7 @@ def html @html_charset = res.charset - res.body_with_limit + res.truncated_body end end From a178ba7cd5fa10b018ecaf3c8e3dd5f298a08818 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Sun, 19 May 2024 19:07:32 +0200 Subject: [PATCH 081/113] Use a modern React context for identity in the app (#30098) --- .../mastodon/components/column_header.jsx | 12 ++- app/javascript/mastodon/components/poll.jsx | 11 +-- .../mastodon/components/status_action_bar.jsx | 17 ++--- .../mastodon/components/status_content.jsx | 12 ++- .../mastodon/containers/mastodon.jsx | 54 ++++---------- .../features/account/components/header.jsx | 10 +-- .../features/community_timeline/index.jsx | 13 ++-- .../features/compose/components/search.jsx | 13 ++-- .../mastodon/features/explore/index.jsx | 11 +-- .../mastodon/features/firehose/index.jsx | 12 +-- .../features/getting_started/index.jsx | 13 ++-- .../features/hashtag_timeline/index.jsx | 15 ++-- .../mastodon/features/home_timeline/index.jsx | 11 +-- .../components/column_settings.jsx | 15 ++-- .../mastodon/features/notifications/index.jsx | 11 +-- .../picture_in_picture/components/footer.jsx | 15 ++-- .../features/public_timeline/index.jsx | 13 ++-- .../features/status/components/action_bar.jsx | 11 +-- .../mastodon/features/status/index.jsx | 15 ++-- .../features/ui/components/compose_panel.jsx | 11 +-- .../features/ui/components/header.jsx | 11 +-- .../features/ui/components/link_footer.jsx | 11 +-- .../ui/components/navigation_panel.jsx | 11 +-- app/javascript/mastodon/features/ui/index.jsx | 25 +++---- app/javascript/mastodon/identity_context.tsx | 74 +++++++++++++++++++ app/javascript/mastodon/initial_state.js | 10 +++ 26 files changed, 213 insertions(+), 224 deletions(-) create mode 100644 app/javascript/mastodon/identity_context.tsx diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index a7d07ffdb07108..42183f336dbd5b 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -14,8 +14,10 @@ import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import SettingsIcon from '@/material-icons/400-24px/settings.svg?react'; import { Icon } from 'mastodon/components/icon'; import { ButtonInTabsBar } from 'mastodon/features/ui/util/columns_context'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; + import { useAppHistory } from './router'; const messages = defineMessages({ @@ -51,12 +53,8 @@ BackButton.propTypes = { }; class ColumnHeader extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, intl: PropTypes.object.isRequired, title: PropTypes.node, icon: PropTypes.string, @@ -171,7 +169,7 @@ class ColumnHeader extends PureComponent { ); } - if (this.context.identity.signedIn && (children || (multiColumn && this.props.onPin))) { + if (this.props.identity.signedIn && (children || (multiColumn && this.props.onPin))) { collapseButton = ( } + {!showResults && } {!showResults && <> · } {showResults && !this.props.disabled && <> · } {votesCount} @@ -247,4 +244,4 @@ class Poll extends ImmutablePureComponent { } -export default injectIntl(Poll); +export default injectIntl(withIdentity(Poll)); diff --git a/app/javascript/mastodon/components/status_action_bar.jsx b/app/javascript/mastodon/components/status_action_bar.jsx index 6def49fdbba90c..c79eae8460c661 100644 --- a/app/javascript/mastodon/components/status_action_bar.jsx +++ b/app/javascript/mastodon/components/status_action_bar.jsx @@ -22,6 +22,7 @@ import RepeatActiveIcon from '@/svg-icons/repeat_active.svg?react'; import RepeatDisabledIcon from '@/svg-icons/repeat_disabled.svg?react'; import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg?react'; import RepeatPrivateActiveIcon from '@/svg-icons/repeat_private_active.svg?react'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -74,12 +75,8 @@ const mapStateToProps = (state, { status }) => ({ }); class StatusActionBar extends ImmutablePureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, status: ImmutablePropTypes.map.isRequired, relationship: ImmutablePropTypes.record, onReply: PropTypes.func, @@ -118,7 +115,7 @@ class StatusActionBar extends ImmutablePureComponent { ]; handleReplyClick = () => { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { this.props.onReply(this.props.status, this.props.history); @@ -136,7 +133,7 @@ class StatusActionBar extends ImmutablePureComponent { }; handleFavouriteClick = () => { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { this.props.onFavourite(this.props.status); @@ -146,7 +143,7 @@ class StatusActionBar extends ImmutablePureComponent { }; handleReblogClick = e => { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { this.props.onReblog(this.props.status, e); @@ -250,7 +247,7 @@ class StatusActionBar extends ImmutablePureComponent { render () { const { status, relationship, intl, withDismiss, withCounters, scrollKey } = this.props; - const { signedIn, permissions } = this.context.identity; + const { signedIn, permissions } = this.props.identity; const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); const pinnableStatus = ['public', 'unlisted', 'private'].includes(status.get('visibility')); @@ -410,4 +407,4 @@ class StatusActionBar extends ImmutablePureComponent { } -export default withRouter(connect(mapStateToProps)(injectIntl(StatusActionBar))); +export default withRouter(withIdentity(connect(mapStateToProps)(injectIntl(StatusActionBar)))); diff --git a/app/javascript/mastodon/components/status_content.jsx b/app/javascript/mastodon/components/status_content.jsx index 4a7ba941eb6297..24483cf512819e 100644 --- a/app/javascript/mastodon/components/status_content.jsx +++ b/app/javascript/mastodon/components/status_content.jsx @@ -12,8 +12,10 @@ import { connect } from 'react-redux'; import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react'; import { Icon } from 'mastodon/components/icon'; import PollContainer from 'mastodon/containers/poll_container'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { autoPlayGif, languages as preloadedLanguages } from 'mastodon/initial_state'; + const MAX_HEIGHT = 706; // 22px * 32 (+ 2px padding at the top) /** @@ -67,12 +69,8 @@ const mapStateToProps = state => ({ }); class StatusContent extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, status: ImmutablePropTypes.map.isRequired, statusContent: PropTypes.string, expanded: PropTypes.bool, @@ -245,7 +243,7 @@ class StatusContent extends PureComponent { const renderReadMore = this.props.onClick && status.get('collapsed'); const contentLocale = intl.locale.replace(/[_-].*/, ''); const targetLanguages = this.props.languages?.get(status.get('language') || 'und'); - const renderTranslate = this.props.onTranslate && this.context.identity.signedIn && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('search_index').trim().length > 0 && targetLanguages?.includes(contentLocale); + const renderTranslate = this.props.onTranslate && this.props.identity.signedIn && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('search_index').trim().length > 0 && targetLanguages?.includes(contentLocale); const content = { __html: statusContent ?? getStatusContent(status) }; const spoilerContent = { __html: status.getIn(['translation', 'spoilerHtml']) || status.get('spoilerHtml') }; @@ -328,4 +326,4 @@ class StatusContent extends PureComponent { } -export default withRouter(connect(mapStateToProps)(injectIntl(StatusContent))); +export default withRouter(withIdentity(connect(mapStateToProps)(injectIntl(StatusContent)))); diff --git a/app/javascript/mastodon/containers/mastodon.jsx b/app/javascript/mastodon/containers/mastodon.jsx index 87708da191bb56..0b1255c3364c4b 100644 --- a/app/javascript/mastodon/containers/mastodon.jsx +++ b/app/javascript/mastodon/containers/mastodon.jsx @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { Helmet } from 'react-helmet'; @@ -14,6 +13,7 @@ import { connectUserStream } from 'mastodon/actions/streaming'; import ErrorBoundary from 'mastodon/components/error_boundary'; import { Router } from 'mastodon/components/router'; import UI from 'mastodon/features/ui'; +import { IdentityContext, createIdentityContext } from 'mastodon/identity_context'; import initialState, { title as siteTitle } from 'mastodon/initial_state'; import { IntlProvider } from 'mastodon/locales'; import { store } from 'mastodon/store'; @@ -28,33 +28,9 @@ if (initialState.meta.me) { store.dispatch(fetchCustomEmojis()); } -const createIdentityContext = state => ({ - signedIn: !!state.meta.me, - accountId: state.meta.me, - disabledAccountId: state.meta.disabled_account_id, - accessToken: state.meta.access_token, - permissions: state.role ? state.role.permissions : 0, -}); - export default class Mastodon extends PureComponent { - - static childContextTypes = { - identity: PropTypes.shape({ - signedIn: PropTypes.bool.isRequired, - accountId: PropTypes.string, - disabledAccountId: PropTypes.string, - accessToken: PropTypes.string, - }).isRequired, - }; - identity = createIdentityContext(initialState); - getChildContext() { - return { - identity: this.identity, - }; - } - componentDidMount() { if (this.identity.signedIn) { this.disconnect = store.dispatch(connectUserStream()); @@ -74,19 +50,21 @@ export default class Mastodon extends PureComponent { render () { return ( - - - - - - - - - - - - - + + + + + + + + + + + + + + + ); } diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index e9d6071a21f80b..b10ef6ef760e03 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -25,6 +25,7 @@ import { IconButton } from 'mastodon/components/icon_button'; import { LoadingIndicator } from 'mastodon/components/loading_indicator'; import { ShortNumber } from 'mastodon/components/short_number'; import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { autoPlayGif, me, domain as localDomain } from 'mastodon/initial_state'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -111,6 +112,7 @@ const dateFormatOptions = { class Header extends ImmutablePureComponent { static propTypes = { + identity: identityContextPropShape, account: ImmutablePropTypes.record, identity_props: ImmutablePropTypes.list, onFollow: PropTypes.func.isRequired, @@ -136,10 +138,6 @@ class Header extends ImmutablePureComponent { ...WithRouterPropTypes, }; - static contextTypes = { - identity: PropTypes.object, - }; - setRef = c => { this.node = c; }; @@ -255,7 +253,7 @@ class Header extends ImmutablePureComponent { render () { const { account, hidden, intl } = this.props; - const { signedIn, permissions } = this.context.identity; + const { signedIn, permissions } = this.props.identity; if (!account) { return null; @@ -516,4 +514,4 @@ class Header extends ImmutablePureComponent { } -export default withRouter(injectIntl(Header)); +export default withRouter(withIdentity(injectIntl(Header))); diff --git a/app/javascript/mastodon/features/community_timeline/index.jsx b/app/javascript/mastodon/features/community_timeline/index.jsx index 0aa1f9aa23a22a..5652ea5327980c 100644 --- a/app/javascript/mastodon/features/community_timeline/index.jsx +++ b/app/javascript/mastodon/features/community_timeline/index.jsx @@ -9,6 +9,7 @@ import { connect } from 'react-redux'; import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; import { DismissableBanner } from 'mastodon/components/dismissable_banner'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { domain } from 'mastodon/initial_state'; import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; @@ -38,16 +39,12 @@ const mapStateToProps = (state, { columnId }) => { }; class CommunityTimeline extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static defaultProps = { onlyMedia: false, }; static propTypes = { + identity: identityContextPropShape, dispatch: PropTypes.func.isRequired, columnId: PropTypes.string, intl: PropTypes.object.isRequired, @@ -77,7 +74,7 @@ class CommunityTimeline extends PureComponent { componentDidMount () { const { dispatch, onlyMedia } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; dispatch(expandCommunityTimeline({ onlyMedia })); @@ -87,7 +84,7 @@ class CommunityTimeline extends PureComponent { } componentDidUpdate (prevProps) { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (prevProps.onlyMedia !== this.props.onlyMedia) { const { dispatch, onlyMedia } = this.props; @@ -161,4 +158,4 @@ class CommunityTimeline extends PureComponent { } -export default connect(mapStateToProps)(injectIntl(CommunityTimeline)); +export default withIdentity(connect(mapStateToProps)(injectIntl(CommunityTimeline))); diff --git a/app/javascript/mastodon/features/compose/components/search.jsx b/app/javascript/mastodon/features/compose/components/search.jsx index ca02c23fc4ec43..7fa7ad248bbf74 100644 --- a/app/javascript/mastodon/features/compose/components/search.jsx +++ b/app/javascript/mastodon/features/compose/components/search.jsx @@ -12,6 +12,7 @@ import CancelIcon from '@/material-icons/400-24px/cancel-fill.svg?react'; import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import { Icon } from 'mastodon/components/icon'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { domain, searchEnabled } from 'mastodon/initial_state'; import { HASHTAG_REGEX } from 'mastodon/utils/hashtags'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -33,12 +34,8 @@ const labelForRecentSearch = search => { }; class Search extends PureComponent { - - static contextTypes = { - identity: PropTypes.object.isRequired, - }; - static propTypes = { + identity: identityContextPropShape, value: PropTypes.string.isRequired, recent: ImmutablePropTypes.orderedSet, submitted: PropTypes.bool, @@ -276,7 +273,7 @@ class Search extends PureComponent { } _calculateOptions (value) { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; const trimmedValue = value.trim(); const options = []; @@ -318,7 +315,7 @@ class Search extends PureComponent { render () { const { intl, value, submitted, recent } = this.props; const { expanded, options, selectedOption } = this.state; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; const hasValue = value.length > 0 || submitted; @@ -402,4 +399,4 @@ class Search extends PureComponent { } -export default withRouter(injectIntl(Search)); +export default withRouter(withIdentity(injectIntl(Search))); diff --git a/app/javascript/mastodon/features/explore/index.jsx b/app/javascript/mastodon/features/explore/index.jsx index d77aec7013e5e9..83e5df22f85ede 100644 --- a/app/javascript/mastodon/features/explore/index.jsx +++ b/app/javascript/mastodon/features/explore/index.jsx @@ -13,6 +13,7 @@ import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; import Search from 'mastodon/features/compose/containers/search_container'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { trendsEnabled } from 'mastodon/initial_state'; import Links from './links'; @@ -32,12 +33,8 @@ const mapStateToProps = state => ({ }); class Explore extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, intl: PropTypes.object.isRequired, multiColumn: PropTypes.bool, isSearching: PropTypes.bool, @@ -53,7 +50,7 @@ class Explore extends PureComponent { render() { const { intl, multiColumn, isSearching } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; return ( @@ -114,4 +111,4 @@ class Explore extends PureComponent { } -export default connect(mapStateToProps)(injectIntl(Explore)); +export default withIdentity(connect(mapStateToProps)(injectIntl(Explore))); diff --git a/app/javascript/mastodon/features/firehose/index.jsx b/app/javascript/mastodon/features/firehose/index.jsx index c65fe48eace9f9..f65bee45eca1e0 100644 --- a/app/javascript/mastodon/features/firehose/index.jsx +++ b/app/javascript/mastodon/features/firehose/index.jsx @@ -6,13 +6,14 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl'; import { Helmet } from 'react-helmet'; import { NavLink } from 'react-router-dom'; +import { useIdentity } from '@/mastodon/identity_context'; import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import { addColumn } from 'mastodon/actions/columns'; import { changeSetting } from 'mastodon/actions/settings'; import { connectPublicStream, connectCommunityStream } from 'mastodon/actions/streaming'; import { expandPublicTimeline, expandCommunityTimeline } from 'mastodon/actions/timelines'; import { DismissableBanner } from 'mastodon/components/dismissable_banner'; -import initialState, { domain } from 'mastodon/initial_state'; +import { domain } from 'mastodon/initial_state'; import { useAppDispatch, useAppSelector } from 'mastodon/store'; import Column from '../../components/column'; @@ -24,15 +25,6 @@ const messages = defineMessages({ title: { id: 'column.firehose', defaultMessage: 'Live feeds' }, }); -// TODO: use a proper React context later on -const useIdentity = () => ({ - signedIn: !!initialState.meta.me, - accountId: initialState.meta.me, - disabledAccountId: initialState.meta.disabled_account_id, - accessToken: initialState.meta.access_token, - permissions: initialState.role ? initialState.role.permissions : 0, -}); - const ColumnSettings = () => { const dispatch = useAppDispatch(); const settings = useAppSelector((state) => state.getIn(['settings', 'firehose'])); diff --git a/app/javascript/mastodon/features/getting_started/index.jsx b/app/javascript/mastodon/features/getting_started/index.jsx index db6e0f6ecd4e40..628bbe62bbf1aa 100644 --- a/app/javascript/mastodon/features/getting_started/index.jsx +++ b/app/javascript/mastodon/features/getting_started/index.jsx @@ -24,6 +24,7 @@ import { fetchFollowRequests } from 'mastodon/actions/accounts'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; import LinkFooter from 'mastodon/features/ui/components/link_footer'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { me, showTrends } from '../../initial_state'; import { NavigationBar } from '../compose/components/navigation_bar'; @@ -75,12 +76,8 @@ const badgeDisplay = (number, limit) => { }; class GettingStarted extends ImmutablePureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, intl: PropTypes.object.isRequired, myAccount: ImmutablePropTypes.record, multiColumn: PropTypes.bool, @@ -91,7 +88,7 @@ class GettingStarted extends ImmutablePureComponent { componentDidMount () { const { fetchFollowRequests } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (!signedIn) { return; @@ -102,7 +99,7 @@ class GettingStarted extends ImmutablePureComponent { render () { const { intl, myAccount, multiColumn, unreadFollowRequests } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; const navItems = []; @@ -167,4 +164,4 @@ class GettingStarted extends ImmutablePureComponent { } -export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(GettingStarted)); +export default withIdentity(connect(mapStateToProps, mapDispatchToProps)(injectIntl(GettingStarted))); diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.jsx b/app/javascript/mastodon/features/hashtag_timeline/index.jsx index f431a7e9b72130..42a668859e0f3c 100644 --- a/app/javascript/mastodon/features/hashtag_timeline/index.jsx +++ b/app/javascript/mastodon/features/hashtag_timeline/index.jsx @@ -17,6 +17,7 @@ import { fetchHashtag, followHashtag, unfollowHashtag } from 'mastodon/actions/t import { expandHashtagTimeline, clearTimeline } from 'mastodon/actions/timelines'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import StatusListContainer from '../ui/containers/status_list_container'; @@ -29,14 +30,10 @@ const mapStateToProps = (state, props) => ({ }); class HashtagTimeline extends PureComponent { - disconnects = []; - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, params: PropTypes.object.isRequired, columnId: PropTypes.string, dispatch: PropTypes.func.isRequired, @@ -94,7 +91,7 @@ class HashtagTimeline extends PureComponent { }; _subscribe (dispatch, id, tags = {}, local) { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (!signedIn) { return; @@ -168,7 +165,7 @@ class HashtagTimeline extends PureComponent { handleFollow = () => { const { dispatch, params, tag } = this.props; const { id } = params; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (!signedIn) { return; @@ -185,7 +182,7 @@ class HashtagTimeline extends PureComponent { const { hasUnread, columnId, multiColumn, tag } = this.props; const { id, local } = this.props.params; const pinned = !!columnId; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; return ( @@ -225,4 +222,4 @@ class HashtagTimeline extends PureComponent { } -export default connect(mapStateToProps)(HashtagTimeline); +export default connect(mapStateToProps)(withIdentity(HashtagTimeline)); diff --git a/app/javascript/mastodon/features/home_timeline/index.jsx b/app/javascript/mastodon/features/home_timeline/index.jsx index 6e7dc2b6c8c8a7..00b5835a161e92 100644 --- a/app/javascript/mastodon/features/home_timeline/index.jsx +++ b/app/javascript/mastodon/features/home_timeline/index.jsx @@ -14,6 +14,7 @@ import { fetchAnnouncements, toggleShowAnnouncements } from 'mastodon/actions/an import { IconWithBadge } from 'mastodon/components/icon_with_badge'; import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator'; import AnnouncementsContainer from 'mastodon/features/getting_started/containers/announcements_container'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { criticalUpdatesPending } from 'mastodon/initial_state'; import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; @@ -40,12 +41,8 @@ const mapStateToProps = state => ({ }); class HomeTimeline extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, dispatch: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, hasUnread: PropTypes.bool, @@ -126,7 +123,7 @@ class HomeTimeline extends PureComponent { render () { const { intl, hasUnread, columnId, multiColumn, hasAnnouncements, unreadAnnouncements, showAnnouncements } = this.props; const pinned = !!columnId; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; const banners = []; let announcementsButton; @@ -190,4 +187,4 @@ class HomeTimeline extends PureComponent { } -export default connect(mapStateToProps)(injectIntl(HomeTimeline)); +export default connect(mapStateToProps)(withIdentity(injectIntl(HomeTimeline))); diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.jsx b/app/javascript/mastodon/features/notifications/components/column_settings.jsx index fc737c0fe20556..e375b856c92e70 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.jsx +++ b/app/javascript/mastodon/features/notifications/components/column_settings.jsx @@ -5,6 +5,7 @@ import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_REPORTS } from 'mastodon/permissions'; import { CheckboxWithLabel } from './checkbox_with_label'; @@ -12,13 +13,9 @@ import ClearColumnButton from './clear_column_button'; import GrantPermissionButton from './grant_permission_button'; import SettingToggle from './setting_toggle'; -export default class ColumnSettings extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - +class ColumnSettings extends PureComponent { static propTypes = { + identity: identityContextPropShape, settings: ImmutablePropTypes.map.isRequired, pushSettings: ImmutablePropTypes.map.isRequired, onChange: PropTypes.func.isRequired, @@ -215,7 +212,7 @@ export default class ColumnSettings extends PureComponent { - {((this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) && ( + {((this.props.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) && (

@@ -228,7 +225,7 @@ export default class ColumnSettings extends PureComponent {
)} - {((this.context.identity.permissions & PERMISSION_MANAGE_REPORTS) === PERMISSION_MANAGE_REPORTS) && ( + {((this.props.identity.permissions & PERMISSION_MANAGE_REPORTS) === PERMISSION_MANAGE_REPORTS) && (

@@ -245,3 +242,5 @@ export default class ColumnSettings extends PureComponent { } } + +export default withIdentity(ColumnSettings); diff --git a/app/javascript/mastodon/features/notifications/index.jsx b/app/javascript/mastodon/features/notifications/index.jsx index e062957ff89a19..d45f517152ea16 100644 --- a/app/javascript/mastodon/features/notifications/index.jsx +++ b/app/javascript/mastodon/features/notifications/index.jsx @@ -17,6 +17,7 @@ import NotificationsIcon from '@/material-icons/400-24px/notifications-fill.svg? import { compareId } from 'mastodon/compare_id'; import { Icon } from 'mastodon/components/icon'; import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; import { submitMarkers } from '../../actions/markers'; @@ -77,12 +78,8 @@ const mapStateToProps = state => ({ }); class Notifications extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, columnId: PropTypes.string, notifications: ImmutablePropTypes.list.isRequired, dispatch: PropTypes.func.isRequired, @@ -190,7 +187,7 @@ class Notifications extends PureComponent { const { intl, notifications, isLoading, isUnread, columnId, multiColumn, hasMore, numPending, lastReadId, canMarkAsRead, needsNotificationPermission } = this.props; const pinned = !!columnId; const emptyMessage = ; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; let scrollableContent = null; @@ -299,4 +296,4 @@ class Notifications extends PureComponent { } -export default connect(mapStateToProps)(injectIntl(Notifications)); +export default connect(mapStateToProps)(withIdentity(injectIntl(Notifications))); diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx index 7a163a88258c6b..d6b1b5fa81ac90 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx @@ -18,6 +18,7 @@ import { replyCompose } from 'mastodon/actions/compose'; import { reblog, favourite, unreblog, unfavourite } from 'mastodon/actions/interactions'; import { openModal } from 'mastodon/actions/modal'; import { IconButton } from 'mastodon/components/icon_button'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { me, boostModal } from 'mastodon/initial_state'; import { makeGetStatus } from 'mastodon/selectors'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -47,12 +48,8 @@ const makeMapStateToProps = () => { }; class Footer extends ImmutablePureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, statusId: PropTypes.string.isRequired, status: ImmutablePropTypes.map.isRequired, intl: PropTypes.object.isRequired, @@ -75,7 +72,7 @@ class Footer extends ImmutablePureComponent { handleReplyClick = () => { const { dispatch, askReplyConfirmation, status, intl } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { if (askReplyConfirmation) { @@ -104,7 +101,7 @@ class Footer extends ImmutablePureComponent { handleFavouriteClick = () => { const { dispatch, status } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { if (status.get('favourited')) { @@ -131,7 +128,7 @@ class Footer extends ImmutablePureComponent { handleReblogClick = e => { const { dispatch, status } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { if (status.get('reblogged')) { @@ -209,4 +206,4 @@ class Footer extends ImmutablePureComponent { } -export default connect(makeMapStateToProps)(withRouter(injectIntl(Footer))); +export default connect(makeMapStateToProps)(withIdentity(withRouter(injectIntl(Footer)))); diff --git a/app/javascript/mastodon/features/public_timeline/index.jsx b/app/javascript/mastodon/features/public_timeline/index.jsx index 3601dfeae80a12..91351901f532a1 100644 --- a/app/javascript/mastodon/features/public_timeline/index.jsx +++ b/app/javascript/mastodon/features/public_timeline/index.jsx @@ -9,6 +9,7 @@ import { connect } from 'react-redux'; import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import { DismissableBanner } from 'mastodon/components/dismissable_banner'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { domain } from 'mastodon/initial_state'; import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; @@ -40,16 +41,12 @@ const mapStateToProps = (state, { columnId }) => { }; class PublicTimeline extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static defaultProps = { onlyMedia: false, }; static propTypes = { + identity: identityContextPropShape, dispatch: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, columnId: PropTypes.string, @@ -80,7 +77,7 @@ class PublicTimeline extends PureComponent { componentDidMount () { const { dispatch, onlyMedia, onlyRemote } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; dispatch(expandPublicTimeline({ onlyMedia, onlyRemote })); @@ -90,7 +87,7 @@ class PublicTimeline extends PureComponent { } componentDidUpdate (prevProps) { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (prevProps.onlyMedia !== this.props.onlyMedia || prevProps.onlyRemote !== this.props.onlyRemote) { const { dispatch, onlyMedia, onlyRemote } = this.props; @@ -164,4 +161,4 @@ class PublicTimeline extends PureComponent { } -export default connect(mapStateToProps)(injectIntl(PublicTimeline)); +export default connect(mapStateToProps)(withIdentity(injectIntl(PublicTimeline))); diff --git a/app/javascript/mastodon/features/status/components/action_bar.jsx b/app/javascript/mastodon/features/status/components/action_bar.jsx index 69209e8bd00820..d6105399873cf1 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.jsx +++ b/app/javascript/mastodon/features/status/components/action_bar.jsx @@ -21,6 +21,7 @@ import RepeatActiveIcon from '@/svg-icons/repeat_active.svg?react'; import RepeatDisabledIcon from '@/svg-icons/repeat_disabled.svg?react'; import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg?react'; import RepeatPrivateActiveIcon from '@/svg-icons/repeat_private_active.svg?react'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -67,12 +68,8 @@ const mapStateToProps = (state, { status }) => ({ }); class ActionBar extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, status: ImmutablePropTypes.map.isRequired, relationship: ImmutablePropTypes.record, onReply: PropTypes.func.isRequired, @@ -198,7 +195,7 @@ class ActionBar extends PureComponent { render () { const { status, relationship, intl } = this.props; - const { signedIn, permissions } = this.context.identity; + const { signedIn, permissions } = this.props.identity; const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); const pinnableStatus = ['public', 'unlisted', 'private'].includes(status.get('visibility')); @@ -326,4 +323,4 @@ class ActionBar extends PureComponent { } -export default withRouter(connect(mapStateToProps)(injectIntl(ActionBar))); +export default withRouter(connect(mapStateToProps)(withIdentity(injectIntl(ActionBar)))); diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 39147597255128..3a9bf524f8c62d 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -20,6 +20,7 @@ import { Icon } from 'mastodon/components/icon'; import { LoadingIndicator } from 'mastodon/components/loading_indicator'; import ScrollContainer from 'mastodon/containers/scroll_container'; import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; import { @@ -189,12 +190,8 @@ const titleFromStatus = (intl, status) => { }; class Status extends ImmutablePureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, params: PropTypes.object.isRequired, dispatch: PropTypes.func.isRequired, status: ImmutablePropTypes.map, @@ -244,7 +241,7 @@ class Status extends ImmutablePureComponent { handleFavouriteClick = (status) => { const { dispatch } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { if (status.get('favourited')) { @@ -274,7 +271,7 @@ class Status extends ImmutablePureComponent { handleReplyClick = (status) => { const { askReplyConfirmation, dispatch, intl } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { if (askReplyConfirmation) { @@ -307,7 +304,7 @@ class Status extends ImmutablePureComponent { handleReblogClick = (status, e) => { const { dispatch } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; if (signedIn) { if (status.get('reblogged')) { @@ -745,4 +742,4 @@ class Status extends ImmutablePureComponent { } -export default withRouter(injectIntl(connect(makeMapStateToProps)(Status))); +export default withRouter(injectIntl(connect(makeMapStateToProps)(withIdentity(Status)))); diff --git a/app/javascript/mastodon/features/ui/components/compose_panel.jsx b/app/javascript/mastodon/features/ui/components/compose_panel.jsx index e6ac79bdd93c7c..18321cbe63eaf4 100644 --- a/app/javascript/mastodon/features/ui/components/compose_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/compose_panel.jsx @@ -7,16 +7,13 @@ import { changeComposing, mountCompose, unmountCompose } from 'mastodon/actions/ import ServerBanner from 'mastodon/components/server_banner'; import ComposeFormContainer from 'mastodon/features/compose/containers/compose_form_container'; import SearchContainer from 'mastodon/features/compose/containers/search_container'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import LinkFooter from './link_footer'; class ComposePanel extends PureComponent { - - static contextTypes = { - identity: PropTypes.object.isRequired, - }; - static propTypes = { + identity: identityContextPropShape, dispatch: PropTypes.func.isRequired, }; @@ -41,7 +38,7 @@ class ComposePanel extends PureComponent { } render() { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; return (
@@ -65,4 +62,4 @@ class ComposePanel extends PureComponent { } -export default connect()(ComposePanel); +export default connect()(withIdentity(ComposePanel)); diff --git a/app/javascript/mastodon/features/ui/components/header.jsx b/app/javascript/mastodon/features/ui/components/header.jsx index 2f8636b12a0e99..19c76c722b1238 100644 --- a/app/javascript/mastodon/features/ui/components/header.jsx +++ b/app/javascript/mastodon/features/ui/components/header.jsx @@ -13,6 +13,7 @@ import { fetchServer } from 'mastodon/actions/server'; import { Avatar } from 'mastodon/components/avatar'; import { Icon } from 'mastodon/components/icon'; import { WordmarkLogo, SymbolLogo } from 'mastodon/components/logo'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { registrationsOpen, me, sso_redirect } from 'mastodon/initial_state'; const Account = connect(state => ({ @@ -41,12 +42,8 @@ const mapDispatchToProps = (dispatch) => ({ }); class Header extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, openClosedRegistrationsModal: PropTypes.func, location: PropTypes.object, signupUrl: PropTypes.string.isRequired, @@ -60,7 +57,7 @@ class Header extends PureComponent { } render () { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; const { location, openClosedRegistrationsModal, signupUrl, intl } = this.props; let content; @@ -121,4 +118,4 @@ class Header extends PureComponent { } -export default injectIntl(withRouter(connect(mapStateToProps, mapDispatchToProps)(Header))); +export default injectIntl(withRouter(withIdentity(connect(mapStateToProps, mapDispatchToProps)(Header)))); diff --git a/app/javascript/mastodon/features/ui/components/link_footer.jsx b/app/javascript/mastodon/features/ui/components/link_footer.jsx index 6b1555243b7668..08af6fa4442658 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.jsx +++ b/app/javascript/mastodon/features/ui/components/link_footer.jsx @@ -8,6 +8,7 @@ import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import { openModal } from 'mastodon/actions/modal'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'mastodon/initial_state'; import { PERMISSION_INVITE_USERS } from 'mastodon/permissions'; import { logOut } from 'mastodon/utils/log_out'; @@ -32,12 +33,8 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ }); class LinkFooter extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, multiColumn: PropTypes.bool, onLogout: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, @@ -53,7 +50,7 @@ class LinkFooter extends PureComponent { }; render () { - const { signedIn, permissions } = this.context.identity; + const { signedIn, permissions } = this.props.identity; const { multiColumn } = this.props; const canInvite = signedIn && ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS); @@ -108,4 +105,4 @@ class LinkFooter extends PureComponent { } -export default injectIntl(connect(null, mapDispatchToProps)(LinkFooter)); +export default injectIntl(withIdentity(connect(null, mapDispatchToProps)(LinkFooter))); diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx index 14a1933436a181..ff90eef359fb6d 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx @@ -31,6 +31,7 @@ import { fetchFollowRequests } from 'mastodon/actions/accounts'; import { IconWithBadge } from 'mastodon/components/icon_with_badge'; import { WordmarkLogo } from 'mastodon/components/logo'; import { NavigationPortal } from 'mastodon/components/navigation_portal'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { timelinePreview, trendsEnabled } from 'mastodon/initial_state'; import { transientSingleColumn } from 'mastodon/is_mobile'; @@ -97,12 +98,8 @@ const FollowRequestsLink = () => { }; class NavigationPanel extends Component { - - static contextTypes = { - identity: PropTypes.object.isRequired, - }; - static propTypes = { + identity: identityContextPropShape, intl: PropTypes.object.isRequired, }; @@ -112,7 +109,7 @@ class NavigationPanel extends Component { render () { const { intl } = this.props; - const { signedIn, disabledAccountId } = this.context.identity; + const { signedIn, disabledAccountId } = this.props.identity; let banner = undefined; @@ -189,4 +186,4 @@ class NavigationPanel extends Component { } -export default injectIntl(NavigationPanel); +export default injectIntl(withIdentity(NavigationPanel)); diff --git a/app/javascript/mastodon/features/ui/index.jsx b/app/javascript/mastodon/features/ui/index.jsx index c84a2c51a46e3e..7742f64860de2e 100644 --- a/app/javascript/mastodon/features/ui/index.jsx +++ b/app/javascript/mastodon/features/ui/index.jsx @@ -15,6 +15,7 @@ import { focusApp, unfocusApp, changeLayout } from 'mastodon/actions/app'; import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'mastodon/actions/markers'; import { INTRODUCTION_VERSION } from 'mastodon/actions/onboarding'; import { PictureInPicture } from 'mastodon/features/picture_in_picture'; +import { identityContextPropShape, withIdentity } from 'mastodon/identity_context'; import { layoutFromWindow } from 'mastodon/is_mobile'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -120,12 +121,8 @@ const keyMap = { }; class SwitchingColumnsArea extends PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - static propTypes = { + identity: identityContextPropShape, children: PropTypes.node, location: PropTypes.object, singleColumn: PropTypes.bool, @@ -160,7 +157,7 @@ class SwitchingColumnsArea extends PureComponent { render () { const { children, singleColumn } = this.props; - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; const pathName = this.props.location.pathname; let redirect; @@ -252,12 +249,8 @@ class SwitchingColumnsArea extends PureComponent { } class UI extends PureComponent { - - static contextTypes = { - identity: PropTypes.object.isRequired, - }; - static propTypes = { + identity: identityContextPropShape, dispatch: PropTypes.func.isRequired, children: PropTypes.node, isComposing: PropTypes.bool, @@ -309,7 +302,7 @@ class UI extends PureComponent { this.dragTargets.push(e.target); } - if (e.dataTransfer && Array.from(e.dataTransfer.types).includes('Files') && this.props.canUploadMore && this.context.identity.signedIn) { + if (e.dataTransfer && Array.from(e.dataTransfer.types).includes('Files') && this.props.canUploadMore && this.props.identity.signedIn) { this.setState({ draggingOver: true }); } }; @@ -337,7 +330,7 @@ class UI extends PureComponent { this.setState({ draggingOver: false }); this.dragTargets = []; - if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore && this.context.identity.signedIn) { + if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore && this.props.identity.signedIn) { this.props.dispatch(uploadCompose(e.dataTransfer.files)); } }; @@ -389,7 +382,7 @@ class UI extends PureComponent { }; componentDidMount () { - const { signedIn } = this.context.identity; + const { signedIn } = this.props.identity; window.addEventListener('focus', this.handleWindowFocus, false); window.addEventListener('blur', this.handleWindowBlur, false); @@ -586,7 +579,7 @@ class UI extends PureComponent {
- + {children} @@ -602,4 +595,4 @@ class UI extends PureComponent { } -export default connect(mapStateToProps)(injectIntl(withRouter(UI))); +export default connect(mapStateToProps)(injectIntl(withRouter(withIdentity(UI)))); diff --git a/app/javascript/mastodon/identity_context.tsx b/app/javascript/mastodon/identity_context.tsx new file mode 100644 index 00000000000000..564b7895c9b4c1 --- /dev/null +++ b/app/javascript/mastodon/identity_context.tsx @@ -0,0 +1,74 @@ +import PropTypes from 'prop-types'; +import { createContext, useContext } from 'react'; + +import hoistStatics from 'hoist-non-react-statics'; + +import type { InitialState } from 'mastodon/initial_state'; + +export interface IdentityContextType { + signedIn: boolean; + accountId: string | undefined; + disabledAccountId: string | undefined; + accessToken: string | undefined; + permissions: number; +} + +export const identityContextPropShape = PropTypes.shape({ + signedIn: PropTypes.bool.isRequired, + accountId: PropTypes.string, + disabledAccountId: PropTypes.string, + accessToken: PropTypes.string, +}).isRequired; + +export const createIdentityContext = (state: InitialState) => ({ + signedIn: !!state.meta.me, + accountId: state.meta.me, + disabledAccountId: state.meta.disabled_account_id, + accessToken: state.meta.access_token, + permissions: state.role?.permissions ?? 0, +}); + +export const IdentityContext = createContext({ + signedIn: false, + permissions: 0, + accountId: undefined, + disabledAccountId: undefined, + accessToken: undefined, +}); + +export const useIdentity = () => useContext(IdentityContext); + +export interface IdentityProps { + ref?: unknown; + wrappedComponentRef?: unknown; +} + +/* Injects an `identity` props into the wrapped component to be able to use the new context in class components */ +export function withIdentity< + ComponentType extends React.ComponentType, +>(Component: ComponentType) { + const displayName = `withIdentity(${Component.displayName ?? Component.name})`; + const C = (props: React.ComponentProps) => { + const { wrappedComponentRef, ...remainingProps } = props; + + return ( + + {(context) => { + return ( + // @ts-expect-error - Dynamic covariant generic components are tough to type. + + ); + }} + + ); + }; + + C.displayName = displayName; + C.WrappedComponent = Component; + + return hoistStatics(C, Component); +} diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index d8c57a2a0c146f..5d60565e17a6bf 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -44,12 +44,22 @@ * @property {string} sso_redirect */ +/** + * @typedef Role + * @property {string} id + * @property {string} name + * @property {string} permissions + * @property {string} color + * @property {boolean} highlighted + */ + /** * @typedef InitialState * @property {Record} accounts * @property {InitialStateLanguage[]} languages * @property {boolean=} critical_updates_pending * @property {InitialStateMeta} meta + * @property {Role?} role */ const element = document.getElementById('initial-state'); From 0a343b9a91bc11fd61090fea027431d1e6b94479 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 May 2024 19:15:06 +0200 Subject: [PATCH 082/113] fix(deps): update react monorepo to v18.3.1 (#30074) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index efe8cc02648ab7..0fd8ead3a76c00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14269,14 +14269,14 @@ __metadata: linkType: hard "react-dom@npm:^18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" + version: 18.3.1 + resolution: "react-dom@npm:18.3.1" dependencies: loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.0" + scheduler: "npm:^0.23.2" peerDependencies: - react: ^18.2.0 - checksum: 10c0/66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a + react: ^18.3.1 + checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85 languageName: node linkType: hard @@ -14679,11 +14679,11 @@ __metadata: linkType: hard "react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" + version: 18.3.1 + resolution: "react@npm:18.3.1" dependencies: loose-envify: "npm:^1.1.0" - checksum: 10c0/b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8 + checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3 languageName: node linkType: hard From 0f07e1cd4cf04049eda34d4dfd98c12fafc5e344 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 19 May 2024 15:37:49 -0400 Subject: [PATCH 083/113] Fix yarn.lock diff (#30366) --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 0fd8ead3a76c00..4d6fe4d1faf638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15344,7 +15344,7 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.0, scheduler@npm:^0.23.2": +"scheduler@npm:^0.23.2": version: 0.23.2 resolution: "scheduler@npm:0.23.2" dependencies: From 990a0c19a9205fdd8b3e6c0082cc8b80725de144 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Mon, 20 May 2024 09:29:27 +0200 Subject: [PATCH 084/113] Fix a warning when running JS Tests because of FakeIdentityContext using deprecated context API (#30368) --- app/javascript/mastodon/test_helpers.tsx | 43 ++++++------------------ 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/app/javascript/mastodon/test_helpers.tsx b/app/javascript/mastodon/test_helpers.tsx index 69d57b95a0437b..bfea3f6bf4dfe4 100644 --- a/app/javascript/mastodon/test_helpers.tsx +++ b/app/javascript/mastodon/test_helpers.tsx @@ -1,7 +1,3 @@ -import PropTypes from 'prop-types'; -import type { PropsWithChildren } from 'react'; -import { Component } from 'react'; - import { IntlProvider } from 'react-intl'; import { MemoryRouter } from 'react-router'; @@ -9,44 +5,27 @@ import { MemoryRouter } from 'react-router'; // eslint-disable-next-line import/no-extraneous-dependencies import { render as rtlRender } from '@testing-library/react'; -class FakeIdentityWrapper extends Component< - PropsWithChildren<{ signedIn: boolean }> -> { - static childContextTypes = { - identity: PropTypes.shape({ - signedIn: PropTypes.bool.isRequired, - accountId: PropTypes.string, - disabledAccountId: PropTypes.string, - accessToken: PropTypes.string, - }).isRequired, - }; - - getChildContext() { - return { - identity: { - signedIn: this.props.signedIn, - accountId: '123', - accessToken: 'test-access-token', - }, - }; - } - - render() { - return this.props.children; - } -} +import { IdentityContext } from './identity_context'; function render( ui: React.ReactElement, { locale = 'en', signedIn = true, ...renderOptions } = {}, ) { + const fakeIdentity = { + signedIn: signedIn, + accountId: '123', + accessToken: 'test-access-token', + disabledAccountId: undefined, + permissions: 0, + }; + const Wrapper = (props: { children: React.ReactNode }) => { return ( - + {props.children} - + ); From 778bd96a52a6c608f78b07f80764046a2eac61b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 09:40:20 +0200 Subject: [PATCH 085/113] chore(deps): update dependency @types/lodash to v4.17.4 (#30371) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4d6fe4d1faf638..98b2da31129fef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3705,9 +3705,9 @@ __metadata: linkType: hard "@types/lodash@npm:^4.14.195": - version: 4.17.1 - resolution: "@types/lodash@npm:4.17.1" - checksum: 10c0/af2ad8a3c8d7deb170a7ec6e18afc5ae8980576e5f7fe798d8a95a1df7222c15bdf967a25a35879f575a3b64743de00145710ee461a0051e055e94e4fe253f45 + version: 4.17.4 + resolution: "@types/lodash@npm:4.17.4" + checksum: 10c0/0124c64cb9fe7a0f78b6777955abd05ef0d97844d49118652eae45f8fa57bfb7f5a7a9bccc0b5a84c0a6dc09631042e4590cb665acb9d58dfd5e6543c75341ec languageName: node linkType: hard From 814d00cf4b8942b87db17b2bc2877f25d7e83f96 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 09:40:37 +0200 Subject: [PATCH 086/113] chore(deps): update dependency @formatjs/cli to v6.2.12 (#30370) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 98b2da31129fef..6b1dd8d22dbe2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2215,13 +2215,13 @@ __metadata: linkType: hard "@formatjs/cli@npm:^6.1.1": - version: 6.2.10 - resolution: "@formatjs/cli@npm:6.2.10" + version: 6.2.12 + resolution: "@formatjs/cli@npm:6.2.12" peerDependencies: "@glimmer/env": ^0.1.7 - "@glimmer/reference": ^0.91.1 - "@glimmer/syntax": ^0.91.1 - "@glimmer/validator": ^0.91.1 + "@glimmer/reference": ^0.91.1 || ^0.92.0 + "@glimmer/syntax": ^0.92.0 + "@glimmer/validator": ^0.92.0 "@vue/compiler-core": ^3.4.0 content-tag: ^2.0.1 ember-template-recast: ^6.1.4 @@ -2245,7 +2245,7 @@ __metadata: optional: true bin: formatjs: bin/formatjs - checksum: 10c0/34b1b0b3be25d945111c1f57913f50da7308ecd05501a27eaca210a774eb50c616b5706ba796d37ffa223ac4c5cddd5f36fe0ca8d31ad8c8ade79cdd497ccfb9 + checksum: 10c0/3bd05a9fad6c837e22988e6638f426c128efa46ab80ff88cf2ad81fb3bc10cf4f228907577fc01e24c2d7d505cfabfaa69f0496d2ec8f0ab2d6b5eaccb5e475c languageName: node linkType: hard From 8b75d18371edb1830de72b83737f94d9024b32b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 09:41:38 +0200 Subject: [PATCH 087/113] New Crowdin Translations (automated) (#30358) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/ia.json | 30 +-- app/javascript/mastodon/locales/ru.json | 1 + app/javascript/mastodon/locales/sl.json | 1 + app/javascript/mastodon/locales/th.json | 2 +- config/locales/bg.yml | 1 + config/locales/ca.yml | 1 + config/locales/da.yml | 1 + config/locales/de.yml | 1 + config/locales/devise.ia.yml | 53 +++-- config/locales/doorkeeper.ia.yml | 77 +++++- config/locales/es-AR.yml | 1 + config/locales/es-MX.yml | 1 + config/locales/es.yml | 1 + config/locales/fi.yml | 1 + config/locales/fo.yml | 1 + config/locales/gl.yml | 1 + config/locales/he.yml | 1 + config/locales/hu.yml | 1 + config/locales/ia.yml | 301 ++++++++++++++++++++++++ config/locales/it.yml | 1 + config/locales/ko.yml | 1 + config/locales/lad.yml | 1 + config/locales/nl.yml | 1 + config/locales/pl.yml | 1 + config/locales/pt-PT.yml | 1 + config/locales/simple_form.fi.yml | 6 +- config/locales/simple_form.sl.yml | 6 + config/locales/sl.yml | 1 + config/locales/sr-Latn.yml | 1 + config/locales/sr.yml | 1 + config/locales/sv.yml | 1 + config/locales/th.yml | 2 + config/locales/tr.yml | 1 + config/locales/vi.yml | 1 + config/locales/zh-CN.yml | 1 + config/locales/zh-TW.yml | 1 + 36 files changed, 464 insertions(+), 41 deletions(-) diff --git a/app/javascript/mastodon/locales/ia.json b/app/javascript/mastodon/locales/ia.json index 313563bdfe3294..47c64e3f0dde88 100644 --- a/app/javascript/mastodon/locales/ia.json +++ b/app/javascript/mastodon/locales/ia.json @@ -19,7 +19,7 @@ "account.block_domain": "Blocar dominio {domain}", "account.block_short": "Blocar", "account.blocked": "Blocate", - "account.browse_more_on_origin_server": "Navigar plus sur le profilo original", + "account.browse_more_on_origin_server": "Percurrer plus sur le profilo original", "account.cancel_follow_request": "Cancellar sequimento", "account.copy": "Copiar ligamine a profilo", "account.direct": "Mentionar privatemente @{name}", @@ -122,7 +122,7 @@ "column.direct": "Mentiones private", "column.directory": "Navigar profilos", "column.domain_blocks": "Dominios blocate", - "column.favourites": "Favoritos", + "column.favourites": "Favorites", "column.firehose": "Fluxos in directo", "column.follow_requests": "Requestas de sequimento", "column.home": "Initio", @@ -204,7 +204,7 @@ "disabled_account_banner.account_settings": "Parametros de conto", "disabled_account_banner.text": "Tu conto {disabledAccount} es actualmente disactivate.", "dismissable_banner.community_timeline": "Ecce le messages public le plus recente del personas con contos sur {domain}.", - "dismissable_banner.dismiss": "Dimitter", + "dismissable_banner.dismiss": "Clauder", "dismissable_banner.explore_links": "Istes es le articulos de novas que se condivide le plus sur le rete social hodie. Le articulos de novas le plus recente, publicate per plus personas differente, se classifica plus in alto.", "dismissable_banner.explore_statuses": "Ecce le messages de tote le rete social que gania popularitate hodie. Le messages plus nove con plus impulsos e favorites se classifica plus in alto.", "dismissable_banner.explore_tags": "Ecce le hashtags que gania popularitate sur le rete social hodie. Le hashtags usate per plus personas differente se classifica plus in alto.", @@ -212,8 +212,8 @@ "domain_block_modal.block": "Blocar le servitor", "domain_block_modal.block_account_instead": "Blocar @{name} in su loco", "domain_block_modal.they_can_interact_with_old_posts": "Le personas de iste servitor pote interager con tu messages ancian.", - "domain_block_modal.they_cant_follow": "Nulle persona ab iste servitor pote sequer te.", - "domain_block_modal.they_wont_know": "Illes non sapera que illes ha essite blocate.", + "domain_block_modal.they_cant_follow": "Necuno de iste servitor pote sequer te.", + "domain_block_modal.they_wont_know": "Ille non sapera que ille ha essite blocate.", "domain_block_modal.title": "Blocar dominio?", "domain_block_modal.you_will_lose_followers": "Omne sequitores ab iste servitor essera removite.", "domain_block_modal.you_wont_see_posts": "Tu non videra messages e notificationes ab usatores sur iste servitor.", @@ -307,7 +307,7 @@ "follow_request.reject": "Rejectar", "follow_requests.unlocked_explanation": "Benque tu conto non es serrate, le personal de {domain} pensa que es un bon idea que tu revide manualmente le sequente requestas de iste contos.", "follow_suggestions.curated_suggestion": "Selection del equipa", - "follow_suggestions.dismiss": "Non monstrar novemente", + "follow_suggestions.dismiss": "Non monstrar de novo", "follow_suggestions.featured_longer": "Seligite con cura per le equipa de {domain}", "follow_suggestions.friends_of_friends_longer": "Popular inter le gente que tu seque", "follow_suggestions.hints.featured": "Iste profilo ha essite seligite manualmente per le equipa de {domain}.", @@ -412,7 +412,7 @@ "lightbox.next": "Sequente", "lightbox.previous": "Precedente", "limited_account_hint.action": "Monstrar profilo in omne caso", - "limited_account_hint.title": "Iste profilo esseva celate per le moderatores de {domain}.", + "limited_account_hint.title": "Iste profilo ha essite celate per le moderatores de {domain}.", "link_preview.author": "Per {name}", "lists.account.add": "Adder al lista", "lists.account.remove": "Remover del lista", @@ -432,12 +432,12 @@ "loading_indicator.label": "Cargante…", "media_gallery.toggle_visible": "{number, plural, one {Celar imagine} other {Celar imagines}}", "moved_to_account_banner.text": "Tu conto {disabledAccount} es actualmente disactivate perque tu ha cambiate de conto a {movedToAccount}.", - "mute_modal.hide_from_notifications": "Celar ab notificationes", + "mute_modal.hide_from_notifications": "Celar in notificationes", "mute_modal.hide_options": "Celar optiones", "mute_modal.indefinite": "Usque io dissilentia iste persona", "mute_modal.show_options": "Monstrar optiones", - "mute_modal.they_can_mention_and_follow": "Illes pote mentionar te e sequer te, ma tu non potera vider los.", - "mute_modal.they_wont_know": "Illes non sapera que illes ha essite silentiate.", + "mute_modal.they_can_mention_and_follow": "Ille pote mentionar te e sequer te, ma tu non potera vider le.", + "mute_modal.they_wont_know": "Ille non sapera que ille ha essite silentiate.", "mute_modal.title": "Silentiar le usator?", "mute_modal.you_wont_see_mentions": "Tu non videra le messages que mentiona iste persona.", "mute_modal.you_wont_see_posts": "Iste persona pote totevia vider tu messages, ma tu non videra le sues.", @@ -451,13 +451,13 @@ "navigation_bar.discover": "Discoperir", "navigation_bar.domain_blocks": "Dominios blocate", "navigation_bar.explore": "Explorar", - "navigation_bar.favourites": "Favoritos", + "navigation_bar.favourites": "Favorites", "navigation_bar.filters": "Parolas silentiate", "navigation_bar.follow_requests": "Requestas de sequimento", "navigation_bar.followed_tags": "Hashtags sequite", "navigation_bar.follows_and_followers": "Sequites e sequitores", "navigation_bar.lists": "Listas", - "navigation_bar.logout": "Clauder le session", + "navigation_bar.logout": "Clauder session", "navigation_bar.mutes": "Usatores silentiate", "navigation_bar.opened_in_classic_interface": "Messages, contos e altere paginas specific es aperite per predefinition in le interfacie web classic.", "navigation_bar.personal": "Personal", @@ -501,7 +501,7 @@ "notifications.column_settings.admin.report": "Nove signalationes:", "notifications.column_settings.admin.sign_up": "Nove inscriptiones:", "notifications.column_settings.alert": "Notificationes de scriptorio", - "notifications.column_settings.favourite": "Favoritos:", + "notifications.column_settings.favourite": "Favorites:", "notifications.column_settings.filter_bar.advanced": "Monstrar tote le categorias", "notifications.column_settings.filter_bar.category": "Barra de filtro rapide", "notifications.column_settings.follow": "Nove sequitores:", @@ -518,7 +518,7 @@ "notifications.column_settings.update": "Modificationes:", "notifications.filter.all": "Toto", "notifications.filter.boosts": "Impulsos", - "notifications.filter.favourites": "Favoritos", + "notifications.filter.favourites": "Favorites", "notifications.filter.follows": "Sequites", "notifications.filter.mentions": "Mentiones", "notifications.filter.polls": "Resultatos del sondage", @@ -717,7 +717,7 @@ "status.edited": "Ultime modification le {date}", "status.edited_x_times": "Modificate {count, plural, one {{count} vice} other {{count} vices}}", "status.embed": "Incastrar", - "status.favourite": "Adder al favoritos", + "status.favourite": "Adder al favorites", "status.favourites": "{count, plural, one {favorite} other {favorites}}", "status.filter": "Filtrar iste message", "status.filtered": "Filtrate", diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json index cd09a505b3e93c..07a41385a2bf26 100644 --- a/app/javascript/mastodon/locales/ru.json +++ b/app/javascript/mastodon/locales/ru.json @@ -468,6 +468,7 @@ "notification.follow": "{name} подписался (-лась) на вас", "notification.follow_request": "{name} отправил запрос на подписку", "notification.mention": "{name} упомянул(а) вас", + "notification.moderation_warning.action_delete_statuses": "Некоторые из ваших публикаций были удалены.", "notification.own_poll": "Ваш опрос закончился", "notification.poll": "Опрос, в котором вы приняли участие, завершился", "notification.reblog": "{name} продвинул(а) ваш пост", diff --git a/app/javascript/mastodon/locales/sl.json b/app/javascript/mastodon/locales/sl.json index 459d05ce3ecfe8..7806abc6b55fbb 100644 --- a/app/javascript/mastodon/locales/sl.json +++ b/app/javascript/mastodon/locales/sl.json @@ -474,6 +474,7 @@ "notification.follow_request": "{name} vam želi slediti", "notification.mention": "{name} vas je omenil/a", "notification.moderation-warning.learn_more": "Več o tem", + "notification.moderation_warning": "Prejeli ste opozorilo moderatorjev", "notification.moderation_warning.action_delete_statuses": "Nekatere vaše objave so odstranjene.", "notification.moderation_warning.action_disable": "Vaš račun je bil onemogočen.", "notification.moderation_warning.action_mark_statuses_as_sensitive": "Nekatere vaše objave so bile označene kot občutljive.", diff --git a/app/javascript/mastodon/locales/th.json b/app/javascript/mastodon/locales/th.json index 7c6b2ade4e3629..b1b9407ba11d9a 100644 --- a/app/javascript/mastodon/locales/th.json +++ b/app/javascript/mastodon/locales/th.json @@ -158,7 +158,7 @@ "compose_form.poll.option_placeholder": "ตัวเลือก {number}", "compose_form.poll.single": "เลือกอย่างใดอย่างหนึ่ง", "compose_form.poll.switch_to_multiple": "เปลี่ยนการสำรวจความคิดเห็นเป็นอนุญาตหลายตัวเลือก", - "compose_form.poll.switch_to_single": "เปลี่ยนการสำรวจความคิดเห็นเป็นอนุญาตตัวเลือกเดี่ยว", + "compose_form.poll.switch_to_single": "เปลี่ยนการสำรวจความคิดเห็นเป็นอนุญาตตัวเลือกเดียว", "compose_form.poll.type": "ลักษณะ", "compose_form.publish": "โพสต์", "compose_form.publish_form": "โพสต์ใหม่", diff --git a/config/locales/bg.yml b/config/locales/bg.yml index f242039ed8dbf8..51180bc66f2724 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -285,6 +285,7 @@ bg: update_custom_emoji_html: "%{name} обнови емоджито %{target}" update_domain_block_html: "%{name} обнови блокирането на домейна за %{target}" update_ip_block_html: "%{name} промени правило за IP на %{target}" + update_report_html: "%{name} осъвремени доклад %{target}" update_status_html: "%{name} обнови публикация от %{target}" update_user_role_html: "%{name} промени ролята %{target}" deleted_account: изтрит акаунт diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 08fef736420556..34fd9008516ac0 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -285,6 +285,7 @@ ca: update_custom_emoji_html: "%{name} ha actualitzat l'emoji %{target}" update_domain_block_html: "%{name} ha actualitzat el bloqueig de domini per a %{target}" update_ip_block_html: "%{name} ha canviat la norma per la IP %{target}" + update_report_html: "%{name} ha actualitzat l'informe %{target}" update_status_html: "%{name} ha actualitzat l'estat de %{target}" update_user_role_html: "%{name} ha canviat el rol %{target}" deleted_account: compte eliminat diff --git a/config/locales/da.yml b/config/locales/da.yml index 252d0e2b580158..17d3037a75a505 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -285,6 +285,7 @@ da: update_custom_emoji_html: "%{name} opdaterede emoji %{target}" update_domain_block_html: "%{name} opdaterede domæneblokeringen for %{target}" update_ip_block_html: "%{name} ændrede reglen for IP'en %{target}" + update_report_html: "%{name} opdaterede rapporten %{target}" update_status_html: "%{name} opdaterede indlægget fra %{target}" update_user_role_html: "%{name} ændrede %{target}-rolle" deleted_account: slettet konto diff --git a/config/locales/de.yml b/config/locales/de.yml index b19315e3942d95..dd2129584fbe7a 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -285,6 +285,7 @@ de: update_custom_emoji_html: "%{name} bearbeitete das Emoji %{target}" update_domain_block_html: "%{name} aktualisierte die Domain-Sperre für %{target}" update_ip_block_html: "%{name} änderte die Regel für die IP-Adresse %{target}" + update_report_html: "%{name} überarbeitete die Meldung %{target}" update_status_html: "%{name} überarbeitete einen Beitrag von %{target}" update_user_role_html: "%{name} änderte die Rolle von %{target}" deleted_account: gelöschtes Konto diff --git a/config/locales/devise.ia.yml b/config/locales/devise.ia.yml index c68efddd07880f..e6ae6d4afbbff4 100644 --- a/config/locales/devise.ia.yml +++ b/config/locales/devise.ia.yml @@ -6,11 +6,11 @@ ia: send_instructions: Tu recipera un e-mail con instructiones pro confirmar tu adresse de e-mail in poc minutas. Per favor verifica tu dossier de spam si tu non lo recipe. send_paranoid_instructions: Si tu adresse de e-mail existe in nostre base de datos, tu recipera un e-mail con instructiones pro confirmar tu adresse de e-mail in poc minutas. Per favor verifica tu dossier de spam si tu non lo recipe. failure: - already_authenticated: Tu jam initiava le session. - inactive: Tu conto ancora non es activate. + already_authenticated: Tu ha jam aperite session. + inactive: Tu conto non es ancora activate. invalid: "%{authentication_keys} o contrasigno non valide." last_attempt: Tu ha solmente un altere tentativa ante que tu conto es serrate. - locked: Tu conto es blocate. + locked: Tu conto es serrate. not_found_in_database: "%{authentication_keys} o contrasigno non valide." omniauth_user_creation_failure: Error creante un conto pro iste identitate. pending: Tu conto es ancora sub revision. @@ -51,12 +51,12 @@ ia: explanation: Ora es possibile aperir session con solmente le adresse de e-mail e contrasigno. subject: 'Mastodon: Authentication bifactorial disactivate' subtitle: Le authentication bifactorial ha essite disactivate pro tu conto. - title: 2FA disactivate + title: A2F disactivate two_factor_enabled: explanation: Pro le apertura de session essera necessari un token generate per le application TOTP accopulate. subject: 'Mastodon: Authentication bifactorial activate' subtitle: Le authentication bifactorial ha essite activate pro tu conto. - title: 2FA activate + title: A2F activate two_factor_recovery_codes_changed: explanation: Le ancian codices de recuperation ha essite invalidate e nove codices ha essite generate. subject: 'Mastodon: Codices de recuperation regenerate' @@ -66,11 +66,11 @@ ia: subject: 'Mastodon: Instructiones pro disblocar' webauthn_credential: added: - explanation: Le sequente clave de securitate esseva addite a tu conto + explanation: Le sequente clave de securitate ha essite addite a tu conto subject: 'Mastodon: Nove clave de securitate' - title: Un nove clave de securitate esseva addite + title: Un nove clave de securitate ha essite addite deleted: - explanation: Le sequente clave de securitate esseva delite de tu conto + explanation: Le sequente clave de securitate ha essite delite de tu conto subject: 'Mastodon: Clave de securitate delite' title: Un de tu claves de securitate ha essite delite webauthn_disabled: @@ -81,18 +81,41 @@ ia: webauthn_enabled: explanation: Le authentication con claves de securitate ha essite activate pro tu conto. extra: Tu clave de securitate pote ora esser usate pro aperir session. + subject: 'Mastodon: authentication de clave de securitate activate' title: Claves de securitate activate + omniauth_callbacks: + failure: Impossibile authenticar te ab %{kind} perque “%{reason}”. + success: Authenticate con successo ab conto %{kind}. + passwords: + no_token: Tu non pote acceder iste pagina sin venir ab un email de redefinition de contrasigno. Si tu veni ab un email de redefinition de contrasigno, verifica que tu usava le integre URL fornite. + send_instructions: Si tu adresse de e-mail existe in nostre base de datos, tu recipera un ligamine de recuperation de contrasigno in tu adresse de e-mail in poc minutas. Per favor verifica tu dossier de spam si tu non lo recipe. + send_paranoid_instructions: Si tu adresse de e-mail existe in nostre base de datos, tu recipera un ligamine de recuperation de contrasigno in tu adresse de e-mail in poc minutas. Per favor verifica tu dossier de spam si tu non lo recipe. + updated: Tu contrasigno ha essite cambiate. Tu ha ora aperite session. + updated_not_active: Tu contrasigno ha essite cambiate. registrations: - destroyed: A revider! Tu conto esseva cancellate con successo. Nos spera vider te novemente tosto. - signed_up_but_pending: Un message con un ligamine de confirmation esseva inviate a tu conto de email. Post que tu clicca le ligamine, nos revidera tu application. Tu essera notificate si illo es approbate. + destroyed: A revider! Tu conto ha essite cancellate. Nos spera vider te de novo tosto. + signed_up: Benvenite! Tu te ha inscribite con successo. + signed_up_but_inactive: Tu te ha inscribite con successo. Nonobstante, nos non poteva aperir tu session perque tu conto non es ancora activate. + signed_up_but_locked: Tu te ha inscribite con successo. Nonobstante, nos non poteva aperir tu session perque tu conto es serrate. + signed_up_but_pending: Un message con un ligamine de confirmation ha essite inviate a tu adresse de email. Post que tu clicca sur le ligamine, nos revidera tu demanda. Tu essera notificate si illo es approbate. + signed_up_but_unconfirmed: Un message con un ligamine de confirmation ha essite inviate a tu adresse de e-mail. Per favor seque le ligamine pro activar tu conto. Verifica tu dossier de spam si tu non recipe iste e-mail. + update_needs_confirmation: Tu ha actualisate tu conto con successo, ma nos debe verificar tu nove adresse de e-mail. Accede a tu e-mail e seque le ligamine de confirmation pro confirmar tu nove adresse de e-mail. Verifica tu dossier de spam si tu non recipe iste e-mail. updated: Tu conto ha essite actualisate con successo. sessions: - signed_in: Connexe con successo. - signed_out: Disconnexe con successo. + already_signed_out: Session claudite con successo. + signed_in: Session aperite con successo. + signed_out: Session claudite con successo. unlocks: - unlocked: Tu conto ha essite disblocate con successo. Initia session a continuar. + send_instructions: Tu recipera un e-mail con instructiones explicante como disserrar tu conto in alcun minutas. Verifica tu dossier de spam si tu non recipe iste e-mail. + send_paranoid_instructions: Si tu conto existe, tu recipera un email con instructiones explicante como disserrar lo in alcun minutas. Verifica tu dossier de spam si tu non recipe iste e-mail. + unlocked: Tu conto ha essite disserrate con successo. Aperi session pro continuar. errors: messages: - already_confirmed: jam esseva confirmate, tenta initiar session + already_confirmed: jam esseva confirmate, tenta aperir session + confirmation_period_expired: debe esser confirmate in %{period}, per favor requesta un nove + expired: ha expirate, per favor requesta un nove not_found: non trovate - not_locked: non era blocate + not_locked: non esseva serrate + not_saved: + one: '1 error ha impedite a iste %{resource} de esser salvate:' + other: "%{count} errores ha impedite a iste %{resource} de esser salvate:" diff --git a/config/locales/doorkeeper.ia.yml b/config/locales/doorkeeper.ia.yml index dc965996810817..9c493e3d7f6e16 100644 --- a/config/locales/doorkeeper.ia.yml +++ b/config/locales/doorkeeper.ia.yml @@ -3,28 +3,40 @@ ia: activerecord: attributes: doorkeeper/application: - name: Nomine de application + name: Nomine del application + redirect_uri: URI de redirection scopes: Ambitos - website: Sito web de application + website: Sito web del application errors: models: doorkeeper/application: attributes: redirect_uri: + fragment_present: non pote continer un fragmento. invalid_uri: debe esser un URI valide. + relative_uri: debe esser un URI absolute. + secured_uri: debe esser un URI HTTPS/SSL. doorkeeper: applications: buttons: authorize: Autorisar cancel: Cancellar + destroy: Destruer edit: Modificar submit: Submitter confirmations: destroy: Es tu secur? edit: title: Modificar application + form: + error: Oops! Verifica tu formulario pro possibile errores + help: + native_redirect_uri: Usar %{native_redirect_uri} pro tests local + redirect_uri: Usar un linea per URI + scopes: Separa ambitos con spatios. Lassa vacue pro usar le ambitos predefinite. index: application: Application + callback_url: URL de retorno delete: Deler empty: Tu non ha applicationes. name: Nomine @@ -37,17 +49,22 @@ ia: show: actions: Actiones application_id: Clave del cliente + callback_urls: URLs de retorno scopes: Ambitos + secret: Secreto del application title: 'Application: %{name}' authorizations: buttons: authorize: Autorisar deny: Negar error: - title: Ocurreva un error + title: Un error ha occurrite new: + prompt_html: "%{client_name} vole haber le permission de acceder a tu conto. Illo es un application tertie. Si tu non confide in illo, alora tu non deberea autorisar lo." review_permissions: Revisionar le permissos title: Autorisation necessari + show: + title: Copia iste codice de autorisation e colla lo in le application. authorized_applications: buttons: revoke: Revocar @@ -55,11 +72,35 @@ ia: revoke: Es tu secur? index: authorized_at: Autorisate le %{date} + description_html: Ecce applicationes que pote acceder tu conto per le API. Si il ha applicationes que tu non recognosce ci, o un application que se comporta mal, tu pote revocar su accesso. last_used_at: Ultime uso in %{date} never_used: Nunquam usate scopes: Permissiones superapp: Interne title: Tu applicationes autorisate + errors: + messages: + access_denied: Le proprietario del ressource o servitor de autorisation ha refusate le requesta. + credential_flow_not_configured: Le processo de credentiales de contrasigno del proprietario del ressource ha fallite perque Doorkeeper.configure.resource_owner_from_credentials non es configurate. + invalid_client: Le authentication del cliente ha fallite perque le cliente es incognite, necun authentication de cliente es includite, o le methodo de authentication non es supportate. + invalid_grant: Le concession de autorisation fornite es invalide, expirate, revocate, non corresponde al URI de redirection usate in le requesta de autorisation, o ha essite emittite a un altere cliente. + invalid_redirect_uri: Le URI de redirection includite non es valide. + invalid_request: + missing_param: 'Parametro requirite mancante: %{value}.' + request_not_authorized: Le requesta debe esser autorisate. Un parametro requirite pro autorisar le requesta manca o non es valide. + unknown: Le requesta non include un parametro requirite, include un valor de parametro non supportate, o es alteremente mal formate. + invalid_resource_owner: Le credentiales del proprietario del ressource fornite non es valide, o le proprietario del ressource non pote esser trovate + invalid_scope: Le ambito requirite es invalide, incognite, o mal formate. + invalid_token: + expired: Le token de accesso ha expirate + revoked: Le token de accesso ha essite revocate + unknown: Le token de accesso non es valide + resource_owner_authenticator_not_configured: Impossibile trovar le proprietario del ressource perque Doorkeeper.configure.resource_owner_authenticator non es configurate. + server_error: Le servitor de autorisation ha incontrate un condition impreviste que lo ha impedite de complir le requesta. + temporarily_unavailable: Le servitor de autorisation actualmente non pote gerer le requesta a causa de un supercarga temporari o de mantenentia del servitor. + unauthorized_client: Le application non es autorisate a exequer iste requesta usante iste methodo. + unsupported_grant_type: Le typo de concession de autorisation non es supportate per le servitor de autorisation. + unsupported_response_type: Le servitor de autorisation non supporta iste typo de responsa. flash: applications: create: @@ -73,20 +114,22 @@ ia: notice: Application revocate. grouped_scopes: access: - read: Accesso de sol lectura + read: Accesso de lectura sol read/write: Accesso de lectura e scriptura - write: Accesso de sol scriptura + write: Accesso de scriptura sol title: accounts: Contos admin/accounts: Gestion de contos admin/all: Tote le functiones administrative admin/reports: Gestion de reportos - all: Accesso plen a tu conto de Mastodon + all: Accesso complete a tu conto de Mastodon blocks: Blocadas bookmarks: Marcapaginas conversations: Conversationes - favourites: Favoritos + crypto: Cryptation de puncta a puncta + favourites: Favorites filters: Filtros + follow: Sequites, silentiates e blocates follows: Sequites lists: Listas media: Annexos multimedial @@ -101,21 +144,41 @@ ia: nav: applications: Applicationes oauth2_provider: Fornitor OAuth2 + application: + title: Autorisation OAuth necessari scopes: admin:read: leger tote le datos in le servitor admin:read:accounts: leger information sensibile de tote le contos + admin:read:canonical_email_blocks: leger datos sensibile de tote le blocadas de email canonic + admin:read:domain_allows: leger informationes sensibile de tote le dominios permittite + admin:read:domain_blocks: leger informationes sensibile de tote le blocadas de dominio + admin:read:email_domain_blocks: leger informationes sensibile de tote le blocadas de dominio email + admin:read:ip_blocks: leger informationes sensibile de tote le blocadas de IP + admin:read:reports: leger information sensibile de tote le reportos e contos signalate admin:write: modificar tote le datos in le servitor + admin:write:accounts: exequer action de moderation sur contos + admin:write:canonical_email_blocks: exequer actiones de moderation sur blocadas de email canonic + admin:write:domain_allows: exequer actiones de moderation sur dominios permittite + admin:write:domain_blocks: exequer actiones de moderation sur blocadas de dominio + admin:write:email_domain_blocks: exequer actiones de moderation sur blocadas de dominio email + admin:write:ip_blocks: exequer actiones de moderation sur blocadas de IP + admin:write:reports: exequer action de moderation sur reportos + crypto: usar cryptation de extremo-a-extremo follow: modificar relationes del contos + push: reciper tu notificationes push read: leger tote le datos de tu conto read:accounts: vider informationes de conto + read:blocks: vider tu blocadas read:bookmarks: vider tu marcapaginas read:favourites: vider tu favoritos read:filters: vider tu filtros read:follows: vider tu sequites read:lists: vider tu listas read:me: leger solmente le information basic de tu conto + read:mutes: vider tu silentiates read:notifications: vider tu notificationes read:reports: vider tu reportos + read:search: cercar in tu nomine read:statuses: vider tote le messages write: modificar tote le datos de tu conto write:accounts: modificar tu profilo diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml index aa3668d92adbeb..302be44112eec1 100644 --- a/config/locales/es-AR.yml +++ b/config/locales/es-AR.yml @@ -285,6 +285,7 @@ es-AR: update_custom_emoji_html: "%{name} actualizó el emoji %{target}" update_domain_block_html: "%{name} actualizó el bloqueo de dominio para %{target}" update_ip_block_html: "%{name} cambió la regla para la dirección IP %{target}" + update_report_html: "%{name} actualizó la denuncia %{target}" update_status_html: "%{name} actualizó el mensaje de %{target}" update_user_role_html: "%{name} cambió el rol %{target}" deleted_account: cuenta eliminada diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index 6a306b07b061f5..10806c6b6cb312 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -285,6 +285,7 @@ es-MX: update_custom_emoji_html: "%{name} actualizó el emoji %{target}" update_domain_block_html: "%{name} actualizó el bloqueo de dominio para %{target}" update_ip_block_html: "%{name} cambió la regla para la IP %{target}" + update_report_html: "%{name} actualizó el informe %{target}" update_status_html: "%{name} actualizó el estado de %{target}" update_user_role_html: "%{name} cambió el rol %{target}" deleted_account: cuenta eliminada diff --git a/config/locales/es.yml b/config/locales/es.yml index e7db7c8b04d439..840bc2ce9b0818 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -285,6 +285,7 @@ es: update_custom_emoji_html: "%{name} actualizó el emoji %{target}" update_domain_block_html: "%{name} actualizó el bloqueo de dominio para %{target}" update_ip_block_html: "%{name} cambió la regla para la IP %{target}" + update_report_html: "%{name} actualizó el informe %{target}" update_status_html: "%{name} actualizó la publicación de %{target}" update_user_role_html: "%{name} cambió el rol %{target}" deleted_account: cuenta eliminada diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 5f96f611b403c2..53db0232aa5d2b 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -285,6 +285,7 @@ fi: update_custom_emoji_html: "%{name} päivitti emojin %{target}" update_domain_block_html: "%{name} päivitti verkkotunnuksen %{target} eston" update_ip_block_html: "%{name} muutti sääntöä IP-osoitteelle %{target}" + update_report_html: "%{name} päivitti raportin %{target}" update_status_html: "%{name} päivitti käyttäjän %{target} julkaisun" update_user_role_html: "%{name} muutti roolia %{target}" deleted_account: poisti tilin diff --git a/config/locales/fo.yml b/config/locales/fo.yml index f7303c512ac686..57caff4d716945 100644 --- a/config/locales/fo.yml +++ b/config/locales/fo.yml @@ -285,6 +285,7 @@ fo: update_custom_emoji_html: "%{name} dagførdi kensluteknið %{target}" update_domain_block_html: "%{name} dagførdi navnaøkisblokeringina hjá %{target}" update_ip_block_html: "%{name} broytti IP-reglurnar %{target}" + update_report_html: "%{name} dagførdi meldingina %{target}" update_status_html: "%{name} dagførdi postin hjá %{target}" update_user_role_html: "%{name} broyttir %{target} leiklutir" deleted_account: strikað konta diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 57af7c82c030db..2c85dc89ae7502 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -285,6 +285,7 @@ gl: update_custom_emoji_html: "%{name} actualizou o emoji %{target}" update_domain_block_html: "%{name} actualizou o bloqueo do dominio para %{target}" update_ip_block_html: "%{name} cambiou a regra para IP %{target}" + update_report_html: "%{name} actualizou a denuncia %{target}" update_status_html: "%{name} actualizou a publicación de %{target}" update_user_role_html: "%{name} cambiou o rol %{target}" deleted_account: conta eliminada diff --git a/config/locales/he.yml b/config/locales/he.yml index 14da27ec75e281..3613a9f0b3b394 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -291,6 +291,7 @@ he: update_custom_emoji_html: "%{name} עדכן/ה אמוג'י %{target}" update_domain_block_html: "%{name} עדכן/ה חסימת דומיין עבור %{target}" update_ip_block_html: "%{name} שינה כלל עבור IP %{target}" + update_report_html: '%{name} עדכן/ה דו"ח %{target}' update_status_html: "%{name} עדכן/ה הודעה של %{target}" update_user_role_html: "%{name} שינה את התפקיד של %{target}" deleted_account: חשבון מחוק diff --git a/config/locales/hu.yml b/config/locales/hu.yml index c48d527cafa74f..dd578305151f60 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -285,6 +285,7 @@ hu: update_custom_emoji_html: "%{name} frissítette az emodzsit: %{target}" update_domain_block_html: "%{name} frissítette a %{target} domain tiltását" update_ip_block_html: "%{name} módosította a(z) %{target} IP-címre vonatkozó szabályt" + update_report_html: "%{name} frissítette a %{target} bejelentést" update_status_html: "%{name} frissítette %{target} felhasználó bejegyzését" update_user_role_html: "%{name} módosította a(z) %{target} szerepkört" deleted_account: törölt fiók diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 68676a09f73957..8af676454fadee 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -285,6 +285,7 @@ ia: update_custom_emoji_html: "%{name} actualisava le emoticone %{target}" update_domain_block_html: "%{name} actualisava le blocada de dominio pro %{target}" update_ip_block_html: "%{name} cambiava le regula pro IP %{target}" + update_report_html: "%{name} actualisava le reporto %{target}" update_status_html: "%{name} actualisava le message per %{target}" update_user_role_html: "%{name} cambiava le rolo de %{target}" deleted_account: conto delite @@ -973,6 +974,7 @@ ia: webhook: Crocs web admin_mailer: auto_close_registrations: + body: Per un carentia recente de activate de moderator, le registrationes sur %{instance} ha essite automaticamente mutate a besoniante revision manual, pro impedir %{instance} de esser usate como un platteforma pro potential mal actores. Tu pote mutar lo retro pro sempre aperir le registrationes. subject: Le registrationes pro %{instance} ha essite automaticamente mutate a besoniante de approbation new_appeal: actions: @@ -1054,19 +1056,27 @@ ia: clicking_this_link: cliccante iste ligamine login_link: acceder proceed_to_login_html: Ora tu pote continuar a %{login_link}. + redirect_to_app_html: Tu deberea haber essite re-dirigite al app %{app_name}. Si isto non eveni, tenta %{clicking_this_link} o manualmente retorna al app. + registration_complete: Tu registration sur %{domain} es ora complete! welcome_title: Benvenite, %{name}! + wrong_email_hint: Si ille adresse email non es correcte, tu pote cambiar lo in parametros de conto. delete_account: Deler le conto + delete_account_html: Si tu vole a dele tu conto, tu pote continuar ci. Te sera demandate confirmation. description: + prefix_invited_by_user: "@%{name} te invita a junger te a iste servitor de Mastodon!" prefix_sign_up: Inscribe te sur Mastodon hodie! + suffix: Con un conto, tu potera sequer personas, messages de actualisation e excambios de messages con usatores de ulle servitor de Mastodon e plus! didnt_get_confirmation: Non recipeva tu un ligamine de confirmation? dont_have_your_security_key: Non ha tu le clave de securitate? forgot_password: Contrasigno oblidate? invalid_reset_password_token: Pete un nove. + link_to_otp: Insere un codice a duo factores o un codice de recuperation ab tu telephono link_to_webauth: Usa tu apparato clave de securitate log_in_with: Accede con login: Accede logout: Clauder le session migrate_account: Move a un conto differente + migrate_account_html: Si tu vole re-adressar iste conto a un altere, tu pote configurar lo ci. or_log_in_with: O accede con privacy_policy_agreement_html: Io ha legite e acceptar le politica de confidentialitate progress: @@ -1192,6 +1202,7 @@ ia: invalid_domain: non es un nomine de dominio valide edit_profile: basic_information: Information basic + hint_html: "Personalisa lo que le personas vide sur tu profilo public e presso tu messages. Il es plus probabile que altere personas te seque e interage con te quando tu ha un profilo compilate e un photo de profilo." other: Alteres errors: '400': Le requesta que tu inviava era non valide o mal formate. @@ -1230,6 +1241,7 @@ ia: add_new: Adder nove errors: limit: Tu ha jam consiliate le maxime numero de hashtags + hint_html: "Consilia tu plus importante hashtags sur tu profilo. Un grande instrumento pro tener tracia de tu labores creative e projectos de longe-tempore, le hashtags consiliate es monstrate prominentemente sur tu profilo e permitte accesso rapide a tu proprie messages." filters: contexts: account: Profilos @@ -1241,8 +1253,10 @@ ia: add_keyword: Adder parola clave keywords: Parolas clave statuses: Messages individual + statuses_hint_html: Iste filtro se applica a seliger messages singule sin reguardo si illes concorda le parolas clave infra. Revide o remove le messages ab le filtro. title: Modificar filtro errors: + deprecated_api_multiple_keywords: Iste parametros non pote esser cambiate ab iste application perque illos se applica a plus que un sol parola clave del filtro. Usa un application plus recente o le interfacie web. invalid_context: Nulle o non valide contexto supplite index: contexts: Filtros in %{contexts} @@ -1272,6 +1286,12 @@ ia: title: Messages filtrate generic: all: Toto + all_items_on_page_selected_html: + one: "%{count} elemento sur iste pagina es seligite." + other: Tote le %{count} elementos sur iste pagina es seligite. + all_matching_items_selected_html: + one: "%{count} elemento concordante que tu cerca es seligite." + other: Tote le %{count} elementos concordante que tu cerca es seligite. cancel: Cancellar changes_saved_msg: Cambios salveguardate con successo! confirm: Confirmar @@ -1299,13 +1319,24 @@ ia: imported: Importate mismatched_types_warning: Il appare que tu pote haber seligite le typo errate pro iste importation, controla duo vices. modes: + merge: Funder + merge_long: Mantene le registrationes existente e adde illos nove + overwrite: Superscriber overwrite_long: Reimplaciar registros actual con le noves overwrite_preambles: blocking_html: Tu es sur le puncto de reimplaciar tu lista de blocadas per usque a %{total_items} contos proveniente de %{filename}. + bookmarks_html: Tu va reimplaciar tu lista de blocadas per usque a %{total_items} contos proveniente de %{filename}. domain_blocking_html: Tu es sur le puncto de reimplaciar tu lista de blocadas de dominio per usque a %{total_items} dominios proveniente de %{filename}. + following_html: Tu va sequer usque %{total_items} contos de %{filename} e cessar de sequer ulle altere. + lists_html: Tu va reimplaciar tu lista con contentos de %{filename}. Usque %{total_items} contos sera addite a nove listas. + muting_html: Tu va reimplaciar tu lista de contos silentiate con usque %{total_items} contos ab %{filename}. preambles: blocking_html: Tu es sur le puncto de blocar usque a %{total_items} contos a partir de %{filename}. + bookmarks_html: Tu va adder usque %{total_items} messages de %{filename} a tu marcapaginas. domain_blocking_html: Tu es sur le puncto de blocar usque a %{total_items} dominios a partir de %{filename}. + following_html: Tu va blocar usque a %{total_items} dominios ab %{filename}. + lists_html: Tu va adder usque %{total_items} contos ab %{filename} a tu lista. Nove listas sera create si il non ha lista a adder. + muting_html: Tu va silentiar usque %{total_items} contos ab %{filename}. preface: Tu pote importar datos que tu ha exportate de un altere servitor, como un lista de personas que tu seque o bloca. recent_imports: Importationes recente states: @@ -1348,16 +1379,30 @@ ia: expires_in_prompt: Nunquam generate: Generar ligamine de invitation invalid: Iste invitation non es valide + invited_by: 'Tu ha essite invitate per:' max_uses: one: un uso other: "%{count} usos" + max_uses_prompt: Nulle limite + prompt: Genera e comparti ligamines con alteres pro conceder accesso a iste servitor table: expires_at: Expira + uses: Usos title: Invitar personas + lists: + errors: + limit: Tu ha attingite le maxime numero de listas login_activities: authentication_methods: + otp: app pro authentication a duo factores password: contrasigno + sign_in_token: codice de securitate de e-mail webauthn: claves de securitate + description_html: Si tu vide activitate que tu non recognosce, considera de cambiar tu contrasigno e activar le authentication a duo factores. + empty: Nulle chronologia de authentication disponibile + failed_sign_in_html: Tentativa de authentication fallite con %{method} ab %{ip} (%{browser}) + successful_sign_in_html: Apertura de session con successo con %{method} ab %{ip} (%{browser}) + title: Chronologia de authentication mail_subscriptions: unsubscribe: action: Si, desubscriber @@ -1373,32 +1418,110 @@ ia: resubscribe_html: Si tu ha cancellate le subscription in error, tu pote resubscriber te a partir del parametros de notification in e-mail. success_html: Tu non recipera plus %{type} pro Mastodon sur %{domain} a tu adresse de e-mail %{email}. title: Desubcriber + media_attachments: + validations: + images_and_video: Impossibile annexar un video a un message que jam contine imagines + not_ready: Impossibile annexar un video a un message que jam contine imagines. Retenta post un momento! + too_many: Impossibile annexar plus que 4 files migrations: + acct: Movite a + cancel: Cancellar redirection + cancel_explanation: Cancellar le redirection reactivara tu conto actual, ma non reportara sequaces que ha essite movite in ille conto. + cancelled_msg: Redirection cancellate con successo. errors: + already_moved: is the same account you have already moved to + missing_also_known_as: non es un alias de iste conto move_to_self: non pote esser le conto actual not_found: non poterea esser trovate + on_cooldown: Tu es in pausa + followers_count: Sequaces a tempore de mover + incoming_migrations: Movente ab un conto differente + incoming_migrations_html: Pro mover ab un altere conto a isto, primo tu debe crear un alias de conto. + moved_msg: Tu conto ora es redirigite a %{acct} e tu sequaces es movite super. + not_redirecting: Tu conto actualmente non es redirigite a ulle altere conto. + on_cooldown: Tu recentemente ha migrate tu conto. Iste function de novo sera disponibile in %{count} dies. + past_migrations: Migrationes passate + proceed_with_move: Mover sequaces + redirected_msg: Tu conto es ora redirigite a %{acct}. + redirecting_to: Tu conto es redirigite a %{acct}. + set_redirect: Predefinir redirection + warning: + backreference_required: Le nove conto debe primo esser configurate pro referer se a isto + before: 'Ante de continuar, lege iste notas accuratemente:' + cooldown: Post le movimento il ha un periodo de pausa durante le qual tu non potera mover te ancora + disabled_account: Tu conto actual non sera plenmente usabile postea. Comocunque, tu habera accesso a exportation de datos e re-activation. + followers: Iste action movera tote le sequaces ab le conto actual al nove conto + only_redirect_html: In alternativa, tu pote solo superponer un redirection sur tu profilo. + other_data: Nulle altere datos sera movite automaticamente + redirect: Le profilo de tu conto actual sera actualisate con un aviso de redirection e sera excludite de recercas moderation: title: Moderation move_handler: carry_blocks_over_text: Iste usator ha cambiate de conto desde %{acct}, que tu habeva blocate. + carry_mutes_over_text: Iste usator moveva ab %{acct}, que tu habeva silentiate. + copy_account_note_text: 'Iste usator moveva ab %{acct}, ci era tu previe notas re ille:' + navigation: + toggle_menu: Mutar menu notification_mailer: admin: + report: + subject: "%{name} inviava un reporto" sign_up: subject: "%{name} se ha inscribite" + favourite: + body: 'Tu message era favorite per %{name}:' + subject: "%{name} favoriva tu message" + title: Nove preferito follow: + body: "%{name} ora te seque!" + subject: "%{name} ora te seque" title: Nove sequitor follow_request: + action: Gere requestas de sequer + body: "%{name} ha demandate de sequer te" + subject: 'Sequace pendente: %{name}' title: Nove requesta de sequimento mention: action: Responder + body: 'Tu era mentionate per %{name} in:' + subject: Tu ha essite mentionate per %{name} title: Nove mention poll: subject: Un inquesta de %{name} ha finite + reblog: + body: 'Tu message ha essite impulsate per %{name}:' + subject: "%{name} ha impulsate tu message" + title: Nove impulso + status: + subject: "%{name} justo ha publicate" + update: + subject: "%{name} ha modificate un message" + notifications: + administration_emails: Avisos de email per administrator + email_events: Eventos pro avisos de email + email_events_hint: 'Selige eventos pro que tu vole reciper avisos:' + number: + human: + decimal_units: + format: "%n%u" + units: + billion: B + million: M + quadrillion: Q + thousand: K + trillion: T otp_authentication: + code_hint: Insere le codice generate per tu app de authentication pro confirmar + description_html: Si tu activa le authentication a duo factores per un app de authentication, le authentication requirera que tu es in possession de tu telephono, que generara testimonios pro facer te entrar. enable: Activar + instructions_html: "Scande iste codice QR in Google Authenticator o un simile app TOTP sur tu telephono. Desde ora in avante, ille app generara testimonios que tu debera inserer quando tu te authenticara." + manual_instructions: 'Si tu non pote scander le codice QR e besonia de inserer lo manualmente, ecce le texto-simple secrete:' setup: Configurar + wrong_code: Le codice inserite non era valide! Es tempore de servitor e tempore de apparato correcte? pagination: + newer: Plus recente next: Sequente + older: Plus vetere prev: Previe truncate: "…" polls: @@ -1418,9 +1541,13 @@ ia: posting_defaults: Publicationes predefinite public_timelines: Chronologias public privacy: + hint_html: "Personalisa como tu vole que tu profilo e tu messages a es trovate. Un varietate de functiones in Mastodon pote adjutar te attinger un plus large auditorio si activate. Prende un momento pro revider iste parametros pro assecurar te que illos se adapta a tu caso de uso." privacy: Confidentialitate + privacy_hint_html: Controla quanto tu vole divulgar pro le beneficio de alteres. Le gente discoperi profilos e applicationes interessante percurrente le profilos sequite per altere personas e vidente a partir de qual applicationes illos publica lor messages, ma tu pote preferer de mantener tal information private. reach: Portata + reach_hint_html: Controla si tu vole esser discoperite e sequite per nove personas. Vole tu que tu messages appare sur le schermo Explorar? Vole tu que altere personas te vide in lor recommendationes de sequimento? Vole tu acceptar automaticamente tote le nove sequitores o prefere tu haber le controlo granular super cata un? search: Cercar + search_hint_html: Controla como tu vole esser trovate. Vole tu que le gente te trova per medio del contento de tu messages public? Vole tu que personas foras de Mastodon trova tu profilo quando illes cerca in le web? Nota ben que non es possibile garantir le exclusion total de tu information public del motores de recerca. title: Confidentialitate e portata privacy_policy: title: Politica de confidentialitate @@ -1521,35 +1648,96 @@ ia: aliases: Aliases de conto appearance: Apparentia authorized_apps: Apps autorisate + back: Tornar a Mastodon delete: Deletion de conto development: Disveloppamento edit_profile: Modificar profilo + export: Exportation de datos featured_tags: Hashtags eminente import: Importar + import_and_export: Importar e exportar migrate: Migration de conto notifications: Notificationes de e-mail preferences: Preferentias profile: Profilo public relationships: Sequites e sequitores + severed_relationships: Relationes rupte + statuses_cleanup: Deletion de message automatic strikes: Admonitiones de moderation + two_factor_authentication: Authentication a duo factores + webauthn_authentication: Claves de securitate severed_relationships: download: Discargar (%{count}) event_type: account_suspension: Suspension del conto (%{target_name}) domain_block: Suspension del servitor (%{target_name}) user_domain_block: Tu ha blocate %{target_name} + lost_followers: Sequitores perdite + lost_follows: Sequites perdite preamble: Tu pote perder sequites e sequitores quando tu bloca un dominio o quando tu moderatores decide suspender un servitor remote. Quando isto occurre, tu potera discargar listas de relationes rumpite, a inspectar e eventualmente importar in un altere servitor. + purged: Le information re iste servitor ha essite purgate per le administratores de tu servitor. type: Evento statuses: + attached: + audio: + one: "%{count} audio" + other: "%{count} audio" + description: 'Attachate: %{attached}' + image: + one: "%{count} imagine" + other: "%{count} imagines" + video: + one: "%{count} video" + other: "%{count} videos" + boosted_from_html: Impulsate desde %{acct_link} + content_warning: 'Advertimento de contento: %{warning}' + default_language: Mesme como lingua de interfacie + disallowed_hashtags: + one: 'contineva un hashtag non autorisate: %{tags}' + other: 'contineva le hashtags non autorisate: %{tags}' + edited_at_html: Modificate le %{date} + errors: + in_reply_not_found: Le message a que tu tenta responder non pare exister. open_in_web: Aperir in le web + over_character_limit: limite de characteres de %{max} excedite + pin_errors: + direct: Messages que es solo visibile a usatores mentionate non pote esser appunctate + limit: Tu ha jam appunctate le maxime numero de messages + ownership: Le message de alcuno altere non pote esser appunctate + reblog: Un impulso non pote esser affixate poll: + total_people: + one: "%{count} persona" + other: "%{count} personas" + total_votes: + one: "%{count} voto" + other: "%{count} votos" vote: Votar show_more: Monstrar plus + show_thread: Monstrar argumento + title: '%{name}: "%{quote}"' visibilities: direct: Directe + private: Solo-sequaces private_long: Solmente monstrar a sequitores public: Public + public_long: Omnes pote vider + unlisted: Non listate + unlisted_long: Omnes pote vider, ma non es listate in le chronologias public statuses_cleanup: + enabled: Deler automaticamente le messages ancian + enabled_hint: Dele automaticamente tu messages un vice que illos attinge un limine de etate specificate, salvo que illes concorda un del exceptiones infra + exceptions: Exceptiones + explanation: Pois que deler messages es un operation costose, isto es facite lentemente in le tempore quando le servitor non es alteremente occupate. Pro iste ration, tu messages pote esser delite un poco post que illos attinge le limine de etate. + ignore_favs: Ignorar favoritos + ignore_reblogs: Ignorar impulsos + interaction_exceptions: Exceptiones basate super interactiones + interaction_exceptions_explanation: Nota que il non ha garantia que le messages essera delite si illos va sub le limine de favorites o impulsos post haber lo superate un vice. + keep_direct: Mantener le messages directe + keep_direct_hint: Non dele alcuno de tu messages directe + keep_media: Mantener messages con annexos de medios + keep_media_hint: Non dele alcuno de tu messages que ha annexos de medios + keep_pinned: Mantener messages appunctate keep_pinned_hint: Non dele alcuno de tu messages appunctate keep_polls: Mantener sondages keep_polls_hint: Non dele ulle de tu sondages @@ -1567,32 +1755,94 @@ ia: '63113904': 2 annos '7889238': 3 menses min_age_label: Limine de etate + min_favs: Mantener messages favorite al minus + min_favs_hint: Non deler alcuno de tu messages que ha recipite al minus iste numero de favoritos. Lassar blanc pro deler messages sin reguardo de lor numero de favoritos + min_reblogs: Mantener messages impulsate al minus + min_reblogs_hint: Non dele alcun de tu messages que ha essite impulsate al minus iste numero de vices. Lassar vacue pro deler messages independentemente de lor numero de impulsos stream_entries: sensitive_content: Contento sensibile strikes: errors: too_late: Es troppo tarde pro facer appello contra iste admonition + tags: + does_not_match_previous_name: non concorda le nomine previe themes: contrast: Mastodon (Alte contrasto) default: Mastodon (Obscur) mastodon-light: Mastodon (Clar) system: Automatic (usar thema del systema) + time: + formats: + default: "%d %b %Y, %H:%M" + month: "%b %Y" + time: "%H:%M" + with_time_zone: "%b %d, %Y, %H:%M %Z" + translation: + errors: + quota_exceeded: Le quota de utilisation del servitor pro le servicio de traduction ha essite excedite. + too_many_requests: Il ha habite troppe requestas al servicio de traduction recentemente. two_factor_authentication: add: Adder disable: Disactivar 2FA + disabled_success: Authentication a duo factores disactivate con successo edit: Modificar + enabled: Le authentication a duo factores es activate + enabled_success: Authentication a duo factores activate con successo generate_recovery_codes: Generar codices de recuperation + lost_recovery_codes: Le codices de recuperation te permitte de reganiar accesso a tu conto si tu perde tu telephono. Si tu ha perdite tu codices de recuperation, tu pote regenerar los ci. Tu vetere codices de recuperation sera invalidate. + methods: Methodos a duo factores + otp: App de authenticator + recovery_codes: Salveguardar codices de recuperation + recovery_codes_regenerated: Codices de recuperation regenerate con successo + recovery_instructions_html: Si tu perde le accesso a tu telephono, tu pote usar un del codices de recuperation hic infra pro reganiar le accesso a tu conto. Mantene le codices de recuperation secur. Per exemplo, tu pote imprimer los e guardar los con altere documentos importante. + webauthn: Claves de securitate user_mailer: appeal_approved: action: Parametros de conto explanation: Le appello contra le admonition contra tu conto del %{strike_date}, que tu ha submittite le %{appeal_date}, ha essite approbate. Tu conto ha de novo un bon reputation. + subject: Tu appello ab %{date} ha essite approbate + subtitle: Tu conto es ancora un vice in regula. + title: Appello approbate appeal_rejected: explanation: Le appello contra le admonition contra tu conto del %{strike_date}, que tu ha submittite le %{appeal_date}, ha essite rejectate. + subject: Tu appello ab %{date} ha essite rejectate + subtitle: Tu appello ha essite rejectate. + title: Appello rejectate + backup_ready: + explanation: Tu ha requestate un copia de securitate complete de tu conto de Mastodon. + extra: Isto es preste pro discargar! + subject: Tu archivo es preste pro discargar + title: Discargar archivo + failed_2fa: + details: 'Hic es le detalios del tentativa de initio de session:' + explanation: Alcuno ha tentate aperir session a tu conto ma ha fornite un secunde factor de authentication non valide. + further_actions_html: Si non se tractava de te, nos recommenda %{action} immediatemente perque illo pote esser compromittite. + subject: Fallimento del authentication de duo factores + title: Falleva le authentication de duo factores + suspicious_sign_in: + change_password: cambiar tu contrasigno + details: 'Hic es le detalios del initio de session:' + explanation: Nos ha detegite un initio de session a tu conto ab un nove adresse IP. + further_actions_html: Si non se tractava de te, nos recommenda %{action} immediatemente e activar le authentication bifactorial pro mantener tu conto secur. + subject: Alcuno ha accedite a tu conto desde un nove adresse IP + title: Un nove initio de session warning: appeal: Submitter un appello + appeal_description: Si tu crede que se tracta de un error, tu pote presentar un appello al personal de %{instance}. categories: spam: Spam + violation: Le contento viola le sequente regulas del communitate + explanation: + delete_statuses: Alcunes de tu messages ha essite judicate contrari a un o plus directivas communitari e ha dunque essite removite per le moderatores de %{instance}. + disable: Tu non pote plus usar tu conto, ma tu profilo e altere datos remane intacte. Tu pote requestar un copia de reserva de tu datos, cambiar le parametros del conto o deler le conto. + mark_statuses_as_sensitive: Alcunes de tu messages ha essite marcate como sensibile per le moderatores de %{instance}. Isto vole dicer que le gente debe toccar le objectos multimedial in le messages ante que un previsualisation appare. Tu pote marcar objectos multimedial como sensibile tu mesme quando tu publica messages in futuro. + sensitive: A partir de iste momento, tote le files multimedial que tu incarga essera marcate como sensibile e le gente debera cliccar sur un advertimento ante de poter vider los. + silence: Tu pote ancora usar tu conto ma solmente le personas qui ja te seque videra tu messages sur iste servitor, e tu pote esser excludite de varie functiones de discoperta. Nonobstante, altere personas pote ancora sequer te manualmente. + suspend: Tu non pote plus usar tu conto, e tu profilo e altere datos non es plus accessibile. Tu pote ancora aperir session pro requestar un copia de reserva de tu datos usque lor elimination in circa 30 dies. Nos retenera certe datos de base pro impedir que tu evade le suspension. + reason: 'Ration:' + statuses: 'Message citate:' subject: + delete_statuses: Tu messages sur %{acct} esseva removite disable: Tu conto %{acct} ha essite gelate mark_statuses_as_sensitive: Tu messages sur %{acct} ha essite marcate como sensibile none: Advertimento pro %{acct} @@ -1612,20 +1862,71 @@ ia: apps_ios_action: Discargar sur le App Store apps_step: Discarga nostre applicationes official. apps_title: Applicationes de Mastodon + checklist_subtitle: 'Comencia tu aventura sur le web social:' + checklist_title: Prime passos edit_profile_action: Personalisar edit_profile_step: Impulsa tu interactiones con un profilo comprehensive. edit_profile_title: Personalisar tu profilo explanation: Ecce alcun consilios pro initiar feature_action: Apprender plus + feature_audience: Mastodon te presenta le possibilitate unic de gerer tu audientia sin intermediarios. Mastodon, installate sur tu proprie infrastructura, te permitte sequer, e esser sequite per, personas sur qualcunque altere servitor Mastodon in linea, e necuno lo controla salvo tu. feature_audience_title: Crea tu auditorio in fiducia + feature_control: Tu sape melio lo que tu vole vider sur tu fluxo de initio. Nulle algorithmos o annuncios dissipa tu tempore. Seque quicinque sur qualcunque servitor Mastodon desde un sol conto, recipe lor messages in ordine chronologic, e face te un angulo del internet ubi tu te senti a casa. + feature_control_title: Mantene le controlo de tu proprie chronologia + feature_creativity: Mastodon supporta messages con audio, video e imagines, descriptiones de accessibilitate, sondages, advertimentos de contento, avatares con animation, emojis personalisate, controlo de retalio de miniaturas, e plus, pro adjutar te a exprimer te in linea. Que tu publica tu arte, tu musica o tu podcast, Mastodon existe pro te. + feature_creativity_title: Creativitate sin parallel + feature_moderation: Mastodon remitte le controlo in tu manos. Cata servitor crea su proprie regulas e directivas, applicate localmente e non de maniera vertical como le medios social corporative, rendente lo flexibile in responder al necessitates de differente gruppos de personas. Adhere a un servitor con regulas que te place, o alberga le tue. feature_moderation_title: Moderation como deberea esser follow_action: Sequer + follow_step: Sequer personas interessante es le ration de esser de Mastodon. + follow_title: Personalisa tu fluxo de initio + follows_subtitle: Seque contos popular + follows_title: Qui sequer + follows_view_more: Vider plus de personas a sequer + hashtags_recent_count: + one: "%{people} persona in le passate duo dies" + other: "%{people} personas in le passate duo diea" + hashtags_subtitle: Explora le tendentias del passate 2 dies + hashtags_title: Hashtags in tendentia + hashtags_view_more: Vider plus de hashtags in tendentia + post_action: Scriber + post_step: Saluta le mundo con texto, photos, videos o sondages. post_title: Face tu prime message share_action: Compartir + share_step: Face saper a tu amicos como trovar te sur Mastodon. share_title: Compartir tu profilo de Mastodon + sign_in_action: Initiar session subject: Benvenite in Mastodon + title: Benvenite a bordo, %{name}! + users: + follow_limit_reached: Tu non pote sequer plus de %{limit} personas + go_to_sso_account_settings: Vader al parametros de conto de tu fornitor de identitate + invalid_otp_token: Codice de duo factores non valide + otp_lost_help_html: Si tu ha perdite le accesso a ambes, tu pote contactar %{email} + rate_limited: Troppo de tentativas de authentication. Per favor reessaya plus tarde. + seamless_external_login: Tu ha aperite session per medio de un servicio externe. Le parametros de contrasigno e de e-mail es dunque indisponibile. + signed_in_as: 'Session aperite como:' verification: + extra_instructions_html: Consilio: Le ligamine sur tu sito web pote esser invisibile. Le parte importante es rel="me" que impedi le usurpation de identitate sur sitos web con contento generate per usatores. Tu pote mesmo usar un etiquetta link in le capite del pagina in vice de a, ma le codice HTML debe esser accessibile sin executar JavaScript. + here_is_how: Ecce como + hint_html: "Omnes pote verificar lor identitate sur Mastodon. Isto es basate sur standards web aperte e es gratuite, ora e pro sempre. Tote lo que es necessari es un sito web personal que le gente recognosce como le tue. Quando tu liga a iste sito web desde tu profilo, le systema verificara que le sito web liga retro a tu profilo e monstrara un indicator visual de iste facto." + instructions_html: Copia e colla le codice hic infra in le HTML de tu sito web. Alora adde le adresse de tu sito web in un del campos supplementari sur tu profilo desde le scheda “Modificar profilo” e salva le cambiamentos. + verification: Verification verified_links: Tu ligamines verificate webauthn_credentials: add: Adder un nove clave de securitate + create: + error: Il habeva un problema in adder tu clave de securitate. Tenta novemente. + success: Tu clave de securitate ha essite addite con successo. delete: Deler + delete_confirmation: Es tu secur que tu vole deler iste clave de securitate? + description_html: Si tu activa le authentication per clave de securitate, le apertura de session requirera que tu usa un de tu claves de securitate. + destroy: + error: Il habeva un problema in deler tu clave de securitate. Tenta novemente. + success: Tu clave de securitate ha essite delite con successo. + invalid_credential: Clave de securitate non valide + nickname_hint: Insere le pseudonymo de tu nove clave de securitate + not_enabled: Tu ancora non ha activate WebAuthn + not_supported: Iste navigator non supporta claves de securitate + otp_required: Pro usar le claves de securitate activa prime le authentication de duo factores. + registered_on: Registrate le %{date} diff --git a/config/locales/it.yml b/config/locales/it.yml index bda681ac084583..5b75e7af7dd142 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -285,6 +285,7 @@ it: update_custom_emoji_html: "%{name} ha aggiornato emoji %{target}" update_domain_block_html: "%{name} ha aggiornato il blocco dominio per %{target}" update_ip_block_html: "%{name} ha cambiato la regola per l'IP %{target}" + update_report_html: "%{name} ha aggiornato la segnalazione %{target}" update_status_html: "%{name} ha aggiornato lo status di %{target}" update_user_role_html: "%{name} ha modificato il ruolo %{target}" deleted_account: account eliminato diff --git a/config/locales/ko.yml b/config/locales/ko.yml index f3f3e3a8fba7c9..b104e31fc0e71c 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -282,6 +282,7 @@ ko: update_custom_emoji_html: "%{name} 님이 에모지 %{target}를 업데이트 했습니다" update_domain_block_html: "%{name} 님이 %{target}에 대한 도메인 차단을 갱신했습니다" update_ip_block_html: "%{name} 님이 IP 규칙 %{target}을 수정했습니다" + update_report_html: "%{name} 님이 신고 %{target}를 업데이트 했습니다" update_status_html: "%{name} 님이 %{target}의 게시물을 업데이트했습니다" update_user_role_html: "%{name} 님이 %{target} 역할을 수정했습니다" deleted_account: 계정을 삭제했습니다 diff --git a/config/locales/lad.yml b/config/locales/lad.yml index e9f18d4bede648..9c165472cd71b1 100644 --- a/config/locales/lad.yml +++ b/config/locales/lad.yml @@ -285,6 +285,7 @@ lad: update_custom_emoji_html: "%{name} aktualizo el emoji %{target}" update_domain_block_html: "%{name} aktualizo el bloko de domeno para %{target}" update_ip_block_html: "\"%{name} troko la regla de IP %{target}" + update_report_html: "%{name} aktualizo el raporto %{target}" update_status_html: "%{name} aktualizo la publikasyon de %{target}" update_user_role_html: "%{name} troko el rolo %{target}" deleted_account: kuento supremido diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 74dea29b0e3558..3452f8099432d9 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -285,6 +285,7 @@ nl: update_custom_emoji_html: Emoji %{target} is door %{name} bijgewerkt update_domain_block_html: "%{name} heeft de domeinblokkade bijgewerkt voor %{target}" update_ip_block_html: "%{name} wijzigde de IP-regel voor %{target}" + update_report_html: Rapportage %{target} is door %{name} bijgewerkt update_status_html: "%{name} heeft de berichten van %{target} bijgewerkt" update_user_role_html: "%{name} wijzigde de rol %{target}" deleted_account: verwijderd account diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 7c037d7d002bf3..1c3fda8d032b90 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -291,6 +291,7 @@ pl: update_custom_emoji_html: Zaktualizowane emoji %{target} przez %{name} update_domain_block_html: Zaktualizowano blokadę domeny dla %{target} przez %{name} update_ip_block_html: "%{name} stworzył(a) regułę dla IP %{target}" + update_report_html: "%{target} zaktualizowany przez %{name}" update_status_html: "%{name} zaktualizował(a) wpis użytkownika %{target}" update_user_role_html: "%{name} zmienił rolę %{target}" deleted_account: usunięte konto diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 0c2e6cfd6d782d..b4669e24d810da 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -285,6 +285,7 @@ pt-PT: update_custom_emoji_html: "%{name} atualizou o emoji %{target}" update_domain_block_html: "%{name} atualizou o bloqueio de domínio para %{target}" update_ip_block_html: "%{name} alterou regra para IP %{target}" + update_report_html: "%{name} atualizou a denúncia %{target}" update_status_html: "%{name} atualizou o estado de %{target}" update_user_role_html: "%{name} alterou a função %{target}" deleted_account: conta apagada diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 2f7010bacf172e..9ac36447de307e 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -78,14 +78,14 @@ fi: form_admin_settings: activity_api_enabled: Paikallisesti julkaistujen julkaisujen, aktiivisten käyttäjien ja rekisteröitymisten viikoittainen määrä app_icon: WEBP, PNG, GIF tai JPG. Korvaa oletusarvoisen mobiililaitteiden sovelluskuvakkeen omalla kuvakkeella. - backups_retention_period: Käyttäjillä on mahdollisuus arkistoida julkaisujaan myöhemmin ladattaviksi. Kun tämä on asetettu positiiviseksi arvoksi, nämä arkistot poistetaan automaattisesti asetetun päivien määrän jälkeen. + backups_retention_period: Käyttäjillä on mahdollisuus arkistoida julkaisujaan myöhemmin ladattaviksi. Kun arvo on positiivinen, nämä arkistot poistuvat automaattisesti, kun määritetty määrä päiviä on kulunut. bootstrap_timeline_accounts: Nämä tilit kiinnitetään uusien käyttäjien seuraamissuosituslistojen alkuun. closed_registrations_message: Näkyy, kun rekisteröityminen on suljettu - content_cache_retention_period: Kaikki muiden palvelimien viestit (mukaan lukien tehostukset ja vastaukset) poistetaan määritetyn päivien lukumäärän jälkeen, ottamatta huomioon paikallisen käyttäjän vuorovaikutusta kyseisten viestien kanssa. Sisältää viestit, jossa paikallinen käyttäjä on merkinnyt kirjanmerkiksi tai suosikeiksi. Myös yksityiset maininnat eri käyttäjien välillä menetetään, eikä niitä voi palauttaa. Tämän asetuksen käyttö on tarkoitettu erityisiin tapauksiin ja se rikkoo monia käyttäjien odotuksia, kun se toteutetaan yleistarkoituksiin. + content_cache_retention_period: Kaikki muiden palvelinten julkaisut (mukaan lukien tehostukset ja vastaukset) poistuvat, kun määritetty määrä päiviä on kulunut, ottamatta huomioon paikallisen käyttäjän vuorovaikutusta näiden julkaisujen kanssa. Sisältää julkaisut, jotka paikallinen käyttäjä on merkinnyt kirjanmerkiksi tai suosikiksi. Myös yksityiset maininnat eri palvelinten käyttäjien välillä menetetään, eikä niitä voi palauttaa. Tämä asetus on tarkoitettu käytettäväksi erityistapauksissa ja rikkoo monia käyttäjien odotuksia, kun sitä käytetään yleistarkoituksiin. custom_css: Voit käyttää mukautettuja tyylejä Mastodonin verkkoversiossa. favicon: WEBP, PNG, GIF tai JPG. Korvaa oletusarvoisen Mastodonin suosikkikuvakkeen omalla kuvakkeella. mascot: Ohittaa kuvituksen edistyneessä selainkäyttöliittymässä. - media_cache_retention_period: Mediatiedostot käyttäjien tekemistä viesteistä ovat välimuistissa palvelimellasi. Kun arvo on positiivinen, media poistetaan määritetyn ajan jälkeen. Jos mediaa pyydetään sen poistamisen jälkeen, ne ladataan uudelleen, jos lähdesisältö on vielä saatavilla. Koska linkkien katselun kyselyitä kolmansien osapuolien sivustoille on rajoitettu, on suositeltavaa asettaa tämä arvo vähintään 14 päivään tai linkkien kortteja ei päivitetä pyynnöstä ennen tätä aikaa. + media_cache_retention_period: Käyttäjien tekemien julkaisujen mediatiedostot ovat välimuistissa palvelimellasi. Kun arvo on positiivinen, media poistuu, kun määritetty määrä päiviä on kulunut. Jos mediaa pyydetään sen poistamisen jälkeen, se ladataan uudelleen, jos lähdesisältö on vielä saatavilla. Koska linkkien esikatselun kyselyitä kolmansien osapuolien sivustoille on rajoitettu, on suositeltavaa asettaa tämä arvo vähintään 14 päivään, tai linkkien kortteja ei päivitetä pyynnöstä ennen tätä ajankohtaa. peers_api_enabled: Luettelo verkkotunnuksista, jotka tämä palvelin on kohdannut fediversumissa. Se ei kerro, oletko liitossa tietyn palvelimen kanssa, vaan että palvelimesi on ylipäätään tietoinen siitä. Tätä tietoa käytetään palveluissa, jotka keräävät tilastoja federoinnista yleisellä tasolla. profile_directory: Profiilihakemisto lueteloi kaikki käyttäjät, jotka ovat ilmoittaneet olevansa löydettävissä. require_invite_text: Kun rekisteröityminen vaatii manuaalisen hyväksynnän, tee ”Miksi haluat liittyä?” -tekstikentästä pakollinen vapaaehtoisen sijaan diff --git a/config/locales/simple_form.sl.yml b/config/locales/simple_form.sl.yml index a4abb737c0ecc5..96b36307a5795d 100644 --- a/config/locales/simple_form.sl.yml +++ b/config/locales/simple_form.sl.yml @@ -77,10 +77,15 @@ sl: warn: Skrij filtrirano vsebino za opozorilom, ki pomenja naslov filtra form_admin_settings: activity_api_enabled: Številke krajevno objavljenih objav, dejavnih uporabnikov in novih registracij na tedenskih seznamih + app_icon: WEBP, PNG, GIF ali JPG. Zamenja privzeto ikono programa na mobilnih napravah z ikono po meri. + backups_retention_period: Uporabniki lahko ustvarijo arhive svojih objav za kasnejši prenos k sebi. Ko je nastavljeno na pozitivno vrednost, bodo ti arhivi po nastavljenem številu dni samodejno izbrisani. bootstrap_timeline_accounts: Ti računi bodo pripeti na vrh priporočenih sledenj za nove uporabnike. closed_registrations_message: Prikazano, ko so registracije zaprte + content_cache_retention_period: Vse objave z drugih strežnikov (vključno z izpostavitvami in odgovori) bodo izbrisani po nastavljenem številu dni, ne glede na krajevne interakcije s temi objavami. To vključuje objave, ki jih je krajevni uporabnik dodal med zaznamke ali priljubljene. Zasebne omembe med uporabniki na različnih strežnikih bodo prav tako izgubljene in jih ne bo moč obnoviti. Uporaba te nastavitve je namenjena strežnikom s posebnim namenom in nasprotuje mnogim pričakovanjem uporabnikov na strežnikih za splošni namen. custom_css: Spletni različici Mastodona lahko uveljavite sloge po meri. + favicon: WEBP, PNG, GIF ali JPG. Zamenja privzeto ikono spletne strani Mastodon z ikono po meri. mascot: Preglasi ilustracijo v naprednem spletnem vmesniku. + media_cache_retention_period: Predstavnostne datoteke iz objav uporabnikov na ostalih strežnikih se začasno hranijo na tem strežniku. Ko je nastavljeno na pozitivno vrednost, bodo predstavnostne datoteke izbrisane po nastavljenem številu dni. Če bo predstavnostna datoteka zahtevana po izbrisu, bo ponovno prenešena, če bo vir še vedno na voljo. Zaradi omejitev pogostosti prejemanja predogledov povezav z drugih strani je priporočljivo to vrednost nastaviti na vsaj 14 dni. V nasprotnem predogledi povezav pred tem časom ne bodo osveženi na zahtevo. peers_api_enabled: Seznam imen domen, na katere je ta strežnik naletel v fediverzumu. Sem niso vključeni podatki o tem, ali ste v federaciji z danim strežnikom, zgolj to, ali vaš strežnik ve zanj. To uporabljajo storitve, ki zbirajo statistične podatke o federaciji v splošnem smislu. profile_directory: Imenik profilov izpiše vse uporabnike, ki so dovolili, da so v njem navedeni. require_invite_text: Če registracije zahtevajo ročno potrditev, nastavite vnos besedila pod »Zakaj se želite pridružiti?« za obveznega. @@ -240,6 +245,7 @@ sl: backups_retention_period: Obdobje hrambe arhivov uporabnikov bootstrap_timeline_accounts: Vedno priporočaj te račune novim uporabnikom closed_registrations_message: Sporočilo po meri, ko registracije niso na voljo + content_cache_retention_period: Obdobje hranjenja vsebine z ostalih strežnikov custom_css: CSS po meri mascot: Maskota po meri (opuščeno) media_cache_retention_period: Obdobje hrambe predpomnilnika predstavnosti diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 6c26511ad6968a..329ce5a29b5701 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -291,6 +291,7 @@ sl: update_custom_emoji_html: "%{name} je posodobil/a emotikone %{target}" update_domain_block_html: "%{name} je posodobil/a domenski blok za %{target}" update_ip_block_html: "%{name} je spremenil/a pravilo za IP %{target}" + update_report_html: "%{name} je posodobil poročilo %{target}" update_status_html: "%{name} je posodobil/a objavo uporabnika %{target}" update_user_role_html: "%{name} je spremenil/a vlogo %{target}" deleted_account: izbrisan račun diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml index b4976f8985da90..808a10e7290c6a 100644 --- a/config/locales/sr-Latn.yml +++ b/config/locales/sr-Latn.yml @@ -288,6 +288,7 @@ sr-Latn: update_custom_emoji_html: "%{name} je ažurirao/-la emodži %{target}" update_domain_block_html: "%{name} je ažurirao/-la blok domena %{target}" update_ip_block_html: "%{name} je promenio/-la IP uslov za %{target}" + update_report_html: "%{name} je ažurirao izveštaj %{target}" update_status_html: "%{name} je ažurirao/-la objavu korisnika %{target}" update_user_role_html: "%{name} je promenio/-la poziciju %{target}" deleted_account: obrisan nalog diff --git a/config/locales/sr.yml b/config/locales/sr.yml index aec6d399d58639..f03c6e878a2a09 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -288,6 +288,7 @@ sr: update_custom_emoji_html: "%{name} је ажурирао/-ла емоџи %{target}" update_domain_block_html: "%{name} је ажурирао/-ла блок домена %{target}" update_ip_block_html: "%{name} је променио/-ла IP услов за %{target}" + update_report_html: "%{name} је ажурирао извештај %{target}" update_status_html: "%{name} је ажурирао/-ла објаву корисника %{target}" update_user_role_html: "%{name} је променио/-ла позицију %{target}" deleted_account: обрисан налог diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 11e1fce3fe6739..9f0de4a723a781 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -285,6 +285,7 @@ sv: update_custom_emoji_html: "%{name} uppdaterade emoji %{target}" update_domain_block_html: "%{name} uppdaterade domän-block för %{target}" update_ip_block_html: "%{name} ändrade regel för IP %{target}" + update_report_html: "%{name} uppdaterade rapporten %{target}" update_status_html: "%{name} uppdaterade inlägget av %{target}" update_user_role_html: "%{name} ändrade rollen %{target}" deleted_account: raderat konto diff --git a/config/locales/th.yml b/config/locales/th.yml index 56b7bea69a8ad8..5711f68ff89061 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -282,6 +282,7 @@ th: update_custom_emoji_html: "%{name} ได้อัปเดตอีโมจิ %{target}" update_domain_block_html: "%{name} ได้อัปเดตการปิดกั้นโดเมนสำหรับ %{target}" update_ip_block_html: "%{name} ได้เปลี่ยนกฎสำหรับ IP %{target}" + update_report_html: "%{name} ได้อัปเดตรายงาน %{target}" update_status_html: "%{name} ได้อัปเดตโพสต์โดย %{target}" update_user_role_html: "%{name} ได้เปลี่ยนบทบาท %{target}" deleted_account: บัญชีที่ลบแล้ว @@ -1838,6 +1839,7 @@ th: feature_action: เรียนรู้เพิ่มเติม feature_audience: Mastodon มีความพิเศษที่ให้คุณจัดการผู้รับสารของคุณได้โดยไม่มีตัวกลาง นอกจากนี้ การติดตั้ง Mastodon บนโครงสร้างพื้นฐานของคุณจะทำให้คุณสามารถติดตาม (และติดตามโดย) เซิร์ฟเวอร์ Mastodon แห่งไหนก็ได้ที่ทำงานอยู่ โดยไม่มีใครสามารถควบคุมได้นอกจากคุณ feature_audience_title: สร้างผู้ชมของคุณด้วยความมั่นใจ + feature_control: คุณทราบดีที่สุดถึงสิ่งที่คุณต้องการเห็นในฟีดหน้าแรกของคุณ ไม่มีอัลกอริทึมหรือโฆษณาให้เสียเวลาของคุณ ติดตามใครก็ตามทั่วทั้งเซิร์ฟเวอร์ Mastodon ใด ๆ จากบัญชีเดียวและรับโพสต์ของเขาตามลำดับเวลา และทำให้มุมอินเทอร์เน็ตของคุณเป็นเหมือนคุณมากขึ้นอีกนิด feature_control_title: การควบคุมเส้นเวลาของคุณเอง feature_creativity_title: ความคิดสร้างสรรค์ที่ไม่มีใครเทียบได้ feature_moderation_title: การกลั่นกรองในแบบที่ควรจะเป็น diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 7b9cf50aaf86ea..469f2c5ad8f07e 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -285,6 +285,7 @@ tr: update_custom_emoji_html: "%{name}, %{target} emojisini güncelledi" update_domain_block_html: "%{name}, %{target} alan adının engelini güncelledi" update_ip_block_html: "%{name}, %{target} IP adresi için kuralı güncelledi" + update_report_html: "%{name}, %{target} raporunu güncelledi" update_status_html: "%{name}, %{target} kullanıcısının gönderisini güncelledi" update_user_role_html: "%{name}, %{target} rolünü değiştirdi" deleted_account: hesap silindi diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 5d9e881ea43a2d..05f3157ec96452 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -282,6 +282,7 @@ vi: update_custom_emoji_html: "%{name} đã cập nhật emoji %{target}" update_domain_block_html: "%{name} cập nhật chặn máy chủ %{target}" update_ip_block_html: "%{name} cập nhật chặn IP %{target}" + update_report_html: "%{name} cập nhật báo cáo %{target}" update_status_html: "%{name} cập nhật tút của %{target}" update_user_role_html: "%{name} đã thay đổi vai trò %{target}" deleted_account: tài khoản đã xóa diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 3140ebdd309aee..12b6197938efd7 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -282,6 +282,7 @@ zh-CN: update_custom_emoji_html: "%{name} 更新了自定义表情 %{target}" update_domain_block_html: "%{name} 更新了对 %{target} 的域名屏蔽" update_ip_block_html: "%{name} 修改了对 IP %{target} 的规则" + update_report_html: "%{name} 更新了举报 %{target}" update_status_html: "%{name} 刷新了 %{target} 的嘟文" update_user_role_html: "%{name} 更改了 %{target} 角色" deleted_account: 账号已注销 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index cdedd759eae866..ac633a201d8fc7 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -282,6 +282,7 @@ zh-TW: update_custom_emoji_html: "%{name} 已更新自訂 emoji 表情符號 %{target}" update_domain_block_html: "%{name} 已更新 %{target} 之網域封鎖" update_ip_block_html: "%{name} 已變更 IP %{target} 之規則" + update_report_html: "%{name} 已更新 %{target} 的檢舉" update_status_html: "%{name} 已更新 %{target} 的嘟文" update_user_role_html: "%{name} 已變更 %{target} 角色" deleted_account: 已刪除帳號 From 0ce22859a5f989593b04cc7701521655a2f85480 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 09:56:28 +0200 Subject: [PATCH 088/113] fix(deps): update dependency @rails/ujs to v7.1.3 (#30356) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 773f19c50d8b9b..f38076d4c6cca8 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@formatjs/intl-pluralrules": "^5.2.2", "@gamestdio/websocket": "^0.3.2", "@github/webauthn-json": "^2.1.1", - "@rails/ujs": "7.1.3-3", + "@rails/ujs": "7.1.3", "@reduxjs/toolkit": "^2.0.1", "@svgr/webpack": "^5.5.0", "arrow-key-navigation": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 6b1dd8d22dbe2d..698824cab4854b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2758,7 +2758,7 @@ __metadata: "@formatjs/intl-pluralrules": "npm:^5.2.2" "@gamestdio/websocket": "npm:^0.3.2" "@github/webauthn-json": "npm:^2.1.1" - "@rails/ujs": "npm:7.1.3-3" + "@rails/ujs": "npm:7.1.3" "@reduxjs/toolkit": "npm:^2.0.1" "@svgr/webpack": "npm:^5.5.0" "@testing-library/jest-dom": "npm:^6.0.0" @@ -3042,10 +3042,10 @@ __metadata: languageName: node linkType: hard -"@rails/ujs@npm:7.1.3-3": - version: 7.1.3-3 - resolution: "@rails/ujs@npm:7.1.3-3" - checksum: 10c0/9eee95372b72d8f704b67f14a3bf9f2681ab5b11c7b79919bfde3341f2970771876af5b40de5b3e4fca6a97c76a41046eff71d96490617c1fc80ef3ad8bbac47 +"@rails/ujs@npm:7.1.3": + version: 7.1.3 + resolution: "@rails/ujs@npm:7.1.3" + checksum: 10c0/68112d9add9dbc59b40c2ec1bc095a67445c57d20d0ab7d817ce3de0cd90374e2690af8ad54ce6ecc2d1c748b34c0c44d0fbd2f515ce2c443d7c5d23d00b9ce5 languageName: node linkType: hard From 9658d3e5804ab1e2180a70b6b19386592731fd78 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Mon, 20 May 2024 10:01:04 +0200 Subject: [PATCH 089/113] Use the job class as span name for Sidekiq root spans (#30353) --- config/initializers/opentelemetry.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/initializers/opentelemetry.rb b/config/initializers/opentelemetry.rb index 9af0ab89c8698a..cf9f0b96f3bead 100644 --- a/config/initializers/opentelemetry.rb +++ b/config/initializers/opentelemetry.rb @@ -51,6 +51,9 @@ use_rack_events: false, # instead of events, use middleware; allows for untraced_endpoints to ignore child spans untraced_endpoints: ['/health'], }, + 'OpenTelemetry::Instrumentation::Sidekiq' => { + span_naming: :job_class, # Use the job class as the span name, otherwise this is the queue name and not very helpful + }, }) prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon') From 70608f824e4bdd197d179c70efc82effcefc0c6b Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 20 May 2024 04:03:39 -0400 Subject: [PATCH 090/113] Add coverage for `AdminMailer#auto_close_registrations` (#30349) --- spec/mailers/admin_mailer_spec.rb | 18 ++++++++++++++++++ spec/mailers/previews/admin_mailer_preview.rb | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/spec/mailers/admin_mailer_spec.rb b/spec/mailers/admin_mailer_spec.rb index 88ad7aa02b0408..cd1ab3311c7ffa 100644 --- a/spec/mailers/admin_mailer_spec.rb +++ b/spec/mailers/admin_mailer_spec.rb @@ -125,4 +125,22 @@ .and(have_header('X-Priority', '1')) end end + + describe '.auto_close_registrations' do + let(:recipient) { Fabricate(:account, username: 'Bob') } + let(:mail) { described_class.with(recipient: recipient).auto_close_registrations } + + before do + recipient.user.update(locale: :en) + end + + it 'renders the email' do + expect(mail) + .to be_present + .and(deliver_to(recipient.user_email)) + .and(deliver_from('notifications@localhost')) + .and(have_subject('Registrations for cb6e6126.ngrok.io have been automatically switched to requiring approval')) + .and(have_body_text('have been automatically switched')) + end + end end diff --git a/spec/mailers/previews/admin_mailer_preview.rb b/spec/mailers/previews/admin_mailer_preview.rb index 942d40d56878aa..b8fb387acdec8a 100644 --- a/spec/mailers/previews/admin_mailer_preview.rb +++ b/spec/mailers/previews/admin_mailer_preview.rb @@ -32,4 +32,9 @@ def new_software_updates def new_critical_software_updates AdminMailer.with(recipient: Account.first).new_critical_software_updates end + + # Preview this email at http://localhost:3000/rails/mailers/admin_mailer/auto_close_registrations + def auto_close_registrations + AdminMailer.with(recipient: Account.first).auto_close_registrations + end end From def6b686ff3ea8e4e77075a812bd463a3bf325c3 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 20 May 2024 05:37:36 -0400 Subject: [PATCH 091/113] Fix `Rails/WhereRange` cop (#30343) --- app/lib/vacuum/imports_vacuum.rb | 4 ++-- app/lib/vacuum/statuses_vacuum.rb | 2 +- app/models/concerns/expireable.rb | 2 +- app/models/invite.rb | 2 +- app/policies/backup_policy.rb | 2 +- app/workers/scheduler/ip_cleanup_scheduler.rb | 10 +++++----- app/workers/scheduler/scheduled_statuses_scheduler.rb | 2 +- app/workers/scheduler/user_cleanup_scheduler.rb | 2 +- lib/mastodon/cli/preview_cards.rb | 2 +- .../accounts_statuses_cleanup_scheduler_spec.rb | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/lib/vacuum/imports_vacuum.rb b/app/lib/vacuum/imports_vacuum.rb index 8c8bb783acb84f..700bd81847f4ac 100644 --- a/app/lib/vacuum/imports_vacuum.rb +++ b/app/lib/vacuum/imports_vacuum.rb @@ -9,10 +9,10 @@ def perform private def clean_unconfirmed_imports! - BulkImport.state_unconfirmed.where('created_at <= ?', 10.minutes.ago).reorder(nil).in_batches.delete_all + BulkImport.state_unconfirmed.where(created_at: ..10.minutes.ago).reorder(nil).in_batches.delete_all end def clean_old_imports! - BulkImport.where('created_at <= ?', 1.week.ago).reorder(nil).in_batches.delete_all + BulkImport.where(created_at: ..1.week.ago).reorder(nil).in_batches.delete_all end end diff --git a/app/lib/vacuum/statuses_vacuum.rb b/app/lib/vacuum/statuses_vacuum.rb index ad1de07380ceb9..92d3ccf4f40877 100644 --- a/app/lib/vacuum/statuses_vacuum.rb +++ b/app/lib/vacuum/statuses_vacuum.rb @@ -34,7 +34,7 @@ def vacuum_statuses! def statuses_scope Status.unscoped.kept .joins(:account).merge(Account.remote) - .where('statuses.id < ?', retention_period_as_id) + .where(statuses: { id: ...retention_period_as_id }) end def retention_period_as_id diff --git a/app/models/concerns/expireable.rb b/app/models/concerns/expireable.rb index c64fc7d807d006..26740e8213759d 100644 --- a/app/models/concerns/expireable.rb +++ b/app/models/concerns/expireable.rb @@ -4,7 +4,7 @@ module Expireable extend ActiveSupport::Concern included do - scope :expired, -> { where.not(expires_at: nil).where('expires_at < ?', Time.now.utc) } + scope :expired, -> { where.not(expires_at: nil).where(expires_at: ...Time.now.utc) } def expires_in return @expires_in if defined?(@expires_in) diff --git a/app/models/invite.rb b/app/models/invite.rb index 2fe9f22fbe1339..ea095a3ac17747 100644 --- a/app/models/invite.rb +++ b/app/models/invite.rb @@ -24,7 +24,7 @@ class Invite < ApplicationRecord belongs_to :user, inverse_of: :invites has_many :users, inverse_of: :invite, dependent: nil - scope :available, -> { where(expires_at: nil).or(where('expires_at >= ?', Time.now.utc)) } + scope :available, -> { where(expires_at: nil).or(where(expires_at: Time.now.utc..)) } validates :comment, length: { maximum: COMMENT_SIZE_LIMIT } diff --git a/app/policies/backup_policy.rb b/app/policies/backup_policy.rb index 86b8efbe96fa7d..7a4c5b4347497d 100644 --- a/app/policies/backup_policy.rb +++ b/app/policies/backup_policy.rb @@ -4,6 +4,6 @@ class BackupPolicy < ApplicationPolicy MIN_AGE = 6.days def create? - user_signed_in? && current_user.backups.where('created_at >= ?', MIN_AGE.ago).count.zero? + user_signed_in? && current_user.backups.where(created_at: MIN_AGE.ago..).count.zero? end end diff --git a/app/workers/scheduler/ip_cleanup_scheduler.rb b/app/workers/scheduler/ip_cleanup_scheduler.rb index f78c0584d7f892..04fb0aaa3306cd 100644 --- a/app/workers/scheduler/ip_cleanup_scheduler.rb +++ b/app/workers/scheduler/ip_cleanup_scheduler.rb @@ -16,11 +16,11 @@ def perform private def clean_ip_columns! - SessionActivation.where('updated_at < ?', SESSION_RETENTION_PERIOD.ago).in_batches.destroy_all - SessionActivation.where('updated_at < ?', IP_RETENTION_PERIOD.ago).in_batches.update_all(ip: nil) - User.where('current_sign_in_at < ?', IP_RETENTION_PERIOD.ago).in_batches.update_all(sign_up_ip: nil) - LoginActivity.where('created_at < ?', IP_RETENTION_PERIOD.ago).in_batches.destroy_all - Doorkeeper::AccessToken.where('last_used_at < ?', IP_RETENTION_PERIOD.ago).in_batches.update_all(last_used_ip: nil) + SessionActivation.where(updated_at: ...SESSION_RETENTION_PERIOD.ago).in_batches.destroy_all + SessionActivation.where(updated_at: ...IP_RETENTION_PERIOD.ago).in_batches.update_all(ip: nil) + User.where(current_sign_in_at: ...IP_RETENTION_PERIOD.ago).in_batches.update_all(sign_up_ip: nil) + LoginActivity.where(created_at: ...IP_RETENTION_PERIOD.ago).in_batches.destroy_all + Doorkeeper::AccessToken.where(last_used_at: ...IP_RETENTION_PERIOD.ago).in_batches.update_all(last_used_ip: nil) end def clean_expired_ip_blocks! diff --git a/app/workers/scheduler/scheduled_statuses_scheduler.rb b/app/workers/scheduler/scheduled_statuses_scheduler.rb index fe60d5524eaf20..4e251780de5f1a 100644 --- a/app/workers/scheduler/scheduled_statuses_scheduler.rb +++ b/app/workers/scheduler/scheduled_statuses_scheduler.rb @@ -20,7 +20,7 @@ def publish_scheduled_statuses! end def due_statuses - ScheduledStatus.where('scheduled_at <= ?', Time.now.utc + PostStatusService::MIN_SCHEDULE_OFFSET) + ScheduledStatus.where(scheduled_at: ..Time.now.utc + PostStatusService::MIN_SCHEDULE_OFFSET) end def publish_scheduled_announcements! diff --git a/app/workers/scheduler/user_cleanup_scheduler.rb b/app/workers/scheduler/user_cleanup_scheduler.rb index 63ea876e5078dc..74abc2370189af 100644 --- a/app/workers/scheduler/user_cleanup_scheduler.rb +++ b/app/workers/scheduler/user_cleanup_scheduler.rb @@ -25,7 +25,7 @@ def clean_unconfirmed_accounts! end def clean_discarded_statuses! - Status.unscoped.discarded.where('deleted_at <= ?', DISCARDED_STATUSES_MAX_AGE_DAYS.days.ago).find_in_batches do |statuses| + Status.unscoped.discarded.where(deleted_at: ..DISCARDED_STATUSES_MAX_AGE_DAYS.days.ago).find_in_batches do |statuses| RemovalWorker.push_bulk(statuses) do |status| [status.id, { 'immediate' => true, 'skip_streaming' => true }] end diff --git a/lib/mastodon/cli/preview_cards.rb b/lib/mastodon/cli/preview_cards.rb index 9b20a0cbb8662d..c0e207ad5969b0 100644 --- a/lib/mastodon/cli/preview_cards.rb +++ b/lib/mastodon/cli/preview_cards.rb @@ -29,7 +29,7 @@ def remove link = options[:link] ? 'link-type ' : '' scope = PreviewCard.cached scope = scope.where(type: :link) if options[:link] - scope = scope.where('updated_at < ?', time_ago) + scope = scope.where(updated_at: ...time_ago) processed, aggregate = parallelize_with_progress(scope) do |preview_card| next if preview_card.image.blank? diff --git a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb index 4d9185093a2d3b..08ebf82785f6d9 100644 --- a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb @@ -163,7 +163,7 @@ def cleanable_statuses_count Status .where(account_id: [account_alice, account_chris, account_erin]) # Accounts with enabled policies - .where('created_at < ?', 2.weeks.ago) # Policy defaults is 2.weeks + .where(created_at: ...2.weeks.ago) # Policy defaults is 2.weeks .count end end From de4815afda0809bf999519aabda1cd14c67278da Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 20 May 2024 12:06:51 +0200 Subject: [PATCH 092/113] Add more tests for self-destruct mode (#30374) --- spec/helpers/self_destruct_helper_spec.rb | 70 +++++++++++++++++ spec/requests/self_destruct_spec.rb | 92 +++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 spec/helpers/self_destruct_helper_spec.rb create mode 100644 spec/requests/self_destruct_spec.rb diff --git a/spec/helpers/self_destruct_helper_spec.rb b/spec/helpers/self_destruct_helper_spec.rb new file mode 100644 index 00000000000000..09d7347eee7ab7 --- /dev/null +++ b/spec/helpers/self_destruct_helper_spec.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe SelfDestructHelper do + describe 'self_destruct?' do + context 'when SELF_DESTRUCT is unset' do + it 'returns false' do + expect(helper.self_destruct?).to be false + end + end + + context 'when SELF_DESTRUCT is set to an invalid value' do + around do |example| + ClimateControl.modify SELF_DESTRUCT: 'true' do + example.run + end + end + + it 'returns false' do + expect(helper.self_destruct?).to be false + end + end + + context 'when SELF_DESTRUCT is set to value signed for the wrong purpose' do + around do |example| + ClimateControl.modify( + SELF_DESTRUCT: Rails.application.message_verifier('foo').generate('example.com'), + LOCAL_DOMAIN: 'example.com' + ) do + example.run + end + end + + it 'returns false' do + expect(helper.self_destruct?).to be false + end + end + + context 'when SELF_DESTRUCT is set to value signed for the wrong domain' do + around do |example| + ClimateControl.modify( + SELF_DESTRUCT: Rails.application.message_verifier('self-destruct').generate('foo.com'), + LOCAL_DOMAIN: 'example.com' + ) do + example.run + end + end + + it 'returns false' do + expect(helper.self_destruct?).to be false + end + end + + context 'when SELF_DESTRUCT is set to a correctly-signed value' do + around do |example| + ClimateControl.modify( + SELF_DESTRUCT: Rails.application.message_verifier('self-destruct').generate('example.com'), + LOCAL_DOMAIN: 'example.com' + ) do + example.run + end + end + + it 'returns true' do + expect(helper.self_destruct?).to be true + end + end + end +end diff --git a/spec/requests/self_destruct_spec.rb b/spec/requests/self_destruct_spec.rb new file mode 100644 index 00000000000000..f71a2325e2a897 --- /dev/null +++ b/spec/requests/self_destruct_spec.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe 'Self-destruct mode' do + before do + allow(SelfDestructHelper).to receive(:self_destruct?).and_return(true) + end + + shared_examples 'generic logged out request' do |path| + it 'returns 410 gone and mentions self-destruct' do + get path, headers: { 'Accept' => 'text/html' } + + expect(response).to have_http_status(410) + expect(response.body).to include(I18n.t('self_destruct.title')) + end + end + + shared_examples 'accessible logged-in endpoint' do |path| + it 'returns 200 ok' do + get path + + expect(response).to have_http_status(200) + end + end + + shared_examples 'ActivityPub request' do |path| + context 'without signature' do + it 'returns 410 gone' do + get path, headers: { + 'Accept' => 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"', + } + + expect(response).to have_http_status(410) + end + end + + context 'with invalid signature' do + it 'returns 410 gone' do + get path, headers: { + 'Accept' => 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"', + 'Signature' => 'keyId="https://remote.domain/users/bob#main-key",algorithm="rsa-sha256",headers="date host (request-target)",signature="bar"', + } + + expect(response).to have_http_status(410) + end + end + end + + context 'when requesting various unavailable endpoints' do + it_behaves_like 'generic logged out request', '/' + it_behaves_like 'generic logged out request', '/about' + it_behaves_like 'generic logged out request', '/public' + end + + context 'when requesting a suspended account' do + let(:suspended) { Fabricate(:account, username: 'suspended') } + + before do + suspended.suspend! + end + + it_behaves_like 'generic logged out request', '/@suspended' + it_behaves_like 'ActivityPub request', '/users/suspended' + it_behaves_like 'ActivityPub request', '/users/suspended/followers' + it_behaves_like 'ActivityPub request', '/users/suspended/outbox' + end + + context 'when requesting a non-suspended account' do + before do + Fabricate(:account, username: 'bob') + end + + it_behaves_like 'generic logged out request', '/@bob' + it_behaves_like 'ActivityPub request', '/users/bob' + it_behaves_like 'ActivityPub request', '/users/bob/followers' + it_behaves_like 'ActivityPub request', '/users/bob/outbox' + end + + context 'when accessing still-enabled endpoints when logged in' do + let(:user) { Fabricate(:user) } + + before do + sign_in(user) + end + + it_behaves_like 'accessible logged-in endpoint', '/auth/edit' + it_behaves_like 'accessible logged-in endpoint', '/settings/export' + it_behaves_like 'accessible logged-in endpoint', '/settings/login_activities' + it_behaves_like 'accessible logged-in endpoint', '/settings/exports/follows.csv' + end +end From 2bcbeed95143448625eccbbf3a3245a1eec26dce Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 20 May 2024 16:59:23 +0200 Subject: [PATCH 093/113] Add some error handling to OTP secret migration (#30344) --- ...80905_migrate_devise_two_factor_secrets.rb | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/db/post_migrate/20240307180905_migrate_devise_two_factor_secrets.rb b/db/post_migrate/20240307180905_migrate_devise_two_factor_secrets.rb index 360e4806da21f7..6194cf9ee342bf 100644 --- a/db/post_migrate/20240307180905_migrate_devise_two_factor_secrets.rb +++ b/db/post_migrate/20240307180905_migrate_devise_two_factor_secrets.rb @@ -18,7 +18,13 @@ def up users_with_otp_enabled.find_each do |user| # Gets the new value on already-updated users # Falls back to legacy value on not-yet-migrated users - otp_secret = user.otp_secret + otp_secret = begin + user.otp_secret + rescue OpenSSL::OpenSSLError + next if ENV['MIGRATION_IGNORE_INVALID_OTP_SECRET'] == 'true' + + abort_with_decryption_error(user) + end Rails.logger.debug { "Processing #{user.email}" } @@ -36,4 +42,22 @@ def down def users_with_otp_enabled MigrationUser.where(otp_required_for_login: true, otp_secret: nil) end + + def abort_with_decryption_error(user) + abort <<~MESSAGE + + ERROR: Unable to decrypt OTP secret for user #{user.id}. + + This is most likely because you have changed the value of `OTP_SECRET` at some point in + time after the user configured 2FA. + + In this case, their OTP secret had already been lost with the change to `OTP_SECRET`, and + proceeding with this migration will not make the situation worse. + + Please double-check that you have not accidentally changed `OTP_SECRET` just for this + migration, and re-run the migration with `MIGRATION_IGNORE_INVALID_OTP_SECRET=true`. + + Migration aborted. + MESSAGE + end end From 00cf8d37480b053b179e1caa12c5e9fc04813a4b Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 20 May 2024 16:59:27 +0200 Subject: [PATCH 094/113] Change older Paperclip database migrations for consistency (#30204) --- .../20160227230233_add_attachment_avatar_to_accounts.rb | 6 +++++- .../20160312193225_add_attachment_header_to_accounts.rb | 6 +++++- db/migrate/20160905150353_create_media_attachments.rb | 8 +++++++- .../20170330164118_add_attachment_data_to_imports.rb | 6 +++++- db/migrate/20170901141119_truncate_preview_cards.rb | 8 +++++++- db/migrate/20170913000752_create_site_uploads.rb | 8 +++++++- db/migrate/20170917153509_create_custom_emojis.rb | 7 ++++++- ...27125810_add_thumbnail_columns_to_media_attachments.rb | 7 ++++++- 8 files changed, 48 insertions(+), 8 deletions(-) diff --git a/db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb b/db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb index 3666abf1cc2ae9..534df25eed1a20 100644 --- a/db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb +++ b/db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb @@ -3,7 +3,11 @@ class AddAttachmentAvatarToAccounts < ActiveRecord::Migration[4.2] def self.up change_table :accounts do |t| - t.attachment :avatar + # The following corresponds to `t.attachment :avatar` in an older version of Paperclip + t.string :avatar_file_name + t.string :avatar_content_type + t.integer :avatar_file_size + t.datetime :avatar_updated_at end end diff --git a/db/migrate/20160312193225_add_attachment_header_to_accounts.rb b/db/migrate/20160312193225_add_attachment_header_to_accounts.rb index 37108fc1894d22..b481fc52906ea9 100644 --- a/db/migrate/20160312193225_add_attachment_header_to_accounts.rb +++ b/db/migrate/20160312193225_add_attachment_header_to_accounts.rb @@ -3,7 +3,11 @@ class AddAttachmentHeaderToAccounts < ActiveRecord::Migration[4.2] def self.up change_table :accounts do |t| - t.attachment :header + # The following corresponds to `t.attachment :header` in an older version of Paperclip + t.string :header_file_name + t.string :header_content_type + t.integer :header_file_size + t.datetime :header_updated_at end end diff --git a/db/migrate/20160905150353_create_media_attachments.rb b/db/migrate/20160905150353_create_media_attachments.rb index 3903a7b9a145f9..92680db9f3d552 100644 --- a/db/migrate/20160905150353_create_media_attachments.rb +++ b/db/migrate/20160905150353_create_media_attachments.rb @@ -4,7 +4,13 @@ class CreateMediaAttachments < ActiveRecord::Migration[5.0] def change create_table :media_attachments do |t| t.integer :status_id, null: true, default: nil - t.attachment :file + + # The following corresponds to `t.attachment :file` in an older version of Paperclip + t.string :file_file_name + t.string :file_content_type + t.integer :file_file_size + t.datetime :file_updated_at + t.string :remote_url, null: false, default: '' t.integer :account_id diff --git a/db/migrate/20170330164118_add_attachment_data_to_imports.rb b/db/migrate/20170330164118_add_attachment_data_to_imports.rb index 908d4da96a0d9f..0daaa9d02e72e6 100644 --- a/db/migrate/20170330164118_add_attachment_data_to_imports.rb +++ b/db/migrate/20170330164118_add_attachment_data_to_imports.rb @@ -3,7 +3,11 @@ class AddAttachmentDataToImports < ActiveRecord::Migration[4.2] def self.up change_table :imports do |t| - t.attachment :data + # The following corresponds to `t.attachment :data` in an older version of Paperclip + t.string :data_file_name + t.string :data_content_type + t.integer :data_file_size + t.datetime :data_updated_at end end diff --git a/db/migrate/20170901141119_truncate_preview_cards.rb b/db/migrate/20170901141119_truncate_preview_cards.rb index b4ba8c45ea633d..f251841f2e6d59 100644 --- a/db/migrate/20170901141119_truncate_preview_cards.rb +++ b/db/migrate/20170901141119_truncate_preview_cards.rb @@ -8,7 +8,13 @@ def up t.string :url, default: '', null: false, index: { unique: true } t.string :title, default: '', null: false t.string :description, default: '', null: false - t.attachment :image + + # The following corresponds to `t.attachment :image` in an older version of Paperclip + t.string :image_file_name + t.string :image_content_type + t.integer :image_file_size + t.datetime :image_updated_at + t.integer :type, default: 0, null: false t.text :html, default: '', null: false t.string :author_name, default: '', null: false diff --git a/db/migrate/20170913000752_create_site_uploads.rb b/db/migrate/20170913000752_create_site_uploads.rb index 43a793806f3348..16a95ea0134fad 100644 --- a/db/migrate/20170913000752_create_site_uploads.rb +++ b/db/migrate/20170913000752_create_site_uploads.rb @@ -4,7 +4,13 @@ class CreateSiteUploads < ActiveRecord::Migration[5.1] def change create_table :site_uploads do |t| t.string :var, default: '', null: false, index: { unique: true } - t.attachment :file + + # The following corresponds to `t.attachment :file` in an older version of Paperclip + t.string :file_file_name + t.string :file_content_type + t.integer :file_file_size + t.datetime :file_updated_at + t.json :meta t.timestamps end diff --git a/db/migrate/20170917153509_create_custom_emojis.rb b/db/migrate/20170917153509_create_custom_emojis.rb index 984fcd2181b63b..dedc8cde80bf56 100644 --- a/db/migrate/20170917153509_create_custom_emojis.rb +++ b/db/migrate/20170917153509_create_custom_emojis.rb @@ -5,7 +5,12 @@ def change create_table :custom_emojis do |t| t.string :shortcode, null: false, default: '' t.string :domain - t.attachment :image + + # The following corresponds to `t.attachment :image` in an older version of Paperclip + t.string :image_file_name + t.string :image_content_type + t.integer :image_file_size + t.datetime :image_updated_at t.timestamps end diff --git a/db/migrate/20200627125810_add_thumbnail_columns_to_media_attachments.rb b/db/migrate/20200627125810_add_thumbnail_columns_to_media_attachments.rb index a3c6b55fd22f0e..c11a24e8b53cd5 100644 --- a/db/migrate/20200627125810_add_thumbnail_columns_to_media_attachments.rb +++ b/db/migrate/20200627125810_add_thumbnail_columns_to_media_attachments.rb @@ -2,7 +2,12 @@ class AddThumbnailColumnsToMediaAttachments < ActiveRecord::Migration[5.2] def up - add_attachment :media_attachments, :thumbnail + # The following corresponds to `add_attachment :media_attachments, :thumbnail` in an older version of Paperclip + add_column :media_attachments, :thumbnail_file_name, :string + add_column :media_attachments, :thumbnail_content_type, :string + add_column :media_attachments, :thumbnail_file_size, :integer + add_column :media_attachments, :thumbnail_updated_at, :datetime + add_column :media_attachments, :thumbnail_remote_url, :string end From 0a2110b9af52005798251dc9d245a66dd5dd20fa Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 20 May 2024 11:00:09 -0400 Subject: [PATCH 095/113] Add coverage for custom filters (#30347) --- spec/system/filters_spec.rb | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 spec/system/filters_spec.rb diff --git a/spec/system/filters_spec.rb b/spec/system/filters_spec.rb new file mode 100644 index 00000000000000..9d18e904608698 --- /dev/null +++ b/spec/system/filters_spec.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe 'Filters' do + let(:user) { Fabricate(:user) } + let(:filter_title) { 'Filter of fun and games' } + + before { sign_in(user) } + + describe 'Creating a filter' do + it 'Populates a new filter from form' do + navigate_to_filters + + click_on I18n.t('filters.new.title') + fill_in_filter_form + expect(page).to have_content(filter_title) + end + end + + describe 'Editing an existing filter' do + let(:new_title) { 'Change title value' } + + before { Fabricate :custom_filter, account: user.account, title: filter_title } + + it 'Updates the saved filter' do + navigate_to_filters + + click_on filter_title + + fill_in filter_title_field, with: new_title + click_on I18n.t('generic.save_changes') + + expect(page).to have_content(new_title) + end + end + + describe 'Destroying an existing filter' do + before { Fabricate :custom_filter, account: user.account, title: filter_title } + + it 'Deletes the filter' do + navigate_to_filters + + expect(page).to have_content filter_title + expect do + click_on I18n.t('filters.index.delete') + end.to change(CustomFilter, :count).by(-1) + + expect(page).to_not have_content(filter_title) + end + end + + def navigate_to_filters + visit settings_path + + click_on I18n.t('filters.index.title') + expect(page).to have_content I18n.t('filters.index.title') + end + + def fill_in_filter_form + fill_in filter_title_field, with: filter_title + check I18n.t('filters.contexts.home') + within('.custom_filter_keywords_keyword') do + fill_in with: 'Keyword' + end + click_on I18n.t('filters.new.save') + end + + def filter_title_field + I18n.t('simple_form.labels.defaults.title') + end +end From 8c925dec793476b0f516aab901c7802d8e04f844 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 19:04:21 +0200 Subject: [PATCH 096/113] chore(deps): update dependency rubocop-rails to v2.25.0 (#30341) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index eade99acfdffb8..f1a1d2a938da1d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -425,7 +425,7 @@ GEM mime-types-data (3.2024.0507) mini_mime (1.1.5) mini_portile2 (2.8.6) - minitest (5.22.3) + minitest (5.23.0) msgpack (1.7.2) multi_json (1.15.0) multipart-post (2.4.0) @@ -610,7 +610,7 @@ GEM pundit (2.3.2) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.7.3) + racc (1.8.0) rack (2.2.9) rack-attack (6.7.0) rack (>= 1.0, < 4) @@ -685,7 +685,7 @@ GEM redis (>= 4) redlock (1.3.2) redis (>= 3.0.0, < 6.0) - regexp_parser (2.9.0) + regexp_parser (2.9.2) reline (0.5.7) io-console (~> 0.5) request_store (1.6.0) @@ -746,7 +746,7 @@ GEM rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.24.1) + rubocop-rails (2.25.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From 0663c7d78d7de406ed199f61fd0cdb55b14b8f1f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 19:14:10 +0200 Subject: [PATCH 097/113] fix(deps): update formatjs monorepo (#30359) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 139 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 44 deletions(-) diff --git a/yarn.lock b/yarn.lock index 698824cab4854b..2d27d1302a42c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2259,6 +2259,16 @@ __metadata: languageName: node linkType: hard +"@formatjs/ecma402-abstract@npm:2.0.0": + version: 2.0.0 + resolution: "@formatjs/ecma402-abstract@npm:2.0.0" + dependencies: + "@formatjs/intl-localematcher": "npm:0.5.4" + tslib: "npm:^2.4.0" + checksum: 10c0/94cba291aeadffa3ca416087c2c2352c8a741bb4dcb7f47f15c247b1f043ffcef1af5b20a1b7578fbba9e704fc5f1c079923f3537a273d50162be62f8037625c + languageName: node + linkType: hard + "@formatjs/fast-memoize@npm:2.2.0": version: 2.2.0 resolution: "@formatjs/fast-memoize@npm:2.2.0" @@ -2279,6 +2289,17 @@ __metadata: languageName: node linkType: hard +"@formatjs/icu-messageformat-parser@npm:2.7.8": + version: 2.7.8 + resolution: "@formatjs/icu-messageformat-parser@npm:2.7.8" + dependencies: + "@formatjs/ecma402-abstract": "npm:2.0.0" + "@formatjs/icu-skeleton-parser": "npm:1.8.2" + tslib: "npm:^2.4.0" + checksum: 10c0/a3b759a825fb22ffd7b906f6a07b1a079bbc34f72c745de2c2514e439c4bb75bc1a9442eba1bac7ff3ea3010e12076374cd755ad12116b1d066cc90da5fbcbc9 + languageName: node + linkType: hard + "@formatjs/icu-skeleton-parser@npm:1.8.0": version: 1.8.0 resolution: "@formatjs/icu-skeleton-parser@npm:1.8.0" @@ -2289,25 +2310,35 @@ __metadata: languageName: node linkType: hard -"@formatjs/intl-displaynames@npm:6.6.6": - version: 6.6.6 - resolution: "@formatjs/intl-displaynames@npm:6.6.6" +"@formatjs/icu-skeleton-parser@npm:1.8.2": + version: 1.8.2 + resolution: "@formatjs/icu-skeleton-parser@npm:1.8.2" dependencies: - "@formatjs/ecma402-abstract": "npm:1.18.2" + "@formatjs/ecma402-abstract": "npm:2.0.0" + tslib: "npm:^2.4.0" + checksum: 10c0/9b15013acc47b8d560b52942e3dab2abaaa9c5a4410bbd1d490a4b22bf5ca36fdd88b71f241d05479bddf856d0d1d57b7ecc9e79738497ac518616aa6d4d0015 + languageName: node + linkType: hard + +"@formatjs/intl-displaynames@npm:6.6.8": + version: 6.6.8 + resolution: "@formatjs/intl-displaynames@npm:6.6.8" + dependencies: + "@formatjs/ecma402-abstract": "npm:2.0.0" "@formatjs/intl-localematcher": "npm:0.5.4" tslib: "npm:^2.4.0" - checksum: 10c0/4ba40057cfafaabf04485137bc96705d5ed7ac48f17ed7dfe8dbd7f71119667b6c0b7fa75469e32b70c9bada2c5d03af37a5261d655a37b81c63ba907edbb2e8 + checksum: 10c0/1a03e7644022741c1bcf10fcd07da88c434416a13603ace693a038114010463307b4130d3a3f53ad5665bd27fca9a6b19ac8e5bf58e17598b1ea84db173fdfbb languageName: node linkType: hard -"@formatjs/intl-listformat@npm:7.5.5": - version: 7.5.5 - resolution: "@formatjs/intl-listformat@npm:7.5.5" +"@formatjs/intl-listformat@npm:7.5.7": + version: 7.5.7 + resolution: "@formatjs/intl-listformat@npm:7.5.7" dependencies: - "@formatjs/ecma402-abstract": "npm:1.18.2" + "@formatjs/ecma402-abstract": "npm:2.0.0" "@formatjs/intl-localematcher": "npm:0.5.4" tslib: "npm:^2.4.0" - checksum: 10c0/bc9d8cbe42bd9513db0b2b221c0b1a752892005a90fa629b4cf7df1cbd3b96997cddbf420e562ebdfdc691a28d9b759ccae9633d5987aa0bceed5aef77a07ca4 + checksum: 10c0/5d0478752d669d87c82aa80880df464d64a1c8974fcb6136bc854567f570a1696e5468005ffa266cfcb623adb7c7299b839c06ea33897f55d35dab6a7575cc84 languageName: node linkType: hard @@ -2321,33 +2352,33 @@ __metadata: linkType: hard "@formatjs/intl-pluralrules@npm:^5.2.2": - version: 5.2.12 - resolution: "@formatjs/intl-pluralrules@npm:5.2.12" + version: 5.2.14 + resolution: "@formatjs/intl-pluralrules@npm:5.2.14" dependencies: - "@formatjs/ecma402-abstract": "npm:1.18.2" + "@formatjs/ecma402-abstract": "npm:2.0.0" "@formatjs/intl-localematcher": "npm:0.5.4" tslib: "npm:^2.4.0" - checksum: 10c0/0f4d9f4f272dd962b2f742519045ad43a1b6358755787d3394efcc5884b02184cc8d76fb13d98b1f30c41a813b81f82dd2342e1fb0fbd7b7efa69f5d0d59c4d0 + checksum: 10c0/3c00109c8d4c8b221c2b9af38a38d31cd6293a0a412a1f2cdae2b8ef81bd71626c9ff4a647389682cb27ae5c223bd6f64ef54d03e3f6f19c372e0c6194b76b38 languageName: node linkType: hard -"@formatjs/intl@npm:2.10.2": - version: 2.10.2 - resolution: "@formatjs/intl@npm:2.10.2" +"@formatjs/intl@npm:2.10.4": + version: 2.10.4 + resolution: "@formatjs/intl@npm:2.10.4" dependencies: - "@formatjs/ecma402-abstract": "npm:1.18.2" + "@formatjs/ecma402-abstract": "npm:2.0.0" "@formatjs/fast-memoize": "npm:2.2.0" - "@formatjs/icu-messageformat-parser": "npm:2.7.6" - "@formatjs/intl-displaynames": "npm:6.6.6" - "@formatjs/intl-listformat": "npm:7.5.5" - intl-messageformat: "npm:10.5.12" + "@formatjs/icu-messageformat-parser": "npm:2.7.8" + "@formatjs/intl-displaynames": "npm:6.6.8" + "@formatjs/intl-listformat": "npm:7.5.7" + intl-messageformat: "npm:10.5.14" tslib: "npm:^2.4.0" peerDependencies: typescript: ^4.7 || 5 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/20df407e141055e8c7b2605c06e952b643be7ea01d992862e13fc623ca2db034069744eae2be16655bf7888b3add1bfc2653fd0a08bcfdb67fb9b72a306f7718 + checksum: 10c0/ca7877e962f73f1fe0e358f12d73bdc3ec4006c14ee801e06d9f7aef06bcdcc12355a8f53f32b0e890f829949ded35e825c914ca5f4709eb1e08c2a18c1368c2 languageName: node linkType: hard @@ -2371,6 +2402,26 @@ __metadata: languageName: node linkType: hard +"@formatjs/ts-transformer@npm:3.13.14": + version: 3.13.14 + resolution: "@formatjs/ts-transformer@npm:3.13.14" + dependencies: + "@formatjs/icu-messageformat-parser": "npm:2.7.8" + "@types/json-stable-stringify": "npm:^1.0.32" + "@types/node": "npm:14 || 16 || 17" + chalk: "npm:^4.0.0" + json-stable-stringify: "npm:^1.0.1" + tslib: "npm:^2.4.0" + typescript: "npm:5" + peerDependencies: + ts-jest: ">=27" + peerDependenciesMeta: + ts-jest: + optional: true + checksum: 10c0/38450cfce3ec5132f3548c1e9ab098909ca8d2db2b8b6b4b5bb87aa59a4ca1a19bbf6d339ace39bcc931fa80d9946b4c7cf039c9574069b317ae015cd6963bd3 + languageName: node + linkType: hard + "@gamestdio/websocket@npm:^0.3.2": version: 0.3.2 resolution: "@gamestdio/websocket@npm:0.3.2" @@ -5197,21 +5248,21 @@ __metadata: linkType: hard "babel-plugin-formatjs@npm:^10.5.1": - version: 10.5.14 - resolution: "babel-plugin-formatjs@npm:10.5.14" + version: 10.5.16 + resolution: "babel-plugin-formatjs@npm:10.5.16" dependencies: "@babel/core": "npm:^7.10.4" "@babel/helper-plugin-utils": "npm:^7.10.4" "@babel/plugin-syntax-jsx": "npm:7" "@babel/traverse": "npm:7" "@babel/types": "npm:^7.12.11" - "@formatjs/icu-messageformat-parser": "npm:2.7.6" - "@formatjs/ts-transformer": "npm:3.13.12" + "@formatjs/icu-messageformat-parser": "npm:2.7.8" + "@formatjs/ts-transformer": "npm:3.13.14" "@types/babel__core": "npm:^7.1.7" "@types/babel__helper-plugin-utils": "npm:^7.10.0" "@types/babel__traverse": "npm:^7.1.7" tslib: "npm:^2.4.0" - checksum: 10c0/78d33f0304c7b6e36334b2f32bacd144cbbe08cb22318ff994e7adc7705b7f8208354c9af9f87b4390d11aee1ea81cfee9f224a57fe5265173b92ee7de921359 + checksum: 10c0/03d9d2b0b9cdc05c011bfb417a43e5c0f557868ed84d83acbc3cb9072b7fa98f5219473d0bd61f02741c151d6f2162da363bd337522c80af14721ae37f6da86b languageName: node linkType: hard @@ -9643,15 +9694,15 @@ __metadata: languageName: node linkType: hard -"intl-messageformat@npm:10.5.12, intl-messageformat@npm:^10.3.5": - version: 10.5.12 - resolution: "intl-messageformat@npm:10.5.12" +"intl-messageformat@npm:10.5.14, intl-messageformat@npm:^10.3.5": + version: 10.5.14 + resolution: "intl-messageformat@npm:10.5.14" dependencies: - "@formatjs/ecma402-abstract": "npm:1.18.2" + "@formatjs/ecma402-abstract": "npm:2.0.0" "@formatjs/fast-memoize": "npm:2.2.0" - "@formatjs/icu-messageformat-parser": "npm:2.7.6" + "@formatjs/icu-messageformat-parser": "npm:2.7.8" tslib: "npm:^2.4.0" - checksum: 10c0/f95734e98a05ef7f51de0c27904d3a994528e3a174963bd1b3a6db9416b5fd84bbd8f7d26d84fc547d51af69ccf46dd3f73a3f4f20a2ccef5c9cd90e946ad82c + checksum: 10c0/8ec0a60539f67039356e211bcc8d81cf1bd9d62190a72ab0e94504da92f0242fe2f94ffb512b97cc6f63782b7891874d4038536ce04631e59d762c3441c60b4b languageName: node linkType: hard @@ -14353,18 +14404,18 @@ __metadata: linkType: hard "react-intl@npm:^6.4.2": - version: 6.6.6 - resolution: "react-intl@npm:6.6.6" - dependencies: - "@formatjs/ecma402-abstract": "npm:1.18.2" - "@formatjs/icu-messageformat-parser": "npm:2.7.6" - "@formatjs/intl": "npm:2.10.2" - "@formatjs/intl-displaynames": "npm:6.6.6" - "@formatjs/intl-listformat": "npm:7.5.5" + version: 6.6.8 + resolution: "react-intl@npm:6.6.8" + dependencies: + "@formatjs/ecma402-abstract": "npm:2.0.0" + "@formatjs/icu-messageformat-parser": "npm:2.7.8" + "@formatjs/intl": "npm:2.10.4" + "@formatjs/intl-displaynames": "npm:6.6.8" + "@formatjs/intl-listformat": "npm:7.5.7" "@types/hoist-non-react-statics": "npm:^3.3.1" "@types/react": "npm:16 || 17 || 18" hoist-non-react-statics: "npm:^3.3.2" - intl-messageformat: "npm:10.5.12" + intl-messageformat: "npm:10.5.14" tslib: "npm:^2.4.0" peerDependencies: react: ^16.6.0 || 17 || 18 @@ -14372,7 +14423,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/04c1d1ca783f2a5e605544290c93e57629500be6811d7c2c3342903bf9f9a720d2e4c9cf3924133bf84e510ee879bf3d870a3ff269f5b197f894a49047bd089d + checksum: 10c0/7673507eb73ad4edd1593da7173cec68f316cf77037e0959900babd32d5984a39ba7fa10aaa0a23bcddb7b98daf7dd007cb73ddfc39127ede87c18ec780a519c languageName: node linkType: hard From eda2bdfc7abeb3f67d982ac009856489089ed7d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 10:48:36 +0200 Subject: [PATCH 098/113] New Crowdin Translations (automated) (#30383) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/fil.json | 14 ++++++++++++++ config/locales/is.yml | 1 + config/locales/lt.yml | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/locales/fil.json b/app/javascript/mastodon/locales/fil.json index 894d73c8cc42ba..38772760490634 100644 --- a/app/javascript/mastodon/locales/fil.json +++ b/app/javascript/mastodon/locales/fil.json @@ -50,6 +50,8 @@ "admin.dashboard.retention.cohort_size": "Mga bagong tagagamit", "alert.rate_limited.message": "Mangyaring subukan muli pagkatapos ng {retry_time, time, medium}.", "audio.hide": "Itago ang tunog", + "block_modal.show_less": "Magpakita ng mas kaunti", + "block_modal.show_more": "Magpakita ng higit pa", "block_modal.title": "Harangan ang tagagamit?", "bundle_column_error.error.title": "Naku!", "bundle_column_error.network.body": "Nagkaroon ng kamalian habang sinusubukang i-karga ang pahinang ito. Maaaring dahil ito sa pansamantalang problema ng iyong koneksyon sa internet o ang server na ito.", @@ -102,6 +104,7 @@ "compose_form.encryption_warning": "Ang mga post sa Mastodon ay hindi naka-encrypt nang dulo-dulo. Huwag magbahagi ng anumang sensitibong impormasyon sa Mastodon.", "compose_form.hashtag_warning": "Hindi maililista ang post na ito sa anumang hashtag dahil hindi ito nakapubliko. Mga nakapublikong post lamang ang mahahanap ayon sa hashtag.", "compose_form.placeholder": "Anong nangyari?", + "compose_form.poll.duration": "Tagal ng botohan", "compose_form.poll.multiple": "Maraming pagpipilian", "compose_form.poll.single": "Piliin ang isa", "compose_form.reply": "Tumugon", @@ -173,6 +176,7 @@ "empty_column.list": "Wala pang laman ang listahang ito. Kapag naglathala ng mga bagong post ang mga miyembro ng listahang ito, makikita iyon dito.", "empty_column.lists": "Wala ka pang mga listahan. Kapag gumawa ka ng isa, makikita yun dito.", "explore.search_results": "Mga resulta ng paghahanap", + "explore.suggested_follows": "Mga tao", "explore.title": "Tuklasin", "explore.trending_links": "Mga balita", "filter_modal.select_filter.search": "Hanapin o gumawa", @@ -186,9 +190,13 @@ "follow_suggestions.who_to_follow": "Sinong maaaring sundan", "footer.about": "Tungkol dito", "footer.get_app": "Kunin ang app", + "footer.status": "Katayuan", "generic.saved": "Nakaimbak", "hashtag.column_header.tag_mode.all": "at {additional}", "hashtag.column_header.tag_mode.any": "o {additional}", + "hashtag.column_settings.tag_mode.all": "Lahat ng nandito", + "hashtag.column_settings.tag_mode.any": "Ilan sa nandito", + "hashtag.column_settings.tag_mode.none": "Wala dito", "home.column_settings.show_replies": "Ipakita ang mga tugon", "home.pending_critical_update.body": "Mangyaring i-update ang iyong serbiro ng Mastodon sa lalong madaling panahon!", "interaction_modal.login.action": "Iuwi mo ako", @@ -199,6 +207,7 @@ "intervals.full.days": "{number, plural, one {# araw} other {# na araw}}", "intervals.full.hours": "{number, plural, one {# oras} other {# na oras}}", "intervals.full.minutes": "{number, plural, one {# minuto} other {# na minuto}}", + "keyboard_shortcuts.blocked": "Buksan ang talaan ng mga nakaharang na mga tagagamit", "keyboard_shortcuts.description": "Paglalarawan", "keyboard_shortcuts.down": "Ilipat pababa sa talaan", "keyboard_shortcuts.mention": "Banggitin ang may-akda", @@ -218,7 +227,10 @@ "navigation_bar.about": "Tungkol dito", "navigation_bar.blocks": "Nakaharang na mga tagagamit", "navigation_bar.direct": "Mga palihim na banggit", + "navigation_bar.discover": "Tuklasin", + "navigation_bar.explore": "Tuklasin", "navigation_bar.favourites": "Mga paborito", + "navigation_bar.follow_requests": "Mga hiling sa pagsunod", "navigation_bar.follows_and_followers": "Mga sinusundan at tagasunod", "navigation_bar.lists": "Mga listahan", "navigation_bar.search": "Maghanap", @@ -226,6 +238,7 @@ "notification.follow": "Sinundan ka ni {name}", "notification.follow_request": "Hinihiling ni {name} na sundan ka", "notification.mention": "Binanggit ka ni {name}", + "notification.moderation_warning": "Mayroong kang natanggap na babala sa pagtitimpi", "notification.relationships_severance_event.learn_more": "Matuto nang higit pa", "notification_requests.accept": "Tanggapin", "notification_requests.notifications_from": "Mga abiso mula kay/sa {name}", @@ -246,6 +259,7 @@ "onboarding.profile.note_hint": "Maaari mong @bangitin ang ibang mga tao o mga #hashtag…", "onboarding.profile.save_and_continue": "Iimbak at magpatuloy", "onboarding.share.next_steps": "Mga posibleng susunod na hakbang:", + "picture_in_picture.restore": "Ilagay ito pabalik", "poll.closed": "Sarado", "poll.reveal": "Ipakita ang mga resulta", "poll.voted": "Binoto mo para sa sagot na ito", diff --git a/config/locales/is.yml b/config/locales/is.yml index 2eeba976bcc30a..99777529696d9b 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -285,6 +285,7 @@ is: update_custom_emoji_html: "%{name} uppfærði tjáningartáknið %{target}" update_domain_block_html: "%{name} uppfærði útilokun lénsins %{target}" update_ip_block_html: "%{name} breytti reglu fyrir IP-vistfangið %{target}" + update_report_html: "%{name} uppfærði kæru %{target}" update_status_html: "%{name} uppfærði færslu frá %{target}" update_user_role_html: "%{name} breytti hlutverki %{target}" deleted_account: eyddur notandaaðgangur diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 552afa83014561..3e514a547b9166 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -618,7 +618,7 @@ lt: settings: 'Keisti el. pašto nuostatas: %{link}' view: 'Peržiūra:' view_profile: Peržiurėti profilį - view_status: Peržiūrėti statusą + view_status: Peržiūrėti įrašą applications: created: Aplikacija sėkmingai sukurta destroyed: Aplikacija sėkmingai ištrinta @@ -777,8 +777,8 @@ lt: title: Moderacija notification_mailer: favourite: - body: 'Jūsų statusą pamėgo %{name}:' - subject: "%{name} pamėgo Jūsų statusą" + body: 'Tavo įrašą pamėgo %{name}:' + subject: "%{name} pamėgo tavo įrašą" title: Naujas mėgstamas follow: body: "%{name} pradėjo jus sekti!" From 89f89d738f5840c80ff938f8bf6734cdafe0fa83 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 21 May 2024 10:56:08 +0200 Subject: [PATCH 099/113] Revert "Allow unblocking email addresses from any matching account (#29305)" (#30385) --- app/controllers/admin/accounts_controller.rb | 2 +- app/models/canonical_email_block.rb | 1 - app/views/admin/accounts/show.html.haml | 2 +- spec/fabricators/canonical_email_block_fabricator.rb | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index d3be7817ff4b81..9beb8fde6b2fda 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -128,7 +128,7 @@ def remove_header def unblock_email authorize @account, :unblock_email? - CanonicalEmailBlock.matching_account(@account).delete_all + CanonicalEmailBlock.where(reference_account: @account).delete_all log_action :unblock_email, @account diff --git a/app/models/canonical_email_block.rb b/app/models/canonical_email_block.rb index c05eb9801dc48c..d09df6f5e2a531 100644 --- a/app/models/canonical_email_block.rb +++ b/app/models/canonical_email_block.rb @@ -20,7 +20,6 @@ class CanonicalEmailBlock < ApplicationRecord validates :canonical_email_hash, presence: true, uniqueness: true scope :matching_email, ->(email) { where(canonical_email_hash: email_to_canonical_email_hash(email)) } - scope :matching_account, ->(account) { matching_email(account&.user_email).or(where(reference_account: account)) } def to_log_human_identifier canonical_email_hash diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index bcf7c073141543..f148b9a0822193 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -30,7 +30,7 @@ = render 'admin/accounts/counters', account: @account - if @account.local? && @account.user.nil? - = link_to t('admin.accounts.unblock_email'), unblock_email_admin_account_path(@account.id), method: :post, class: 'button' if can?(:unblock_email, @account) && CanonicalEmailBlock.matching_account(@account).exists? + = link_to t('admin.accounts.unblock_email'), unblock_email_admin_account_path(@account.id), method: :post, class: 'button' if can?(:unblock_email, @account) && CanonicalEmailBlock.exists?(reference_account_id: @account.id) - else .table-wrapper %table.table.inline-table diff --git a/spec/fabricators/canonical_email_block_fabricator.rb b/spec/fabricators/canonical_email_block_fabricator.rb index 2f979df794ef21..1ef53ff4a47d8f 100644 --- a/spec/fabricators/canonical_email_block_fabricator.rb +++ b/spec/fabricators/canonical_email_block_fabricator.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true Fabricator(:canonical_email_block) do - email { |attrs| attrs[:reference_account] ? attrs[:reference_account].user_email : sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } } + email { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } } reference_account { Fabricate.build(:account) } end From 32223863a51472d929c57d22dbffc5d9c9fafa79 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 21 May 2024 15:17:34 +0200 Subject: [PATCH 100/113] Add coverage to `/admin/accounts/:id` (#30386) --- .../admin/accounts_controller_spec.rb | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb index b90bb414b06a84..f241d261b1b18d 100644 --- a/spec/controllers/admin/accounts_controller_spec.rb +++ b/spec/controllers/admin/accounts_controller_spec.rb @@ -53,11 +53,32 @@ describe 'GET #show' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } - let(:account) { Fabricate(:account) } - it 'returns http success' do - get :show, params: { id: account.id } - expect(response).to have_http_status(200) + context 'with a remote account' do + let(:account) { Fabricate(:account, domain: 'example.com') } + + it 'returns http success' do + get :show, params: { id: account.id } + expect(response).to have_http_status(200) + end + end + + context 'with a local account' do + let(:account) { Fabricate(:account, domain: nil) } + + it 'returns http success' do + get :show, params: { id: account.id } + expect(response).to have_http_status(200) + end + end + + context 'with a local deleted account' do + let(:account) { Fabricate(:account, domain: nil, user: nil) } + + it 'returns http success' do + get :show, params: { id: account.id } + expect(response).to have_http_status(200) + end end end From cd0c5479362260082dbe1cbc42e364017853bbfc Mon Sep 17 00:00:00 2001 From: David Lapshin Date: Tue, 21 May 2024 18:24:51 +0300 Subject: [PATCH 101/113] Fix announcements icon rotating like settings one (#30388) --- app/javascript/styles/mastodon/components.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index f377eed95cba3d..859c6e32675c8f 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4372,7 +4372,7 @@ a.status-card { color: $primary-text-color; } - .icon { + .icon-sliders { transform: rotate(60deg); } } @@ -4383,7 +4383,7 @@ a.status-card { } } -.no-reduce-motion .column-header__button .icon { +.no-reduce-motion .column-header__button .icon-sliders { transition: transform 150ms ease-in-out; } From 6e67ca73f3b32bbac226b77f78acce52c525307b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 09:35:27 +0200 Subject: [PATCH 102/113] fix(deps): update dependency axios to v1.7.2 (#30372) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2d27d1302a42c9..9d97b2f15704a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5196,13 +5196,13 @@ __metadata: linkType: hard "axios@npm:^1.4.0": - version: 1.6.8 - resolution: "axios@npm:1.6.8" + version: 1.7.2 + resolution: "axios@npm:1.7.2" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10c0/0f22da6f490335479a89878bc7d5a1419484fbb437b564a80c34888fc36759ae4f56ea28d55a191695e5ed327f0bad56e7ff60fb6770c14d1be6501505d47ab9 + checksum: 10c0/cbd47ce380fe045313364e740bb03b936420b8b5558c7ea36a4563db1258c658f05e40feb5ddd41f6633fdd96d37ac2a76f884dad599c5b0224b4c451b3fa7ae languageName: node linkType: hard From d9d4ba1b6f2756e819344b384d731c7722a931b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 09:47:49 +0200 Subject: [PATCH 103/113] fix(deps): update dependency glob to v10.3.16 (#30392) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9d97b2f15704a8..9f953bb781548b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8936,17 +8936,17 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.2.6, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.3.15 - resolution: "glob@npm:10.3.15" + version: 10.3.16 + resolution: "glob@npm:10.3.16" dependencies: foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.3.6" + jackspeak: "npm:^3.1.2" minimatch: "npm:^9.0.1" minipass: "npm:^7.0.4" path-scurry: "npm:^1.11.0" bin: glob: dist/esm/bin.mjs - checksum: 10c0/cda748ddc181b31b3df9548c0991800406d5cc3b3f8110e37a8751ec1e39f37cdae7d7782d5422d7df92775121cdf00599992dff22f7ff1260344843af227c2b + checksum: 10c0/f7eb4c3e66f221f0be3967c02527047167967549bdf8ed1bd5f6277d43a35191af4e2bb8c89f07a79664958bae088fd06659e69a0f1de462972f1eab52a715e8 languageName: node linkType: hard @@ -10407,16 +10407,16 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.6": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" +"jackspeak@npm:^3.1.2": + version: 3.1.2 + resolution: "jackspeak@npm:3.1.2" dependencies: "@isaacs/cliui": "npm:^8.0.2" "@pkgjs/parseargs": "npm:^0.11.0" dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 10c0/f01d8f972d894cd7638bc338e9ef5ddb86f7b208ce177a36d718eac96ec86638a6efa17d0221b10073e64b45edc2ce15340db9380b1f5d5c5d000cbc517dc111 + checksum: 10c0/5f1922a1ca0f19869e23f0dc4374c60d36e922f7926c76fecf8080cc6f7f798d6a9caac1b9428327d14c67731fd551bb3454cb270a5e13a0718f3b3660ec3d5d languageName: node linkType: hard From a2b4c29c8fc8b7db163afffe1987fc4a41b574cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 09:57:51 +0200 Subject: [PATCH 104/113] New Crowdin Translations (automated) (#30394) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/fil.json | 10 +++++++++- app/javascript/mastodon/locales/lv.json | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/locales/fil.json b/app/javascript/mastodon/locales/fil.json index 38772760490634..1f9b0496b9d427 100644 --- a/app/javascript/mastodon/locales/fil.json +++ b/app/javascript/mastodon/locales/fil.json @@ -195,8 +195,9 @@ "hashtag.column_header.tag_mode.all": "at {additional}", "hashtag.column_header.tag_mode.any": "o {additional}", "hashtag.column_settings.tag_mode.all": "Lahat ng nandito", - "hashtag.column_settings.tag_mode.any": "Ilan sa nandito", + "hashtag.column_settings.tag_mode.any": "Ilan dito", "hashtag.column_settings.tag_mode.none": "Wala dito", + "hashtags.and_other": "…at {count, plural, one {# iba pa} other {# na iba pa}}", "home.column_settings.show_replies": "Ipakita ang mga tugon", "home.pending_critical_update.body": "Mangyaring i-update ang iyong serbiro ng Mastodon sa lalong madaling panahon!", "interaction_modal.login.action": "Iuwi mo ako", @@ -224,6 +225,7 @@ "lists.replies_policy.title": "Ipakita ang mga tugon sa:", "lists.subheading": "Iyong mga talaan", "loading_indicator.label": "Kumakarga…", + "mute_modal.hide_from_notifications": "Itago mula sa mga abiso", "navigation_bar.about": "Tungkol dito", "navigation_bar.blocks": "Nakaharang na mga tagagamit", "navigation_bar.direct": "Mga palihim na banggit", @@ -233,6 +235,7 @@ "navigation_bar.follow_requests": "Mga hiling sa pagsunod", "navigation_bar.follows_and_followers": "Mga sinusundan at tagasunod", "navigation_bar.lists": "Mga listahan", + "navigation_bar.public_timeline": "Pinagsamang timeline", "navigation_bar.search": "Maghanap", "notification.admin.report": "Iniulat ni {name} si {target}", "notification.follow": "Sinundan ka ni {name}", @@ -247,10 +250,12 @@ "notifications.column_settings.alert": "Mga abiso sa Desktop", "notifications.column_settings.favourite": "Mga paborito:", "notifications.column_settings.follow": "Mga bagong tagasunod:", + "notifications.column_settings.poll": "Resulta ng botohan:", "notifications.column_settings.unread_notifications.category": "Hindi Nabasang mga Abiso", "notifications.column_settings.update": "Mga pagbago:", "notifications.filter.all": "Lahat", "notifications.filter.favourites": "Mga paborito", + "notifications.filter.polls": "Resulta ng botohan", "notifications.mark_as_read": "Markahan lahat ng abiso bilang nabasa na", "notifications.policy.filter_not_followers_title": "Mga taong hindi ka susundan", "notifications.policy.filter_not_following_title": "Mga taong hindi mo sinusundan", @@ -294,10 +299,13 @@ "report.thanks.title": "Ayaw mo bang makita ito?", "report.thanks.title_actionable": "Salamat sa pag-uulat, titingnan namin ito.", "report_notification.categories.other": "Iba pa", + "report_notification.categories.violation": "Paglabag sa patakaran", + "report_notification.open": "Buksan ang ulat", "search.quick_action.open_url": "Buksan ang URL sa Mastodon", "search.search_or_paste": "Maghanap o ilagay ang URL", "search_popout.full_text_search_disabled_message": "Hindi magagamit sa {domain}.", "search_popout.full_text_search_logged_out_message": "Magagamit lamang kapag naka-log in.", + "search_popout.recent": "Kamakailang mga paghahanap", "search_results.all": "Lahat", "search_results.see_all": "Ipakita lahat", "server_banner.learn_more": "Matuto nang higit pa", diff --git a/app/javascript/mastodon/locales/lv.json b/app/javascript/mastodon/locales/lv.json index 32ea6e47c45a7c..e7ab114909aa42 100644 --- a/app/javascript/mastodon/locales/lv.json +++ b/app/javascript/mastodon/locales/lv.json @@ -90,7 +90,7 @@ "attachments_list.unprocessed": "(neapstrādāti)", "audio.hide": "Slēpt audio", "block_modal.remote_users_caveat": "Mēs vaicāsim serverim {domain} ņemt vērā Tavu lēmumu. Tomēr atbilstība nav nodrošināta, jo atsevišķi serveri var apstrādāt bloķēšanu citādi. Publiski ieraksti joprojām var būt redzami lietotājiem, kuri nav pieteikušies.", - "block_modal.show_less": "Parādīt vairāk", + "block_modal.show_less": "Rādīt mazāk", "block_modal.show_more": "Parādīt mazāk", "boost_modal.combo": "Nospied {combo}, lai nākamreiz šo izlaistu", "bundle_column_error.copy_stacktrace": "Kopēt kļūdu ziņojumu", @@ -309,7 +309,7 @@ "hashtag.counter_by_uses_today": "{count, plural, zero {{counter} ierakstu} one {{counter} ieraksts} other {{counter} ieraksti}} šodien", "hashtag.follow": "Sekot tēmturim", "hashtag.unfollow": "Pārstāt sekot tēmturim", - "hashtags.and_other": "..un {count, plural, other {# vairāk}}", + "hashtags.and_other": "… un {count, plural, other {vēl #}}", "home.column_settings.show_reblogs": "Rādīt pastiprinātos ierakstus", "home.column_settings.show_replies": "Rādīt atbildes", "home.hide_announcements": "Slēpt paziņojumus", From 2c75cf85991bd0c22eaabe4ccd3bfb658ec59d32 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Wed, 22 May 2024 04:05:33 -0500 Subject: [PATCH 105/113] Add "Warning preset" link to admin navigation (#26199) --- config/locales/en-GB.yml | 2 +- config/locales/en.yml | 2 +- config/navigation.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 7e31080dfa2c10..7cd888b3732837 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -950,7 +950,7 @@ en-GB: delete: Delete edit_preset: Edit warning preset empty: You haven't defined any warning presets yet. - title: Manage warning presets + title: Warning presets webhooks: add_new: Add endpoint delete: Delete diff --git a/config/locales/en.yml b/config/locales/en.yml index d3704bbbcf54cb..43aa8481c64be8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -951,7 +951,7 @@ en: delete: Delete edit_preset: Edit warning preset empty: You haven't defined any warning presets yet. - title: Manage warning presets + title: Warning presets webhooks: add_new: Add endpoint delete: Delete diff --git a/config/navigation.rb b/config/navigation.rb index efac96d46e6a1a..c1dd81501cf90d 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -59,6 +59,7 @@ s.item :dashboard, safe_join([fa_icon('tachometer fw'), t('admin.dashboard.title')]), admin_dashboard_path, if: -> { current_user.can?(:view_dashboard) } s.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), admin_settings_path, if: -> { current_user.can?(:manage_settings) }, highlights_on: %r{/admin/settings} s.item :rules, safe_join([fa_icon('gavel fw'), t('admin.rules.title')]), admin_rules_path, highlights_on: %r{/admin/rules}, if: -> { current_user.can?(:manage_rules) } + s.item :warning_presets, safe_join([fa_icon('warning fw'), t('admin.warning_presets.title')]), admin_warning_presets_path, highlights_on: %r{/admin/warning_presets}, if: -> { current_user.can?(:manage_settings) } s.item :roles, safe_join([fa_icon('vcard fw'), t('admin.roles.title')]), admin_roles_path, highlights_on: %r{/admin/roles}, if: -> { current_user.can?(:manage_roles) } s.item :announcements, safe_join([fa_icon('bullhorn fw'), t('admin.announcements.title')]), admin_announcements_path, highlights_on: %r{/admin/announcements}, if: -> { current_user.can?(:manage_announcements) } s.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_path, highlights_on: %r{/admin/custom_emojis}, if: -> { current_user.can?(:manage_custom_emojis) } From 2c5ab8f647841ea8075ece50ccc9e12c21af8720 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Wed, 22 May 2024 16:45:18 +0200 Subject: [PATCH 106/113] Remove the access token from Redux & context (#30275) --- .../mastodon/actions/account_notes.ts | 4 +- app/javascript/mastodon/actions/accounts.js | 64 +++++++++---------- .../mastodon/actions/announcements.js | 14 ++-- app/javascript/mastodon/actions/blocks.js | 6 +- app/javascript/mastodon/actions/bookmarks.js | 4 +- app/javascript/mastodon/actions/compose.js | 16 ++--- .../mastodon/actions/conversations.js | 10 +-- .../mastodon/actions/custom_emojis.js | 4 +- app/javascript/mastodon/actions/directory.js | 6 +- .../mastodon/actions/domain_blocks.js | 10 +-- app/javascript/mastodon/actions/favourites.js | 4 +- .../mastodon/actions/featured_tags.js | 2 +- app/javascript/mastodon/actions/filters.js | 12 ++-- app/javascript/mastodon/actions/history.js | 2 +- .../mastodon/actions/interactions.js | 44 ++++++------- app/javascript/mastodon/actions/lists.js | 39 ++++++----- app/javascript/mastodon/actions/markers.ts | 34 +++++----- app/javascript/mastodon/actions/mutes.js | 6 +- .../mastodon/actions/notifications.js | 32 +++++----- .../mastodon/actions/pin_statuses.js | 4 +- app/javascript/mastodon/actions/polls.js | 8 +-- app/javascript/mastodon/actions/reports.js | 4 +- app/javascript/mastodon/actions/search.js | 6 +- app/javascript/mastodon/actions/server.js | 10 +-- app/javascript/mastodon/actions/statuses.js | 22 +++---- .../mastodon/actions/suggestions.js | 8 +-- app/javascript/mastodon/actions/tags.js | 18 +++--- app/javascript/mastodon/actions/timelines.js | 2 +- app/javascript/mastodon/actions/trends.js | 12 ++-- app/javascript/mastodon/api.ts | 22 ++----- app/javascript/mastodon/identity_context.tsx | 4 -- app/javascript/mastodon/initial_state.js | 7 ++ app/javascript/mastodon/reducers/meta.js | 4 +- app/javascript/mastodon/stream.js | 6 +- app/javascript/mastodon/test_helpers.tsx | 1 - 35 files changed, 225 insertions(+), 226 deletions(-) diff --git a/app/javascript/mastodon/actions/account_notes.ts b/app/javascript/mastodon/actions/account_notes.ts index e524e5235bfe5a..acd9ecf4104ba3 100644 --- a/app/javascript/mastodon/actions/account_notes.ts +++ b/app/javascript/mastodon/actions/account_notes.ts @@ -5,8 +5,8 @@ import api from '../api'; export const submitAccountNote = createAppAsyncThunk( 'account_note/submit', - async (args: { id: string; value: string }, { getState }) => { - const response = await api(getState).post( + async (args: { id: string; value: string }) => { + const response = await api().post( `/api/v1/accounts/${args.id}/note`, { comment: args.value, diff --git a/app/javascript/mastodon/actions/accounts.js b/app/javascript/mastodon/actions/accounts.js index 9f3bbba03313f6..cea915e5f17fd0 100644 --- a/app/javascript/mastodon/actions/accounts.js +++ b/app/javascript/mastodon/actions/accounts.js @@ -76,11 +76,11 @@ export const ACCOUNT_REVEAL = 'ACCOUNT_REVEAL'; export * from './accounts_typed'; export function fetchAccount(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchRelationships([id])); dispatch(fetchAccountRequest(id)); - api(getState).get(`/api/v1/accounts/${id}`).then(response => { + api().get(`/api/v1/accounts/${id}`).then(response => { dispatch(importFetchedAccount(response.data)); dispatch(fetchAccountSuccess()); }).catch(error => { @@ -89,10 +89,10 @@ export function fetchAccount(id) { }; } -export const lookupAccount = acct => (dispatch, getState) => { +export const lookupAccount = acct => (dispatch) => { dispatch(lookupAccountRequest(acct)); - api(getState).get('/api/v1/accounts/lookup', { params: { acct } }).then(response => { + api().get('/api/v1/accounts/lookup', { params: { acct } }).then(response => { dispatch(fetchRelationships([response.data.id])); dispatch(importFetchedAccount(response.data)); dispatch(lookupAccountSuccess()); @@ -146,7 +146,7 @@ export function followAccount(id, options = { reblogs: true }) { dispatch(followAccountRequest({ id, locked })); - api(getState).post(`/api/v1/accounts/${id}/follow`, options).then(response => { + api().post(`/api/v1/accounts/${id}/follow`, options).then(response => { dispatch(followAccountSuccess({relationship: response.data, alreadyFollowing})); }).catch(error => { dispatch(followAccountFail({ id, error, locked })); @@ -158,7 +158,7 @@ export function unfollowAccount(id) { return (dispatch, getState) => { dispatch(unfollowAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/unfollow`).then(response => { + api().post(`/api/v1/accounts/${id}/unfollow`).then(response => { dispatch(unfollowAccountSuccess({relationship: response.data, statuses: getState().get('statuses')})); }).catch(error => { dispatch(unfollowAccountFail({ id, error })); @@ -170,7 +170,7 @@ export function blockAccount(id) { return (dispatch, getState) => { dispatch(blockAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/block`).then(response => { + api().post(`/api/v1/accounts/${id}/block`).then(response => { // Pass in entire statuses map so we can use it to filter stuff in different parts of the reducers dispatch(blockAccountSuccess({ relationship: response.data, statuses: getState().get('statuses') })); }).catch(error => { @@ -180,10 +180,10 @@ export function blockAccount(id) { } export function unblockAccount(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unblockAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/unblock`).then(response => { + api().post(`/api/v1/accounts/${id}/unblock`).then(response => { dispatch(unblockAccountSuccess({ relationship: response.data })); }).catch(error => { dispatch(unblockAccountFail({ id, error })); @@ -223,7 +223,7 @@ export function muteAccount(id, notifications, duration=0) { return (dispatch, getState) => { dispatch(muteAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/mute`, { notifications, duration }).then(response => { + api().post(`/api/v1/accounts/${id}/mute`, { notifications, duration }).then(response => { // Pass in entire statuses map so we can use it to filter stuff in different parts of the reducers dispatch(muteAccountSuccess({ relationship: response.data, statuses: getState().get('statuses') })); }).catch(error => { @@ -233,10 +233,10 @@ export function muteAccount(id, notifications, duration=0) { } export function unmuteAccount(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unmuteAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/unmute`).then(response => { + api().post(`/api/v1/accounts/${id}/unmute`).then(response => { dispatch(unmuteAccountSuccess({ relationship: response.data })); }).catch(error => { dispatch(unmuteAccountFail({ id, error })); @@ -274,10 +274,10 @@ export function unmuteAccountFail(error) { export function fetchFollowers(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchFollowersRequest(id)); - api(getState).get(`/api/v1/accounts/${id}/followers`).then(response => { + api().get(`/api/v1/accounts/${id}/followers`).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); @@ -324,7 +324,7 @@ export function expandFollowers(id) { dispatch(expandFollowersRequest(id)); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); @@ -361,10 +361,10 @@ export function expandFollowersFail(id, error) { } export function fetchFollowing(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchFollowingRequest(id)); - api(getState).get(`/api/v1/accounts/${id}/following`).then(response => { + api().get(`/api/v1/accounts/${id}/following`).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); @@ -411,7 +411,7 @@ export function expandFollowing(id) { dispatch(expandFollowingRequest(id)); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); @@ -460,7 +460,7 @@ export function fetchRelationships(accountIds) { dispatch(fetchRelationshipsRequest(newAccountIds)); - api(getState).get(`/api/v1/accounts/relationships?with_suspended=true&${newAccountIds.map(id => `id[]=${id}`).join('&')}`).then(response => { + api().get(`/api/v1/accounts/relationships?with_suspended=true&${newAccountIds.map(id => `id[]=${id}`).join('&')}`).then(response => { dispatch(fetchRelationshipsSuccess({ relationships: response.data })); }).catch(error => { dispatch(fetchRelationshipsFail(error)); @@ -486,10 +486,10 @@ export function fetchRelationshipsFail(error) { } export function fetchFollowRequests() { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchFollowRequestsRequest()); - api(getState).get('/api/v1/follow_requests').then(response => { + api().get('/api/v1/follow_requests').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null)); @@ -528,7 +528,7 @@ export function expandFollowRequests() { dispatch(expandFollowRequestsRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null)); @@ -558,10 +558,10 @@ export function expandFollowRequestsFail(error) { } export function authorizeFollowRequest(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(authorizeFollowRequestRequest(id)); - api(getState) + api() .post(`/api/v1/follow_requests/${id}/authorize`) .then(() => dispatch(authorizeFollowRequestSuccess({ id }))) .catch(error => dispatch(authorizeFollowRequestFail(id, error))); @@ -585,10 +585,10 @@ export function authorizeFollowRequestFail(id, error) { export function rejectFollowRequest(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(rejectFollowRequestRequest(id)); - api(getState) + api() .post(`/api/v1/follow_requests/${id}/reject`) .then(() => dispatch(rejectFollowRequestSuccess({ id }))) .catch(error => dispatch(rejectFollowRequestFail(id, error))); @@ -611,10 +611,10 @@ export function rejectFollowRequestFail(id, error) { } export function pinAccount(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(pinAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/pin`).then(response => { + api().post(`/api/v1/accounts/${id}/pin`).then(response => { dispatch(pinAccountSuccess({ relationship: response.data })); }).catch(error => { dispatch(pinAccountFail(error)); @@ -623,10 +623,10 @@ export function pinAccount(id) { } export function unpinAccount(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unpinAccountRequest(id)); - api(getState).post(`/api/v1/accounts/${id}/unpin`).then(response => { + api().post(`/api/v1/accounts/${id}/unpin`).then(response => { dispatch(unpinAccountSuccess({ relationship: response.data })); }).catch(error => { dispatch(unpinAccountFail(error)); @@ -662,7 +662,7 @@ export function unpinAccountFail(error) { }; } -export const updateAccount = ({ displayName, note, avatar, header, discoverable, indexable }) => (dispatch, getState) => { +export const updateAccount = ({ displayName, note, avatar, header, discoverable, indexable }) => (dispatch) => { const data = new FormData(); data.append('display_name', displayName); @@ -672,7 +672,7 @@ export const updateAccount = ({ displayName, note, avatar, header, discoverable, data.append('discoverable', discoverable); data.append('indexable', indexable); - return api(getState).patch('/api/v1/accounts/update_credentials', data).then(response => { + return api().patch('/api/v1/accounts/update_credentials', data).then(response => { dispatch(importFetchedAccount(response.data)); }); }; diff --git a/app/javascript/mastodon/actions/announcements.js b/app/javascript/mastodon/actions/announcements.js index 339c5f3adc5a8e..7657b05dc42364 100644 --- a/app/javascript/mastodon/actions/announcements.js +++ b/app/javascript/mastodon/actions/announcements.js @@ -26,10 +26,10 @@ export const ANNOUNCEMENTS_TOGGLE_SHOW = 'ANNOUNCEMENTS_TOGGLE_SHOW'; const noOp = () => {}; -export const fetchAnnouncements = (done = noOp) => (dispatch, getState) => { +export const fetchAnnouncements = (done = noOp) => (dispatch) => { dispatch(fetchAnnouncementsRequest()); - api(getState).get('/api/v1/announcements').then(response => { + api().get('/api/v1/announcements').then(response => { dispatch(fetchAnnouncementsSuccess(response.data.map(x => normalizeAnnouncement(x)))); }).catch(error => { dispatch(fetchAnnouncementsFail(error)); @@ -61,10 +61,10 @@ export const updateAnnouncements = announcement => ({ announcement: normalizeAnnouncement(announcement), }); -export const dismissAnnouncement = announcementId => (dispatch, getState) => { +export const dismissAnnouncement = announcementId => (dispatch) => { dispatch(dismissAnnouncementRequest(announcementId)); - api(getState).post(`/api/v1/announcements/${announcementId}/dismiss`).then(() => { + api().post(`/api/v1/announcements/${announcementId}/dismiss`).then(() => { dispatch(dismissAnnouncementSuccess(announcementId)); }).catch(error => { dispatch(dismissAnnouncementFail(announcementId, error)); @@ -103,7 +103,7 @@ export const addReaction = (announcementId, name) => (dispatch, getState) => { dispatch(addReactionRequest(announcementId, name, alreadyAdded)); } - api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => { + api().put(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => { dispatch(addReactionSuccess(announcementId, name, alreadyAdded)); }).catch(err => { if (!alreadyAdded) { @@ -134,10 +134,10 @@ export const addReactionFail = (announcementId, name, error) => ({ skipLoading: true, }); -export const removeReaction = (announcementId, name) => (dispatch, getState) => { +export const removeReaction = (announcementId, name) => (dispatch) => { dispatch(removeReactionRequest(announcementId, name)); - api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => { + api().delete(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => { dispatch(removeReactionSuccess(announcementId, name)); }).catch(err => { dispatch(removeReactionFail(announcementId, name, err)); diff --git a/app/javascript/mastodon/actions/blocks.js b/app/javascript/mastodon/actions/blocks.js index 54296d0905c9a9..5c66e27bec2d0b 100644 --- a/app/javascript/mastodon/actions/blocks.js +++ b/app/javascript/mastodon/actions/blocks.js @@ -13,10 +13,10 @@ export const BLOCKS_EXPAND_SUCCESS = 'BLOCKS_EXPAND_SUCCESS'; export const BLOCKS_EXPAND_FAIL = 'BLOCKS_EXPAND_FAIL'; export function fetchBlocks() { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchBlocksRequest()); - api(getState).get('/api/v1/blocks').then(response => { + api().get('/api/v1/blocks').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(fetchBlocksSuccess(response.data, next ? next.uri : null)); @@ -56,7 +56,7 @@ export function expandBlocks() { dispatch(expandBlocksRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(expandBlocksSuccess(response.data, next ? next.uri : null)); diff --git a/app/javascript/mastodon/actions/bookmarks.js b/app/javascript/mastodon/actions/bookmarks.js index 0b16f61e63635a..89716b224c598e 100644 --- a/app/javascript/mastodon/actions/bookmarks.js +++ b/app/javascript/mastodon/actions/bookmarks.js @@ -18,7 +18,7 @@ export function fetchBookmarkedStatuses() { dispatch(fetchBookmarkedStatusesRequest()); - api(getState).get('/api/v1/bookmarks').then(response => { + api().get('/api/v1/bookmarks').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); dispatch(fetchBookmarkedStatusesSuccess(response.data, next ? next.uri : null)); @@ -59,7 +59,7 @@ export function expandBookmarkedStatuses() { dispatch(expandBookmarkedStatusesRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); dispatch(expandBookmarkedStatusesSuccess(response.data, next ? next.uri : null)); diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js index 7477e45e5eb4bf..b07dff182a8bb4 100644 --- a/app/javascript/mastodon/actions/compose.js +++ b/app/javascript/mastodon/actions/compose.js @@ -196,7 +196,7 @@ export function submitCompose(routerHistory) { }); } - api(getState).request({ + api().request({ url: statusId === null ? '/api/v1/statuses' : `/api/v1/statuses/${statusId}`, method: statusId === null ? 'post' : 'put', data: { @@ -304,7 +304,7 @@ export function uploadCompose(files) { const data = new FormData(); data.append('file', file); - api(getState).post('/api/v2/media', data, { + api().post('/api/v2/media', data, { onUploadProgress: function({ loaded }){ progress[i] = loaded; dispatch(uploadComposeProgress(progress.reduce((a, v) => a + v, 0), total)); @@ -321,7 +321,7 @@ export function uploadCompose(files) { let tryCount = 1; const poll = () => { - api(getState).get(`/api/v1/media/${data.id}`).then(response => { + api().get(`/api/v1/media/${data.id}`).then(response => { if (response.status === 200) { dispatch(uploadComposeSuccess(response.data, file)); } else if (response.status === 206) { @@ -343,7 +343,7 @@ export const uploadComposeProcessing = () => ({ type: COMPOSE_UPLOAD_PROCESSING, }); -export const uploadThumbnail = (id, file) => (dispatch, getState) => { +export const uploadThumbnail = (id, file) => (dispatch) => { dispatch(uploadThumbnailRequest()); const total = file.size; @@ -351,7 +351,7 @@ export const uploadThumbnail = (id, file) => (dispatch, getState) => { data.append('thumbnail', file); - api(getState).put(`/api/v1/media/${id}`, data, { + api().put(`/api/v1/media/${id}`, data, { onUploadProgress: ({ loaded }) => { dispatch(uploadThumbnailProgress(loaded, total)); }, @@ -434,7 +434,7 @@ export function changeUploadCompose(id, params) { dispatch(changeUploadComposeSuccess(data, true)); } else { - api(getState).put(`/api/v1/media/${id}`, params).then(response => { + api().put(`/api/v1/media/${id}`, params).then(response => { dispatch(changeUploadComposeSuccess(response.data, false)); }).catch(error => { dispatch(changeUploadComposeFail(id, error)); @@ -522,7 +522,7 @@ const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => fetchComposeSuggestionsAccountsController = new AbortController(); - api(getState).get('/api/v1/accounts/search', { + api().get('/api/v1/accounts/search', { signal: fetchComposeSuggestionsAccountsController.signal, params: { @@ -556,7 +556,7 @@ const fetchComposeSuggestionsTags = throttle((dispatch, getState, token) => { fetchComposeSuggestionsTagsController = new AbortController(); - api(getState).get('/api/v2/search', { + api().get('/api/v2/search', { signal: fetchComposeSuggestionsTagsController.signal, params: { diff --git a/app/javascript/mastodon/actions/conversations.js b/app/javascript/mastodon/actions/conversations.js index 8c4c4529fb7e8b..03174c485dd4c0 100644 --- a/app/javascript/mastodon/actions/conversations.js +++ b/app/javascript/mastodon/actions/conversations.js @@ -28,13 +28,13 @@ export const unmountConversations = () => ({ type: CONVERSATIONS_UNMOUNT, }); -export const markConversationRead = conversationId => (dispatch, getState) => { +export const markConversationRead = conversationId => (dispatch) => { dispatch({ type: CONVERSATIONS_READ, id: conversationId, }); - api(getState).post(`/api/v1/conversations/${conversationId}/read`); + api().post(`/api/v1/conversations/${conversationId}/read`); }; export const expandConversations = ({ maxId } = {}) => (dispatch, getState) => { @@ -48,7 +48,7 @@ export const expandConversations = ({ maxId } = {}) => (dispatch, getState) => { const isLoadingRecent = !!params.since_id; - api(getState).get('/api/v1/conversations', { params }) + api().get('/api/v1/conversations', { params }) .then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); @@ -88,10 +88,10 @@ export const updateConversations = conversation => dispatch => { }); }; -export const deleteConversation = conversationId => (dispatch, getState) => { +export const deleteConversation = conversationId => (dispatch) => { dispatch(deleteConversationRequest(conversationId)); - api(getState).delete(`/api/v1/conversations/${conversationId}`) + api().delete(`/api/v1/conversations/${conversationId}`) .then(() => dispatch(deleteConversationSuccess(conversationId))) .catch(error => dispatch(deleteConversationFail(conversationId, error))); }; diff --git a/app/javascript/mastodon/actions/custom_emojis.js b/app/javascript/mastodon/actions/custom_emojis.js index 9ec8156b170a21..fb65f072dc8db7 100644 --- a/app/javascript/mastodon/actions/custom_emojis.js +++ b/app/javascript/mastodon/actions/custom_emojis.js @@ -5,10 +5,10 @@ export const CUSTOM_EMOJIS_FETCH_SUCCESS = 'CUSTOM_EMOJIS_FETCH_SUCCESS'; export const CUSTOM_EMOJIS_FETCH_FAIL = 'CUSTOM_EMOJIS_FETCH_FAIL'; export function fetchCustomEmojis() { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchCustomEmojisRequest()); - api(getState).get('/api/v1/custom_emojis').then(response => { + api().get('/api/v1/custom_emojis').then(response => { dispatch(fetchCustomEmojisSuccess(response.data)); }).catch(error => { dispatch(fetchCustomEmojisFail(error)); diff --git a/app/javascript/mastodon/actions/directory.js b/app/javascript/mastodon/actions/directory.js index cda63f2b5a43eb..7a0748029d97c1 100644 --- a/app/javascript/mastodon/actions/directory.js +++ b/app/javascript/mastodon/actions/directory.js @@ -11,10 +11,10 @@ export const DIRECTORY_EXPAND_REQUEST = 'DIRECTORY_EXPAND_REQUEST'; export const DIRECTORY_EXPAND_SUCCESS = 'DIRECTORY_EXPAND_SUCCESS'; export const DIRECTORY_EXPAND_FAIL = 'DIRECTORY_EXPAND_FAIL'; -export const fetchDirectory = params => (dispatch, getState) => { +export const fetchDirectory = params => (dispatch) => { dispatch(fetchDirectoryRequest()); - api(getState).get('/api/v1/directory', { params: { ...params, limit: 20 } }).then(({ data }) => { + api().get('/api/v1/directory', { params: { ...params, limit: 20 } }).then(({ data }) => { dispatch(importFetchedAccounts(data)); dispatch(fetchDirectorySuccess(data)); dispatch(fetchRelationships(data.map(x => x.id))); @@ -40,7 +40,7 @@ export const expandDirectory = params => (dispatch, getState) => { const loadedItems = getState().getIn(['user_lists', 'directory', 'items']).size; - api(getState).get('/api/v1/directory', { params: { ...params, offset: loadedItems, limit: 20 } }).then(({ data }) => { + api().get('/api/v1/directory', { params: { ...params, offset: loadedItems, limit: 20 } }).then(({ data }) => { dispatch(importFetchedAccounts(data)); dispatch(expandDirectorySuccess(data)); dispatch(fetchRelationships(data.map(x => x.id))); diff --git a/app/javascript/mastodon/actions/domain_blocks.js b/app/javascript/mastodon/actions/domain_blocks.js index 55c0a6ce9d0ab7..727f800af3b528 100644 --- a/app/javascript/mastodon/actions/domain_blocks.js +++ b/app/javascript/mastodon/actions/domain_blocks.js @@ -24,7 +24,7 @@ export function blockDomain(domain) { return (dispatch, getState) => { dispatch(blockDomainRequest(domain)); - api(getState).post('/api/v1/domain_blocks', { domain }).then(() => { + api().post('/api/v1/domain_blocks', { domain }).then(() => { const at_domain = '@' + domain; const accounts = getState().get('accounts').filter(item => item.get('acct').endsWith(at_domain)).valueSeq().map(item => item.get('id')); @@ -54,7 +54,7 @@ export function unblockDomain(domain) { return (dispatch, getState) => { dispatch(unblockDomainRequest(domain)); - api(getState).delete('/api/v1/domain_blocks', { params: { domain } }).then(() => { + api().delete('/api/v1/domain_blocks', { params: { domain } }).then(() => { const at_domain = '@' + domain; const accounts = getState().get('accounts').filter(item => item.get('acct').endsWith(at_domain)).valueSeq().map(item => item.get('id')); dispatch(unblockDomainSuccess({ domain, accounts })); @@ -80,10 +80,10 @@ export function unblockDomainFail(domain, error) { } export function fetchDomainBlocks() { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchDomainBlocksRequest()); - api(getState).get('/api/v1/domain_blocks').then(response => { + api().get('/api/v1/domain_blocks').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(fetchDomainBlocksSuccess(response.data, next ? next.uri : null)); }).catch(err => { @@ -123,7 +123,7 @@ export function expandDomainBlocks() { dispatch(expandDomainBlocksRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(expandDomainBlocksSuccess(response.data, next ? next.uri : null)); }).catch(err => { diff --git a/app/javascript/mastodon/actions/favourites.js b/app/javascript/mastodon/actions/favourites.js index 2d4d4e6206e845..ff475c82bec806 100644 --- a/app/javascript/mastodon/actions/favourites.js +++ b/app/javascript/mastodon/actions/favourites.js @@ -18,7 +18,7 @@ export function fetchFavouritedStatuses() { dispatch(fetchFavouritedStatusesRequest()); - api(getState).get('/api/v1/favourites').then(response => { + api().get('/api/v1/favourites').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); dispatch(fetchFavouritedStatusesSuccess(response.data, next ? next.uri : null)); @@ -62,7 +62,7 @@ export function expandFavouritedStatuses() { dispatch(expandFavouritedStatusesRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); dispatch(expandFavouritedStatusesSuccess(response.data, next ? next.uri : null)); diff --git a/app/javascript/mastodon/actions/featured_tags.js b/app/javascript/mastodon/actions/featured_tags.js index 18bb615394571c..6ee4dee2bcd34a 100644 --- a/app/javascript/mastodon/actions/featured_tags.js +++ b/app/javascript/mastodon/actions/featured_tags.js @@ -11,7 +11,7 @@ export const fetchFeaturedTags = (id) => (dispatch, getState) => { dispatch(fetchFeaturedTagsRequest(id)); - api(getState).get(`/api/v1/accounts/${id}/featured_tags`) + api().get(`/api/v1/accounts/${id}/featured_tags`) .then(({ data }) => dispatch(fetchFeaturedTagsSuccess(id, data))) .catch(err => dispatch(fetchFeaturedTagsFail(id, err))); }; diff --git a/app/javascript/mastodon/actions/filters.js b/app/javascript/mastodon/actions/filters.js index a11956ac564c6a..588e390f0a95f8 100644 --- a/app/javascript/mastodon/actions/filters.js +++ b/app/javascript/mastodon/actions/filters.js @@ -23,13 +23,13 @@ export const initAddFilter = (status, { contextType }) => dispatch => }, })); -export const fetchFilters = () => (dispatch, getState) => { +export const fetchFilters = () => (dispatch) => { dispatch({ type: FILTERS_FETCH_REQUEST, skipLoading: true, }); - api(getState) + api() .get('/api/v2/filters') .then(({ data }) => dispatch({ type: FILTERS_FETCH_SUCCESS, @@ -44,10 +44,10 @@ export const fetchFilters = () => (dispatch, getState) => { })); }; -export const createFilterStatus = (params, onSuccess, onFail) => (dispatch, getState) => { +export const createFilterStatus = (params, onSuccess, onFail) => (dispatch) => { dispatch(createFilterStatusRequest()); - api(getState).post(`/api/v2/filters/${params.filter_id}/statuses`, params).then(response => { + api().post(`/api/v2/filters/${params.filter_id}/statuses`, params).then(response => { dispatch(createFilterStatusSuccess(response.data)); if (onSuccess) onSuccess(); }).catch(error => { @@ -70,10 +70,10 @@ export const createFilterStatusFail = error => ({ error, }); -export const createFilter = (params, onSuccess, onFail) => (dispatch, getState) => { +export const createFilter = (params, onSuccess, onFail) => (dispatch) => { dispatch(createFilterRequest()); - api(getState).post('/api/v2/filters', params).then(response => { + api().post('/api/v2/filters', params).then(response => { dispatch(createFilterSuccess(response.data)); if (onSuccess) onSuccess(response.data); }).catch(error => { diff --git a/app/javascript/mastodon/actions/history.js b/app/javascript/mastodon/actions/history.js index 52401b7dce3f95..07732ea187459d 100644 --- a/app/javascript/mastodon/actions/history.js +++ b/app/javascript/mastodon/actions/history.js @@ -15,7 +15,7 @@ export const fetchHistory = statusId => (dispatch, getState) => { dispatch(fetchHistoryRequest(statusId)); - api(getState).get(`/api/v1/statuses/${statusId}/history`).then(({ data }) => { + api().get(`/api/v1/statuses/${statusId}/history`).then(({ data }) => { dispatch(importFetchedAccounts(data.map(x => x.account))); dispatch(fetchHistorySuccess(statusId, data)); }).catch(error => dispatch(fetchHistoryFail(error))); diff --git a/app/javascript/mastodon/actions/interactions.js b/app/javascript/mastodon/actions/interactions.js index 7d0144438aa29c..fe7c911b61e2a5 100644 --- a/app/javascript/mastodon/actions/interactions.js +++ b/app/javascript/mastodon/actions/interactions.js @@ -52,10 +52,10 @@ export const UNBOOKMARK_SUCCESS = 'UNBOOKMARKED_SUCCESS'; export const UNBOOKMARK_FAIL = 'UNBOOKMARKED_FAIL'; export function reblog(status, visibility) { - return function (dispatch, getState) { + return function (dispatch) { dispatch(reblogRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/reblog`, { visibility }).then(function (response) { + api().post(`/api/v1/statuses/${status.get('id')}/reblog`, { visibility }).then(function (response) { // The reblog API method returns a new status wrapped around the original. In this case we are only // interested in how the original is modified, hence passing it skipping the wrapper dispatch(importFetchedStatus(response.data.reblog)); @@ -67,10 +67,10 @@ export function reblog(status, visibility) { } export function unreblog(status) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unreblogRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/unreblog`).then(response => { + api().post(`/api/v1/statuses/${status.get('id')}/unreblog`).then(response => { dispatch(importFetchedStatus(response.data)); dispatch(unreblogSuccess(status)); }).catch(error => { @@ -130,10 +130,10 @@ export function unreblogFail(status, error) { } export function favourite(status) { - return function (dispatch, getState) { + return function (dispatch) { dispatch(favouriteRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/favourite`).then(function (response) { + api().post(`/api/v1/statuses/${status.get('id')}/favourite`).then(function (response) { dispatch(importFetchedStatus(response.data)); dispatch(favouriteSuccess(status)); }).catch(function (error) { @@ -143,10 +143,10 @@ export function favourite(status) { } export function unfavourite(status) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unfavouriteRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/unfavourite`).then(response => { + api().post(`/api/v1/statuses/${status.get('id')}/unfavourite`).then(response => { dispatch(importFetchedStatus(response.data)); dispatch(unfavouriteSuccess(status)); }).catch(error => { @@ -206,10 +206,10 @@ export function unfavouriteFail(status, error) { } export function bookmark(status) { - return function (dispatch, getState) { + return function (dispatch) { dispatch(bookmarkRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/bookmark`).then(function (response) { + api().post(`/api/v1/statuses/${status.get('id')}/bookmark`).then(function (response) { dispatch(importFetchedStatus(response.data)); dispatch(bookmarkSuccess(status, response.data)); }).catch(function (error) { @@ -219,10 +219,10 @@ export function bookmark(status) { } export function unbookmark(status) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unbookmarkRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/unbookmark`).then(response => { + api().post(`/api/v1/statuses/${status.get('id')}/unbookmark`).then(response => { dispatch(importFetchedStatus(response.data)); dispatch(unbookmarkSuccess(status, response.data)); }).catch(error => { @@ -278,10 +278,10 @@ export function unbookmarkFail(status, error) { } export function fetchReblogs(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchReblogsRequest(id)); - api(getState).get(`/api/v1/statuses/${id}/reblogged_by`).then(response => { + api().get(`/api/v1/statuses/${id}/reblogged_by`).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(fetchReblogsSuccess(id, response.data, next ? next.uri : null)); @@ -325,7 +325,7 @@ export function expandReblogs(id) { dispatch(expandReblogsRequest(id)); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); @@ -360,10 +360,10 @@ export function expandReblogsFail(id, error) { } export function fetchFavourites(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchFavouritesRequest(id)); - api(getState).get(`/api/v1/statuses/${id}/favourited_by`).then(response => { + api().get(`/api/v1/statuses/${id}/favourited_by`).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(fetchFavouritesSuccess(id, response.data, next ? next.uri : null)); @@ -407,7 +407,7 @@ export function expandFavourites(id) { dispatch(expandFavouritesRequest(id)); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); @@ -442,10 +442,10 @@ export function expandFavouritesFail(id, error) { } export function pin(status) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(pinRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/pin`).then(response => { + api().post(`/api/v1/statuses/${status.get('id')}/pin`).then(response => { dispatch(importFetchedStatus(response.data)); dispatch(pinSuccess(status)); }).catch(error => { @@ -480,10 +480,10 @@ export function pinFail(status, error) { } export function unpin (status) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unpinRequest(status)); - api(getState).post(`/api/v1/statuses/${status.get('id')}/unpin`).then(response => { + api().post(`/api/v1/statuses/${status.get('id')}/unpin`).then(response => { dispatch(importFetchedStatus(response.data)); dispatch(unpinSuccess(status)); }).catch(error => { diff --git a/app/javascript/mastodon/actions/lists.js b/app/javascript/mastodon/actions/lists.js index b0789cd426450a..9956059387efc2 100644 --- a/app/javascript/mastodon/actions/lists.js +++ b/app/javascript/mastodon/actions/lists.js @@ -57,7 +57,7 @@ export const fetchList = id => (dispatch, getState) => { dispatch(fetchListRequest(id)); - api(getState).get(`/api/v1/lists/${id}`) + api().get(`/api/v1/lists/${id}`) .then(({ data }) => dispatch(fetchListSuccess(data))) .catch(err => dispatch(fetchListFail(id, err))); }; @@ -78,10 +78,10 @@ export const fetchListFail = (id, error) => ({ error, }); -export const fetchLists = () => (dispatch, getState) => { +export const fetchLists = () => (dispatch) => { dispatch(fetchListsRequest()); - api(getState).get('/api/v1/lists') + api().get('/api/v1/lists') .then(({ data }) => dispatch(fetchListsSuccess(data))) .catch(err => dispatch(fetchListsFail(err))); }; @@ -125,10 +125,10 @@ export const changeListEditorTitle = value => ({ value, }); -export const createList = (title, shouldReset) => (dispatch, getState) => { +export const createList = (title, shouldReset) => (dispatch) => { dispatch(createListRequest()); - api(getState).post('/api/v1/lists', { title }).then(({ data }) => { + api().post('/api/v1/lists', { title }).then(({ data }) => { dispatch(createListSuccess(data)); if (shouldReset) { @@ -151,10 +151,10 @@ export const createListFail = error => ({ error, }); -export const updateList = (id, title, shouldReset, isExclusive, replies_policy) => (dispatch, getState) => { +export const updateList = (id, title, shouldReset, isExclusive, replies_policy) => (dispatch) => { dispatch(updateListRequest(id)); - api(getState).put(`/api/v1/lists/${id}`, { title, replies_policy, exclusive: typeof isExclusive === 'undefined' ? undefined : !!isExclusive }).then(({ data }) => { + api().put(`/api/v1/lists/${id}`, { title, replies_policy, exclusive: typeof isExclusive === 'undefined' ? undefined : !!isExclusive }).then(({ data }) => { dispatch(updateListSuccess(data)); if (shouldReset) { @@ -183,10 +183,10 @@ export const resetListEditor = () => ({ type: LIST_EDITOR_RESET, }); -export const deleteList = id => (dispatch, getState) => { +export const deleteList = id => (dispatch) => { dispatch(deleteListRequest(id)); - api(getState).delete(`/api/v1/lists/${id}`) + api().delete(`/api/v1/lists/${id}`) .then(() => dispatch(deleteListSuccess(id))) .catch(err => dispatch(deleteListFail(id, err))); }; @@ -207,10 +207,10 @@ export const deleteListFail = (id, error) => ({ error, }); -export const fetchListAccounts = listId => (dispatch, getState) => { +export const fetchListAccounts = listId => (dispatch) => { dispatch(fetchListAccountsRequest(listId)); - api(getState).get(`/api/v1/lists/${listId}/accounts`, { params: { limit: 0 } }).then(({ data }) => { + api().get(`/api/v1/lists/${listId}/accounts`, { params: { limit: 0 } }).then(({ data }) => { dispatch(importFetchedAccounts(data)); dispatch(fetchListAccountsSuccess(listId, data)); }).catch(err => dispatch(fetchListAccountsFail(listId, err))); @@ -234,7 +234,7 @@ export const fetchListAccountsFail = (id, error) => ({ error, }); -export const fetchListSuggestions = q => (dispatch, getState) => { +export const fetchListSuggestions = q => (dispatch) => { const params = { q, resolve: false, @@ -242,7 +242,7 @@ export const fetchListSuggestions = q => (dispatch, getState) => { following: true, }; - api(getState).get('/api/v1/accounts/search', { params }).then(({ data }) => { + api().get('/api/v1/accounts/search', { params }).then(({ data }) => { dispatch(importFetchedAccounts(data)); dispatch(fetchListSuggestionsReady(q, data)); }).catch(error => dispatch(showAlertForError(error))); @@ -267,10 +267,10 @@ export const addToListEditor = accountId => (dispatch, getState) => { dispatch(addToList(getState().getIn(['listEditor', 'listId']), accountId)); }; -export const addToList = (listId, accountId) => (dispatch, getState) => { +export const addToList = (listId, accountId) => (dispatch) => { dispatch(addToListRequest(listId, accountId)); - api(getState).post(`/api/v1/lists/${listId}/accounts`, { account_ids: [accountId] }) + api().post(`/api/v1/lists/${listId}/accounts`, { account_ids: [accountId] }) .then(() => dispatch(addToListSuccess(listId, accountId))) .catch(err => dispatch(addToListFail(listId, accountId, err))); }; @@ -298,10 +298,10 @@ export const removeFromListEditor = accountId => (dispatch, getState) => { dispatch(removeFromList(getState().getIn(['listEditor', 'listId']), accountId)); }; -export const removeFromList = (listId, accountId) => (dispatch, getState) => { +export const removeFromList = (listId, accountId) => (dispatch) => { dispatch(removeFromListRequest(listId, accountId)); - api(getState).delete(`/api/v1/lists/${listId}/accounts`, { params: { account_ids: [accountId] } }) + api().delete(`/api/v1/lists/${listId}/accounts`, { params: { account_ids: [accountId] } }) .then(() => dispatch(removeFromListSuccess(listId, accountId))) .catch(err => dispatch(removeFromListFail(listId, accountId, err))); }; @@ -338,10 +338,10 @@ export const setupListAdder = accountId => (dispatch, getState) => { dispatch(fetchAccountLists(accountId)); }; -export const fetchAccountLists = accountId => (dispatch, getState) => { +export const fetchAccountLists = accountId => (dispatch) => { dispatch(fetchAccountListsRequest(accountId)); - api(getState).get(`/api/v1/accounts/${accountId}/lists`) + api().get(`/api/v1/accounts/${accountId}/lists`) .then(({ data }) => dispatch(fetchAccountListsSuccess(accountId, data))) .catch(err => dispatch(fetchAccountListsFail(accountId, err))); }; @@ -370,4 +370,3 @@ export const addToListAdder = listId => (dispatch, getState) => { export const removeFromListAdder = listId => (dispatch, getState) => { dispatch(removeFromList(listId, getState().getIn(['listAdder', 'accountId']))); }; - diff --git a/app/javascript/mastodon/actions/markers.ts b/app/javascript/mastodon/actions/markers.ts index 91f78ee2867c2c..03f577c540fc5d 100644 --- a/app/javascript/mastodon/actions/markers.ts +++ b/app/javascript/mastodon/actions/markers.ts @@ -1,19 +1,24 @@ import { debounce } from 'lodash'; import type { MarkerJSON } from 'mastodon/api_types/markers'; +import { getAccessToken } from 'mastodon/initial_state'; import type { AppDispatch, RootState } from 'mastodon/store'; import { createAppAsyncThunk } from 'mastodon/store/typed_functions'; -import api, { authorizationTokenFromState } from '../api'; +import api from '../api'; import { compareId } from '../compare_id'; export const synchronouslySubmitMarkers = createAppAsyncThunk( 'markers/submit', async (_args, { getState }) => { - const accessToken = authorizationTokenFromState(getState); + const accessToken = getAccessToken(); const params = buildPostMarkersParams(getState()); - if (Object.keys(params).length === 0 || !accessToken) { + if ( + Object.keys(params).length === 0 || + !accessToken || + accessToken === '' + ) { return; } @@ -96,14 +101,14 @@ export const submitMarkersAction = createAppAsyncThunk<{ home: string | undefined; notifications: string | undefined; }>('markers/submitAction', async (_args, { getState }) => { - const accessToken = authorizationTokenFromState(getState); + const accessToken = getAccessToken(); const params = buildPostMarkersParams(getState()); - if (Object.keys(params).length === 0 || accessToken === '') { + if (Object.keys(params).length === 0 || !accessToken || accessToken === '') { return { home: undefined, notifications: undefined }; } - await api(getState).post('/api/v1/markers', params); + await api().post('/api/v1/markers', params); return { home: params.home?.last_read_id, @@ -133,14 +138,11 @@ export const submitMarkers = createAppAsyncThunk( }, ); -export const fetchMarkers = createAppAsyncThunk( - 'markers/fetch', - async (_args, { getState }) => { - const response = await api(getState).get>( - `/api/v1/markers`, - { params: { timeline: ['notifications'] } }, - ); +export const fetchMarkers = createAppAsyncThunk('markers/fetch', async () => { + const response = await api().get>( + `/api/v1/markers`, + { params: { timeline: ['notifications'] } }, + ); - return { markers: response.data }; - }, -); + return { markers: response.data }; +}); diff --git a/app/javascript/mastodon/actions/mutes.js b/app/javascript/mastodon/actions/mutes.js index 99c113f4147302..3676748cf3fe77 100644 --- a/app/javascript/mastodon/actions/mutes.js +++ b/app/javascript/mastodon/actions/mutes.js @@ -13,10 +13,10 @@ export const MUTES_EXPAND_SUCCESS = 'MUTES_EXPAND_SUCCESS'; export const MUTES_EXPAND_FAIL = 'MUTES_EXPAND_FAIL'; export function fetchMutes() { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchMutesRequest()); - api(getState).get('/api/v1/mutes').then(response => { + api().get('/api/v1/mutes').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(fetchMutesSuccess(response.data, next ? next.uri : null)); @@ -56,7 +56,7 @@ export function expandMutes() { dispatch(expandMutesRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data)); dispatch(expandMutesSuccess(response.data, next ? next.uri : null)); diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index b54cbe27b99ff2..fe728aa26ee7fc 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -216,7 +216,7 @@ export function expandNotifications({ maxId, forceLoad } = {}, done = noOp) { dispatch(expandNotificationsRequest(isLoadingMore)); - api(getState).get('/api/v1/notifications', { params, signal: expandNotificationsController.signal }).then(response => { + api().get('/api/v1/notifications', { params, signal: expandNotificationsController.signal }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data.map(item => item.account))); @@ -262,12 +262,12 @@ export function expandNotificationsFail(error, isLoadingMore) { } export function clearNotifications() { - return (dispatch, getState) => { + return (dispatch) => { dispatch({ type: NOTIFICATIONS_CLEAR, }); - api(getState).post('/api/v1/notifications/clear'); + api().post('/api/v1/notifications/clear'); }; } @@ -346,10 +346,10 @@ export function setBrowserPermission (value) { }; } -export const fetchNotificationPolicy = () => (dispatch, getState) => { +export const fetchNotificationPolicy = () => (dispatch) => { dispatch(fetchNotificationPolicyRequest()); - api(getState).get('/api/v1/notifications/policy').then(({ data }) => { + api().get('/api/v1/notifications/policy').then(({ data }) => { dispatch(fetchNotificationPolicySuccess(data)); }).catch(err => { dispatch(fetchNotificationPolicyFail(err)); @@ -370,10 +370,10 @@ export const fetchNotificationPolicyFail = error => ({ error, }); -export const updateNotificationsPolicy = params => (dispatch, getState) => { +export const updateNotificationsPolicy = params => (dispatch) => { dispatch(fetchNotificationPolicyRequest()); - api(getState).put('/api/v1/notifications/policy', params).then(({ data }) => { + api().put('/api/v1/notifications/policy', params).then(({ data }) => { dispatch(fetchNotificationPolicySuccess(data)); }).catch(err => { dispatch(fetchNotificationPolicyFail(err)); @@ -393,7 +393,7 @@ export const fetchNotificationRequests = () => (dispatch, getState) => { dispatch(fetchNotificationRequestsRequest()); - api(getState).get('/api/v1/notifications/requests', { params }).then(response => { + api().get('/api/v1/notifications/requests', { params }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data.map(x => x.account))); dispatch(fetchNotificationRequestsSuccess(response.data, next ? next.uri : null)); @@ -426,7 +426,7 @@ export const expandNotificationRequests = () => (dispatch, getState) => { dispatch(expandNotificationRequestsRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data.map(x => x.account))); dispatch(expandNotificationRequestsSuccess(response.data, next?.uri)); @@ -459,7 +459,7 @@ export const fetchNotificationRequest = id => (dispatch, getState) => { dispatch(fetchNotificationRequestRequest(id)); - api(getState).get(`/api/v1/notifications/requests/${id}`).then(({ data }) => { + api().get(`/api/v1/notifications/requests/${id}`).then(({ data }) => { dispatch(fetchNotificationRequestSuccess(data)); }).catch(err => { dispatch(fetchNotificationRequestFail(id, err)); @@ -482,10 +482,10 @@ export const fetchNotificationRequestFail = (id, error) => ({ error, }); -export const acceptNotificationRequest = id => (dispatch, getState) => { +export const acceptNotificationRequest = id => (dispatch) => { dispatch(acceptNotificationRequestRequest(id)); - api(getState).post(`/api/v1/notifications/requests/${id}/accept`).then(() => { + api().post(`/api/v1/notifications/requests/${id}/accept`).then(() => { dispatch(acceptNotificationRequestSuccess(id)); }).catch(err => { dispatch(acceptNotificationRequestFail(id, err)); @@ -508,10 +508,10 @@ export const acceptNotificationRequestFail = (id, error) => ({ error, }); -export const dismissNotificationRequest = id => (dispatch, getState) => { +export const dismissNotificationRequest = id => (dispatch) => { dispatch(dismissNotificationRequestRequest(id)); - api(getState).post(`/api/v1/notifications/requests/${id}/dismiss`).then(() =>{ + api().post(`/api/v1/notifications/requests/${id}/dismiss`).then(() =>{ dispatch(dismissNotificationRequestSuccess(id)); }).catch(err => { dispatch(dismissNotificationRequestFail(id, err)); @@ -550,7 +550,7 @@ export const fetchNotificationsForRequest = accountId => (dispatch, getState) => dispatch(fetchNotificationsForRequestRequest()); - api(getState).get('/api/v1/notifications', { params }).then(response => { + api().get('/api/v1/notifications', { params }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data.map(item => item.account))); dispatch(importFetchedStatuses(response.data.map(item => item.status).filter(status => !!status))); @@ -586,7 +586,7 @@ export const expandNotificationsForRequest = () => (dispatch, getState) => { dispatch(expandNotificationsForRequestRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedAccounts(response.data.map(item => item.account))); dispatch(importFetchedStatuses(response.data.map(item => item.status).filter(status => !!status))); diff --git a/app/javascript/mastodon/actions/pin_statuses.js b/app/javascript/mastodon/actions/pin_statuses.js index baa10d15627d66..d583eab5735a9e 100644 --- a/app/javascript/mastodon/actions/pin_statuses.js +++ b/app/javascript/mastodon/actions/pin_statuses.js @@ -8,10 +8,10 @@ export const PINNED_STATUSES_FETCH_SUCCESS = 'PINNED_STATUSES_FETCH_SUCCESS'; export const PINNED_STATUSES_FETCH_FAIL = 'PINNED_STATUSES_FETCH_FAIL'; export function fetchPinnedStatuses() { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchPinnedStatusesRequest()); - api(getState).get(`/api/v1/accounts/${me}/statuses`, { params: { pinned: true } }).then(response => { + api().get(`/api/v1/accounts/${me}/statuses`, { params: { pinned: true } }).then(response => { dispatch(importFetchedStatuses(response.data)); dispatch(fetchPinnedStatusesSuccess(response.data, null)); }).catch(error => { diff --git a/app/javascript/mastodon/actions/polls.js b/app/javascript/mastodon/actions/polls.js index a37410dc90fa4d..aa49341444c7bc 100644 --- a/app/javascript/mastodon/actions/polls.js +++ b/app/javascript/mastodon/actions/polls.js @@ -10,10 +10,10 @@ export const POLL_FETCH_REQUEST = 'POLL_FETCH_REQUEST'; export const POLL_FETCH_SUCCESS = 'POLL_FETCH_SUCCESS'; export const POLL_FETCH_FAIL = 'POLL_FETCH_FAIL'; -export const vote = (pollId, choices) => (dispatch, getState) => { +export const vote = (pollId, choices) => (dispatch) => { dispatch(voteRequest()); - api(getState).post(`/api/v1/polls/${pollId}/votes`, { choices }) + api().post(`/api/v1/polls/${pollId}/votes`, { choices }) .then(({ data }) => { dispatch(importFetchedPoll(data)); dispatch(voteSuccess(data)); @@ -21,10 +21,10 @@ export const vote = (pollId, choices) => (dispatch, getState) => { .catch(err => dispatch(voteFail(err))); }; -export const fetchPoll = pollId => (dispatch, getState) => { +export const fetchPoll = pollId => (dispatch) => { dispatch(fetchPollRequest()); - api(getState).get(`/api/v1/polls/${pollId}`) + api().get(`/api/v1/polls/${pollId}`) .then(({ data }) => { dispatch(importFetchedPoll(data)); dispatch(fetchPollSuccess(data)); diff --git a/app/javascript/mastodon/actions/reports.js b/app/javascript/mastodon/actions/reports.js index 756b8cd05e1648..49b89b0d131bf2 100644 --- a/app/javascript/mastodon/actions/reports.js +++ b/app/javascript/mastodon/actions/reports.js @@ -15,10 +15,10 @@ export const initReport = (account, status) => dispatch => }, })); -export const submitReport = (params, onSuccess, onFail) => (dispatch, getState) => { +export const submitReport = (params, onSuccess, onFail) => (dispatch) => { dispatch(submitReportRequest()); - api(getState).post('/api/v1/reports', params).then(response => { + api().post('/api/v1/reports', params).then(response => { dispatch(submitReportSuccess(response.data)); if (onSuccess) onSuccess(); }).catch(error => { diff --git a/app/javascript/mastodon/actions/search.js b/app/javascript/mastodon/actions/search.js index a34a490e760d6e..bde17ae0db17a2 100644 --- a/app/javascript/mastodon/actions/search.js +++ b/app/javascript/mastodon/actions/search.js @@ -46,7 +46,7 @@ export function submitSearch(type) { dispatch(fetchSearchRequest(type)); - api(getState).get('/api/v2/search', { + api().get('/api/v2/search', { params: { q: value, resolve: signedIn, @@ -99,7 +99,7 @@ export const expandSearch = type => (dispatch, getState) => { dispatch(expandSearchRequest(type)); - api(getState).get('/api/v2/search', { + api().get('/api/v2/search', { params: { q: value, type, @@ -156,7 +156,7 @@ export const openURL = (value, history, onFailure) => (dispatch, getState) => { dispatch(fetchSearchRequest()); - api(getState).get('/api/v2/search', { params: { q: value, resolve: true } }).then(response => { + api().get('/api/v2/search', { params: { q: value, resolve: true } }).then(response => { if (response.data.accounts?.length > 0) { dispatch(importFetchedAccounts(response.data.accounts)); history.push(`/@${response.data.accounts[0].acct}`); diff --git a/app/javascript/mastodon/actions/server.js b/app/javascript/mastodon/actions/server.js index 65f3efc3a72a3d..32ee093afa8423 100644 --- a/app/javascript/mastodon/actions/server.js +++ b/app/javascript/mastodon/actions/server.js @@ -25,7 +25,7 @@ export const fetchServer = () => (dispatch, getState) => { dispatch(fetchServerRequest()); - api(getState) + api() .get('/api/v2/instance').then(({ data }) => { if (data.contact.account) dispatch(importFetchedAccount(data.contact.account)); dispatch(fetchServerSuccess(data)); @@ -46,10 +46,10 @@ const fetchServerFail = error => ({ error, }); -export const fetchServerTranslationLanguages = () => (dispatch, getState) => { +export const fetchServerTranslationLanguages = () => (dispatch) => { dispatch(fetchServerTranslationLanguagesRequest()); - api(getState) + api() .get('/api/v1/instance/translation_languages').then(({ data }) => { dispatch(fetchServerTranslationLanguagesSuccess(data)); }).catch(err => dispatch(fetchServerTranslationLanguagesFail(err))); @@ -76,7 +76,7 @@ export const fetchExtendedDescription = () => (dispatch, getState) => { dispatch(fetchExtendedDescriptionRequest()); - api(getState) + api() .get('/api/v1/instance/extended_description') .then(({ data }) => dispatch(fetchExtendedDescriptionSuccess(data))) .catch(err => dispatch(fetchExtendedDescriptionFail(err))); @@ -103,7 +103,7 @@ export const fetchDomainBlocks = () => (dispatch, getState) => { dispatch(fetchDomainBlocksRequest()); - api(getState) + api() .get('/api/v1/instance/domain_blocks') .then(({ data }) => dispatch(fetchDomainBlocksSuccess(true, data))) .catch(err => { diff --git a/app/javascript/mastodon/actions/statuses.js b/app/javascript/mastodon/actions/statuses.js index 3aed8073588a28..a60b80dc2c07ba 100644 --- a/app/javascript/mastodon/actions/statuses.js +++ b/app/javascript/mastodon/actions/statuses.js @@ -59,7 +59,7 @@ export function fetchStatus(id, forceFetch = false) { dispatch(fetchStatusRequest(id, skipLoading)); - api(getState).get(`/api/v1/statuses/${id}`).then(response => { + api().get(`/api/v1/statuses/${id}`).then(response => { dispatch(importFetchedStatus(response.data)); dispatch(fetchStatusSuccess(skipLoading)); }).catch(error => { @@ -102,7 +102,7 @@ export const editStatus = (id, routerHistory) => (dispatch, getState) => { dispatch(fetchStatusSourceRequest()); - api(getState).get(`/api/v1/statuses/${id}/source`).then(response => { + api().get(`/api/v1/statuses/${id}/source`).then(response => { dispatch(fetchStatusSourceSuccess()); ensureComposeIsVisible(getState, routerHistory); dispatch(setComposeToStatus(status, response.data.text, response.data.spoiler_text)); @@ -134,7 +134,7 @@ export function deleteStatus(id, routerHistory, withRedraft = false) { dispatch(deleteStatusRequest(id)); - api(getState).delete(`/api/v1/statuses/${id}`).then(response => { + api().delete(`/api/v1/statuses/${id}`).then(response => { dispatch(deleteStatusSuccess(id)); dispatch(deleteFromTimelines(id)); dispatch(importFetchedAccount(response.data.account)); @@ -175,10 +175,10 @@ export const updateStatus = status => dispatch => dispatch(importFetchedStatus(status)); export function fetchContext(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchContextRequest(id)); - api(getState).get(`/api/v1/statuses/${id}/context`).then(response => { + api().get(`/api/v1/statuses/${id}/context`).then(response => { dispatch(importFetchedStatuses(response.data.ancestors.concat(response.data.descendants))); dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants)); @@ -219,10 +219,10 @@ export function fetchContextFail(id, error) { } export function muteStatus(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(muteStatusRequest(id)); - api(getState).post(`/api/v1/statuses/${id}/mute`).then(() => { + api().post(`/api/v1/statuses/${id}/mute`).then(() => { dispatch(muteStatusSuccess(id)); }).catch(error => { dispatch(muteStatusFail(id, error)); @@ -253,10 +253,10 @@ export function muteStatusFail(id, error) { } export function unmuteStatus(id) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(unmuteStatusRequest(id)); - api(getState).post(`/api/v1/statuses/${id}/unmute`).then(() => { + api().post(`/api/v1/statuses/${id}/unmute`).then(() => { dispatch(unmuteStatusSuccess(id)); }).catch(error => { dispatch(unmuteStatusFail(id, error)); @@ -316,10 +316,10 @@ export function toggleStatusCollapse(id, isCollapsed) { }; } -export const translateStatus = id => (dispatch, getState) => { +export const translateStatus = id => (dispatch) => { dispatch(translateStatusRequest(id)); - api(getState).post(`/api/v1/statuses/${id}/translate`).then(response => { + api().post(`/api/v1/statuses/${id}/translate`).then(response => { dispatch(translateStatusSuccess(id, response.data)); }).catch(error => { dispatch(translateStatusFail(id, error)); diff --git a/app/javascript/mastodon/actions/suggestions.js b/app/javascript/mastodon/actions/suggestions.js index 8eafe38b21ae0e..258ffa901de5d1 100644 --- a/app/javascript/mastodon/actions/suggestions.js +++ b/app/javascript/mastodon/actions/suggestions.js @@ -10,10 +10,10 @@ export const SUGGESTIONS_FETCH_FAIL = 'SUGGESTIONS_FETCH_FAIL'; export const SUGGESTIONS_DISMISS = 'SUGGESTIONS_DISMISS'; export function fetchSuggestions(withRelationships = false) { - return (dispatch, getState) => { + return (dispatch) => { dispatch(fetchSuggestionsRequest()); - api(getState).get('/api/v2/suggestions', { params: { limit: 20 } }).then(response => { + api().get('/api/v2/suggestions', { params: { limit: 20 } }).then(response => { dispatch(importFetchedAccounts(response.data.map(x => x.account))); dispatch(fetchSuggestionsSuccess(response.data)); @@ -48,11 +48,11 @@ export function fetchSuggestionsFail(error) { }; } -export const dismissSuggestion = accountId => (dispatch, getState) => { +export const dismissSuggestion = accountId => (dispatch) => { dispatch({ type: SUGGESTIONS_DISMISS, id: accountId, }); - api(getState).delete(`/api/v1/suggestions/${accountId}`).catch(() => {}); + api().delete(`/api/v1/suggestions/${accountId}`).catch(() => {}); }; diff --git a/app/javascript/mastodon/actions/tags.js b/app/javascript/mastodon/actions/tags.js index dda8c924bb59a4..d18d7e514fc8f2 100644 --- a/app/javascript/mastodon/actions/tags.js +++ b/app/javascript/mastodon/actions/tags.js @@ -20,10 +20,10 @@ export const HASHTAG_UNFOLLOW_REQUEST = 'HASHTAG_UNFOLLOW_REQUEST'; export const HASHTAG_UNFOLLOW_SUCCESS = 'HASHTAG_UNFOLLOW_SUCCESS'; export const HASHTAG_UNFOLLOW_FAIL = 'HASHTAG_UNFOLLOW_FAIL'; -export const fetchHashtag = name => (dispatch, getState) => { +export const fetchHashtag = name => (dispatch) => { dispatch(fetchHashtagRequest()); - api(getState).get(`/api/v1/tags/${name}`).then(({ data }) => { + api().get(`/api/v1/tags/${name}`).then(({ data }) => { dispatch(fetchHashtagSuccess(name, data)); }).catch(err => { dispatch(fetchHashtagFail(err)); @@ -45,10 +45,10 @@ export const fetchHashtagFail = error => ({ error, }); -export const fetchFollowedHashtags = () => (dispatch, getState) => { +export const fetchFollowedHashtags = () => (dispatch) => { dispatch(fetchFollowedHashtagsRequest()); - api(getState).get('/api/v1/followed_tags').then(response => { + api().get('/api/v1/followed_tags').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(fetchFollowedHashtagsSuccess(response.data, next ? next.uri : null)); }).catch(err => { @@ -87,7 +87,7 @@ export function expandFollowedHashtags() { dispatch(expandFollowedHashtagsRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(expandFollowedHashtagsSuccess(response.data, next ? next.uri : null)); }).catch(error => { @@ -117,10 +117,10 @@ export function expandFollowedHashtagsFail(error) { }; } -export const followHashtag = name => (dispatch, getState) => { +export const followHashtag = name => (dispatch) => { dispatch(followHashtagRequest(name)); - api(getState).post(`/api/v1/tags/${name}/follow`).then(({ data }) => { + api().post(`/api/v1/tags/${name}/follow`).then(({ data }) => { dispatch(followHashtagSuccess(name, data)); }).catch(err => { dispatch(followHashtagFail(name, err)); @@ -144,10 +144,10 @@ export const followHashtagFail = (name, error) => ({ error, }); -export const unfollowHashtag = name => (dispatch, getState) => { +export const unfollowHashtag = name => (dispatch) => { dispatch(unfollowHashtagRequest(name)); - api(getState).post(`/api/v1/tags/${name}/unfollow`).then(({ data }) => { + api().post(`/api/v1/tags/${name}/unfollow`).then(({ data }) => { dispatch(unfollowHashtagSuccess(name, data)); }).catch(err => { dispatch(unfollowHashtagFail(name, err)); diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js index 4ce7c3cf8414a3..dc37cdf1f1f471 100644 --- a/app/javascript/mastodon/actions/timelines.js +++ b/app/javascript/mastodon/actions/timelines.js @@ -114,7 +114,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) { dispatch(expandTimelineRequest(timelineId, isLoadingMore)); - api(getState).get(path, { params }).then(response => { + api().get(path, { params }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); diff --git a/app/javascript/mastodon/actions/trends.js b/app/javascript/mastodon/actions/trends.js index d314423884efe1..0b840b41ce6085 100644 --- a/app/javascript/mastodon/actions/trends.js +++ b/app/javascript/mastodon/actions/trends.js @@ -18,10 +18,10 @@ export const TRENDS_STATUSES_EXPAND_REQUEST = 'TRENDS_STATUSES_EXPAND_REQUEST'; export const TRENDS_STATUSES_EXPAND_SUCCESS = 'TRENDS_STATUSES_EXPAND_SUCCESS'; export const TRENDS_STATUSES_EXPAND_FAIL = 'TRENDS_STATUSES_EXPAND_FAIL'; -export const fetchTrendingHashtags = () => (dispatch, getState) => { +export const fetchTrendingHashtags = () => (dispatch) => { dispatch(fetchTrendingHashtagsRequest()); - api(getState) + api() .get('/api/v1/trends/tags') .then(({ data }) => dispatch(fetchTrendingHashtagsSuccess(data))) .catch(err => dispatch(fetchTrendingHashtagsFail(err))); @@ -45,10 +45,10 @@ export const fetchTrendingHashtagsFail = error => ({ skipAlert: true, }); -export const fetchTrendingLinks = () => (dispatch, getState) => { +export const fetchTrendingLinks = () => (dispatch) => { dispatch(fetchTrendingLinksRequest()); - api(getState) + api() .get('/api/v1/trends/links') .then(({ data }) => dispatch(fetchTrendingLinksSuccess(data))) .catch(err => dispatch(fetchTrendingLinksFail(err))); @@ -79,7 +79,7 @@ export const fetchTrendingStatuses = () => (dispatch, getState) => { dispatch(fetchTrendingStatusesRequest()); - api(getState).get('/api/v1/trends/statuses').then(response => { + api().get('/api/v1/trends/statuses').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); dispatch(fetchTrendingStatusesSuccess(response.data, next ? next.uri : null)); @@ -115,7 +115,7 @@ export const expandTrendingStatuses = () => (dispatch, getState) => { dispatch(expandTrendingStatusesRequest()); - api(getState).get(url).then(response => { + api().get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); dispatch(importFetchedStatuses(response.data)); dispatch(expandTrendingStatusesSuccess(response.data, next ? next.uri : null)); diff --git a/app/javascript/mastodon/api.ts b/app/javascript/mastodon/api.ts index de597a3e3b62f5..ccff68c373e5d6 100644 --- a/app/javascript/mastodon/api.ts +++ b/app/javascript/mastodon/api.ts @@ -2,8 +2,8 @@ import type { AxiosResponse, RawAxiosRequestHeaders } from 'axios'; import axios from 'axios'; import LinkHeader from 'http-link-header'; +import { getAccessToken } from './initial_state'; import ready from './ready'; -import type { GetState } from './store'; export const getLinks = (response: AxiosResponse) => { const value = response.headers.link as string | undefined; @@ -29,30 +29,22 @@ const setCSRFHeader = () => { void ready(setCSRFHeader); -export const authorizationTokenFromState = (getState?: GetState) => { - return ( - getState && (getState().meta.get('access_token', '') as string | false) - ); -}; +const authorizationTokenFromInitialState = (): RawAxiosRequestHeaders => { + const accessToken = getAccessToken(); -const authorizationHeaderFromState = (getState?: GetState) => { - const accessToken = authorizationTokenFromState(getState); - - if (!accessToken) { - return {}; - } + if (!accessToken) return {}; return { Authorization: `Bearer ${accessToken}`, - } as RawAxiosRequestHeaders; + }; }; // eslint-disable-next-line import/no-default-export -export default function api(getState: GetState) { +export default function api() { return axios.create({ headers: { ...csrfHeader, - ...authorizationHeaderFromState(getState), + ...authorizationTokenFromInitialState(), }, transformResponse: [ diff --git a/app/javascript/mastodon/identity_context.tsx b/app/javascript/mastodon/identity_context.tsx index 564b7895c9b4c1..7f28ab77a34a7d 100644 --- a/app/javascript/mastodon/identity_context.tsx +++ b/app/javascript/mastodon/identity_context.tsx @@ -9,7 +9,6 @@ export interface IdentityContextType { signedIn: boolean; accountId: string | undefined; disabledAccountId: string | undefined; - accessToken: string | undefined; permissions: number; } @@ -17,14 +16,12 @@ export const identityContextPropShape = PropTypes.shape({ signedIn: PropTypes.bool.isRequired, accountId: PropTypes.string, disabledAccountId: PropTypes.string, - accessToken: PropTypes.string, }).isRequired; export const createIdentityContext = (state: InitialState) => ({ signedIn: !!state.meta.me, accountId: state.meta.me, disabledAccountId: state.meta.disabled_account_id, - accessToken: state.meta.access_token, permissions: state.role?.permissions ?? 0, }); @@ -33,7 +30,6 @@ export const IdentityContext = createContext({ permissions: 0, accountId: undefined, disabledAccountId: undefined, - accessToken: undefined, }); export const useIdentity = () => useContext(IdentityContext); diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index 5d60565e17a6bf..9ec3df0df87814 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -117,4 +117,11 @@ export const criticalUpdatesPending = initialState?.critical_updates_pending; export const statusPageUrl = getMeta('status_page_url'); export const sso_redirect = getMeta('sso_redirect'); +/** + * @returns {string | undefined} + */ +export function getAccessToken() { + return getMeta('access_token'); +} + export default initialState; diff --git a/app/javascript/mastodon/reducers/meta.js b/app/javascript/mastodon/reducers/meta.js index 96baf2f1152cbb..ddb78845929464 100644 --- a/app/javascript/mastodon/reducers/meta.js +++ b/app/javascript/mastodon/reducers/meta.js @@ -6,7 +6,6 @@ import { layoutFromWindow } from 'mastodon/is_mobile'; const initialState = ImmutableMap({ streaming_api_base_url: null, - access_token: null, layout: layoutFromWindow(), permissions: '0', }); @@ -14,7 +13,8 @@ const initialState = ImmutableMap({ export default function meta(state = initialState, action) { switch(action.type) { case STORE_HYDRATE: - return state.merge(action.state.get('meta')).set('permissions', action.state.getIn(['role', 'permissions'])); + // we do not want `access_token` to be stored in the state + return state.merge(action.state.get('meta')).delete('access_token').set('permissions', action.state.getIn(['role', 'permissions'])); case changeLayout.type: return state.set('layout', action.payload.layout); default: diff --git a/app/javascript/mastodon/stream.js b/app/javascript/mastodon/stream.js index ff3af5fd885c96..40d69136a84808 100644 --- a/app/javascript/mastodon/stream.js +++ b/app/javascript/mastodon/stream.js @@ -2,6 +2,8 @@ import WebSocketClient from '@gamestdio/websocket'; +import { getAccessToken } from './initial_state'; + /** * @type {WebSocketClient | undefined} */ @@ -145,9 +147,11 @@ const channelNameWithInlineParams = (channelName, params) => { // @ts-expect-error export const connectStream = (channelName, params, callbacks) => (dispatch, getState) => { const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']); - const accessToken = getState().getIn(['meta', 'access_token']); + const accessToken = getAccessToken(); const { onConnect, onReceive, onDisconnect } = callbacks(dispatch, getState); + if(!accessToken) throw new Error("Trying to connect to the streaming server but no access token is available."); + // If we cannot use a websockets connection, we must fall back // to using individual connections for each channel if (!streamingAPIBaseURL.startsWith('ws')) { diff --git a/app/javascript/mastodon/test_helpers.tsx b/app/javascript/mastodon/test_helpers.tsx index bfea3f6bf4dfe4..93b5a8453accf1 100644 --- a/app/javascript/mastodon/test_helpers.tsx +++ b/app/javascript/mastodon/test_helpers.tsx @@ -14,7 +14,6 @@ function render( const fakeIdentity = { signedIn: signedIn, accountId: '123', - accessToken: 'test-access-token', disabledAccountId: undefined, permissions: 0, }; From 15d307075479cf93ea199be0f25820003ddbe27c Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 23 May 2024 09:30:48 +0200 Subject: [PATCH 107/113] Fix some API calls that should not use an API token (#30401) --- app/javascript/mastodon/api.ts | 4 ++-- app/javascript/mastodon/components/admin/Counter.jsx | 2 +- app/javascript/mastodon/components/admin/Dimension.jsx | 2 +- app/javascript/mastodon/components/admin/ImpactReport.jsx | 2 +- .../mastodon/components/admin/ReportReasonSelector.jsx | 4 ++-- app/javascript/mastodon/components/admin/Retention.jsx | 2 +- app/javascript/mastodon/components/admin/Trends.jsx | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/javascript/mastodon/api.ts b/app/javascript/mastodon/api.ts index ccff68c373e5d6..2ccf178f00ea92 100644 --- a/app/javascript/mastodon/api.ts +++ b/app/javascript/mastodon/api.ts @@ -40,11 +40,11 @@ const authorizationTokenFromInitialState = (): RawAxiosRequestHeaders => { }; // eslint-disable-next-line import/no-default-export -export default function api() { +export default function api(withAuthorization = true) { return axios.create({ headers: { ...csrfHeader, - ...authorizationTokenFromInitialState(), + ...(withAuthorization ? authorizationTokenFromInitialState() : {}), }, transformResponse: [ diff --git a/app/javascript/mastodon/components/admin/Counter.jsx b/app/javascript/mastodon/components/admin/Counter.jsx index 6ce23c9f05e2cb..e4d21da6271ef5 100644 --- a/app/javascript/mastodon/components/admin/Counter.jsx +++ b/app/javascript/mastodon/components/admin/Counter.jsx @@ -48,7 +48,7 @@ export default class Counter extends PureComponent { componentDidMount () { const { measure, start_at, end_at, params } = this.props; - api().post('/api/v1/admin/measures', { keys: [measure], start_at, end_at, [measure]: params }).then(res => { + api(false).post('/api/v1/admin/measures', { keys: [measure], start_at, end_at, [measure]: params }).then(res => { this.setState({ loading: false, data: res.data, diff --git a/app/javascript/mastodon/components/admin/Dimension.jsx b/app/javascript/mastodon/components/admin/Dimension.jsx index bfda6c93d7fb55..56557ad8e85453 100644 --- a/app/javascript/mastodon/components/admin/Dimension.jsx +++ b/app/javascript/mastodon/components/admin/Dimension.jsx @@ -26,7 +26,7 @@ export default class Dimension extends PureComponent { componentDidMount () { const { start_at, end_at, dimension, limit, params } = this.props; - api().post('/api/v1/admin/dimensions', { keys: [dimension], start_at, end_at, limit, [dimension]: params }).then(res => { + api(false).post('/api/v1/admin/dimensions', { keys: [dimension], start_at, end_at, limit, [dimension]: params }).then(res => { this.setState({ loading: false, data: res.data, diff --git a/app/javascript/mastodon/components/admin/ImpactReport.jsx b/app/javascript/mastodon/components/admin/ImpactReport.jsx index c27ee0ab08102f..add54134b6fe92 100644 --- a/app/javascript/mastodon/components/admin/ImpactReport.jsx +++ b/app/javascript/mastodon/components/admin/ImpactReport.jsx @@ -27,7 +27,7 @@ export default class ImpactReport extends PureComponent { include_subdomains: true, }; - api().post('/api/v1/admin/measures', { + api(false).post('/api/v1/admin/measures', { keys: ['instance_accounts', 'instance_follows', 'instance_followers'], start_at: null, end_at: null, diff --git a/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx b/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx index 90f4334a6e1ad2..cc05e5c163c320 100644 --- a/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx +++ b/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx @@ -105,7 +105,7 @@ class ReportReasonSelector extends PureComponent { }; componentDidMount() { - api().get('/api/v1/instance').then(res => { + api(false).get('/api/v1/instance').then(res => { this.setState({ rules: res.data.rules, }); @@ -122,7 +122,7 @@ class ReportReasonSelector extends PureComponent { return; } - api().put(`/api/v1/admin/reports/${id}`, { + api(false).put(`/api/v1/admin/reports/${id}`, { category, rule_ids: category === 'violation' ? rule_ids : [], }).catch(err => { diff --git a/app/javascript/mastodon/components/admin/Retention.jsx b/app/javascript/mastodon/components/admin/Retention.jsx index 1e8ef48b7abde3..87746e9f497bf6 100644 --- a/app/javascript/mastodon/components/admin/Retention.jsx +++ b/app/javascript/mastodon/components/admin/Retention.jsx @@ -34,7 +34,7 @@ export default class Retention extends PureComponent { componentDidMount () { const { start_at, end_at, frequency } = this.props; - api().post('/api/v1/admin/retention', { start_at, end_at, frequency }).then(res => { + api(false).post('/api/v1/admin/retention', { start_at, end_at, frequency }).then(res => { this.setState({ loading: false, data: res.data, diff --git a/app/javascript/mastodon/components/admin/Trends.jsx b/app/javascript/mastodon/components/admin/Trends.jsx index c69b4a8cbaf414..fd6db106d54183 100644 --- a/app/javascript/mastodon/components/admin/Trends.jsx +++ b/app/javascript/mastodon/components/admin/Trends.jsx @@ -22,7 +22,7 @@ export default class Trends extends PureComponent { componentDidMount () { const { limit } = this.props; - api().get('/api/v1/admin/trends/tags', { params: { limit } }).then(res => { + api(false).get('/api/v1/admin/trends/tags', { params: { limit } }).then(res => { this.setState({ loading: false, data: res.data, From 5b5a35cf96de51b5ef44f69dcde1e3dc2acb9dd6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 10:26:29 +0200 Subject: [PATCH 108/113] New Crowdin Translations (automated) (#30402) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/be.json | 1 + app/javascript/mastodon/locales/lv.json | 2 +- config/locales/an.yml | 1 - config/locales/ar.yml | 1 - config/locales/ast.yml | 2 - config/locales/be.yml | 1 - config/locales/bg.yml | 2 +- config/locales/ca.yml | 2 +- config/locales/ckb.yml | 1 - config/locales/co.yml | 1 - config/locales/cs.yml | 1 - config/locales/cy.yml | 3 +- config/locales/da.yml | 2 +- config/locales/de.yml | 2 +- config/locales/devise.lt.yml | 2 +- config/locales/el.yml | 1 - config/locales/en-GB.yml | 1 - config/locales/eo.yml | 1 - config/locales/es-AR.yml | 2 +- config/locales/es-MX.yml | 2 +- config/locales/es.yml | 2 +- config/locales/et.yml | 1 - config/locales/eu.yml | 1 - config/locales/fa.yml | 1 - config/locales/fi.yml | 1 - config/locales/fo.yml | 2 +- config/locales/fr-CA.yml | 1 - config/locales/fr.yml | 1 - config/locales/fy.yml | 1 - config/locales/gd.yml | 1 - config/locales/gl.yml | 2 +- config/locales/he.yml | 2 +- config/locales/hu.yml | 2 +- config/locales/ia.yml | 2 +- config/locales/id.yml | 1 - config/locales/ie.yml | 1 - config/locales/io.yml | 1 - config/locales/is.yml | 2 +- config/locales/it.yml | 2 +- config/locales/ja.yml | 1 - config/locales/kk.yml | 1 - config/locales/ko.yml | 2 +- config/locales/ku.yml | 1 - config/locales/lad.yml | 1 - config/locales/lt.yml | 148 ++++++++++++++++++++---- config/locales/lv.yml | 1 - config/locales/ms.yml | 1 - config/locales/my.yml | 1 - config/locales/nl.yml | 2 +- config/locales/nn.yml | 1 - config/locales/no.yml | 1 - config/locales/oc.yml | 1 - config/locales/pl.yml | 2 +- config/locales/pt-BR.yml | 1 - config/locales/pt-PT.yml | 2 +- config/locales/ru.yml | 1 - config/locales/sc.yml | 1 - config/locales/sco.yml | 1 - config/locales/si.yml | 1 - config/locales/simple_form.lt.yml | 7 ++ config/locales/simple_form.nl.yml | 4 +- config/locales/simple_form.sr-Latn.yml | 10 +- config/locales/simple_form.sr.yml | 12 +- config/locales/sk.yml | 1 - config/locales/sl.yml | 2 +- config/locales/sq.yml | 3 +- config/locales/sr-Latn.yml | 8 +- config/locales/sr.yml | 8 +- config/locales/sv.yml | 1 - config/locales/th.yml | 1 - config/locales/tr.yml | 2 +- config/locales/uk.yml | 1 - config/locales/vi.yml | 1 - config/locales/zh-CN.yml | 2 +- config/locales/zh-HK.yml | 1 - config/locales/zh-TW.yml | 2 +- 76 files changed, 182 insertions(+), 113 deletions(-) diff --git a/app/javascript/mastodon/locales/be.json b/app/javascript/mastodon/locales/be.json index 2b7673312fbe57..61e96e4b585b91 100644 --- a/app/javascript/mastodon/locales/be.json +++ b/app/javascript/mastodon/locales/be.json @@ -469,6 +469,7 @@ "notification.follow": "{name} падпісаўся на вас", "notification.follow_request": "{name} адправіў запыт на падпіску", "notification.mention": "{name} згадаў вас", + "notification.moderation-warning.learn_more": "Даведацца больш", "notification.own_poll": "Ваша апытанне скончылася", "notification.poll": "Апытанне, дзе вы прынялі ўдзел, скончылася", "notification.reblog": "{name} пашырыў ваш допіс", diff --git a/app/javascript/mastodon/locales/lv.json b/app/javascript/mastodon/locales/lv.json index e7ab114909aa42..b61a2c0c360c5d 100644 --- a/app/javascript/mastodon/locales/lv.json +++ b/app/javascript/mastodon/locales/lv.json @@ -491,7 +491,7 @@ "onboarding.actions.go_to_home": "Dodieties uz manu mājas plūsmu", "onboarding.compose.template": "Sveiki, #Mastodon!", "onboarding.follows.empty": "Diemžēl pašlaik nevar parādīt rezultātus. Vari mēģināt izmantot meklēšanu vai pārlūkot izpētes lapu, lai atrastu cilvēkus, kuriem sekot, vai vēlāk mēģināt vēlreiz.", - "onboarding.follows.lead": "Tava mājas plūsma ir galvenais veids, kā izbaudīt Mastodon. Jo vairāk cilvēku sekosi, jo aktīvāk un interesantāk tas būs. Lai sāktu, šeit ir daži ieteikumi:", + "onboarding.follows.lead": "Tava mājas plūsma ir galvenais veids, kā pieredzēt Mastodon. Jo vairāk cilvēkiem sekosi, jo dzīvīgāka un aizraujošāka tā būs. Lai sāktu, šeit ir daži ieteikumi:", "onboarding.follows.title": "Pielāgo savu mājas barotni", "onboarding.profile.discoverable": "Padarīt manu profilu atklājamu", "onboarding.profile.display_name": "Attēlojamais vārds", diff --git a/config/locales/an.yml b/config/locales/an.yml index 068a20187d6963..637aa8c8b37cdc 100644 --- a/config/locales/an.yml +++ b/config/locales/an.yml @@ -852,7 +852,6 @@ an: delete: Borrar edit_preset: Editar aviso predeterminau empty: Encara no has definiu garra preajuste d'alvertencia. - title: Editar configuración predeterminada d'avisos webhooks: add_new: Anyadir endpoint delete: Eliminar diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 02ba56d0b23213..2ca7538c324d00 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1013,7 +1013,6 @@ ar: delete: حذف edit_preset: تعديل نموذج التحذير empty: لم تحدد أي إعدادات تحذير مسبقة بعد. - title: إدارة نماذج التحذير webhooks: add_new: إضافة نقطة نهاية delete: حذف diff --git a/config/locales/ast.yml b/config/locales/ast.yml index 816858d4a09277..9e6ec6d2330cb9 100644 --- a/config/locales/ast.yml +++ b/config/locales/ast.yml @@ -400,8 +400,6 @@ ast: usable: Pue usase title: Tendencies trending: En tendencia - warning_presets: - title: Xestión d'alvertencies preconfiguraes webhooks: add_new: Amestar un estremu delete: Desaniciar diff --git a/config/locales/be.yml b/config/locales/be.yml index 13daa9897e7534..6f1f189523e61e 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -983,7 +983,6 @@ be: delete: Выдаліць edit_preset: Рэдагаваць шаблон папярэджання empty: Вы яшчэ не вызначылі ніякіх шаблонаў папярэджанняў. - title: Кіраванне шаблонамі папярэджанняў webhooks: add_new: Дадаць канцавую кропку delete: Выдаліць diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 51180bc66f2724..5aca8ad0fd3918 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -951,7 +951,7 @@ bg: delete: Изтриване edit_preset: Редакция на предварителните настройки empty: Все още няма предварителни настройки за предупрежденията. - title: Управление на предварителните настройки + title: Предупредителни образци webhooks: add_new: Добавяне на крайна точка delete: Изтриване diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 34fd9008516ac0..ec32f771e929c8 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -951,7 +951,7 @@ ca: delete: Elimina edit_preset: Edita l'avís predeterminat empty: Encara no has definit cap preavís. - title: Gestiona les configuracions predefinides dels avisos + title: Predefinicions d'avís webhooks: add_new: Afegir extrem delete: Elimina diff --git a/config/locales/ckb.yml b/config/locales/ckb.yml index dfa035eca81cb7..93eea8273f514b 100644 --- a/config/locales/ckb.yml +++ b/config/locales/ckb.yml @@ -548,7 +548,6 @@ ckb: add_new: زیادکردنی نوێ delete: سڕینەوە edit_preset: دەستکاریکردنی ئاگاداری پێشگریمان - title: بەڕێوەبردنی ئاگادارکردنەوە پێش‌سازدان admin_mailer: new_pending_account: body: وردەکاریهەژمارە نوێیەکە لە خوارەوەیە. دەتوانیت ئەم نەرمەکالا پەسەند بکەیت یان ڕەت بکەیتەوە. diff --git a/config/locales/co.yml b/config/locales/co.yml index 7d8abcd112e6b8..6edbbc95ffb31f 100644 --- a/config/locales/co.yml +++ b/config/locales/co.yml @@ -510,7 +510,6 @@ co: add_new: Aghjunghje delete: Sguassà edit_preset: Cambià a preselezzione d'avertimentu - title: Amministrà e preselezzione d'avertimentu admin_mailer: new_pending_account: body: I ditagli di u novu contu sò quì sottu. Pudete appruvà o righjittà a dumanda. diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 56930773193a40..17c743f1de5b5e 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -984,7 +984,6 @@ cs: delete: Smazat edit_preset: Upravit předlohu pro varování empty: Zatím jste nedefinovali žádné předlohy varování. - title: Spravovat předlohy pro varování webhooks: add_new: Přidat koncový bod delete: Smazat diff --git a/config/locales/cy.yml b/config/locales/cy.yml index f96068f212b083..35ed5ade8aa913 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -297,6 +297,7 @@ cy: update_custom_emoji_html: Mae %{name} wedi diweddaru emoji %{target} update_domain_block_html: Mae %{name} wedi diweddaru bloc parth %{target} update_ip_block_html: Mae %{name} wedi newid rheol IP %{target} + update_report_html: Mae %{name} wedi diweddaru adroddiad %{target} update_status_html: Mae %{name} wedi diweddaru postiad gan %{target} update_user_role_html: Mae %{name} wedi newid rôl %{target} deleted_account: cyfrif wedi'i ddileu @@ -1018,7 +1019,7 @@ cy: delete: Dileu edit_preset: Golygu rhagosodiad rhybudd empty: Nid ydych wedi diffinio unrhyw ragosodiadau rhybudd eto. - title: Rheoli rhagosodiadau rhybudd + title: Rhagosodiadau rhybuddion webhooks: add_new: Ychwanegu diweddbwynt delete: Dileu diff --git a/config/locales/da.yml b/config/locales/da.yml index 17d3037a75a505..f37086264fd2d9 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -951,7 +951,7 @@ da: delete: Slet edit_preset: Redigér advarselsforvalg empty: Ingen advarselsforvalg defineret endnu. - title: Håndtérr advarselsforvalg + title: Præindstillinger for advarsel webhooks: add_new: Tilføj endepunkt delete: Slet diff --git a/config/locales/de.yml b/config/locales/de.yml index dd2129584fbe7a..11460c3b401763 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -951,7 +951,7 @@ de: delete: Löschen edit_preset: Warnvorlage bearbeiten empty: Du hast noch keine Warnvorlagen hinzugefügt. - title: Warnvorlagen verwalten + title: Warnvorlagen webhooks: add_new: Endpunkt hinzufügen delete: Löschen diff --git a/config/locales/devise.lt.yml b/config/locales/devise.lt.yml index ec5b852727c87a..e36e60a7588485 100644 --- a/config/locales/devise.lt.yml +++ b/config/locales/devise.lt.yml @@ -22,7 +22,7 @@ lt: action: Patvirtinti el. pašto adresą action_with_app: Patvirtinti ir grįžti į %{app} explanation: Šiuo el. pašto adresu sukūrei paskyrą %{host}. Iki jos aktyvavimo liko vienas paspaudimas. Jei tai buvo ne tu, ignoruok šį el. laišką. - explanation_when_pending: Šiuo el. pašto adresu pateikei paraišką pakvietimui į %{host}. Kai patvirtinsi savo el. pašto adresą, mes peržiūrėsime tavo paraišką. Gali prisijungti ir pakeisti savo duomenis arba ištrinti paskyrą, tačiau negalėsi naudotis daugeliu funkcijų, kol tavo paskyra nebus patvirtinta. Jei tavo paraiška bus atmesta, duomenys bus pašalinti, todėl jokių papildomų veiksmų iš tavęs nereikės. Jei tai buvo ne tu, ignoruok šį el. laišką. + explanation_when_pending: Šiuo el. pašto adresu pateikei paraišką pakvietimui į %{host}. Kai patvirtinsi savo el. pašto adresą, mes peržiūrėsime tavo paraišką. Gali prisijungti ir pakeisti savo duomenis arba ištrinti paskyrą, bet negalėsi naudotis daugeliu funkcijų, kol tavo paskyra nebus patvirtinta. Jei tavo paraiška bus atmesta, duomenys bus pašalinti, todėl jokių papildomų veiksmų iš tavęs nereikės. Jei tai buvo ne tu, ignoruok šį el. laišką. extra_html: Taip pat peržiūrėk serverio taisykles ir mūsų paslaugų teikimo sąlygas. subject: 'Mastodon: patvirtinimo instrukcijos %{instance}' title: Patvirtinti el. pašto adresą diff --git a/config/locales/el.yml b/config/locales/el.yml index 2e7ac87463679d..47b2250f0e04e3 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -903,7 +903,6 @@ el: delete: Διαγραφή edit_preset: Ενημέρωση προκαθορισμένης προειδοποίησης empty: Δεν έχετε ακόμη ορίσει κάποια προκαθορισμένη προειδοποίηση. - title: Διαχείριση προκαθορισμένων προειδοποιήσεων webhooks: add_new: Προσθήκη σημείου τερματισμού delete: Διαγραφή diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 7cd888b3732837..07eb84ebbef0a8 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -950,7 +950,6 @@ en-GB: delete: Delete edit_preset: Edit warning preset empty: You haven't defined any warning presets yet. - title: Warning presets webhooks: add_new: Add endpoint delete: Delete diff --git a/config/locales/eo.yml b/config/locales/eo.yml index 749f80687df6de..95e3dd5a8d9e03 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -919,7 +919,6 @@ eo: delete: Forigi edit_preset: Redakti avertan antaŭagordon empty: Vi ankoraŭ ne difinis iun ajn antaŭagordon de averto. - title: Administri avertajn antaŭagordojn webhooks: add_new: Aldoni finpunkton delete: Forigi diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml index 302be44112eec1..d6bfb60a19649f 100644 --- a/config/locales/es-AR.yml +++ b/config/locales/es-AR.yml @@ -951,7 +951,7 @@ es-AR: delete: Eliminar edit_preset: Editar preajuste de advertencia empty: Aún no ha definido ningún preajuste de advertencia. - title: Administrar preajustes de advertencia + title: Preajustes de advertencia webhooks: add_new: Agregar punto final delete: Eliminar diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index 10806c6b6cb312..8f4aa183d833a4 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -951,7 +951,7 @@ es-MX: delete: Borrar edit_preset: Editar aviso predeterminado empty: Aún no has definido ningún preajuste de advertencia. - title: Editar configuración predeterminada de avisos + title: Preajustes de advertencia webhooks: add_new: Añadir endpoint delete: Eliminar diff --git a/config/locales/es.yml b/config/locales/es.yml index 840bc2ce9b0818..343f6f5a6363fb 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -951,7 +951,7 @@ es: delete: Borrar edit_preset: Editar aviso predeterminado empty: Aún no has definido ningún preajuste de advertencia. - title: Editar configuración predeterminada de avisos + title: Preajustes de advertencia webhooks: add_new: Añadir endpoint delete: Eliminar diff --git a/config/locales/et.yml b/config/locales/et.yml index a544d8063dbb32..172aad25b93ea6 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -949,7 +949,6 @@ et: delete: Kustuta edit_preset: Hoiatuse eelseadistuse muutmine empty: Hoiatuste eelseadeid pole defineeritud. - title: Halda hoiatuste eelseadistusi webhooks: add_new: Lisa lõpp-punkt delete: Kustuta diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 22ca8135d51262..67da357e1de98d 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -952,7 +952,6 @@ eu: delete: Ezabatu edit_preset: Editatu abisu aurre-ezarpena empty: Ez duzu abisu aurrezarpenik definitu oraindik. - title: Kudeatu abisu aurre-ezarpenak webhooks: add_new: Gehitu amaiera-puntua delete: Ezabatu diff --git a/config/locales/fa.yml b/config/locales/fa.yml index d93d2e7d5f1096..509d69fcba71c8 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -808,7 +808,6 @@ fa: delete: زدودن edit_preset: ویرایش هشدار پیش‌فرض empty: هنز هیچ پیش‌تنظیم هشداری را تعریف نکرده‌اید. - title: مدیریت هشدارهای پیش‌فرض webhooks: add_new: افزودن نقطهٔ پایانی delete: حذف diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 53db0232aa5d2b..3a75066d5bd39a 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -951,7 +951,6 @@ fi: delete: Poista edit_preset: Muokkaa varoituksen esiasetusta empty: Et ole vielä määrittänyt yhtäkään varoitusten esiasetusta. - title: Hallitse varoitusten esiasetuksia webhooks: add_new: Lisää päätepiste delete: Poista diff --git a/config/locales/fo.yml b/config/locales/fo.yml index 57caff4d716945..0372d3dca3e875 100644 --- a/config/locales/fo.yml +++ b/config/locales/fo.yml @@ -951,7 +951,7 @@ fo: delete: Strika edit_preset: Rætta ávaringar-undanstilling empty: Tú hevur ikki ásett nakrar ávaringar-undanstillingar enn. - title: Stýr ávaringar-undanstillingar + title: Undanstillingar fyri ávaring webhooks: add_new: Legg endapunkt afturat delete: Strika diff --git a/config/locales/fr-CA.yml b/config/locales/fr-CA.yml index 05d6b8864d8d4a..f297e8bfdea780 100644 --- a/config/locales/fr-CA.yml +++ b/config/locales/fr-CA.yml @@ -949,7 +949,6 @@ fr-CA: delete: Supprimer edit_preset: Éditer les avertissements prédéfinis empty: Vous n'avez pas encore créé de paramètres prédéfinis pour les avertissements. - title: Gérer les avertissements prédéfinis webhooks: add_new: Ajouter un point de terminaison delete: Supprimer diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 6ab42088014fcb..33cdcd44cc5477 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -949,7 +949,6 @@ fr: delete: Supprimer edit_preset: Éditer les avertissements prédéfinis empty: Vous n'avez pas encore créé de paramètres prédéfinis pour les avertissements. - title: Gérer les avertissements prédéfinis webhooks: add_new: Ajouter un point de terminaison delete: Supprimer diff --git a/config/locales/fy.yml b/config/locales/fy.yml index 1f1a27fec4b41c..c8e287732a7c54 100644 --- a/config/locales/fy.yml +++ b/config/locales/fy.yml @@ -949,7 +949,6 @@ fy: delete: Fuortsmite edit_preset: Foarynstelling foar warskôging bewurkje empty: Jo hawwe noch gjin foarynstellingen foar warskôgingen tafoege. - title: Foarynstellingen foar warskôgingen beheare webhooks: add_new: Einpunt tafoegje delete: Fuortsmite diff --git a/config/locales/gd.yml b/config/locales/gd.yml index 70bace05cf43a2..52b25e28543dd8 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -983,7 +983,6 @@ gd: delete: Sguab às edit_preset: Deasaich rabhadh ro-shuidhichte empty: Cha do mhìnich thu ro-sheataichean rabhaidhean fhathast. - title: Stiùirich na rabhaidhean ro-shuidhichte webhooks: add_new: Cuir puing-dheiridh ris delete: Sguab às diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 2c85dc89ae7502..a8489e425fe39c 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -951,7 +951,7 @@ gl: delete: Eliminar edit_preset: Editar aviso preestablecido empty: Non definiches os avisos prestablecidos. - title: Xestionar avisos preestablecidos + title: Preestablecidos de advertencia webhooks: add_new: Engadir punto de extremo delete: Eliminar diff --git a/config/locales/he.yml b/config/locales/he.yml index 3613a9f0b3b394..9088f48218c273 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -985,7 +985,7 @@ he: delete: למחוק edit_preset: ערוך/י טקסט מוכן מראש לאזהרה empty: לא הגדרת עדיין שום טקסט מוכן מראש לאזהרה. - title: ניהול טקסטים מוכנים מראש לאזהרות + title: תצורת אזהרות webhooks: add_new: הוספת נקודת קצה delete: מחיקה diff --git a/config/locales/hu.yml b/config/locales/hu.yml index dd578305151f60..d79bca7ff75793 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -951,7 +951,7 @@ hu: delete: Törlés edit_preset: Figyelmeztetés szerkesztése empty: Nem definiáltál még egyetlen figyelmeztetést sem. - title: Figyelmeztetések + title: Figyelmeztető szövegek webhooks: add_new: Végpont hozzáadása delete: Törlés diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 8af676454fadee..f8834136b9ca27 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -951,7 +951,7 @@ ia: delete: Deler edit_preset: Rediger aviso predefinite empty: Tu non ha ancora definite alcun avisos predefinite. - title: Gerer avisos predefinite + title: Predefinitiones de avisos webhooks: add_new: Adder terminal delete: Deler diff --git a/config/locales/id.yml b/config/locales/id.yml index bee282fa833259..aae790f4814164 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -831,7 +831,6 @@ id: delete: Hapus edit_preset: Sunting preset peringatan empty: Anda belum mendefinisikan peringatan apapun. - title: Kelola preset peringatan webhooks: add_new: Tambah titik akhir delete: Hapus diff --git a/config/locales/ie.yml b/config/locales/ie.yml index 473d7b750f6741..432e7d031b0331 100644 --- a/config/locales/ie.yml +++ b/config/locales/ie.yml @@ -950,7 +950,6 @@ ie: delete: Deleter edit_preset: Modificar prefiguration de avise empty: Vu ancor ha definit null prefigurationes de avise. - title: Modificar prefigurationes de avise webhooks: add_new: Adjunter punctu terminal delete: Deleter diff --git a/config/locales/io.yml b/config/locales/io.yml index ed0d0d6345e040..bccdcb3cc5c33b 100644 --- a/config/locales/io.yml +++ b/config/locales/io.yml @@ -928,7 +928,6 @@ io: delete: Efacez edit_preset: Modifikez avertfixito empty: Vu ne fixis irga avertfixito til nun. - title: Jerez avertfixiti webhooks: add_new: Insertez finpunto delete: Efacez diff --git a/config/locales/is.yml b/config/locales/is.yml index 99777529696d9b..75950e572dccbc 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -953,7 +953,7 @@ is: delete: Eyða edit_preset: Breyta forstilltri aðvörun empty: Þú hefur ekki enn skilgreint neinar aðvaranaforstillingar. - title: Sýsla með forstilltar aðvaranir + title: Forstilltar aðvaranir webhooks: add_new: Bæta við endapunkti delete: Eyða diff --git a/config/locales/it.yml b/config/locales/it.yml index 5b75e7af7dd142..c3389f59c6bf6c 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -951,7 +951,7 @@ it: delete: Cancella edit_preset: Modifica avviso predefinito empty: Non hai ancora definito alcun avviso preimpostato. - title: Gestisci avvisi predefiniti + title: Preimpostazioni di avviso webhooks: add_new: Aggiungi endpoint delete: Elimina diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 0712ba380ad947..6c0fba259c35c7 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -933,7 +933,6 @@ ja: delete: 削除 edit_preset: プリセット警告文を編集 empty: まだプリセット警告文が作成されていません。 - title: プリセット警告文を管理 webhooks: add_new: エンドポイントを追加 delete: 削除 diff --git a/config/locales/kk.yml b/config/locales/kk.yml index f08d8ead1aa8b0..2695127f0a782f 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -299,7 +299,6 @@ kk: add_new: Add nеw delete: Deletе edit_preset: Edit warning prеset - title: Manage warning presеts admin_mailer: new_pending_account: body: Жаңа есептік жазба туралы мәліметтер төменде берілген. Бұл қолданбаны мақұлдауыңызға немесе қабылдамауыңызға болады. diff --git a/config/locales/ko.yml b/config/locales/ko.yml index b104e31fc0e71c..9de2f6ca53cd41 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -936,7 +936,7 @@ ko: delete: 삭제 edit_preset: 경고 프리셋 편집 empty: 아직 어떤 경고 틀도 정의되지 않았습니다. - title: 경고 틀 관리 + title: 경고 프리셋 webhooks: add_new: 엔드포인트 추가 delete: 삭제 diff --git a/config/locales/ku.yml b/config/locales/ku.yml index 74dcd6f8f38a01..c24337dd7c05ef 100644 --- a/config/locales/ku.yml +++ b/config/locales/ku.yml @@ -849,7 +849,6 @@ ku: delete: Jê bibe edit_preset: Hişyariyên pêşsazkirî serrast bike empty: Te hin tu hişyariyên pêşsazkirî destnîşan nekirine. - title: Hişyariyên pêşsazkirî bi rêve bibe webhooks: add_new: Xala dawîbûnê tevlî bike delete: Jê bibe diff --git a/config/locales/lad.yml b/config/locales/lad.yml index 9c165472cd71b1..d0657e73f99efd 100644 --- a/config/locales/lad.yml +++ b/config/locales/lad.yml @@ -950,7 +950,6 @@ lad: delete: Efasa edit_preset: Edita avizo predeterminado empty: Ainda no tienes definido ningun avizo predeterminado. - title: Edita konfigurasyon predeterminada de avizos webhooks: add_new: Adjusta endpoint delete: Efasa diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 3e514a547b9166..8e32ed07bde719 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -451,7 +451,7 @@ lt: filter: all: Visi available: Pasiekiamas - expired: Pasibaigęs + expired: Nebegaliojantis title: Filtras title: Kvietimai relays: @@ -505,9 +505,15 @@ lt: unresolved: Neišspręsti updated_at: Atnaujinti roles: + categories: + invites: Kvietimai everyone: Numatytieji leidimai everyone_full_description_html: Tai – bazinis vaidmuo, turintis įtakos visiems naudotojams, net ir tiems, kurie neturi priskirto vaidmens. Visi kiti vaidmenys iš jo paveldi teises. privileges: + invite_users: Kviesti naudotojus + invite_users_description: Leidžia naudotojams pakviesti naujus žmones į serverį. + manage_invites: Tvarkyti kvietimus + manage_invites_description: Leidžia naudotojams naršyti ir deaktyvuoti kvietimų nuorodas. manage_taxonomies_description: Leidžia naudotojams peržiūrėti tendencingą turinį ir atnaujinti saitažodžių nustatymus settings: captcha_enabled: @@ -522,12 +528,34 @@ lt: registrations: moderation_recommandation: Prieš atidarant registraciją visiems, įsitikink, kad turi tinkamą ir reaguojančią prižiūrėjimo komandą! software_updates: - description: Rekomenduojama nuolat atnaujinti Mastodon diegyklę, kad galėtum naudotis naujausiais pataisymais ir funkcijomis. Be to, kartais labai svarbu laiku naujinti Mastodon, kad būtų išvengta saugumo problemų. Dėl šių priežasčių Mastodon kas 30 minučių tikrina, ar yra atnaujinimų, ir praneša tau apie tai pagal tavo el. pašto pranešimų parinktis. + description: Rekomenduojama nuolat atnaujinti Mastodon diegyklę, kad galėtum naudotis naujausiais pataisymais ir funkcijomis. Be to, kartais labai svarbu laiku atnaujinti Mastodon, kad būtų išvengta saugumo problemų. Dėl šių priežasčių Mastodon kas 30 minučių tikrina, ar yra naujinimų, ir praneša tau apie tai pagal tavo el. pašto pranešimų parinktis. + documentation_link: Sužinoti daugiau + release_notes: Leidimo informacija + title: Galimi naujinimai + type: Tipas + types: + major: Pagrindinis leidimas + minor: Nedidelis leidimas + patch: Pataiso leidimas – riktų taisymai ir lengvai pritaikomi pakeitimai + version: Versija statuses: + account: Autorius (-ė) + application: Programa back_to_account: Grįžti į paskyros puslapį + back_to_report: Grįžti į ataskaitos puslapį + batch: + remove_from_report: Pašalinti iš ataskaitos + deleted: Ištrinta + favourites: Mėgstami + history: Versijų istorija + in_reply_to: Atsakydant į + language: Kalba media: title: Medija - no_status_selected: Jokie statusai nebuvo pakeisti, nes niekas nepasirinkta + metadata: Metaduomenys + no_status_selected: Jokie įrašai nebuvo pakeisti, nes nė vienas buvo pasirinktas + open: Atidaryti įrašą + original_status: Originalus įrašas title: Paskyros statusai trending: Tendencinga with_media: Su medija @@ -537,6 +565,7 @@ lt: elasticsearch_preset: message_html: Tavo Elasticsearch klasteris turi daugiau nei vieną mazgą, bet Mastodon nėra sukonfigūruotas juos naudoti. elasticsearch_preset_single_node: + action: Žiūrėti dokumentaciją message_html: Tavo Elasticsearch klasteris turi tik vieną mazgą, ES_PRESET turėtų būti nustatyta į single_node_cluster. title: Administracija trends: @@ -571,8 +600,20 @@ lt: disallow_account: Neleisti autorių (-ę) no_status_selected: Jokie tendencingi įrašai nebuvo pakeisti, nes nė vienas iš jų nebuvo pasirinktas not_discoverable: Autorius (-ė) nesutiko, kad būtų galima juos atrasti + shared_by: + few: Bendrinta arba pamėgta %{friendly_count} kartus + many: Bendrinta arba pamėgta %{friendly_count} karto + one: Bendrinta arba pamėgta vieną kartą + other: Bendrinta arba pamėgta %{friendly_count} kartų title: Tendencingi įrašai tags: + dashboard: + tag_accounts_measure: unikalūs naudojimai + tag_languages_dimension: Populiariausios kalbos + tag_servers_dimension: Populiariausi serveriai + tag_servers_measure: skirtingi serveriai + tag_uses_measure: bendri naudojimai + listable: Gali būti siūloma not_trendable: Nepasirodys tendencijose title: Tendencingos saitažodžiai trendable: Gali pasirodyti tendencijose @@ -583,7 +624,6 @@ lt: add_new: Pridėti naują delete: Ištrinti edit_preset: Keisti įspėjimo nustatymus - title: Valdyti įspėjimo nustatymus webhooks: description_html: "Webhook leidžia Mastodon siųsti realaus laiko pranešimus apie pasirinktus įvykius į tavo programą, kad programa galėtų automatiškai paleisti reakcijas." events: Įvykiai @@ -627,21 +667,32 @@ lt: warning: Būkite atsargūs su šia informacija. Niekada jos nesidalinkite! your_token: Tavo prieigos raktas auth: + confirmations: + welcome_title: Sveiki, %{name}! delete_account: Ištrinti paskyrą delete_account_html: Jeigu norite ištrinti savo paskyrą, galite eiti čia. Jūsų prašys patvirtinti pasirinkimą. + description: + prefix_invited_by_user: "@%{name} kviečia prisijungti prie šio Mastodon serverio!" + prefix_sign_up: Užsiregistruok Mastodon šiandien! + didnt_get_confirmation: Negavai patvirtinimo nuorodos? dont_have_your_security_key: Neturi saugumo rakto? - forgot_password: Pamiršote slaptažodį? - invalid_reset_password_token: Slaptažodžio atkūrimo žetonas netinkamas arba jo galiojimo laikas pasibaigęs. Prašykite naujo žetono. + forgot_password: Pamiršai slaptažodį? + invalid_reset_password_token: Slaptažodžio atkūrimo raktas yra netinkamas arba nebegaliojantis. Paprašyk naujo. + log_in_with: Prisijungti su login: Prisijungti logout: Atsijungti migrate_account: Prisijungti prie kitos paskyros migrate_account_html: Jeigu norite nukreipti šią paskyrą į kita, galite tai konfiguruoti čia. or_log_in_with: Arba prisijungti su + providers: + cas: CAS + saml: SAML register: Užsiregistruoti reset_password: Atstatyti slaptažodį rules: invited_by: 'Gali prisijungti prie %{domain} pagal kvietimą, kurį gavai iš:' preamble_invited: Prieš tęsiant, atsižvelk į pagrindines taisykles, kurias nustatė %{domain} prižiūrėtojai. + title_invited: Esi pakviestas. security: Apsauga set_new_password: Nustatyti naują slaptažodį status: @@ -673,6 +724,9 @@ lt: success_msg: Tavo paskyra buvo sėkmingai ištrinta disputes: strikes: + created_at: Data + title_actions: + none: Įspėjimas your_appeal_approved: Tavo apeliacija buvo patvirtinta your_appeal_pending: Pateikei apeliaciją your_appeal_rejected: Tavo apeliacija buvo atmesta @@ -699,6 +753,8 @@ lt: request: Prašyti savo archyvo size: Dydis blocks: Jūs blokuojate + bookmarks: Žymės + csv: CSV domain_blocks: Domeno blokai lists: Sąrašai mutes: Jūs tildote @@ -708,11 +764,14 @@ lt: hint_html: "Savo profilyje parodyk svarbiausius saitažodžius. Tai puikus įrankis kūrybiniams darbams ir ilgalaikiams projektams sekti, todėl svarbiausios saitažodžiai rodomi matomoje vietoje profilyje ir leidžia greitai pasiekti tavo paties įrašus." filters: contexts: - home: Namų laiko juosta - notifications: Priminimai + account: Profiliai + home: Pagrindinis ir sąrašai + notifications: Pranešimai public: Viešieji laiko skalės thread: Pokalbiai edit: + add_keyword: Pridėti raktažodį + keywords: Raktažodžiai title: Keisti filtrą errors: invalid_context: Jokio arba netinkamas pateiktas kontekstas @@ -726,9 +785,14 @@ lt: all: Visi changes_saved_msg: Pakeitimai sėkmingai išsaugoti! copy: Kopijuoti + delete: Ištrinti + deselect: Panaikinti visus žymėjimus order_by: Tvarkyti pagal save_changes: Išsaugoti pakeitimus + today: šiandien imports: + errors: + too_large: Failas per didelis. modes: merge: Sulieti merge_long: Išsaugoti esančius įrašus ir pridėti naujus @@ -744,7 +808,7 @@ lt: upload: Įkelti invites: delete: Deaktyvuoti - expired: Pasibaigė + expired: Nebegaliojantis expires_in: '1800': 30 minučių '21600': 6 valandų @@ -753,28 +817,29 @@ lt: '604800': 1 savaitės '86400': 1 dienos expires_in_prompt: Niekada - generate: Generuoti + generate: Generuoti kvietimo nuorodą invalid: Šis kvietimas negalioja. - invited_by: 'Jus pakvietė:' + invited_by: 'Tave pakvietė:' max_uses: few: "%{count} naudojimai" many: "%{count} naudojimo" one: 1 naudojimas other: "%{count} naudojimų" - max_uses_prompt: Nėra limito + max_uses_prompt: Nėra ribojimo prompt: Generuok ir bendrink nuorodas su kitais, kad suteiktum prieigą prie šio serverio table: expires_at: Baigsis uses: Naudojimai - title: Pakviesti žmones + title: Kviesti žmones media_attachments: validations: images_and_video: Negalima pridėti video prie statuso, kuris jau turi nuotrauką too_many: Negalima pridėti daugiau nei 4 failų migrations: - acct: slapyvardis@domenas naujam vartotojui + acct: Perkelta į + cancel: Atšaukti nukreipimą moderation: - title: Moderacija + title: Prižiūrėjimas notification_mailer: favourite: body: 'Tavo įrašą pamėgo %{name}:' @@ -801,11 +866,19 @@ lt: notifications: email_events: Įvykiai, skirti el. laiško pranešimams email_events_hint: 'Pasirink įvykius, apie kuriuos nori gauti pranešimus:' + number: + human: + decimal_units: + units: + billion: mlrd. + million: mln. + thousand: tūkst. pagination: newer: Naujesnis next: Kitas older: Senesnis prev: Ankstesnis + truncate: "…" preferences: other: Kita posting_defaults: Skelbimo numatytosios nuostatos @@ -829,6 +902,7 @@ lt: dormant: Neaktyvus followers: Sekėjai following: Sekama + invited: Pakviestas last_active: Paskutinį kartą aktyvus most_recent: Naujausias moved: Perkelta @@ -851,24 +925,35 @@ lt: date: Data description: "%{browser} ant %{platform}" explanation: Čia rodomos web naršyklės prijungtos prie Jūsų Mastodon paskyros. + ip: IP platforms: + adobe_air: Adobe Air android: Android + blackberry: BlackBerry + chrome_os: ChromeOS + firefox_os: Firefox OS ios: iOS kai_os: KaiOS + linux: Linux mac: macOS + unknown_platform: Nežinoma platforma windows: Windows windows_mobile: Windows Mobile windows_phone: Windows Phone - revoke: Atšaukti + revoke: Naikinti revoke_success: Seansas sėkmingai panaikintas. title: Seansai settings: - authorized_apps: Autorizuotos aplikacijos + account: Paskyra + account_settings: Paskyros nustatymai + aliases: Paskyros pseudonimai + appearance: Išvaizda + authorized_apps: Leidžiamos programėlės back: Grįžti į Mastodon delete: Paskyros trynimas - development: Plėtojimas - edit_profile: Keisti profilį - export: Informacijos eksportas + development: Kūrimas + edit_profile: Redaguoti profilį + export: Duomenų eksportas featured_tags: Rodomi saitažodžiai import: Importuoti migrate: Paskyros migracija @@ -879,10 +964,22 @@ lt: severed_relationships: Nutrūkę sąryšiai two_factor_authentication: Dviejų veiksnių autentikacija severed_relationships: + download: Atsisiųsti (%{count}) preamble: Užblokavus domeną arba prižiūrėtojams nusprendus pristabdyti nuotolinio serverio veiklą, gali prarasti sekimus ir sekėjus. Kai taip atsitiks, galėsi atsisiųsti nutrauktų sąryšių sąrašus, kad juos patikrinti ir galbūt importuoti į kitą serverį. + type: Įvykis statuses: attached: + audio: + few: "%{count} garso įrašai" + many: "%{count} garso įrašo" + one: "%{count} garso įrašas" + other: "%{count} garso įrašų" description: 'Pridėta: %{attached}' + image: + few: "%{count} vaizdai" + many: "%{count} vaizdo" + one: "%{count} vaizdas" + other: "%{count} vaizdų" boosted_from_html: Pakelta iš %{acct_link} content_warning: 'Turinio įspėjimas: %{warning}' open_in_web: Atidaryti naudojan Web @@ -891,11 +988,14 @@ lt: limit: Jūs jau prisegėte maksimalų toot'ų skaičų ownership: Kitų vartotojų toot'ai negali būti prisegti reblog: Pakeltos žinutės negali būti prisegtos - show_more: Daugiau + poll: + vote: Balsuoti + show_more: Rodyti daugiau + show_thread: Rodyti giją visibilities: private: Tik sekėjams private_long: rodyti tik sekėjams - public: Viešas + public: Vieša public_long: visi gali matyti unlisted: Neįtrauktas į sąrašus unlisted_long: matyti gali visi, bet nėra išvardyti į viešąsias laiko skales @@ -904,6 +1004,7 @@ lt: keep_polls_hint: Neištrina jokių tavo apklausų keep_self_bookmark: Laikyti įrašus, kuriuos pažymėjai keep_self_bookmark_hint: Neištrina tavo pačių įrašų, jei esi juos pažymėjęs (-usi) + keep_self_fav_hint: Neištrina tavo pačių įrašų, jei esi juos pamėgęs (-usi) stream_entries: sensitive_content: Jautrus turinys themes: @@ -912,7 +1013,8 @@ lt: mastodon-light: Mastodon (šviesi) system: Automatinis (naudoti sistemos temą) two_factor_authentication: - disable: Išjungti + add: Pridėti + disable: Išjungti 2FA enabled: Dviejų veiksnių autentikacija įjungta enabled_success: Dviejų veiksnių autentikacija sėkmingai įjungta generate_recovery_codes: Sugeneruoti atkūrimo kodus diff --git a/config/locales/lv.yml b/config/locales/lv.yml index f4f0aa9db27742..5a071eba863e84 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -961,7 +961,6 @@ lv: delete: Dzēst edit_preset: Labot iepriekš iestatītus brīdinājumus empty: Tu vēl neesi definējis iepriekš iestatītos brīdinājumus. - title: Pārvaldīt brīdinājuma iestatījumus webhooks: add_new: Pievienot galapunktu delete: Dzēst diff --git a/config/locales/ms.yml b/config/locales/ms.yml index f39c26a5c10baa..a778d0c28f1491 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -924,7 +924,6 @@ ms: delete: Padam edit_preset: Edit pratetap amaran empty: Anda belum menentukan sebarang pratetap amaran lagi. - title: Urus pratetap amaran webhooks: add_new: Tambah titik akhir delete: Padam diff --git a/config/locales/my.yml b/config/locales/my.yml index 4ac9ecdd45ba9d..f28458360b5b3b 100644 --- a/config/locales/my.yml +++ b/config/locales/my.yml @@ -909,7 +909,6 @@ my: delete: ဖျက်ပါ edit_preset: ကြိုသတိပေးချက်ကို ပြင်ဆင်ပါ empty: ကြိုသတိပေးချက်များကို မသတ်မှတ်ရသေးပါ။ - title: ကြိုသတိပေးချက်များကို စီမံပါ webhooks: add_new: ဆုံးမှတ် ထည့်ပါ delete: ဖျက်ပါ diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 3452f8099432d9..a527fdb5a7009a 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -951,7 +951,7 @@ nl: delete: Verwijderen edit_preset: Preset voor waarschuwing bewerken empty: Je hebt nog geen presets voor waarschuwingen toegevoegd. - title: Presets voor waarschuwingen beheren + title: Presets voor waarschuwingen webhooks: add_new: Eindpunt toevoegen delete: Verwijderen diff --git a/config/locales/nn.yml b/config/locales/nn.yml index 013674ca514133..9291ba2c2c9477 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -950,7 +950,6 @@ nn: delete: Slett edit_preset: Endr åtvaringsoppsett empty: Du har ikke definert noen forhåndsinnstillinger for advarsler enda. - title: Handsam åtvaringsoppsett webhooks: add_new: Legg til endepunkt delete: Slett diff --git a/config/locales/no.yml b/config/locales/no.yml index c71dffc6361e99..537552ea98662d 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -944,7 +944,6 @@ delete: Slett edit_preset: Rediger advarsel forhåndsinnstilling empty: Du har ikke definert noen forhåndsinnstillinger for varsler enda. - title: Endre forhåndsinnstillinger for advarsler webhooks: add_new: Legg til endepunkt delete: Slett diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 0a653ea46c2732..d2bea55bd37c7b 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -430,7 +430,6 @@ oc: add_new: N’ajustar un nòu delete: Escafar edit_preset: Modificar lo tèxt predefinit d’avertiment - title: Gerir los tèxtes predefinits webhooks: delete: Suprimir disable: Desactivar diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 1c3fda8d032b90..4c7af82b94f63a 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -985,7 +985,7 @@ pl: delete: Usuń edit_preset: Edytuj szablon ostrzeżenia empty: Nie zdefiniowano jeszcze żadnych szablonów ostrzegawczych. - title: Zarządzaj szablonami ostrzeżeń + title: Zapisane ostrzeżenia webhooks: add_new: Dodaj punkt końcowy delete: Usuń diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 60730d53e977a7..6b80edb24e60f3 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -950,7 +950,6 @@ pt-BR: delete: Excluir edit_preset: Editar o aviso pré-definido empty: Você ainda não definiu nenhuma predefinição de alerta. - title: Gerenciar os avisos pré-definidos webhooks: add_new: Adicionar endpoint delete: Excluir diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index b4669e24d810da..49522b7414306d 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -951,7 +951,7 @@ pt-PT: delete: Eliminar edit_preset: Editar o aviso predefinido empty: Ainda não definiu nenhum aviso predefinido. - title: Gerir os avisos predefinidos + title: Predefinições de aviso webhooks: add_new: Adicionar endpoint delete: Eliminar diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 85d8a7a54046c3..d6b8726ba4fc32 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -978,7 +978,6 @@ ru: delete: Удалить edit_preset: Удалить шаблон предупреждения empty: Вы еще не определили пресеты предупреждений. - title: Управление шаблонами предупреждений webhooks: add_new: Добавить конечную точку delete: Удалить diff --git a/config/locales/sc.yml b/config/locales/sc.yml index 01c355794d3a75..449d8d9c7f3296 100644 --- a/config/locales/sc.yml +++ b/config/locales/sc.yml @@ -535,7 +535,6 @@ sc: delete: Cantzella edit_preset: Modìfica s'avisu predefinidu empty: No as cunfiguradu ancora perunu avisu predefinidu. - title: Gesti is cunfiguratziones predefinidas de is avisos webhooks: delete: Cantzella disable: Disativa diff --git a/config/locales/sco.yml b/config/locales/sco.yml index 2a7b1e3e701aed..7c733b71b50d89 100644 --- a/config/locales/sco.yml +++ b/config/locales/sco.yml @@ -842,7 +842,6 @@ sco: delete: Delete edit_preset: Edit warnin preset empty: Ye huvnae definit onie warnin presets yit. - title: Manage warnin presets webhooks: add_new: Add enpynt delete: Delete diff --git a/config/locales/si.yml b/config/locales/si.yml index f5e65fda8d8107..0f714ee146bbfe 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -726,7 +726,6 @@ si: delete: මකන්න edit_preset: අනතුරු ඇඟවීමේ පෙර සැකසුම සංස්කරණය කරන්න empty: ඔබ තවම කිසිදු අනතුරු ඇඟවීමේ පෙරසිටුවක් නිර්වචනය කර නැත. - title: අනතුරු ඇඟවීමේ පෙරසිටුවීම් කළමනාකරණය කරන්න webhooks: add_new: අන්ත ලක්ෂ්‍යය එක් කරන්න delete: මකන්න diff --git a/config/locales/simple_form.lt.yml b/config/locales/simple_form.lt.yml index 1c73ce0a842a56..789121be42e769 100644 --- a/config/locales/simple_form.lt.yml +++ b/config/locales/simple_form.lt.yml @@ -79,6 +79,7 @@ lt: mascot: Pakeičia išplėstinės žiniatinklio sąsajos iliustraciją. media_cache_retention_period: Nuotolinių naudotojų įrašytų įrašų medijos failai talpinami tavo serveryje. Nustačius teigiamą reikšmę, medijos bus ištrinamos po nurodyto dienų skaičiaus. Jei medijos duomenų bus paprašyta po to, kai jie bus ištrinti, jie bus atsiųsti iš naujo, jei šaltinio turinys vis dar prieinamas. Dėl apribojimų, susijusių su nuorodų peržiūros kortelių apklausos dažnumu trečiųjų šalių svetainėse, rekomenduojama nustatyti šią reikšmę ne trumpesnę kaip 14 dienų, kitaip nuorodų peržiūros kortelės nebus atnaujinamos pagal pareikalavimą iki to laiko. peers_api_enabled: Domenų pavadinimų sąrašas, su kuriais šis serveris susidūrė fediverse. Čia nėra duomenų apie tai, ar tu bendrauji su tam tikru serveriu, tik apie tai, kad tavo serveris apie jį žino. Tai naudojama tarnybose, kurios renka federacijos statistiką bendrąja prasme. + require_invite_text: Kai registraciją reikia patvirtinti rankiniu būdu, teksto įvesties laukelį „Kodėl nori prisijungti?“ padaryk privalomą, o ne pasirenkamą site_contact_email: Kaip žmonės gali su tavimi susisiekti teisiniais ar pagalbos užklausimais. site_contact_username: Kaip žmonės gali tave pasiekti Mastodon. site_extended_description: Bet kokia papildoma informacija, kuri gali būti naudinga lankytojams ir naudotojams. Gali būti struktūrizuota naudojant Markdown sintaksę. @@ -86,6 +87,8 @@ lt: timeline_preview: Atsijungę lankytojai galės naršyti naujausius viešus įrašus, esančius serveryje. trends: Trendai rodo, kurios įrašai, saitažodžiai ir naujienų istorijos tavo serveryje sulaukia didžiausio susidomėjimo. trends_as_landing_page: Rodyti tendencingą turinį atsijungusiems naudotojams ir lankytojams vietoj šio serverio aprašymo. Reikia, kad tendencijos būtų įjungtos. + invite_request: + text: Tai padės mums peržiūrėti tavo paraišką rule: hint: Pasirinktinai. Pateik daugiau informacijos apie taisyklę. sessions: @@ -108,6 +111,7 @@ lt: admin_account_action: include_statuses: Įtraukti praneštus įrašus į el. laišką defaults: + autofollow: Kviesti sekti tavo paskyrą avatar: Profilio nuotrauka bot: Tai automatinė paskyra chosen_languages: Filtruoti kalbas @@ -163,6 +167,7 @@ lt: custom_css: Pasirinktinis CSS mascot: Pasirinktinis talismanas (pasenęs) registrations_mode: Kas gali užsiregistruoti + require_invite_text: Reikalauti priežasties prisijungti show_domain_blocks_rationale: Rodyti, kodėl domenai buvo užblokuoti site_extended_description: Išplėstas aprašymas site_short_description: Serverio aprašymas @@ -173,6 +178,8 @@ lt: trendable_by_default: Leisti tendencijas be išankstinės peržiūros trends: Įjungti tendencijas trends_as_landing_page: Naudoti tendencijas kaip nukreipimo puslapį + invite: + comment: Komentuoti invite_request: text: Kodėl nori prisijungti? notification_emails: diff --git a/config/locales/simple_form.nl.yml b/config/locales/simple_form.nl.yml index 8bc717fe1fa172..2271d7037efa45 100644 --- a/config/locales/simple_form.nl.yml +++ b/config/locales/simple_form.nl.yml @@ -28,7 +28,7 @@ nl: sensitive: Forceer dat alle mediabijlagen van deze gebruiker als gevoelig worden gemarkeerd. silence: Voorkom dat de gebruiker berichten kan plaatsen met openbare zichtbaarheid, verberg diens berichten en meldingen van mensen die de gebruiker niet volgen. Sluit alle rapportages tegen dit account af. suspend: Voorkom interactie van of naar dit account en verwijder de inhoud. Dit is omkeerbaar binnen 30 dagen. Dit sluit alle rapporten tegen dit account af. - warning_preset_id: Optioneel. Je kunt nog steeds handmatig tekst toevoegen aan het eind van de voorinstelling + warning_preset_id: Optioneel. Je kunt nog steeds handmatig tekst toevoegen aan het eind van de preset announcement: all_day: Wanneer dit is aangevinkt worden alleen de datums binnen het tijdvak getoond ends_at: Optioneel. De publicatie van de mededeling wordt op dit tijdstip automatisch beëindigd @@ -168,7 +168,7 @@ nl: sensitive: Gevoelig silence: Beperken suspend: Opschorten en onomkeerbaar accountgegevens verwijderen - warning_preset_id: Gebruik een voorinstelling van een waarschuwing + warning_preset_id: Een preset voor een waarschuwing gebruiken announcement: all_day: Gedurende de hele dag ends_at: Eindigt diff --git a/config/locales/simple_form.sr-Latn.yml b/config/locales/simple_form.sr-Latn.yml index 8dd19865636755..710f81e84fd1bd 100644 --- a/config/locales/simple_form.sr-Latn.yml +++ b/config/locales/simple_form.sr-Latn.yml @@ -20,7 +20,7 @@ sr-Latn: admin_account_action: include_statuses: Korisnik će videti koje su objave prouzrokovale moderacijsku radnju ili upozorenje send_email_notification: Korisnik će dobiti objašnjenje toga šta mu se desilo sa nalogom - text_html: Opcionalno. Možete koristiti sintaksu objava. Možete dodati unapred određene postavke upozorenja za uštedu vremena + text_html: Opciono. Možete koristiti sintaksu objava. Možete dodati predefinisana upozorenja za uštedu vremena type_html: Izaberite šta da radite sa %{acct} types: disable: Sprečava korisnika da koristi svoj nalog, ali ne briše niti sakriva njegove sadržaje. @@ -28,7 +28,7 @@ sr-Latn: sensitive: Učini da svi medijski prilozi ovog korisnika prisilno budu označeni kao osetljivi. silence: Sprečava korisnika da pravi javne objave, sakriva njegove objave i obaveštenja od ljudi koji ga ne prate. Zatvara sve prijave podnete protiv ovog naloga. suspend: Sprečava svu interakciju od ovog naloga i ka ovom nalogu i briše njegov sadržaj. Opozivo u roku od 30 dana. Zatvara sve prijave podnete protiv ovog naloga. - warning_preset_id: Opcionalno. Možete i dalje dodati prilagođeni tekst na kraj preseta + warning_preset_id: Opciono. Možete i dalje dodati prilagođeni tekst na kraj predefinisane vrednosti announcement: all_day: Kada je ova opcija označena, samo datumi iz vremenskog opsega će biti prikazani ends_at: Opciono. Objava će biti automatski opozvana u ovom trenutku @@ -118,7 +118,7 @@ sr-Latn: sign_up_requires_approval: Nove registracije će zahtevati Vaše odobrenje severity: Izaberite šta će se desiti sa zahtevima sa ove IP adrese rule: - hint: Opcionalno. Pružite više detalja o pravilu + hint: Opciono. Pružite više detalja o pravilu text: Opišite pravilo ili uslov za korisnike na ovom serveru. Potrudite se da opis bude kratak i jednostavan sessions: otp: 'Unesite dvofaktorski kod sa Vašeg telefona ili koristite jedan od kodova za oporavak:' @@ -155,7 +155,7 @@ sr-Latn: account_migration: acct: Ručica (@) novog naloga account_warning_preset: - text: Tekst preseta + text: Tekst predefinisane vrednosti title: Naslov admin_account_action: include_statuses: Uključi prijavljene objave u e-poštu @@ -168,7 +168,7 @@ sr-Latn: sensitive: Osetljivo silence: Utišaj suspend: Obustavite i nepovratno izbrišite podatke o nalogu - warning_preset_id: Koristi upozoravajući preset + warning_preset_id: Koristi predefinisano upozorenje announcement: all_day: Celodnevni događaj ends_at: Kraj događaja diff --git a/config/locales/simple_form.sr.yml b/config/locales/simple_form.sr.yml index e88a99df13af7d..c5fbc9185a517e 100644 --- a/config/locales/simple_form.sr.yml +++ b/config/locales/simple_form.sr.yml @@ -20,7 +20,7 @@ sr: admin_account_action: include_statuses: Корисник ће видети које су објаве проузроковале модерацијску радњу или упозорење send_email_notification: Корисник ће добити објашњење тога шта му се десило са налогом - text_html: Опционално. Можете користити синтаксу објава. Можете додати унапред одређене поставке упозорења за уштеду времена + text_html: Опционо. Можете користити синтаксу објава. Можете додати предефинисана упозорења за уштеду времена type_html: Изаберите шта да радите са %{acct} types: disable: Спречава корисника да користи свој налог, али не брише нити сакрива његове садржаје. @@ -28,7 +28,7 @@ sr: sensitive: Учини да сви медијски прилози овог корисника присилно буду означени као осетљиви. silence: Спречава корисника да прави јавне објаве, сакрива његове објаве и обавештења од људи који га не прате. Затвара све пријаве поднете против овог налога. suspend: Спречава сву интеракцију од овог налога и ка овом налогу и брише његов садржај. Опозиво у року од 30 дана. Затвара све пријаве поднете против овог налога. - warning_preset_id: Опционално. Можете и даље додати прилагођени текст на крај пресета + warning_preset_id: Опционо. Можете и даље додати прилагођени текст на крај предефинисане вредности announcement: all_day: Када је ова опција означена, само датуми из временског опсега ће бити приказани ends_at: Опционо. Објава ће бити аутоматски опозвана у овом тренутку @@ -88,7 +88,7 @@ sr: media_cache_retention_period: Медијске датотеке из објава удаљених корисника се кеширају на вашем серверу. Када се подеси на позитивну вредност, медији ће бити избрисани након наведеног броја дана. Ако се медијски подаци захтевају након брисања, биће поново преузети, ако је изворни садржај и даље доступан. Због ограничења колико често картице за преглед веза анкетирају сајтове трећих страна, препоручује се да ову вредност поставите на најмање 14 дана, иначе картице за преглед веза неће бити ажуриране на захтев пре тог времена. peers_api_enabled: Листа домена са којима се овај сервер сусрео у федиверзуму. Овде нису садржани подаци о томе да ли се Ваш сервер федерише са другим серверима, већ само да Ваш сервер зна за њих. Ове информације користе сервиси који прикупљају податке и воде статистику о федерацији у ширем смислу. profile_directory: Директоријум профила наводи све кориснике који су се определили да буду видљиви. - require_invite_text: Када регистрације захтевају ручно одобрење, поставите да одговор на „Зашто желите да се придружите?“ буде обавезан, а не опционалан + require_invite_text: Када регистрације захтевају ручно одобрење, постави да унос текста „Зашто желиш да се придружиш?“ буде обавезан, а не опциони site_contact_email: Како корисници могу да контактирају са Вама за правна питања или питања у вези подршке. site_contact_username: Како корисници могу да контактирају са вама на Mastodon-у. site_extended_description: Било какве додатне информације које могу бити корисне посетиоцима и Вашим корисницима. Могу се структурирати помоћу Markdown синтаксе. @@ -118,7 +118,7 @@ sr: sign_up_requires_approval: Нове регистрације ће захтевати Ваше одобрење severity: Изаберите шта ће се десити са захтевима са ове IP адресе rule: - hint: Опционално. Пружите више детаља о правилу + hint: Опционо. Пружите више детаља о правилу text: Опишите правило или услов за кориснике на овом серверу. Потрудите се да опис буде кратак и једноставан sessions: otp: 'Унесите двофакторски код са Вашег телефона или користите један од кодова за опоравак:' @@ -155,7 +155,7 @@ sr: account_migration: acct: Ручица (@) новог налога account_warning_preset: - text: Текст пресета + text: Текст предефинисане вредности title: Наслов admin_account_action: include_statuses: Укључи пријављене објаве у е-пошту @@ -168,7 +168,7 @@ sr: sensitive: Осетљиво silence: Утишај suspend: Обуставите и неповратно избришите податке о налогу - warning_preset_id: Користи упозоравајући пресет + warning_preset_id: Користи предефинисано упозорење announcement: all_day: Целодневни догађај ends_at: Крај догађаја diff --git a/config/locales/sk.yml b/config/locales/sk.yml index f05887dc33cc0c..f10815129dd286 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -763,7 +763,6 @@ sk: add_new: Pridaj nové delete: Vymaž edit_preset: Uprav varovnú predlohu - title: Spravuj varovné predlohy webhooks: delete: Vymaž disable: Vypni diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 329ce5a29b5701..1e4e254cf18eaa 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -985,7 +985,7 @@ sl: delete: Izbriši edit_preset: Uredi prednastavitev opozoril empty: Zaenkrat še niste določili nobenih opozorilnih prednastavitev. - title: Upravljaj prednastavitev opozoril + title: Pred-nastavitve opozoril webhooks: add_new: Dodaj končno točko delete: Izbriši diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 8319cfcaecac48..5439f08a04a8b2 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -285,6 +285,7 @@ sq: update_custom_emoji_html: "%{name} përditësoi emoxhin %{target}" update_domain_block_html: "%{name} përditësoi bllokim përkatësish për %{target}" update_ip_block_html: "%{name} ndryshoi rregull për IP-në %{target}" + update_report_html: "%{name} përditësoi raportimin %{target}" update_status_html: "%{name} përditësoi gjendjen me %{target}" update_user_role_html: "%{name} ndryshoi rolin për %{target}" deleted_account: fshiu llogarinë @@ -946,7 +947,7 @@ sq: delete: Fshije edit_preset: Përpunoni sinjalizim të paracaktuar empty: S’keni përcaktuar ende sinjalizime të gatshme. - title: Administroni sinjalizime të paracaktuara + title: Paracaktime sinjalizimesh webhooks: add_new: Shtoni pikëmbarim delete: Fshije diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml index 808a10e7290c6a..718d1c0f84f336 100644 --- a/config/locales/sr-Latn.yml +++ b/config/locales/sr-Latn.yml @@ -869,7 +869,7 @@ sr-Latn: action: Pogledaj dokumentaciju message_html: Vaš Elasticsearch klaster ima samo jedan čvor, ES_PRESETtreba postaviti nasingle_node_cluster. elasticsearch_reset_chewy: - message_html: Vaš Elasticsearch klaster ima samo jedan čvor, ES_PRESETtreba postaviti nasingle_node_cluster. + message_html: Indeks Elasticsearch sistema je zastareo zbog promene podešavanja. Pokrenite tootctl search deploy --reset-chewyda biste ga ažurirali. elasticsearch_running_check: message_html: Povezivanje na Elasticsearch nije bilo moguće. Molimo Vas proverite da li je pokrenut, ili onemogućite pretragu celog teksta elasticsearch_version_check: @@ -966,9 +966,9 @@ sr-Latn: warning_presets: add_new: Dodaj novi delete: Izbriši - edit_preset: Uredi preset upozorenja - empty: Još uvek niste definisali nijedan šablon upozorenja. - title: Upravljaj presetima upozorenja + edit_preset: Uredi predefinisana upozorenja + empty: Još uvek niste definisali nijedno upozorenje. + title: Predefinisana upozorenja webhooks: add_new: Dodaj krajnju tačku delete: Izbriši diff --git a/config/locales/sr.yml b/config/locales/sr.yml index f03c6e878a2a09..c9a67b1936656a 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -869,7 +869,7 @@ sr: action: Погледај документацију message_html: Ваш Elasticsearch кластер има само један чвор, ES_PRESETтреба поставити наsingle_node_cluster. elasticsearch_reset_chewy: - message_html: Ваш Elasticsearch кластер има само један чвор, ES_PRESETтреба поставити наsingle_node_cluster. + message_html: Индекс Elasticsearch система је застарео због промене подешавања. Покрените tootctl search deploy --reset-chewyда бисте га ажурирали. elasticsearch_running_check: message_html: Повезивање на Elasticsearch није било могуће. Молимо Вас проверите да ли је покренут, или онемогућите претрагу целог текста elasticsearch_version_check: @@ -966,9 +966,9 @@ sr: warning_presets: add_new: Додај нови delete: Избриши - edit_preset: Уреди пресет упозорења - empty: Још увек нисте дефинисали ниједан шаблон упозорења. - title: Управљај пресетима упозорења + edit_preset: Уреди предефинисана упозорења + empty: Још увек нисте дефинисали ниједно упозорење. + title: Предефинисна упозорења webhooks: add_new: Додај крајњу тачку delete: Избриши diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 9f0de4a723a781..cf68cdd5637509 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -951,7 +951,6 @@ sv: delete: Radera edit_preset: Redigera varningsförval empty: Du har inte definierat några varningsförval ännu. - title: Hantera varningsförval webhooks: add_new: Lägg till slutpunkt delete: Ta bort diff --git a/config/locales/th.yml b/config/locales/th.yml index 5711f68ff89061..3ca4f097338e55 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -934,7 +934,6 @@ th: delete: ลบ edit_preset: แก้ไขคำเตือนที่ตั้งไว้ล่วงหน้า empty: คุณยังไม่ได้กำหนดคำเตือนที่ตั้งไว้ล่วงหน้าใด ๆ - title: จัดการคำเตือนที่ตั้งไว้ล่วงหน้า webhooks: add_new: เพิ่มปลายทาง delete: ลบ diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 469f2c5ad8f07e..3ce12fec87c678 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -951,7 +951,7 @@ tr: delete: Sil edit_preset: Uyarı ön-ayarını düzenle empty: Henüz önceden ayarlanmış bir uyarı tanımlanmadı. - title: Uyarı ön-ayarlarını yönet + title: Uyarı Önayarları webhooks: add_new: Uç nokta ekle delete: Sil diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 71e84a1d54daf3..5baaa93870317d 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -984,7 +984,6 @@ uk: delete: Видалити edit_preset: Редагувати шаблон попередження empty: Ви ще не визначили жодних попереджень. - title: Керування шаблонами попереджень webhooks: add_new: Додати кінцеву точку delete: Видалити diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 05f3157ec96452..4265c1a33a153f 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -934,7 +934,6 @@ vi: delete: Xóa bỏ edit_preset: Sửa mẫu có sẵn empty: Bạn chưa thêm mẫu cảnh cáo nào cả. - title: Quản lý mẫu cảnh cáo webhooks: add_new: Thêm endpoint delete: Xóa bỏ diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 12b6197938efd7..b668c23d29be89 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -934,7 +934,7 @@ zh-CN: delete: 删除 edit_preset: 编辑预置警告 empty: 你尚未定义任何警告预设。 - title: 管理预设警告 + title: 预设警告 webhooks: add_new: 新增对端 delete: 删除 diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 1bfbe38bb52e72..ddc6571e6da9a5 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -933,7 +933,6 @@ zh-HK: delete: 刪除 edit_preset: 設定警告預設 empty: 您尚未定義任何預設警告 - title: 管理警告預設 webhooks: add_new: 新增端點 delete: 刪除 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index ac633a201d8fc7..14f54f9a12219c 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -936,7 +936,7 @@ zh-TW: delete: 刪除 edit_preset: 編輯預設警告 empty: 您尚未定義任何預設警告。 - title: 管理預設警告 + title: 預設警告內容 webhooks: add_new: 新增端點 delete: 刪除 From 3a862439dfc989c6c5741e007c2f4e0335fffe33 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 23 May 2024 04:26:58 -0400 Subject: [PATCH 109/113] Remove unused account record in api/v2/admin/accounts spec (#30397) --- spec/requests/api/v2/admin/accounts_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/requests/api/v2/admin/accounts_spec.rb b/spec/requests/api/v2/admin/accounts_spec.rb index fb04850bb7d2cb..f5db93233c2012 100644 --- a/spec/requests/api/v2/admin/accounts_spec.rb +++ b/spec/requests/api/v2/admin/accounts_spec.rb @@ -8,7 +8,6 @@ let(:scopes) { 'admin:read admin:write' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } - let(:account) { Fabricate(:account) } describe 'GET #index' do let!(:remote_account) { Fabricate(:account, domain: 'example.org') } From 10ec421dd4e0da987e69a3dd7f4f696f9c5878e0 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 23 May 2024 11:50:13 +0200 Subject: [PATCH 110/113] Proposal: a modern & typed way of writing Redux actions doing API requests (#30270) --- .../mastodon/actions/account_notes.ts | 21 +- .../mastodon/actions/interactions.js | 86 +------- .../mastodon/actions/interactions_typed.ts | 30 +++ app/javascript/mastodon/api.ts | 16 +- app/javascript/mastodon/api/accounts.ts | 7 + app/javascript/mastodon/api/interactions.ts | 10 + .../mastodon/containers/status_container.jsx | 4 +- .../containers/account_note_container.js | 2 +- .../containers/notification_container.js | 4 +- .../picture_in_picture/components/footer.jsx | 4 +- .../containers/detailed_status_container.js | 4 +- .../mastodon/features/status/index.jsx | 4 +- app/javascript/mastodon/reducers/statuses.js | 28 +-- .../mastodon/store/typed_functions.ts | 186 ++++++++++++++++++ 14 files changed, 281 insertions(+), 125 deletions(-) create mode 100644 app/javascript/mastodon/actions/interactions_typed.ts create mode 100644 app/javascript/mastodon/api/accounts.ts create mode 100644 app/javascript/mastodon/api/interactions.ts diff --git a/app/javascript/mastodon/actions/account_notes.ts b/app/javascript/mastodon/actions/account_notes.ts index acd9ecf4104ba3..bf4f93dca9e5c9 100644 --- a/app/javascript/mastodon/actions/account_notes.ts +++ b/app/javascript/mastodon/actions/account_notes.ts @@ -1,18 +1,9 @@ -import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships'; -import { createAppAsyncThunk } from 'mastodon/store/typed_functions'; +import { apiSubmitAccountNote } from 'mastodon/api/accounts'; +import { createDataLoadingThunk } from 'mastodon/store/typed_functions'; -import api from '../api'; - -export const submitAccountNote = createAppAsyncThunk( +export const submitAccountNote = createDataLoadingThunk( 'account_note/submit', - async (args: { id: string; value: string }) => { - const response = await api().post( - `/api/v1/accounts/${args.id}/note`, - { - comment: args.value, - }, - ); - - return { relationship: response.data }; - }, + (accountId: string, note: string) => apiSubmitAccountNote(accountId, note), + (relationship) => ({ relationship }), + { skipLoading: true }, ); diff --git a/app/javascript/mastodon/actions/interactions.js b/app/javascript/mastodon/actions/interactions.js index fe7c911b61e2a5..57f2459c016fa4 100644 --- a/app/javascript/mastodon/actions/interactions.js +++ b/app/javascript/mastodon/actions/interactions.js @@ -3,10 +3,6 @@ import api, { getLinks } from '../api'; import { fetchRelationships } from './accounts'; import { importFetchedAccounts, importFetchedStatus } from './importer'; -export const REBLOG_REQUEST = 'REBLOG_REQUEST'; -export const REBLOG_SUCCESS = 'REBLOG_SUCCESS'; -export const REBLOG_FAIL = 'REBLOG_FAIL'; - export const REBLOGS_EXPAND_REQUEST = 'REBLOGS_EXPAND_REQUEST'; export const REBLOGS_EXPAND_SUCCESS = 'REBLOGS_EXPAND_SUCCESS'; export const REBLOGS_EXPAND_FAIL = 'REBLOGS_EXPAND_FAIL'; @@ -15,10 +11,6 @@ export const FAVOURITE_REQUEST = 'FAVOURITE_REQUEST'; export const FAVOURITE_SUCCESS = 'FAVOURITE_SUCCESS'; export const FAVOURITE_FAIL = 'FAVOURITE_FAIL'; -export const UNREBLOG_REQUEST = 'UNREBLOG_REQUEST'; -export const UNREBLOG_SUCCESS = 'UNREBLOG_SUCCESS'; -export const UNREBLOG_FAIL = 'UNREBLOG_FAIL'; - export const UNFAVOURITE_REQUEST = 'UNFAVOURITE_REQUEST'; export const UNFAVOURITE_SUCCESS = 'UNFAVOURITE_SUCCESS'; export const UNFAVOURITE_FAIL = 'UNFAVOURITE_FAIL'; @@ -51,83 +43,7 @@ export const UNBOOKMARK_REQUEST = 'UNBOOKMARKED_REQUEST'; export const UNBOOKMARK_SUCCESS = 'UNBOOKMARKED_SUCCESS'; export const UNBOOKMARK_FAIL = 'UNBOOKMARKED_FAIL'; -export function reblog(status, visibility) { - return function (dispatch) { - dispatch(reblogRequest(status)); - - api().post(`/api/v1/statuses/${status.get('id')}/reblog`, { visibility }).then(function (response) { - // The reblog API method returns a new status wrapped around the original. In this case we are only - // interested in how the original is modified, hence passing it skipping the wrapper - dispatch(importFetchedStatus(response.data.reblog)); - dispatch(reblogSuccess(status)); - }).catch(function (error) { - dispatch(reblogFail(status, error)); - }); - }; -} - -export function unreblog(status) { - return (dispatch) => { - dispatch(unreblogRequest(status)); - - api().post(`/api/v1/statuses/${status.get('id')}/unreblog`).then(response => { - dispatch(importFetchedStatus(response.data)); - dispatch(unreblogSuccess(status)); - }).catch(error => { - dispatch(unreblogFail(status, error)); - }); - }; -} - -export function reblogRequest(status) { - return { - type: REBLOG_REQUEST, - status: status, - skipLoading: true, - }; -} - -export function reblogSuccess(status) { - return { - type: REBLOG_SUCCESS, - status: status, - skipLoading: true, - }; -} - -export function reblogFail(status, error) { - return { - type: REBLOG_FAIL, - status: status, - error: error, - skipLoading: true, - }; -} - -export function unreblogRequest(status) { - return { - type: UNREBLOG_REQUEST, - status: status, - skipLoading: true, - }; -} - -export function unreblogSuccess(status) { - return { - type: UNREBLOG_SUCCESS, - status: status, - skipLoading: true, - }; -} - -export function unreblogFail(status, error) { - return { - type: UNREBLOG_FAIL, - status: status, - error: error, - skipLoading: true, - }; -} +export * from "./interactions_typed"; export function favourite(status) { return function (dispatch) { diff --git a/app/javascript/mastodon/actions/interactions_typed.ts b/app/javascript/mastodon/actions/interactions_typed.ts new file mode 100644 index 00000000000000..51808060872cb0 --- /dev/null +++ b/app/javascript/mastodon/actions/interactions_typed.ts @@ -0,0 +1,30 @@ +import { apiReblog, apiUnreblog } from 'mastodon/api/interactions'; +import type { StatusVisibility } from 'mastodon/models/status'; +import { createDataLoadingThunk } from 'mastodon/store/typed_functions'; + +import { importFetchedStatus } from './importer'; + +export const reblog = createDataLoadingThunk( + 'status/reblog', + (statusId: string, visibility: StatusVisibility) => + apiReblog(statusId, visibility), + (data, { dispatch, discardLoadData }) => { + // The reblog API method returns a new status wrapped around the original. In this case we are only + // interested in how the original is modified, hence passing it skipping the wrapper + dispatch(importFetchedStatus(data.reblog)); + + // The payload is not used in any actions + return discardLoadData; + }, +); + +export const unreblog = createDataLoadingThunk( + 'status/unreblog', + (statusId: string) => apiUnreblog(statusId), + (data, { dispatch, discardLoadData }) => { + dispatch(importFetchedStatus(data)); + + // The payload is not used in any actions + return discardLoadData; + }, +); diff --git a/app/javascript/mastodon/api.ts b/app/javascript/mastodon/api.ts index 2ccf178f00ea92..4e5ccef08cb56a 100644 --- a/app/javascript/mastodon/api.ts +++ b/app/javascript/mastodon/api.ts @@ -1,4 +1,4 @@ -import type { AxiosResponse, RawAxiosRequestHeaders } from 'axios'; +import type { AxiosResponse, Method, RawAxiosRequestHeaders } from 'axios'; import axios from 'axios'; import LinkHeader from 'http-link-header'; @@ -58,3 +58,17 @@ export default function api(withAuthorization = true) { ], }); } + +export async function apiRequest( + method: Method, + url: string, + params?: unknown, +) { + const { data } = await api().request({ + method, + url, + params, + }); + + return data; +} diff --git a/app/javascript/mastodon/api/accounts.ts b/app/javascript/mastodon/api/accounts.ts new file mode 100644 index 00000000000000..51b1f4f8de8dd4 --- /dev/null +++ b/app/javascript/mastodon/api/accounts.ts @@ -0,0 +1,7 @@ +import { apiRequest } from 'mastodon/api'; +import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships'; + +export const apiSubmitAccountNote = (id: string, value: string) => + apiRequest('post', `/api/v1/accounts/${id}/note`, { + comment: value, + }); diff --git a/app/javascript/mastodon/api/interactions.ts b/app/javascript/mastodon/api/interactions.ts new file mode 100644 index 00000000000000..4c466a1b46d90b --- /dev/null +++ b/app/javascript/mastodon/api/interactions.ts @@ -0,0 +1,10 @@ +import { apiRequest } from 'mastodon/api'; +import type { Status, StatusVisibility } from 'mastodon/models/status'; + +export const apiReblog = (statusId: string, visibility: StatusVisibility) => + apiRequest<{ reblog: Status }>('post', `v1/statuses/${statusId}/reblog`, { + visibility, + }); + +export const apiUnreblog = (statusId: string) => + apiRequest('post', `v1/statuses/${statusId}/unreblog`); diff --git a/app/javascript/mastodon/containers/status_container.jsx b/app/javascript/mastodon/containers/status_container.jsx index c6842e8df86f1a..0174e5a02c5006 100644 --- a/app/javascript/mastodon/containers/status_container.jsx +++ b/app/javascript/mastodon/containers/status_container.jsx @@ -96,9 +96,9 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({ onModalReblog (status, privacy) { if (status.get('reblogged')) { - dispatch(unreblog(status)); + dispatch(unreblog(status.id)); } else { - dispatch(reblog(status, privacy)); + dispatch(reblog(status.id, privacy)); } }, diff --git a/app/javascript/mastodon/features/account/containers/account_note_container.js b/app/javascript/mastodon/features/account/containers/account_note_container.js index 20304a4524346c..9fbe0671c06d02 100644 --- a/app/javascript/mastodon/features/account/containers/account_note_container.js +++ b/app/javascript/mastodon/features/account/containers/account_note_container.js @@ -11,7 +11,7 @@ const mapStateToProps = (state, { account }) => ({ const mapDispatchToProps = (dispatch, { account }) => ({ onSave (value) { - dispatch(submitAccountNote({ id: account.get('id'), value})); + dispatch(submitAccountNote(account.get('id'), value)); }, }); diff --git a/app/javascript/mastodon/features/notifications/containers/notification_container.js b/app/javascript/mastodon/features/notifications/containers/notification_container.js index de450cd1abe17d..d829cb833ea8af 100644 --- a/app/javascript/mastodon/features/notifications/containers/notification_container.js +++ b/app/javascript/mastodon/features/notifications/containers/notification_container.js @@ -39,12 +39,12 @@ const mapDispatchToProps = dispatch => ({ }, onModalReblog (status, privacy) { - dispatch(reblog(status, privacy)); + dispatch(reblog(status.id, privacy)); }, onReblog (status, e) { if (status.get('reblogged')) { - dispatch(unreblog(status)); + dispatch(unreblog(status.id)); } else { if (e.shiftKey || !boostModal) { this.onModalReblog(status); diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx index d6b1b5fa81ac90..1c142f3c104c3d 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx @@ -123,7 +123,7 @@ class Footer extends ImmutablePureComponent { _performReblog = (status, privacy) => { const { dispatch } = this.props; - dispatch(reblog(status, privacy)); + dispatch(reblog(status.id, privacy)); }; handleReblogClick = e => { @@ -132,7 +132,7 @@ class Footer extends ImmutablePureComponent { if (signedIn) { if (status.get('reblogged')) { - dispatch(unreblog(status)); + dispatch(unreblog(status.id)); } else if ((e && e.shiftKey) || !boostModal) { this._performReblog(status); } else { diff --git a/app/javascript/mastodon/features/status/containers/detailed_status_container.js b/app/javascript/mastodon/features/status/containers/detailed_status_container.js index 1c650f544f577b..91bc700e980d29 100644 --- a/app/javascript/mastodon/features/status/containers/detailed_status_container.js +++ b/app/javascript/mastodon/features/status/containers/detailed_status_container.js @@ -74,12 +74,12 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ }, onModalReblog (status, privacy) { - dispatch(reblog(status, privacy)); + dispatch(reblog(status.id, privacy)); }, onReblog (status, e) { if (status.get('reblogged')) { - dispatch(unreblog(status)); + dispatch(unreblog(status.id)); } else { if (e.shiftKey || !boostModal) { this.onModalReblog(status); diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 3a9bf524f8c62d..48f045a4afff1b 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -299,7 +299,7 @@ class Status extends ImmutablePureComponent { }; handleModalReblog = (status, privacy) => { - this.props.dispatch(reblog(status, privacy)); + this.props.dispatch(reblog(status.id, privacy)); }; handleReblogClick = (status, e) => { @@ -308,7 +308,7 @@ class Status extends ImmutablePureComponent { if (signedIn) { if (status.get('reblogged')) { - dispatch(unreblog(status)); + dispatch(unreblog(status.id)); } else { if ((e && e.shiftKey) || !boostModal) { this.handleModalReblog(status); diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js index 683fe848f776cd..1da1c9cf2fa4d1 100644 --- a/app/javascript/mastodon/reducers/statuses.js +++ b/app/javascript/mastodon/reducers/statuses.js @@ -3,10 +3,6 @@ import { Map as ImmutableMap, fromJS } from 'immutable'; import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer'; import { normalizeStatusTranslation } from '../actions/importer/normalizer'; import { - REBLOG_REQUEST, - REBLOG_FAIL, - UNREBLOG_REQUEST, - UNREBLOG_FAIL, FAVOURITE_REQUEST, FAVOURITE_FAIL, UNFAVOURITE_REQUEST, @@ -16,6 +12,10 @@ import { UNBOOKMARK_REQUEST, UNBOOKMARK_FAIL, } from '../actions/interactions'; +import { + reblog, + unreblog, +} from '../actions/interactions_typed'; import { STATUS_MUTE_SUCCESS, STATUS_UNMUTE_SUCCESS, @@ -65,6 +65,7 @@ const statusTranslateUndo = (state, id) => { const initialState = ImmutableMap(); +/** @type {import('@reduxjs/toolkit').Reducer} */ export default function statuses(state = initialState, action) { switch(action.type) { case STATUS_FETCH_REQUEST: @@ -91,14 +92,6 @@ export default function statuses(state = initialState, action) { return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'bookmarked'], false); case UNBOOKMARK_FAIL: return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'bookmarked'], true); - case REBLOG_REQUEST: - return state.setIn([action.status.get('id'), 'reblogged'], true); - case REBLOG_FAIL: - return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'reblogged'], false); - case UNREBLOG_REQUEST: - return state.setIn([action.status.get('id'), 'reblogged'], false); - case UNREBLOG_FAIL: - return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'reblogged'], true); case STATUS_MUTE_SUCCESS: return state.setIn([action.id, 'muted'], true); case STATUS_UNMUTE_SUCCESS: @@ -128,6 +121,15 @@ export default function statuses(state = initialState, action) { case STATUS_TRANSLATE_UNDO: return statusTranslateUndo(state, action.id); default: - return state; + if(reblog.pending.match(action)) + return state.setIn([action.meta.params.statusId, 'reblogged'], true); + else if(reblog.rejected.match(action)) + return state.get(action.meta.params.statusId) === undefined ? state : state.setIn([action.meta.params.statusId, 'reblogged'], false); + else if(unreblog.pending.match(action)) + return state.setIn([action.meta.params.statusId, 'reblogged'], false); + else if(unreblog.rejected.match(action)) + return state.get(action.meta.params.statusId) === undefined ? state : state.setIn([action.meta.params.statusId, 'reblogged'], true); + else + return state; } } diff --git a/app/javascript/mastodon/store/typed_functions.ts b/app/javascript/mastodon/store/typed_functions.ts index b66d7545c5dd4c..4b07a556107af9 100644 --- a/app/javascript/mastodon/store/typed_functions.ts +++ b/app/javascript/mastodon/store/typed_functions.ts @@ -2,6 +2,8 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; // eslint-disable-next-line @typescript-eslint/no-restricted-imports import { useDispatch, useSelector } from 'react-redux'; +import type { BaseThunkAPI } from '@reduxjs/toolkit/dist/createAsyncThunk'; + import type { AppDispatch, RootState } from './store'; export const useAppDispatch = useDispatch.withTypes(); @@ -13,8 +15,192 @@ export interface AsyncThunkRejectValue { error?: unknown; } +interface AppMeta { + skipLoading?: boolean; +} + export const createAppAsyncThunk = createAsyncThunk.withTypes<{ state: RootState; dispatch: AppDispatch; rejectValue: AsyncThunkRejectValue; }>(); + +type AppThunkApi = Pick< + BaseThunkAPI< + RootState, + unknown, + AppDispatch, + AsyncThunkRejectValue, + AppMeta, + AppMeta + >, + 'getState' | 'dispatch' +>; + +interface AppThunkOptions { + skipLoading?: boolean; +} + +const createBaseAsyncThunk = createAsyncThunk.withTypes<{ + state: RootState; + dispatch: AppDispatch; + rejectValue: AsyncThunkRejectValue; + fulfilledMeta: AppMeta; + rejectedMeta: AppMeta; +}>(); + +export function createThunk( + name: string, + creator: (arg: Arg, api: AppThunkApi) => Returned | Promise, + options: AppThunkOptions = {}, +) { + return createBaseAsyncThunk( + name, + async ( + arg: Arg, + { getState, dispatch, fulfillWithValue, rejectWithValue }, + ) => { + try { + const result = await creator(arg, { dispatch, getState }); + + return fulfillWithValue(result, { + skipLoading: options.skipLoading, + }); + } catch (error) { + return rejectWithValue({ error }, { skipLoading: true }); + } + }, + { + getPendingMeta() { + if (options.skipLoading) return { skipLoading: true }; + return {}; + }, + }, + ); +} + +const discardLoadDataInPayload = Symbol('discardLoadDataInPayload'); +type DiscardLoadData = typeof discardLoadDataInPayload; + +type OnData = ( + data: LoadDataResult, + api: AppThunkApi & { + discardLoadData: DiscardLoadData; + }, +) => ReturnedData | DiscardLoadData | Promise; + +// Overload when there is no `onData` method, the payload is the `onData` result +export function createDataLoadingThunk< + LoadDataResult, + Args extends readonly unknown[], +>( + name: string, + loadData: (...args: Args) => Promise, + thunkOptions?: AppThunkOptions, +): ReturnType>; + +// Overload when the `onData` method returns discardLoadDataInPayload, then the payload is empty +export function createDataLoadingThunk< + LoadDataResult, + Args extends readonly unknown[], +>( + name: string, + loadData: (...args: Args) => Promise, + onDataOrThunkOptions?: + | AppThunkOptions + | OnData, + thunkOptions?: AppThunkOptions, +): ReturnType>; + +// Overload when the `onData` method returns nothing, then the mayload is the `onData` result +export function createDataLoadingThunk< + LoadDataResult, + Args extends readonly unknown[], +>( + name: string, + loadData: (...args: Args) => Promise, + onDataOrThunkOptions?: AppThunkOptions | OnData, + thunkOptions?: AppThunkOptions, +): ReturnType>; + +// Overload when there is an `onData` method returning something +export function createDataLoadingThunk< + LoadDataResult, + Args extends readonly unknown[], + Returned, +>( + name: string, + loadData: (...args: Args) => Promise, + onDataOrThunkOptions?: AppThunkOptions | OnData, + thunkOptions?: AppThunkOptions, +): ReturnType>; + +/** + * This function creates a Redux Thunk that handles loading data asynchronously (usually from the API), dispatching `pending`, `fullfilled` and `rejected` actions. + * + * You can run a callback on the `onData` results to either dispatch side effects or modify the payload. + * + * It is a wrapper around RTK's [`createAsyncThunk`](https://redux-toolkit.js.org/api/createAsyncThunk) + * @param name Prefix for the actions types + * @param loadData Function that loads the data. It's arguments will become the thunk's arguments + * @param onDataOrThunkOptions + * Callback called on the results from `loadData`. + * + * First argument will be the return from `loadData`. + * + * Second argument is an object with: `dispatch`, `getState` and `discardLoadData`. + * It can return: + * - `undefined` (or no explicit return), meaning that the `onData` results will be the payload + * - `discardLoadData` to discard the `onData` results and return an empty payload + * - anything else, which will be the payload + * + * You can also omit this parameter and pass `thunkOptions` directly + * @param maybeThunkOptions + * Additional Mastodon specific options for the thunk. Currently supports: + * - `skipLoading` to avoid showing the loading bar when the request is in progress + * @returns The created thunk + */ +export function createDataLoadingThunk< + LoadDataResult, + Args extends readonly unknown[], + Returned, +>( + name: string, + loadData: (...args: Args) => Promise, + onDataOrThunkOptions?: AppThunkOptions | OnData, + maybeThunkOptions?: AppThunkOptions, +) { + let onData: OnData | undefined; + let thunkOptions: AppThunkOptions | undefined; + + if (typeof onDataOrThunkOptions === 'function') onData = onDataOrThunkOptions; + else if (typeof onDataOrThunkOptions === 'object') + thunkOptions = onDataOrThunkOptions; + + if (maybeThunkOptions) { + thunkOptions = maybeThunkOptions; + } + + return createThunk( + name, + async (arg, { getState, dispatch }) => { + const data = await loadData(...arg); + + if (!onData) return data as Returned; + + const result = await onData(data, { + dispatch, + getState, + discardLoadData: discardLoadDataInPayload, + }); + + // if there is no return in `onData`, we return the `onData` result + if (typeof result === 'undefined') return data as Returned; + // the user explicitely asked to discard the payload + else if (result === discardLoadDataInPayload) + return undefined as Returned; + else return result; + }, + thunkOptions, + ); +} From 133d98fb25e623745326945b3800173c27519d57 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 23 May 2024 19:28:18 +0200 Subject: [PATCH 111/113] Normalize language code of incoming posts (#30403) --- app/lib/activitypub/parser/status_parser.rb | 11 +++- .../activitypub/parser/status_parser_spec.rb | 50 +++++++++++++++++++ 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 spec/lib/activitypub/parser/status_parser_spec.rb diff --git a/app/lib/activitypub/parser/status_parser.rb b/app/lib/activitypub/parser/status_parser.rb index cfc2b8788b1319..2940aea44b7b95 100644 --- a/app/lib/activitypub/parser/status_parser.rb +++ b/app/lib/activitypub/parser/status_parser.rb @@ -3,6 +3,8 @@ class ActivityPub::Parser::StatusParser include JsonLdHelper + NORMALIZED_LOCALE_NAMES = LanguagesHelper::SUPPORTED_LOCALES.keys.index_by(&:downcase).freeze + # @param [Hash] json # @param [Hash] options # @option options [String] :followers_collection @@ -87,6 +89,13 @@ def visibility end def language + lang = raw_language_code + lang.presence && NORMALIZED_LOCALE_NAMES.fetch(lang.downcase.to_sym, lang) + end + + private + + def raw_language_code if content_language_map? @object['contentMap'].keys.first elsif name_language_map? @@ -96,8 +105,6 @@ def language end end - private - def audience_to as_array(@object['to'] || @json['to']).map { |x| value_or_id(x) } end diff --git a/spec/lib/activitypub/parser/status_parser_spec.rb b/spec/lib/activitypub/parser/status_parser_spec.rb new file mode 100644 index 00000000000000..5d9f008db158d5 --- /dev/null +++ b/spec/lib/activitypub/parser/status_parser_spec.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe ActivityPub::Parser::StatusParser do + subject { described_class.new(json) } + + let(:sender) { Fabricate(:account, followers_url: 'http://example.com/followers', domain: 'example.com', uri: 'https://example.com/actor') } + let(:follower) { Fabricate(:account, username: 'bob') } + + let(:json) do + { + '@context': 'https://www.w3.org/ns/activitystreams', + id: [ActivityPub::TagManager.instance.uri_for(sender), '#foo'].join, + type: 'Create', + actor: ActivityPub::TagManager.instance.uri_for(sender), + object: object_json, + }.with_indifferent_access + end + + let(:object_json) do + { + id: [ActivityPub::TagManager.instance.uri_for(sender), 'post1'].join('/'), + type: 'Note', + to: [ + 'https://www.w3.org/ns/activitystreams#Public', + ActivityPub::TagManager.instance.uri_for(follower), + ], + content: '@bob lorem ipsum', + contentMap: { + EN: '@bob lorem ipsum', + }, + published: 1.hour.ago.utc.iso8601, + updated: 1.hour.ago.utc.iso8601, + tag: { + type: 'Mention', + href: ActivityPub::TagManager.instance.uri_for(follower), + }, + } + end + + it 'correctly parses status' do + expect(subject).to have_attributes( + text: '@bob lorem ipsum', + uri: [ActivityPub::TagManager.instance.uri_for(sender), 'post1'].join('/'), + reply: false, + language: :en + ) + end +end From b6fd14f0e2842eca269ef8962e3c5bd560a76357 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 23 May 2024 20:22:42 +0200 Subject: [PATCH 112/113] Fix `createDataLoadingThunk` and related actions (#30408) --- .../mastodon/actions/account_notes.ts | 3 ++- .../mastodon/actions/interactions_typed.ts | 11 ++++++--- app/javascript/mastodon/api.ts | 6 ++--- app/javascript/mastodon/api/accounts.ts | 2 +- .../mastodon/containers/status_container.jsx | 4 ++-- .../containers/account_note_container.js | 2 +- .../containers/notification_container.js | 4 ++-- .../picture_in_picture/components/footer.jsx | 4 ++-- .../containers/detailed_status_container.js | 4 ++-- .../mastodon/features/status/index.jsx | 4 ++-- app/javascript/mastodon/reducers/statuses.js | 8 +++---- .../mastodon/store/typed_functions.ts | 24 +++++++++---------- 12 files changed, 41 insertions(+), 35 deletions(-) diff --git a/app/javascript/mastodon/actions/account_notes.ts b/app/javascript/mastodon/actions/account_notes.ts index bf4f93dca9e5c9..c2ebaf54a43055 100644 --- a/app/javascript/mastodon/actions/account_notes.ts +++ b/app/javascript/mastodon/actions/account_notes.ts @@ -3,7 +3,8 @@ import { createDataLoadingThunk } from 'mastodon/store/typed_functions'; export const submitAccountNote = createDataLoadingThunk( 'account_note/submit', - (accountId: string, note: string) => apiSubmitAccountNote(accountId, note), + ({ accountId, note }: { accountId: string; note: string }) => + apiSubmitAccountNote(accountId, note), (relationship) => ({ relationship }), { skipLoading: true }, ); diff --git a/app/javascript/mastodon/actions/interactions_typed.ts b/app/javascript/mastodon/actions/interactions_typed.ts index 51808060872cb0..f58faffa86d468 100644 --- a/app/javascript/mastodon/actions/interactions_typed.ts +++ b/app/javascript/mastodon/actions/interactions_typed.ts @@ -6,8 +6,13 @@ import { importFetchedStatus } from './importer'; export const reblog = createDataLoadingThunk( 'status/reblog', - (statusId: string, visibility: StatusVisibility) => - apiReblog(statusId, visibility), + ({ + statusId, + visibility, + }: { + statusId: string; + visibility: StatusVisibility; + }) => apiReblog(statusId, visibility), (data, { dispatch, discardLoadData }) => { // The reblog API method returns a new status wrapped around the original. In this case we are only // interested in how the original is modified, hence passing it skipping the wrapper @@ -20,7 +25,7 @@ export const reblog = createDataLoadingThunk( export const unreblog = createDataLoadingThunk( 'status/unreblog', - (statusId: string) => apiUnreblog(statusId), + ({ statusId }: { statusId: string }) => apiUnreblog(statusId), (data, { dispatch, discardLoadData }) => { dispatch(importFetchedStatus(data)); diff --git a/app/javascript/mastodon/api.ts b/app/javascript/mastodon/api.ts index 4e5ccef08cb56a..e133125a29cf33 100644 --- a/app/javascript/mastodon/api.ts +++ b/app/javascript/mastodon/api.ts @@ -62,12 +62,12 @@ export default function api(withAuthorization = true) { export async function apiRequest( method: Method, url: string, - params?: unknown, + params?: Record, ) { const { data } = await api().request({ method, - url, - params, + url: '/api/' + url, + data: params, }); return data; diff --git a/app/javascript/mastodon/api/accounts.ts b/app/javascript/mastodon/api/accounts.ts index 51b1f4f8de8dd4..3d89e44b2673d3 100644 --- a/app/javascript/mastodon/api/accounts.ts +++ b/app/javascript/mastodon/api/accounts.ts @@ -2,6 +2,6 @@ import { apiRequest } from 'mastodon/api'; import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships'; export const apiSubmitAccountNote = (id: string, value: string) => - apiRequest('post', `/api/v1/accounts/${id}/note`, { + apiRequest('post', `v1/accounts/${id}/note`, { comment: value, }); diff --git a/app/javascript/mastodon/containers/status_container.jsx b/app/javascript/mastodon/containers/status_container.jsx index 0174e5a02c5006..4a9b5257778b35 100644 --- a/app/javascript/mastodon/containers/status_container.jsx +++ b/app/javascript/mastodon/containers/status_container.jsx @@ -96,9 +96,9 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({ onModalReblog (status, privacy) { if (status.get('reblogged')) { - dispatch(unreblog(status.id)); + dispatch(unreblog({ statusId: status.get('id') })); } else { - dispatch(reblog(status.id, privacy)); + dispatch(reblog({ statusId: status.get('id'), visibility: privacy })); } }, diff --git a/app/javascript/mastodon/features/account/containers/account_note_container.js b/app/javascript/mastodon/features/account/containers/account_note_container.js index 9fbe0671c06d02..1530242d694992 100644 --- a/app/javascript/mastodon/features/account/containers/account_note_container.js +++ b/app/javascript/mastodon/features/account/containers/account_note_container.js @@ -11,7 +11,7 @@ const mapStateToProps = (state, { account }) => ({ const mapDispatchToProps = (dispatch, { account }) => ({ onSave (value) { - dispatch(submitAccountNote(account.get('id'), value)); + dispatch(submitAccountNote({ accountId: account.get('id'), note: value })); }, }); diff --git a/app/javascript/mastodon/features/notifications/containers/notification_container.js b/app/javascript/mastodon/features/notifications/containers/notification_container.js index d829cb833ea8af..650acf4ccd4aa9 100644 --- a/app/javascript/mastodon/features/notifications/containers/notification_container.js +++ b/app/javascript/mastodon/features/notifications/containers/notification_container.js @@ -39,12 +39,12 @@ const mapDispatchToProps = dispatch => ({ }, onModalReblog (status, privacy) { - dispatch(reblog(status.id, privacy)); + dispatch(reblog({ statusId: status.get('id'), visibility: privacy })); }, onReblog (status, e) { if (status.get('reblogged')) { - dispatch(unreblog(status.id)); + dispatch(unreblog({ statusId: status.get('id') })); } else { if (e.shiftKey || !boostModal) { this.onModalReblog(status); diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx index 1c142f3c104c3d..ba0642da288d55 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx @@ -123,7 +123,7 @@ class Footer extends ImmutablePureComponent { _performReblog = (status, privacy) => { const { dispatch } = this.props; - dispatch(reblog(status.id, privacy)); + dispatch(reblog({ statusId: status.get('id'), visibility: privacy })); }; handleReblogClick = e => { @@ -132,7 +132,7 @@ class Footer extends ImmutablePureComponent { if (signedIn) { if (status.get('reblogged')) { - dispatch(unreblog(status.id)); + dispatch(unreblog({ statusId: status.get('id') })); } else if ((e && e.shiftKey) || !boostModal) { this._performReblog(status); } else { diff --git a/app/javascript/mastodon/features/status/containers/detailed_status_container.js b/app/javascript/mastodon/features/status/containers/detailed_status_container.js index 91bc700e980d29..c3d4fec4dba47f 100644 --- a/app/javascript/mastodon/features/status/containers/detailed_status_container.js +++ b/app/javascript/mastodon/features/status/containers/detailed_status_container.js @@ -74,12 +74,12 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ }, onModalReblog (status, privacy) { - dispatch(reblog(status.id, privacy)); + dispatch(reblog({ statusId: status.get('id'), visibility: privacy })); }, onReblog (status, e) { if (status.get('reblogged')) { - dispatch(unreblog(status.id)); + dispatch(unreblog({ statusId: status.get('id') })); } else { if (e.shiftKey || !boostModal) { this.onModalReblog(status); diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 48f045a4afff1b..7f37cb50d2e51c 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -299,7 +299,7 @@ class Status extends ImmutablePureComponent { }; handleModalReblog = (status, privacy) => { - this.props.dispatch(reblog(status.id, privacy)); + this.props.dispatch(reblog({ statusId: status.get('id'), visibility: privacy })); }; handleReblogClick = (status, e) => { @@ -308,7 +308,7 @@ class Status extends ImmutablePureComponent { if (signedIn) { if (status.get('reblogged')) { - dispatch(unreblog(status.id)); + dispatch(unreblog({ statusId: status.get('id') })); } else { if ((e && e.shiftKey) || !boostModal) { this.handleModalReblog(status); diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js index 1da1c9cf2fa4d1..ca766f73a36e5d 100644 --- a/app/javascript/mastodon/reducers/statuses.js +++ b/app/javascript/mastodon/reducers/statuses.js @@ -122,13 +122,13 @@ export default function statuses(state = initialState, action) { return statusTranslateUndo(state, action.id); default: if(reblog.pending.match(action)) - return state.setIn([action.meta.params.statusId, 'reblogged'], true); + return state.setIn([action.meta.arg.statusId, 'reblogged'], true); else if(reblog.rejected.match(action)) - return state.get(action.meta.params.statusId) === undefined ? state : state.setIn([action.meta.params.statusId, 'reblogged'], false); + return state.get(action.meta.arg.statusId) === undefined ? state : state.setIn([action.meta.arg.statusId, 'reblogged'], false); else if(unreblog.pending.match(action)) - return state.setIn([action.meta.params.statusId, 'reblogged'], false); + return state.setIn([action.meta.arg.statusId, 'reblogged'], false); else if(unreblog.rejected.match(action)) - return state.get(action.meta.params.statusId) === undefined ? state : state.setIn([action.meta.params.statusId, 'reblogged'], true); + return state.get(action.meta.arg.statusId) === undefined ? state : state.setIn([action.meta.arg.statusId, 'reblogged'], true); else return state; } diff --git a/app/javascript/mastodon/store/typed_functions.ts b/app/javascript/mastodon/store/typed_functions.ts index 4b07a556107af9..0392f373c0c6bb 100644 --- a/app/javascript/mastodon/store/typed_functions.ts +++ b/app/javascript/mastodon/store/typed_functions.ts @@ -92,20 +92,20 @@ type OnData = ( // Overload when there is no `onData` method, the payload is the `onData` result export function createDataLoadingThunk< LoadDataResult, - Args extends readonly unknown[], + Args extends Record, >( name: string, - loadData: (...args: Args) => Promise, + loadData: (args: Args) => Promise, thunkOptions?: AppThunkOptions, ): ReturnType>; // Overload when the `onData` method returns discardLoadDataInPayload, then the payload is empty export function createDataLoadingThunk< LoadDataResult, - Args extends readonly unknown[], + Args extends Record, >( name: string, - loadData: (...args: Args) => Promise, + loadData: (args: Args) => Promise, onDataOrThunkOptions?: | AppThunkOptions | OnData, @@ -115,10 +115,10 @@ export function createDataLoadingThunk< // Overload when the `onData` method returns nothing, then the mayload is the `onData` result export function createDataLoadingThunk< LoadDataResult, - Args extends readonly unknown[], + Args extends Record, >( name: string, - loadData: (...args: Args) => Promise, + loadData: (args: Args) => Promise, onDataOrThunkOptions?: AppThunkOptions | OnData, thunkOptions?: AppThunkOptions, ): ReturnType>; @@ -126,11 +126,11 @@ export function createDataLoadingThunk< // Overload when there is an `onData` method returning something export function createDataLoadingThunk< LoadDataResult, - Args extends readonly unknown[], + Args extends Record, Returned, >( name: string, - loadData: (...args: Args) => Promise, + loadData: (args: Args) => Promise, onDataOrThunkOptions?: AppThunkOptions | OnData, thunkOptions?: AppThunkOptions, ): ReturnType>; @@ -142,7 +142,7 @@ export function createDataLoadingThunk< * * It is a wrapper around RTK's [`createAsyncThunk`](https://redux-toolkit.js.org/api/createAsyncThunk) * @param name Prefix for the actions types - * @param loadData Function that loads the data. It's arguments will become the thunk's arguments + * @param loadData Function that loads the data. It's (object) argument will become the thunk's argument * @param onDataOrThunkOptions * Callback called on the results from `loadData`. * @@ -162,11 +162,11 @@ export function createDataLoadingThunk< */ export function createDataLoadingThunk< LoadDataResult, - Args extends readonly unknown[], + Args extends Record, Returned, >( name: string, - loadData: (...args: Args) => Promise, + loadData: (args: Args) => Promise, onDataOrThunkOptions?: AppThunkOptions | OnData, maybeThunkOptions?: AppThunkOptions, ) { @@ -184,7 +184,7 @@ export function createDataLoadingThunk< return createThunk( name, async (arg, { getState, dispatch }) => { - const data = await loadData(...arg); + const data = await loadData(arg); if (!onData) return data as Returned; From dc7778cb8bab9d3a3791f96afe77eb9843ece3f7 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 24 May 2024 08:38:58 +0900 Subject: [PATCH 113/113] Fix rubocop --- app/helpers/registration_limitation_helper.rb | 2 +- app/lib/importer/public_statuses_index_importer.rb | 4 ++-- app/lib/importer/statuses_index_importer.rb | 4 ++-- app/lib/vacuum/list_statuses_vacuum.rb | 2 +- app/lib/vacuum/ng_histories_vacuum.rb | 4 ++-- app/models/concerns/account/interactions.rb | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/helpers/registration_limitation_helper.rb b/app/helpers/registration_limitation_helper.rb index 56523b816cdf54..c295dc074665b4 100644 --- a/app/helpers/registration_limitation_helper.rb +++ b/app/helpers/registration_limitation_helper.rb @@ -26,7 +26,7 @@ def today_increase_user_count end def today_increase_user_count_value - User.confirmed.enabled.where('users.created_at >= ?', Time.now.utc.beginning_of_day).joins(:account).merge(Account.without_suspended).count + User.confirmed.enabled.where(users: { created_at: Time.now.utc.beginning_of_day.. }).joins(:account).merge(Account.without_suspended).count end def registrations_in_time? diff --git a/app/lib/importer/public_statuses_index_importer.rb b/app/lib/importer/public_statuses_index_importer.rb index 02134dc2517052..14fb97e3fd2ec3 100644 --- a/app/lib/importer/public_statuses_index_importer.rb +++ b/app/lib/importer/public_statuses_index_importer.rb @@ -28,8 +28,8 @@ def index def scope to_index = Status.indexable.reorder(nil) - to_index = to_index.where('statuses.created_at >= ?', @from) if @from.present? - to_index = to_index.where('statuses.created_at < ?', @to) if @to.present? + to_index = to_index.where(statuses: { created_at: @from.. }) if @from.present? + to_index = to_index.where(statuses: { created_at: ...@to }) if @to.present? to_index end end diff --git a/app/lib/importer/statuses_index_importer.rb b/app/lib/importer/statuses_index_importer.rb index 5a8fa29c869b17..9ef58b1358134e 100644 --- a/app/lib/importer/statuses_index_importer.rb +++ b/app/lib/importer/statuses_index_importer.rb @@ -17,8 +17,8 @@ def import! bulk = ActiveRecord::Base.connection_pool.with_connection do to_index = index.adapter.default_scope.where(id: status_ids) - to_index = to_index.where('created_at >= ?', @from) if @from.present? - to_index = to_index.where('created_at < ?', @to) if @to.present? + to_index = to_index.where(created_at: @from..) if @from.present? + to_index = to_index.where(created_at: ...@to) if @to.present? crutches = Chewy::Index::Crutch::Crutches.new index, to_index to_index.map do |object| # This is unlikely to happen, but the post may have been diff --git a/app/lib/vacuum/list_statuses_vacuum.rb b/app/lib/vacuum/list_statuses_vacuum.rb index 41dca7602f6c1b..e89f6475aa6734 100644 --- a/app/lib/vacuum/list_statuses_vacuum.rb +++ b/app/lib/vacuum/list_statuses_vacuum.rb @@ -12,6 +12,6 @@ def perform private def vacuum_list_statuses! - ListStatus.where('created_at < ?', LIST_STATUS_LIFE_DURATION.ago).in_batches.destroy_all + ListStatus.where(created_at: ...LIST_STATUS_LIFE_DURATION.ago).in_batches.destroy_all end end diff --git a/app/lib/vacuum/ng_histories_vacuum.rb b/app/lib/vacuum/ng_histories_vacuum.rb index f70558f1160085..1b9f42d7fefbaf 100644 --- a/app/lib/vacuum/ng_histories_vacuum.rb +++ b/app/lib/vacuum/ng_histories_vacuum.rb @@ -12,7 +12,7 @@ def perform private def vacuum_histories! - NgwordHistory.where('created_at < ?', HISTORY_LIFE_DURATION.ago).in_batches.destroy_all - NgRuleHistory.where('created_at < ?', HISTORY_LIFE_DURATION.ago).in_batches.destroy_all + NgwordHistory.where(created_at: ...HISTORY_LIFE_DURATION.ago).in_batches.destroy_all + NgRuleHistory.where(created_at: ...HISTORY_LIFE_DURATION.ago).in_batches.destroy_all end end diff --git a/app/models/concerns/account/interactions.rb b/app/models/concerns/account/interactions.rb index 664ec056c10de9..979b2278dc8e08 100644 --- a/app/models/concerns/account/interactions.rb +++ b/app/models/concerns/account/interactions.rb @@ -212,7 +212,7 @@ def followed_by_domain?(other_domain, since = nil) return false unless local? scope = followers - scope = scope.where('follows.created_at < ?', since) if since.present? + scope = scope.where(follows: { created_at: ...since }) if since.present? scope.exists?(domain: other_domain) end