From 92fa9b109f78647710c52d86fa777ab3972e2f1b Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 06:56:47 -0500 Subject: [PATCH 01/49] Add spec coverage for media CLI usage command (#28167) --- spec/lib/mastodon/cli/media_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb index 9543640e96..305d67d28f 100644 --- a/spec/lib/mastodon/cli/media_spec.rb +++ b/spec/lib/mastodon/cli/media_spec.rb @@ -78,4 +78,16 @@ describe Mastodon::CLI::Media do end end end + + describe '#usage' do + context 'without options' do + let(:options) { {} } + + it 'reports about storage size' do + expect { cli.invoke(:usage, [], options) }.to output( + a_string_including('0 Bytes') + ).to_stdout + end + end + end end From 7753e5f715ba105a8ec3dd335e8af4a9448aee63 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 07:00:34 -0500 Subject: [PATCH 02/49] Add shared example for CLI command specs (#28165) --- spec/lib/mastodon/cli/accounts_spec.rb | 8 ++------ spec/lib/mastodon/cli/cache_spec.rb | 6 +----- spec/lib/mastodon/cli/canonical_email_blocks_spec.rb | 6 +----- spec/lib/mastodon/cli/domains_spec.rb | 6 +----- spec/lib/mastodon/cli/email_domain_blocks_spec.rb | 6 +----- spec/lib/mastodon/cli/emoji_spec.rb | 6 +----- spec/lib/mastodon/cli/feeds_spec.rb | 6 +----- spec/lib/mastodon/cli/ip_blocks_spec.rb | 6 +----- spec/lib/mastodon/cli/main_spec.rb | 6 +----- spec/lib/mastodon/cli/maintenance_spec.rb | 6 +----- spec/lib/mastodon/cli/media_spec.rb | 6 +----- spec/lib/mastodon/cli/preview_cards_spec.rb | 6 +----- spec/lib/mastodon/cli/search_spec.rb | 6 +----- spec/lib/mastodon/cli/settings_spec.rb | 6 +----- spec/lib/mastodon/cli/statuses_spec.rb | 6 +----- spec/lib/mastodon/cli/upgrade_spec.rb | 6 +----- spec/support/examples/cli.rb | 11 +++++++++++ 17 files changed, 28 insertions(+), 81 deletions(-) create mode 100644 spec/support/examples/cli.rb diff --git a/spec/lib/mastodon/cli/accounts_spec.rb b/spec/lib/mastodon/cli/accounts_spec.rb index 626cf4778c..3216d0d1bd 100644 --- a/spec/lib/mastodon/cli/accounts_spec.rb +++ b/spec/lib/mastodon/cli/accounts_spec.rb @@ -6,6 +6,8 @@ require 'mastodon/cli/accounts' describe Mastodon::CLI::Accounts do let(:cli) { described_class.new } + it_behaves_like 'CLI Command' + # `parallelize_with_progress` cannot run in transactions, so instead, # stub it with an alternative implementation that runs sequentially # and can run in transactions. @@ -24,12 +26,6 @@ describe Mastodon::CLI::Accounts do end end - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end - describe '#create' do shared_examples 'a new user with given email address and username' do it 'creates a new user with the specified email address' do diff --git a/spec/lib/mastodon/cli/cache_spec.rb b/spec/lib/mastodon/cli/cache_spec.rb index 3ab42dc8ce..c1ce04710c 100644 --- a/spec/lib/mastodon/cli/cache_spec.rb +++ b/spec/lib/mastodon/cli/cache_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/cache' describe Mastodon::CLI::Cache do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#clear' do before { allow(Rails.cache).to receive(:clear) } diff --git a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb index eb57a3cd15..6e4675748e 100644 --- a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb +++ b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/canonical_email_blocks' describe Mastodon::CLI::CanonicalEmailBlocks do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#find' do let(:arguments) { ['user@example.com'] } diff --git a/spec/lib/mastodon/cli/domains_spec.rb b/spec/lib/mastodon/cli/domains_spec.rb index ea58845c00..765b63e2a7 100644 --- a/spec/lib/mastodon/cli/domains_spec.rb +++ b/spec/lib/mastodon/cli/domains_spec.rb @@ -4,9 +4,5 @@ require 'rails_helper' require 'mastodon/cli/domains' describe Mastodon::CLI::Domains do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' end diff --git a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb index 333ae3f2b7..060943b188 100644 --- a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb +++ b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb @@ -4,9 +4,5 @@ require 'rails_helper' require 'mastodon/cli/email_domain_blocks' describe Mastodon::CLI::EmailDomainBlocks do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' end diff --git a/spec/lib/mastodon/cli/emoji_spec.rb b/spec/lib/mastodon/cli/emoji_spec.rb index 9b58653729..5d109eb524 100644 --- a/spec/lib/mastodon/cli/emoji_spec.rb +++ b/spec/lib/mastodon/cli/emoji_spec.rb @@ -4,9 +4,5 @@ require 'rails_helper' require 'mastodon/cli/emoji' describe Mastodon::CLI::Emoji do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' end diff --git a/spec/lib/mastodon/cli/feeds_spec.rb b/spec/lib/mastodon/cli/feeds_spec.rb index 030f087212..e16113c854 100644 --- a/spec/lib/mastodon/cli/feeds_spec.rb +++ b/spec/lib/mastodon/cli/feeds_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/feeds' describe Mastodon::CLI::Feeds do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#build' do before { Fabricate(:account) } diff --git a/spec/lib/mastodon/cli/ip_blocks_spec.rb b/spec/lib/mastodon/cli/ip_blocks_spec.rb index 030d9fcb19..684314dc7a 100644 --- a/spec/lib/mastodon/cli/ip_blocks_spec.rb +++ b/spec/lib/mastodon/cli/ip_blocks_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/ip_blocks' describe Mastodon::CLI::IpBlocks do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#add' do let(:ip_list) do diff --git a/spec/lib/mastodon/cli/main_spec.rb b/spec/lib/mastodon/cli/main_spec.rb index e3709afe37..b5b5d69062 100644 --- a/spec/lib/mastodon/cli/main_spec.rb +++ b/spec/lib/mastodon/cli/main_spec.rb @@ -4,11 +4,7 @@ require 'rails_helper' require 'mastodon/cli/main' describe Mastodon::CLI::Main do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe 'version' do it 'returns the Mastodon version' do diff --git a/spec/lib/mastodon/cli/maintenance_spec.rb b/spec/lib/mastodon/cli/maintenance_spec.rb index a6789ea5a4..95e695ab55 100644 --- a/spec/lib/mastodon/cli/maintenance_spec.rb +++ b/spec/lib/mastodon/cli/maintenance_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/maintenance' describe Mastodon::CLI::Maintenance do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#fix_duplicates' do context 'when the database version is too old' do diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb index 305d67d28f..15f84c14b8 100644 --- a/spec/lib/mastodon/cli/media_spec.rb +++ b/spec/lib/mastodon/cli/media_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/media' describe Mastodon::CLI::Media do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#remove' do context 'with --prune-profiles and --remove-headers' do diff --git a/spec/lib/mastodon/cli/preview_cards_spec.rb b/spec/lib/mastodon/cli/preview_cards_spec.rb index 1e064ed58e..a766d250eb 100644 --- a/spec/lib/mastodon/cli/preview_cards_spec.rb +++ b/spec/lib/mastodon/cli/preview_cards_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/preview_cards' describe Mastodon::CLI::PreviewCards do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#remove' do context 'with relevant preview cards' do diff --git a/spec/lib/mastodon/cli/search_spec.rb b/spec/lib/mastodon/cli/search_spec.rb index d5cae5bf49..785dc2bd61 100644 --- a/spec/lib/mastodon/cli/search_spec.rb +++ b/spec/lib/mastodon/cli/search_spec.rb @@ -4,9 +4,5 @@ require 'rails_helper' require 'mastodon/cli/search' describe Mastodon::CLI::Search do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' end diff --git a/spec/lib/mastodon/cli/settings_spec.rb b/spec/lib/mastodon/cli/settings_spec.rb index ae58e74e56..7dcd1110ba 100644 --- a/spec/lib/mastodon/cli/settings_spec.rb +++ b/spec/lib/mastodon/cli/settings_spec.rb @@ -4,11 +4,7 @@ require 'rails_helper' require 'mastodon/cli/settings' describe Mastodon::CLI::Settings do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe 'subcommand "registrations"' do let(:cli) { Mastodon::CLI::Registrations.new } diff --git a/spec/lib/mastodon/cli/statuses_spec.rb b/spec/lib/mastodon/cli/statuses_spec.rb index 38ebcd9934..70e4e2c086 100644 --- a/spec/lib/mastodon/cli/statuses_spec.rb +++ b/spec/lib/mastodon/cli/statuses_spec.rb @@ -6,11 +6,7 @@ require 'mastodon/cli/statuses' describe Mastodon::CLI::Statuses do let(:cli) { described_class.new } - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' describe '#remove', use_transactional_tests: false do context 'with small batch size' do diff --git a/spec/lib/mastodon/cli/upgrade_spec.rb b/spec/lib/mastodon/cli/upgrade_spec.rb index 9e0ab9d06e..817044f7ea 100644 --- a/spec/lib/mastodon/cli/upgrade_spec.rb +++ b/spec/lib/mastodon/cli/upgrade_spec.rb @@ -4,9 +4,5 @@ require 'rails_helper' require 'mastodon/cli/upgrade' describe Mastodon::CLI::Upgrade do - describe '.exit_on_failure?' do - it 'returns true' do - expect(described_class.exit_on_failure?).to be true - end - end + it_behaves_like 'CLI Command' end diff --git a/spec/support/examples/cli.rb b/spec/support/examples/cli.rb new file mode 100644 index 0000000000..091c842bd1 --- /dev/null +++ b/spec/support/examples/cli.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +shared_examples 'CLI Command' do + it 'configures Thor to exit on failure' do + expect(described_class.exit_on_failure?).to be true + end + + it 'descends from the CLI base class' do + expect(described_class.new).to be_a(Mastodon::CLI::Base) + end +end From 1564799952ec4b8039eecb28125493814bd56ed0 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 09:18:45 -0500 Subject: [PATCH 03/49] Add spec coverage for media CLI `refresh` command (#28166) --- lib/mastodon/cli/media.rb | 1 + spec/lib/mastodon/cli/media_spec.rb | 73 +++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/lib/mastodon/cli/media.rb b/lib/mastodon/cli/media.rb index c906161770..c3275b799f 100644 --- a/lib/mastodon/cli/media.rb +++ b/lib/mastodon/cli/media.rb @@ -265,6 +265,7 @@ module Mastodon::CLI elsif options[:days].present? scope = MediaAttachment.remote else + say('Specify the source of media attachments', :red) exit(1) end diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb index 15f84c14b8..6d510c1f5a 100644 --- a/spec/lib/mastodon/cli/media_spec.rb +++ b/spec/lib/mastodon/cli/media_spec.rb @@ -86,4 +86,77 @@ describe Mastodon::CLI::Media do end end end + + describe '#refresh' do + context 'without any options' do + let(:options) { {} } + + it 'warns about usage and exits' do + expect { cli.invoke(:refresh, [], options) }.to output( + a_string_including('Specify the source') + ).to_stdout.and raise_error(SystemExit) + end + end + + context 'with --status option' do + before do + media_attachment.update(file_file_name: nil) + end + + let(:media_attachment) { Fabricate(:media_attachment, status: status, remote_url: 'https://host.example/asset.jpg') } + let(:options) { { status: status.id } } + let(:status) { Fabricate(:status) } + + it 'redownloads the attachment file' do + expect { cli.invoke(:refresh, [], options) }.to output( + a_string_including('Downloaded 1 media') + ).to_stdout + end + end + + context 'with --account option' do + context 'when the account does not exist' do + let(:options) { { account: 'not-real-user@example.host' } } + + it 'warns about usage and exits' do + expect { cli.invoke(:refresh, [], options) }.to output( + a_string_including('No such account') + ).to_stdout.and raise_error(SystemExit) + end + end + + context 'when the account exists' do + before do + media_attachment.update(file_file_name: nil) + end + + let(:media_attachment) { Fabricate(:media_attachment, account: account) } + let(:options) { { account: account.acct } } + let(:account) { Fabricate(:account) } + + it 'redownloads the attachment file' do + expect { cli.invoke(:refresh, [], options) }.to output( + a_string_including('Downloaded 1 media') + ).to_stdout + end + end + end + + context 'with --domain option' do + before do + media_attachment.update(file_file_name: nil) + end + + let(:domain) { 'example.host' } + let(:media_attachment) { Fabricate(:media_attachment, account: account) } + let(:options) { { domain: domain } } + let(:account) { Fabricate(:account, domain: domain) } + + it 'redownloads the attachment file' do + expect { cli.invoke(:refresh, [], options) }.to output( + a_string_including('Downloaded 1 media') + ).to_stdout + end + end + end end From f70f39dd04886c2ced6d424cdcb8690fcddd52f7 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 10:52:47 -0500 Subject: [PATCH 04/49] Add explicit `dependent: nil` to associations (#28169) --- .rubocop_todo.yml | 14 -------------- app/models/concerns/account/counters.rb | 2 +- app/models/conversation.rb | 2 +- app/models/custom_emoji.rb | 2 +- app/models/custom_emoji_category.rb | 2 +- app/models/domain_block.rb | 2 +- app/models/invite.rb | 2 +- app/models/status.rb | 14 +++++++++----- app/models/user.rb | 8 ++++---- app/models/web/push_subscription.rb | 2 +- 10 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9fb163ceb9..03543c8e0d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -112,20 +112,6 @@ Rails/HasAndBelongsToMany: - 'app/models/status.rb' - 'app/models/tag.rb' -# Configuration parameters: Include. -# Include: app/models/**/*.rb -Rails/HasManyOrHasOneDependent: - Exclude: - - 'app/models/concerns/account/counters.rb' - - 'app/models/conversation.rb' - - 'app/models/custom_emoji.rb' - - 'app/models/custom_emoji_category.rb' - - 'app/models/domain_block.rb' - - 'app/models/invite.rb' - - 'app/models/status.rb' - - 'app/models/user.rb' - - 'app/models/web/push_subscription.rb' - # Configuration parameters: Include. # Include: app/controllers/**/*.rb, app/mailers/**/*.rb Rails/LexicallyScopedActionFilter: diff --git a/app/models/concerns/account/counters.rb b/app/models/concerns/account/counters.rb index fb69be9b70..4488398128 100644 --- a/app/models/concerns/account/counters.rb +++ b/app/models/concerns/account/counters.rb @@ -6,7 +6,7 @@ module Account::Counters ALLOWED_COUNTER_KEYS = %i(statuses_count following_count followers_count).freeze included do - has_one :account_stat, inverse_of: :account + has_one :account_stat, inverse_of: :account, dependent: nil after_save :save_account_stat end diff --git a/app/models/conversation.rb b/app/models/conversation.rb index 5de2599627..a7fe148840 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -13,7 +13,7 @@ class Conversation < ApplicationRecord validates :uri, uniqueness: true, if: :uri? - has_many :statuses + has_many :statuses, dependent: nil def local? uri.nil? diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index 717de27723..97b1c63bf3 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -37,7 +37,7 @@ class CustomEmoji < ApplicationRecord belongs_to :category, class_name: 'CustomEmojiCategory', optional: true - has_one :local_counterpart, -> { where(domain: nil) }, class_name: 'CustomEmoji', primary_key: :shortcode, foreign_key: :shortcode, inverse_of: false + has_one :local_counterpart, -> { where(domain: nil) }, class_name: 'CustomEmoji', primary_key: :shortcode, foreign_key: :shortcode, inverse_of: false, dependent: nil has_attached_file :image, styles: { static: { format: 'png', convert_options: '-coalesce +profile "!icc,*" +set date:modify +set date:create +set date:timestamp' } }, validate_media_type: false diff --git a/app/models/custom_emoji_category.rb b/app/models/custom_emoji_category.rb index 3c87f2b2e5..f480746517 100644 --- a/app/models/custom_emoji_category.rb +++ b/app/models/custom_emoji_category.rb @@ -11,7 +11,7 @@ # class CustomEmojiCategory < ApplicationRecord - has_many :emojis, class_name: 'CustomEmoji', foreign_key: 'category_id', inverse_of: :category + has_many :emojis, class_name: 'CustomEmoji', foreign_key: 'category_id', inverse_of: :category, dependent: nil validates :name, presence: true, uniqueness: true end diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb index a7af2d62e2..ff23f8fcc4 100644 --- a/app/models/domain_block.rb +++ b/app/models/domain_block.rb @@ -25,7 +25,7 @@ class DomainBlock < ApplicationRecord validates :domain, presence: true, uniqueness: true, domain: true - has_many :accounts, foreign_key: :domain, primary_key: :domain, inverse_of: false + has_many :accounts, foreign_key: :domain, primary_key: :domain, inverse_of: false, dependent: nil delegate :count, to: :accounts, prefix: true scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) } diff --git a/app/models/invite.rb b/app/models/invite.rb index 8e816cef06..c0cbc58458 100644 --- a/app/models/invite.rb +++ b/app/models/invite.rb @@ -20,7 +20,7 @@ class Invite < ApplicationRecord include Expireable belongs_to :user, inverse_of: :invites - has_many :users, inverse_of: :invite + has_many :users, inverse_of: :invite, dependent: nil scope :available, -> { where(expires_at: nil).or(where('expires_at >= ?', Time.now.utc)) } diff --git a/app/models/status.rb b/app/models/status.rb index 7b1ca69c7c..eb7159dc61 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -66,12 +66,14 @@ class Status < ApplicationRecord has_many :bookmarks, inverse_of: :status, dependent: :destroy has_many :reblogs, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblog, dependent: :destroy has_many :reblogged_by_accounts, through: :reblogs, class_name: 'Account', source: :account - has_many :replies, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :thread + has_many :replies, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :thread, dependent: nil has_many :mentions, dependent: :destroy, inverse_of: :status has_many :mentioned_accounts, through: :mentions, source: :account, class_name: 'Account' - has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status has_many :media_attachments, dependent: :nullify + # The `dependent` option is enabled by the initial `mentions` association declaration + has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status # rubocop:disable Rails/HasManyOrHasOneDependent + # Those associations are used for the private search index has_many :local_mentioned, -> { merge(Account.local) }, through: :active_mentions, source: :account has_many :local_favorited, -> { merge(Account.local) }, through: :favourites, source: :account @@ -80,11 +82,13 @@ class Status < ApplicationRecord has_and_belongs_to_many :tags - has_one :preview_cards_status, inverse_of: :status # Because of a composite primary key, the dependent option cannot be used + # Because of a composite primary key, the `dependent` option cannot be used on this association + has_one :preview_cards_status, inverse_of: :status # rubocop:disable Rails/HasManyOrHasOneDependent + has_one :notification, as: :activity, dependent: :destroy - has_one :status_stat, inverse_of: :status + has_one :status_stat, inverse_of: :status, dependent: nil has_one :poll, inverse_of: :status, dependent: :destroy - has_one :trend, class_name: 'StatusTrend', inverse_of: :status + has_one :trend, class_name: 'StatusTrend', inverse_of: :status, dependent: nil validates :uri, uniqueness: true, presence: true, unless: :local? validates :text, presence: true, unless: -> { with_media? || reblog? } diff --git a/app/models/user.rb b/app/models/user.rb index 550f8bfd30..a1574c02ad 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -84,12 +84,12 @@ class User < ApplicationRecord belongs_to :role, class_name: 'UserRole', optional: true accepts_nested_attributes_for :account - has_many :applications, class_name: 'Doorkeeper::Application', as: :owner - has_many :backups, inverse_of: :user - has_many :invites, inverse_of: :user + has_many :applications, class_name: 'Doorkeeper::Application', as: :owner, dependent: nil + has_many :backups, inverse_of: :user, dependent: nil + has_many :invites, inverse_of: :user, dependent: nil has_many :markers, inverse_of: :user, dependent: :destroy has_many :webauthn_credentials, dependent: :destroy - has_many :ips, class_name: 'UserIp', inverse_of: :user + has_many :ips, class_name: 'UserIp', inverse_of: :user, dependent: nil has_one :invite_request, class_name: 'UserInviteRequest', inverse_of: :user, dependent: :destroy accepts_nested_attributes_for :invite_request, reject_if: ->(attributes) { attributes['text'].blank? && !Setting.require_invite_text } diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb index 0ffbe068eb..a3a2ec3f03 100644 --- a/app/models/web/push_subscription.rb +++ b/app/models/web/push_subscription.rb @@ -19,7 +19,7 @@ class Web::PushSubscription < ApplicationRecord belongs_to :user, optional: true belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', optional: true - has_one :session_activation, foreign_key: 'web_push_subscription_id', inverse_of: :web_push_subscription + has_one :session_activation, foreign_key: 'web_push_subscription_id', inverse_of: :web_push_subscription, dependent: nil validates :endpoint, presence: true validates :key_p256dh, presence: true From a98fccf84e9deed1ea1aa52b5adbc0c1f0bdfaab Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 10:52:52 -0500 Subject: [PATCH 05/49] Fix `Style/SelfAssignment` cop (#28171) --- lib/mastodon/snowflake.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/snowflake.rb b/lib/mastodon/snowflake.rb index 0a596b2940..ec4f6140ca 100644 --- a/lib/mastodon/snowflake.rb +++ b/lib/mastodon/snowflake.rb @@ -99,7 +99,7 @@ module Mastodon::Snowflake def id_at(timestamp, with_random: true) id = timestamp.to_i * 1000 id += rand(1000) if with_random - id = id << 16 + id <<= 16 id += rand(2**16) if with_random id end From d83d01eb1e2f2ae56cd3f3a40e254fcfec51360c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 10:52:56 -0500 Subject: [PATCH 06/49] Fix `Lint/RedundantSafeNavigation` cop (#28172) --- app/controllers/api/v1/accounts_controller.rb | 2 +- app/models/trends/history.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 653529316f..be251b4259 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -49,7 +49,7 @@ class Api::V1::AccountsController < Api::BaseController end def mute - MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: (params[:duration]&.to_i || 0)) + MuteService.new.call(current_user.account, @account, notifications: truthy_param?(:notifications), duration: params[:duration].to_i) render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships end diff --git a/app/models/trends/history.rb b/app/models/trends/history.rb index db36899337..21331f00dc 100644 --- a/app/models/trends/history.rb +++ b/app/models/trends/history.rb @@ -37,7 +37,7 @@ class Trends::History end def uses - with_redis { |redis| redis.get(key_for(:uses))&.to_i || 0 } + with_redis { |redis| redis.get(key_for(:uses)).to_i } end def add(account_id) From aa8563d43df93647db50e52eddccba63500e0c88 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 10:53:15 -0500 Subject: [PATCH 07/49] Fix `Style/SuperWithArgsParentheses` cop (#28174) --- spec/support/signed_request_helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/signed_request_helpers.rb b/spec/support/signed_request_helpers.rb index 33d7dba6b8..eba4095e43 100644 --- a/spec/support/signed_request_helpers.rb +++ b/spec/support/signed_request_helpers.rb @@ -2,7 +2,7 @@ module SignedRequestHelpers def get(path, headers: nil, sign_with: nil, **args) - return super path, headers: headers, **args if sign_with.nil? + return super(path, headers: headers, **args) if sign_with.nil? headers ||= {} headers['Date'] = Time.now.utc.httpdate @@ -16,6 +16,6 @@ module SignedRequestHelpers headers['Signature'] = "keyId=\"#{key_id}\",algorithm=\"rsa-sha256\",headers=\"#{signed_headers.keys.join(' ').downcase}\",signature=\"#{signature}\"" - super path, headers: headers, **args + super(path, headers: headers, **args) end end From 5631f139c1f6f923923a82f8c55d5ab0820a2788 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 10:53:35 -0500 Subject: [PATCH 08/49] Fix `Lint/SymbolConversion` cop (#28175) --- app/models/concerns/remotable.rb | 2 +- app/models/user_settings/setting.rb | 2 +- config/deploy.rb | 2 +- spec/models/concerns/remotable_spec.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/concerns/remotable.rb b/app/models/concerns/remotable.rb index cb8f46e688..bd8b6f4eb9 100644 --- a/app/models/concerns/remotable.rb +++ b/app/models/concerns/remotable.rb @@ -5,7 +5,7 @@ module Remotable class_methods do def remotable_attachment(attachment_name, limit, suppress_errors: true, download_on_assign: true, attribute_name: nil) - attribute_name ||= "#{attachment_name}_remote_url".to_sym + attribute_name ||= :"#{attachment_name}_remote_url" define_method("download_#{attachment_name}!") do |url = nil| url ||= self[attribute_name] diff --git a/app/models/user_settings/setting.rb b/app/models/user_settings/setting.rb index 9c17017440..1ab6cbeab2 100644 --- a/app/models/user_settings/setting.rb +++ b/app/models/user_settings/setting.rb @@ -62,7 +62,7 @@ class UserSettings::Setting def key if namespace - "#{namespace}.#{name}".to_sym + :"#{namespace}.#{name}" else name end diff --git a/config/deploy.rb b/config/deploy.rb index b19567a729..75bfcc26f4 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -20,7 +20,7 @@ namespace :systemd do SYSTEMD_SERVICES.each do |service| SERVICE_ACTIONS.each do |action| desc "Perform a #{action} on #{service} service" - task "#{service}:#{action}".to_sym do + task :"#{service}:#{action}" do on roles(:app) do # runs e.g. "sudo restart mastodon-sidekiq.service" sudo :systemctl, action, "#{fetch(:application)}-#{service}.service" diff --git a/spec/models/concerns/remotable_spec.rb b/spec/models/concerns/remotable_spec.rb index db690da3c2..9f6aeb7fb4 100644 --- a/spec/models/concerns/remotable_spec.rb +++ b/spec/models/concerns/remotable_spec.rb @@ -31,7 +31,7 @@ RSpec.describe Remotable do end end - let(:attribute_name) { "#{hoge}_remote_url".to_sym } + let(:attribute_name) { :"#{hoge}_remote_url" } let(:code) { 200 } let(:file) { 'filename="foo.txt"' } let(:foo) { foo_class.new } From 3bc437b99a19bba26c0c637b18ce6c7410d5a606 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 11:00:44 -0500 Subject: [PATCH 09/49] Fix `Style/RedundantParentheses` cop (#28176) --- app/controllers/api/base_controller.rb | 2 +- app/lib/feed_manager.rb | 4 ++-- lib/mastodon/cli/media.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index c81ba32b08..b3c60fcaf4 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -64,7 +64,7 @@ class Api::BaseController < ApplicationController end def doorkeeper_unauthorized_render_options(error: nil) - { json: { error: (error.try(:description) || 'Not authorized') } } + { json: { error: error.try(:description) || 'Not authorized' } } end def doorkeeper_forbidden_render_options(*) diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 4e645a11f6..53767486ff 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -420,8 +420,8 @@ class FeedManager check_for_blocks = status.active_mentions.pluck(:account_id) check_for_blocks.push(status.in_reply_to_account) if status.reply? && !status.in_reply_to_account_id.nil? - should_filter = blocks_or_mutes?(receiver_id, check_for_blocks, :mentions) # Filter if it's from someone I blocked, in reply to someone I blocked, or mentioning someone I blocked (or muted) - should_filter ||= (status.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.account_id).exists?) # of if the account is silenced and I'm not following them + should_filter = blocks_or_mutes?(receiver_id, check_for_blocks, :mentions) # Filter if it's from someone I blocked, in reply to someone I blocked, or mentioning someone I blocked (or muted) + should_filter ||= status.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.account_id).exists? # of if the account is silenced and I'm not following them should_filter end diff --git a/lib/mastodon/cli/media.rb b/lib/mastodon/cli/media.rb index c3275b799f..a796bb729a 100644 --- a/lib/mastodon/cli/media.rb +++ b/lib/mastodon/cli/media.rb @@ -48,8 +48,8 @@ module Mastodon::CLI next if account.avatar.blank? && account.header.blank? next if options[:remove_headers] && account.header.blank? - size = (account.header_file_size || 0) - size += (account.avatar_file_size || 0) if options[:prune_profiles] + size = account.header_file_size || 0 + size += account.avatar_file_size || 0 if options[:prune_profiles] unless dry_run? account.header.destroy From 469ee2ae36d0c4b355fd5486c294133be75288a0 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 1 Dec 2023 11:07:19 -0500 Subject: [PATCH 10/49] Fix `Style/HashEachMethods` cop (#28173) --- db/seeds/03_roles.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/seeds/03_roles.rb b/db/seeds/03_roles.rb index 8b359582b5..95a989a95c 100644 --- a/db/seeds/03_roles.rb +++ b/db/seeds/03_roles.rb @@ -6,6 +6,6 @@ UserRole.everyone # Create default roles defined in config file default_roles = YAML.load_file(Rails.root.join('config', 'roles.yml')) -default_roles.each do |_, config| +default_roles.each_value do |config| UserRole.create_with(position: config['position'], permissions_as_keys: config['permissions'], highlighted: true).find_or_create_by(name: config['name']) end From 456597dae5251af841e46ab0608e0d44a7de1197 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:22:15 +0100 Subject: [PATCH 11/49] Update dependency doorkeeper to v5.6.8 (#28177) 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 40f85c7d48..4c78e6b0a8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -245,7 +245,7 @@ GEM docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.6.7) + doorkeeper (5.6.8) railties (>= 5) dotenv (2.8.1) dotenv-rails (2.8.1) @@ -617,7 +617,7 @@ GEM redlock (1.3.2) redis (>= 3.0.0, < 6.0) regexp_parser (2.8.2) - reline (0.4.0) + reline (0.4.1) io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) From 0ca7a50e96f8ff596de7432462a5e92a98de5e38 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 09:50:28 +0100 Subject: [PATCH 12/49] Update devDependencies (non-major) (#28200) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 142 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 102 insertions(+), 40 deletions(-) diff --git a/yarn.lock b/yarn.lock index ad792d26c5..3ec0235337 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2893,8 +2893,8 @@ __metadata: linkType: hard "@testing-library/jest-dom@npm:^6.0.0": - version: 6.1.4 - resolution: "@testing-library/jest-dom@npm:6.1.4" + version: 6.1.5 + resolution: "@testing-library/jest-dom@npm:6.1.5" dependencies: "@adobe/css-tools": "npm:^4.3.1" "@babel/runtime": "npm:^7.9.2" @@ -2918,7 +2918,7 @@ __metadata: optional: true vitest: optional: true - checksum: 2e23f120613fd8ae6d5169bbc94f1a2e4c82b07182057dc94db8ec54ebf32555833442e6c43a187e59715d83704ffb5df49ba88a71f6f32d2683f3d95ba721c7 + checksum: f3643a56fcd970b5c7e8fd10faf3c4817d8ab0e74fb1198d726643bdc5ac675ceaac3b0068c5b4fbad254470e8f98ed50028741de875a29ceaa2f854570979c9 languageName: node linkType: hard @@ -4168,12 +4168,12 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^5.0.0": - version: 5.0.0 - resolution: "ansi-escapes@npm:5.0.0" +"ansi-escapes@npm:^6.2.0": + version: 6.2.0 + resolution: "ansi-escapes@npm:6.2.0" dependencies: - type-fest: "npm:^1.0.2" - checksum: f705cc7fbabb981ddf51562cd950792807bccd7260cc3d9478a619dda62bff6634c87ca100f2545ac7aade9b72652c4edad8c7f0d31a0b949b5fa58f33eaf0d0 + type-fest: "npm:^3.0.0" + checksum: 3eec75deedd8b10192c5f98e4cd9715cc3ff268d33fc463c24b7d22446668bfcd4ad1803993ea89c0f51f88b5a3399572bacb7c8cb1a067fc86e189c5f3b0c7e languageName: node linkType: hard @@ -4239,7 +4239,7 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0": +"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" checksum: 5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c @@ -5584,13 +5584,13 @@ __metadata: languageName: node linkType: hard -"cli-truncate@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-truncate@npm:3.1.0" +"cli-truncate@npm:^4.0.0": + version: 4.0.0 + resolution: "cli-truncate@npm:4.0.0" dependencies: slice-ansi: "npm:^5.0.0" - string-width: "npm:^5.0.0" - checksum: a19088878409ec0e5dc2659a5166929629d93cfba6d68afc9cde2282fd4c751af5b555bf197047e31c87c574396348d011b7aa806fec29c4139ea4f7f00b324c + string-width: "npm:^7.0.0" + checksum: d7f0b73e3d9b88cb496e6c086df7410b541b56a43d18ade6a573c9c18bd001b1c3fba1ad578f741a4218fdc794d042385f8ac02c25e1c295a2d8b9f3cb86eb4c languageName: node linkType: hard @@ -6997,7 +6997,7 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:10.3.0, emoji-regex@npm:^10.2.1": +"emoji-regex@npm:10.3.0, emoji-regex@npm:^10.2.1, emoji-regex@npm:^10.3.0": version: 10.3.0 resolution: "emoji-regex@npm:10.3.0" checksum: b4838e8dcdceb44cf47f59abe352c25ff4fe7857acaf5fb51097c427f6f75b44d052eb907a7a3b86f86bc4eae3a93f5c2b7460abe79c407307e6212d65c91163 @@ -8387,6 +8387,13 @@ __metadata: languageName: node linkType: hard +"get-east-asian-width@npm:^1.0.0": + version: 1.2.0 + resolution: "get-east-asian-width@npm:1.2.0" + checksum: 914b1e217cf38436c24b4c60b4c45289e39a45bf9e65ef9fd343c2815a1a02b8a0215aeec8bf9c07c516089004b6e3826332481f40a09529fcadbf6e579f286b + languageName: node + linkType: hard + "get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": version: 1.2.2 resolution: "get-intrinsic@npm:1.2.2" @@ -9610,6 +9617,15 @@ __metadata: languageName: node linkType: hard +"is-fullwidth-code-point@npm:^5.0.0": + version: 5.0.0 + resolution: "is-fullwidth-code-point@npm:5.0.0" + dependencies: + get-east-asian-width: "npm:^1.0.0" + checksum: cd591b27d43d76b05fa65ed03eddce57a16e1eca0b7797ff7255de97019bcaf0219acfc0c4f7af13319e13541f2a53c0ace476f442b13267b9a6a7568f2b65c8 + languageName: node + linkType: hard + "is-generator-fn@npm:^2.0.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" @@ -10892,7 +10908,14 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:2.1.0, lilconfig@npm:^2.1.0": +"lilconfig@npm:3.0.0": + version: 3.0.0 + resolution: "lilconfig@npm:3.0.0" + checksum: 7f5ee7a658dc016cacf146815e8d88b06f06f4402823b8b0934e305a57a197f55ccc9c5cd4fb5ea1b2b821c8ccaf2d54abd59602a4931af06eabda332388d3e6 + languageName: node + linkType: hard + +"lilconfig@npm:^2.1.0": version: 2.1.0 resolution: "lilconfig@npm:2.1.0" checksum: 64645641aa8d274c99338e130554abd6a0190533c0d9eb2ce7ebfaf2e05c7d9961f3ffe2bfa39efd3b60c521ba3dd24fa236fe2775fc38501bf82bf49d4678b8 @@ -10907,36 +10930,36 @@ __metadata: linkType: hard "lint-staged@npm:^15.0.0": - version: 15.1.0 - resolution: "lint-staged@npm:15.1.0" + version: 15.2.0 + resolution: "lint-staged@npm:15.2.0" dependencies: chalk: "npm:5.3.0" commander: "npm:11.1.0" debug: "npm:4.3.4" execa: "npm:8.0.1" - lilconfig: "npm:2.1.0" - listr2: "npm:7.0.2" + lilconfig: "npm:3.0.0" + listr2: "npm:8.0.0" micromatch: "npm:4.0.5" pidtree: "npm:0.6.0" string-argv: "npm:0.3.2" yaml: "npm:2.3.4" bin: lint-staged: bin/lint-staged.js - checksum: d427408be98df7558e918593cb765d5caaa67a5cdca89671fb54280a6c959f4e448db36d4f85e8e0bd9c2c1e996aa133916925cf47c9df573b47308d5e298d84 + checksum: 4a1ff25dd06dbd4346fd244c9a0ebb936532ba18c0caedeb895c2e232f3c6c5fd08f6667624716660bc29e3e0f9f0440a9175114394616e991ebd5fab4b1f092 languageName: node linkType: hard -"listr2@npm:7.0.2": - version: 7.0.2 - resolution: "listr2@npm:7.0.2" +"listr2@npm:8.0.0": + version: 8.0.0 + resolution: "listr2@npm:8.0.0" dependencies: - cli-truncate: "npm:^3.1.0" + cli-truncate: "npm:^4.0.0" colorette: "npm:^2.0.20" eventemitter3: "npm:^5.0.1" - log-update: "npm:^5.0.1" + log-update: "npm:^6.0.0" rfdc: "npm:^1.3.0" - wrap-ansi: "npm:^8.1.0" - checksum: 37b6501be84ebea66dcce07c5f86c224aff0c01c9fb43f5055cc38a063030281d58198aad0aad481f174438309831ddf5f763b890e820cd7b7b4f4a5dfa229c9 + wrap-ansi: "npm:^9.0.0" + checksum: 6e356df9127c68b69186c927c993645223557e941a76b0bb210e35786aedc53f577df437251db804606ff37ac509c5d945289a84b3daee7fadf2e3dcb889ecc9 languageName: node linkType: hard @@ -11104,16 +11127,16 @@ __metadata: languageName: node linkType: hard -"log-update@npm:^5.0.1": - version: 5.0.1 - resolution: "log-update@npm:5.0.1" +"log-update@npm:^6.0.0": + version: 6.0.0 + resolution: "log-update@npm:6.0.0" dependencies: - ansi-escapes: "npm:^5.0.0" + ansi-escapes: "npm:^6.2.0" cli-cursor: "npm:^4.0.0" - slice-ansi: "npm:^5.0.0" - strip-ansi: "npm:^7.0.1" - wrap-ansi: "npm:^8.0.1" - checksum: 1050ea2027e80f32e132aace909987cb00c2719368c78b82ffca681a5b3f4020eeb5f4b4e310c47c35c6c36aff258c1d1bc51485ac44d6fdac9eb0a4275c539f + slice-ansi: "npm:^7.0.0" + strip-ansi: "npm:^7.1.0" + wrap-ansi: "npm:^9.0.0" + checksum: e0b3c3401ef49ce3eb17e2f83d644765e4f7988498fc1344eaa4f31ab30e510dcc469a7fb64dc01bd1c8d9237d917598fa677a9818705fb3774c10f6e9d4b27c languageName: node linkType: hard @@ -15050,6 +15073,16 @@ __metadata: languageName: node linkType: hard +"slice-ansi@npm:^7.0.0": + version: 7.1.0 + resolution: "slice-ansi@npm:7.1.0" + dependencies: + ansi-styles: "npm:^6.2.1" + is-fullwidth-code-point: "npm:^5.0.0" + checksum: 631c971d4abf56cf880f034d43fcc44ff883624867bf11ecbd538c47343911d734a4656d7bc02362b40b89d765652a7f935595441e519b59e2ad3f4d5d6fe7ca + languageName: node + linkType: hard + "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -15493,7 +15526,7 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^5.0.0, string-width@npm:^5.0.1, string-width@npm:^5.1.2": +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": version: 5.1.2 resolution: "string-width@npm:5.1.2" dependencies: @@ -15504,6 +15537,17 @@ __metadata: languageName: node linkType: hard +"string-width@npm:^7.0.0": + version: 7.0.0 + resolution: "string-width@npm:7.0.0" + dependencies: + emoji-regex: "npm:^10.3.0" + get-east-asian-width: "npm:^1.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 8ffaeeccf4a56ccce5b6235d0b99ee3a581e3e3e5d453708efe7aa8e264fa3a858b4fe2244310cb71c6a20d8c05921cedc8b2ccd88cbaad9f5c92051ff68edc6 + languageName: node + linkType: hard + "string.prototype.matchall@npm:^4.0.6, string.prototype.matchall@npm:^4.0.8": version: 4.0.8 resolution: "string.prototype.matchall@npm:4.0.8" @@ -15618,7 +15662,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^7.0.1": +"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": version: 7.1.0 resolution: "strip-ansi@npm:7.1.0" dependencies: @@ -16379,13 +16423,20 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^1.0.1, type-fest@npm:^1.0.2, type-fest@npm:^1.2.1, type-fest@npm:^1.2.2": +"type-fest@npm:^1.0.1, type-fest@npm:^1.2.1, type-fest@npm:^1.2.2": version: 1.4.0 resolution: "type-fest@npm:1.4.0" checksum: a3c0f4ee28ff6ddf800d769eafafcdeab32efa38763c1a1b8daeae681920f6e345d7920bf277245235561d8117dab765cb5f829c76b713b4c9de0998a5397141 languageName: node linkType: hard +"type-fest@npm:^3.0.0": + version: 3.13.1 + resolution: "type-fest@npm:3.13.1" + checksum: 547d22186f73a8c04590b70dcf63baff390078c75ea8acd366bbd510fd0646e348bd1970e47ecf795b7cff0b41d26e9c475c1fedd6ef5c45c82075fbf916b629 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -17613,7 +17664,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^8.0.1, wrap-ansi@npm:^8.1.0": +"wrap-ansi@npm:^8.1.0": version: 8.1.0 resolution: "wrap-ansi@npm:8.1.0" dependencies: @@ -17624,6 +17675,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi@npm:^9.0.0": + version: 9.0.0 + resolution: "wrap-ansi@npm:9.0.0" + dependencies: + ansi-styles: "npm:^6.2.1" + string-width: "npm:^7.0.0" + strip-ansi: "npm:^7.1.0" + checksum: a139b818da9573677548dd463bd626a5a5286271211eb6e4e82f34a4f643191d74e6d4a9bb0a3c26ec90e6f904f679e0569674ac099ea12378a8b98e20706066 + languageName: node + linkType: hard + "wrappy@npm:1": version: 1.0.2 resolution: "wrappy@npm:1.0.2" From b4fef6c26fe63aeda60a6359a17a7f357b2c923e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 09:50:43 +0100 Subject: [PATCH 13/49] Update DefinitelyTyped types (non-major) (#28199) 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 3ec0235337..288d75925a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3495,13 +3495,13 @@ __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.2.38 - resolution: "@types/react@npm:18.2.38" + version: 18.2.41 + resolution: "@types/react@npm:18.2.41" dependencies: "@types/prop-types": "npm:*" "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 56edd4756081b677e38ee23ad6d340658c5e2468785cb20968318cec357e1ea7ccf3ecd9534981741192dd1b894200acfaf0f1551b4795c6077668f6afc19345 + checksum: 5cc72491ce8be95e7bbedd8bf039ca971772ecd22d989feb045af7e73247c7e6cff25a2f1c2200be461fb2f6b5aacef739e1ba9fd83c744209dfd3ce8aa75afe languageName: node linkType: hard @@ -3657,11 +3657,11 @@ __metadata: linkType: hard "@types/ws@npm:^8.5.9": - version: 8.5.9 - resolution: "@types/ws@npm:8.5.9" + version: 8.5.10 + resolution: "@types/ws@npm:8.5.10" dependencies: "@types/node": "npm:*" - checksum: 678bdd6461c4653f2975c537fb673cb1918c331558e2d2422b69761c9ced67200bb07c664e2593f3864077a891cb7c13ef2a40d303b4aacb06173d095d8aa3ce + checksum: e9af279b984c4a04ab53295a40aa95c3e9685f04888df5c6920860d1dd073fcc57c7bd33578a04b285b2c655a0b52258d34bee0a20569dca8defb8393e1e5d29 languageName: node linkType: hard From 3ec263bf155c87dd5c513f181682e051e9f3e105 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 09:51:08 +0100 Subject: [PATCH 14/49] Update dependency irb to v1.10.0 (#28198) 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 4c78e6b0a8..6820c12f94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -377,7 +377,7 @@ GEM terminal-table (>= 1.5.1) idn-ruby (0.1.5) io-console (0.6.0) - irb (1.9.1) + irb (1.10.0) rdoc reline (>= 0.3.8) jmespath (1.6.2) @@ -747,7 +747,7 @@ GEM statsd-ruby (1.5.0) stoplight (3.0.2) redlock (~> 1.0) - stringio (3.0.9) + stringio (3.1.0) strong_migrations (1.6.4) activerecord (>= 5.2) swd (1.3.0) From d848d8d87cbef49f5f4635b3378b582464bae98a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 03:52:21 -0500 Subject: [PATCH 15/49] Add helper methods for domains allow and export blocks files (#28196) --- .../admin/export_domain_allows_controller_spec.rb | 10 ++++++++-- .../admin/export_domain_blocks_controller_spec.rb | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/spec/controllers/admin/export_domain_allows_controller_spec.rb b/spec/controllers/admin/export_domain_allows_controller_spec.rb index e1e5ecc1f0..0a2e342620 100644 --- a/spec/controllers/admin/export_domain_allows_controller_spec.rb +++ b/spec/controllers/admin/export_domain_allows_controller_spec.rb @@ -24,7 +24,7 @@ RSpec.describe Admin::ExportDomainAllowsController do get :export, params: { format: :csv } expect(response).to have_http_status(200) - expect(response.body).to eq(File.read(File.join(file_fixture_path, 'domain_allows.csv'))) + expect(response.body).to eq(domain_allows_csv_file) end end @@ -40,7 +40,7 @@ RSpec.describe Admin::ExportDomainAllowsController do # Domains should now be added get :export, params: { format: :csv } expect(response).to have_http_status(200) - expect(response.body).to eq(File.read(File.join(file_fixture_path, 'domain_allows.csv'))) + expect(response.body).to eq(domain_allows_csv_file) end it 'displays error on no file selected' do @@ -49,4 +49,10 @@ RSpec.describe Admin::ExportDomainAllowsController do expect(flash[:error]).to eq(I18n.t('admin.export_domain_allows.no_file')) end end + + private + + def domain_allows_csv_file + File.read(File.join(file_fixture_path, 'domain_allows.csv')) + end end diff --git a/spec/controllers/admin/export_domain_blocks_controller_spec.rb b/spec/controllers/admin/export_domain_blocks_controller_spec.rb index 5a282c9572..bfcccfa06c 100644 --- a/spec/controllers/admin/export_domain_blocks_controller_spec.rb +++ b/spec/controllers/admin/export_domain_blocks_controller_spec.rb @@ -26,7 +26,13 @@ RSpec.describe Admin::ExportDomainBlocksController do get :export, params: { format: :csv } expect(response).to have_http_status(200) - expect(response.body).to eq(File.read(File.join(file_fixture_path, 'domain_blocks.csv'))) + expect(response.body).to eq(domain_blocks_csv_file) + end + + private + + def domain_blocks_csv_file + File.read(File.join(file_fixture_path, 'domain_blocks.csv')) end end From 154fb95e44da94d8473ecdc081cf8b9648f41a52 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 09:52:53 +0100 Subject: [PATCH 16/49] Update dependency postcss to v8.4.32 (#28185) 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 288d75925a..4226fcc0fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11784,12 +11784,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.6": - version: 3.3.6 - resolution: "nanoid@npm:3.3.6" +"nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" bin: nanoid: bin/nanoid.cjs - checksum: 606b355960d0fcbe3d27924c4c52ef7d47d3b57208808ece73279420d91469b01ec1dce10fae512b6d4a8c5a5432b352b228336a8b2202a6ea68e67fa348e2ee + checksum: e3fb661aa083454f40500473bb69eedb85dc160e763150b9a2c567c7e9ff560ce028a9f833123b618a6ea742e311138b591910e795614a629029e86e180660f3 languageName: node linkType: hard @@ -13218,13 +13218,13 @@ __metadata: linkType: hard "postcss@npm:^8.2.15, postcss@npm:^8.4.24, postcss@npm:^8.4.28": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" + version: 8.4.32 + resolution: "postcss@npm:8.4.32" dependencies: - nanoid: "npm:^3.3.6" + nanoid: "npm:^3.3.7" picocolors: "npm:^1.0.0" source-map-js: "npm:^1.0.2" - checksum: 748b82e6e5fc34034dcf2ae88ea3d11fd09f69b6c50ecdd3b4a875cfc7cdca435c958b211e2cb52355422ab6fccb7d8f2f2923161d7a1b281029e4a913d59acf + checksum: 39308a9195fa34d4dbdd7b58a896cff0c7809f84f7a4ac1b95b68ca86c9138a395addff33075668ed3983d41b90aac05754c445237a9365eb1c3a5602ebd03ad languageName: node linkType: hard From 19ad51253d255c26ba71b0754c8b21197fcd0113 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 04:02:40 -0500 Subject: [PATCH 17/49] Prevent triple-subject run in admin/domain_blocks spec (#28195) --- .../admin/domain_blocks_controller_spec.rb | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/spec/controllers/admin/domain_blocks_controller_spec.rb b/spec/controllers/admin/domain_blocks_controller_spec.rb index 13826be366..22960f5312 100644 --- a/spec/controllers/admin/domain_blocks_controller_spec.rb +++ b/spec/controllers/admin/domain_blocks_controller_spec.rb @@ -192,16 +192,11 @@ RSpec.describe Admin::DomainBlocksController do let(:original_severity) { 'suspend' } let(:new_severity) { 'silence' } - it 'changes the block severity' do - expect { subject }.to change { domain_block.reload.severity }.from('suspend').to('silence') - end - - it 'undoes individual suspensions' do - expect { subject }.to change { remote_account.reload.suspended? }.from(true).to(false) - end - - it 'performs individual silences' do - expect { subject }.to change { remote_account.reload.silenced? }.from(false).to(true) + it 'changes the block severity, suspensions, and silences' do + expect { subject } + .to change_severity('suspend', 'silence') + .and change_suspended(true, false) + .and change_silenced(false, true) end end @@ -209,17 +204,26 @@ RSpec.describe Admin::DomainBlocksController do let(:original_severity) { 'silence' } let(:new_severity) { 'suspend' } - it 'changes the block severity' do - expect { subject }.to change { domain_block.reload.severity }.from('silence').to('suspend') + it 'changes the block severity, silences, and suspensions' do + expect { subject } + .to change_severity('silence', 'suspend') + .and change_silenced(true, false) + .and change_suspended(false, true) end + end - it 'undoes individual silences' do - expect { subject }.to change { remote_account.reload.silenced? }.from(true).to(false) - end + private - it 'performs individual suspends' do - expect { subject }.to change { remote_account.reload.suspended? }.from(false).to(true) - end + def change_severity(from, to) + change { domain_block.reload.severity }.from(from).to(to) + end + + def change_silenced(from, to) + change { remote_account.reload.silenced? }.from(from).to(to) + end + + def change_suspended(from, to) + change { remote_account.reload.suspended? }.from(from).to(to) end end From 1bf2230fd1a25a1f8c012e4ff70c08a0a48d88d3 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 04:08:47 -0500 Subject: [PATCH 18/49] Add spec coverage for `CLI::Upgrade#storage_schema` command (#28180) --- spec/lib/mastodon/cli/upgrade_spec.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spec/lib/mastodon/cli/upgrade_spec.rb b/spec/lib/mastodon/cli/upgrade_spec.rb index 817044f7ea..0d6494eeee 100644 --- a/spec/lib/mastodon/cli/upgrade_spec.rb +++ b/spec/lib/mastodon/cli/upgrade_spec.rb @@ -4,5 +4,24 @@ require 'rails_helper' require 'mastodon/cli/upgrade' describe Mastodon::CLI::Upgrade do + let(:cli) { described_class.new } + it_behaves_like 'CLI Command' + + describe '#storage_schema' do + context 'with records that dont need upgrading' do + let(:options) { {} } + + before do + Fabricate(:account) + Fabricate(:media_attachment) + end + + it 'does not upgrade storage for the attachments' do + expect { cli.invoke(:storage_schema, [], options) }.to output( + a_string_including('Upgraded storage schema of 0 records') + ).to_stdout + end + end + end end From 9603198982fce7e064a4ec60ac36420173a91cd5 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 04:09:05 -0500 Subject: [PATCH 19/49] Add spec coverage for `CLI::Domains#purge` command (#28179) --- spec/lib/mastodon/cli/domains_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/lib/mastodon/cli/domains_spec.rb b/spec/lib/mastodon/cli/domains_spec.rb index 765b63e2a7..add754159c 100644 --- a/spec/lib/mastodon/cli/domains_spec.rb +++ b/spec/lib/mastodon/cli/domains_spec.rb @@ -4,5 +4,22 @@ require 'rails_helper' require 'mastodon/cli/domains' describe Mastodon::CLI::Domains do + let(:cli) { described_class.new } + it_behaves_like 'CLI Command' + + describe '#purge' do + context 'with accounts from the domain' do + let(:options) { {} } + let(:domain) { 'host.example' } + let!(:account) { Fabricate(:account, domain: domain) } + + it 'removes the account' do + expect { cli.invoke(:purge, [domain], options) }.to output( + a_string_including('Removed 1 accounts') + ).to_stdout + expect { account.reload }.to raise_error(ActiveRecord::RecordNotFound) + end + end + end end From a2bcfeb887a0ae1d437bb727333d769a8248b578 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 4 Dec 2023 10:09:43 +0100 Subject: [PATCH 20/49] Fix `Style/HashEachMethods` cop in HAML files (#28178) --- app/views/admin/reports/index.html.haml | 2 +- app/views/settings/applications/_fields.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index e94847d674..e2a9868aa5 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -27,7 +27,7 @@ %button.button= t('admin.accounts.search') = link_to t('admin.accounts.reset'), admin_reports_path, class: 'button negative' -- @reports.group_by(&:target_account_id).each do |_target_account_id, reports| +- @reports.group_by(&:target_account_id).each_value do |reports| - target_account = reports.first.target_account .report-card .report-card__profile diff --git a/app/views/settings/applications/_fields.html.haml b/app/views/settings/applications/_fields.html.haml index 4f5077d831..29e2bcb5a3 100644 --- a/app/views/settings/applications/_fields.html.haml +++ b/app/views/settings/applications/_fields.html.haml @@ -14,5 +14,5 @@ %label= t('activerecord.attributes.doorkeeper/application.scopes') %span.hint= t('simple_form.hints.defaults.scopes') - - Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |_key, value| + - Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each_value do |value| = f.input :scopes, label: false, hint: false, collection: value.sort, wrapper: :with_block_label, include_blank: false, label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' From 829457212ee2ae933db273b8dce402d2d8e659cf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:38:49 +0100 Subject: [PATCH 21/49] Update dependency rubocop to v1.58.0 (#28170) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6820c12f94..037fe145d2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -381,7 +381,7 @@ GEM rdoc reline (>= 0.3.8) jmespath (1.6.2) - json (2.6.3) + json (2.7.0) json-canonicalization (0.3.2) json-jwt (1.15.3) activesupport (>= 4.2) @@ -656,7 +656,7 @@ GEM rspec-mocks (~> 3.0) sidekiq (>= 5, < 8) rspec-support (3.12.1) - rubocop (1.57.2) + rubocop (1.58.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -664,7 +664,7 @@ GEM rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.30.0) From b3b009e6aa29d9051aa61113da344b3ab26d98e4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 04:44:54 -0500 Subject: [PATCH 22/49] Add spec coverage for `CLI::EmailDomainBlocks` commands (#28181) --- lib/mastodon/cli/email_domain_blocks.rb | 4 +- .../mastodon/cli/email_domain_blocks_spec.rb | 93 +++++++++++++++++++ 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/lib/mastodon/cli/email_domain_blocks.rb b/lib/mastodon/cli/email_domain_blocks.rb index 88a84ecb42..022b1dcbb1 100644 --- a/lib/mastodon/cli/email_domain_blocks.rb +++ b/lib/mastodon/cli/email_domain_blocks.rb @@ -7,10 +7,10 @@ module Mastodon::CLI class EmailDomainBlocks < Base desc 'list', 'List blocked e-mail domains' def list - EmailDomainBlock.where(parent_id: nil).order(id: 'DESC').find_each do |entry| + EmailDomainBlock.where(parent_id: nil).find_each do |entry| say(entry.domain.to_s, :white) - EmailDomainBlock.where(parent_id: entry.id).order(id: 'DESC').find_each do |child| + EmailDomainBlock.where(parent_id: entry.id).find_each do |child| say(" #{child.domain}", :cyan) end end diff --git a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb index 060943b188..f5cb6c332b 100644 --- a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb +++ b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb @@ -4,5 +4,98 @@ require 'rails_helper' require 'mastodon/cli/email_domain_blocks' describe Mastodon::CLI::EmailDomainBlocks do + let(:cli) { described_class.new } + it_behaves_like 'CLI Command' + + describe '#list' do + context 'with email domain block records' do + let!(:parent_block) { Fabricate(:email_domain_block) } + let!(:child_block) { Fabricate(:email_domain_block, parent: parent_block) } + let(:options) { {} } + + it 'lists the blocks' do + expect { cli.invoke(:list, [], options) }.to output( + a_string_including(parent_block.domain) + .and(a_string_including(child_block.domain)) + ).to_stdout + end + end + end + + describe '#add' do + context 'without any options' do + let(:options) { {} } + + it 'warns about usage and exits' do + expect { cli.invoke(:add, [], options) }.to output( + a_string_including('No domain(s) given') + ).to_stdout.and raise_error(SystemExit) + end + end + + context 'when blocks exist' do + let(:options) { {} } + let(:domain) { 'host.example' } + + before { Fabricate(:email_domain_block, domain: domain) } + + it 'does not add a new block' do + expect { cli.invoke(:add, [domain], options) }.to output( + a_string_including('is already blocked') + ).to_stdout + .and(not_change(EmailDomainBlock, :count)) + end + end + + context 'when no blocks exist' do + let(:options) { {} } + let(:domain) { 'host.example' } + + it 'adds a new block' do + expect { cli.invoke(:add, [domain], options) }.to output( + a_string_including('Added 1') + ).to_stdout + .and(change(EmailDomainBlock, :count).by(1)) + end + end + end + + describe '#remove' do + context 'without any options' do + let(:options) { {} } + + it 'warns about usage and exits' do + expect { cli.invoke(:remove, [], options) }.to output( + a_string_including('No domain(s) given') + ).to_stdout.and raise_error(SystemExit) + end + end + + context 'when blocks exist' do + let(:options) { {} } + let(:domain) { 'host.example' } + + before { Fabricate(:email_domain_block, domain: domain) } + + it 'removes the block' do + expect { cli.invoke(:remove, [domain], options) }.to output( + a_string_including('Removed 1') + ).to_stdout + .and(change(EmailDomainBlock, :count).by(-1)) + end + end + + context 'when no blocks exist' do + let(:options) { {} } + let(:domain) { 'host.example' } + + it 'does not remove a block' do + expect { cli.invoke(:remove, [domain], options) }.to output( + a_string_including('is not yet blocked') + ).to_stdout + .and(not_change(EmailDomainBlock, :count)) + end + end + end end From cca19f5fbb568bf7f145fe98d6d2497632c8987c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 07:56:28 -0500 Subject: [PATCH 23/49] Use the `Admin::ActionLog` fabricator in admin/action_logs spec (#28194) --- .../admin/accounts_controller_spec.rb | 32 ++++++++++++------- .../admin/action_logs_controller_spec.rb | 31 +++++++++++++++--- .../api/v1/admin/account_actions_spec.rb | 17 +++++++--- spec/requests/api/v1/admin/accounts_spec.rb | 32 ++++++++++++------- 4 files changed, 78 insertions(+), 34 deletions(-) diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb index 307e819501..1882ea8388 100644 --- a/spec/controllers/admin/accounts_controller_spec.rb +++ b/spec/controllers/admin/accounts_controller_spec.rb @@ -161,12 +161,13 @@ RSpec.describe Admin::AccountsController do it 'logs action' do expect(subject).to have_http_status 302 - log_item = Admin::ActionLog.last - - expect(log_item).to_not be_nil - expect(log_item.action).to eq :approve - expect(log_item.account_id).to eq current_user.account_id - expect(log_item.target_id).to eq account.user.id + expect(latest_admin_action_log) + .to be_present + .and have_attributes( + action: eq(:approve), + account_id: eq(current_user.account_id), + target_id: eq(account.user.id) + ) end end @@ -201,12 +202,13 @@ RSpec.describe Admin::AccountsController do it 'logs action' do expect(subject).to have_http_status 302 - log_item = Admin::ActionLog.last - - expect(log_item).to_not be_nil - expect(log_item.action).to eq :reject - expect(log_item.account_id).to eq current_user.account_id - expect(log_item.target_id).to eq account.user.id + expect(latest_admin_action_log) + .to be_present + .and have_attributes( + action: eq(:reject), + account_id: eq(current_user.account_id), + target_id: eq(account.user.id) + ) end end @@ -427,4 +429,10 @@ RSpec.describe Admin::AccountsController do end end end + + private + + def latest_admin_action_log + Admin::ActionLog.last + end end diff --git a/spec/controllers/admin/action_logs_controller_spec.rb b/spec/controllers/admin/action_logs_controller_spec.rb index b7854469dd..be4222df08 100644 --- a/spec/controllers/admin/action_logs_controller_spec.rb +++ b/spec/controllers/admin/action_logs_controller_spec.rb @@ -9,11 +9,9 @@ describe Admin::ActionLogsController do let!(:account) { Fabricate(:account) } before do - _orphaned_logs = %w( - Account User UserRole Report DomainBlock DomainAllow - EmailDomainBlock UnavailableDomain Status AccountWarning - Announcement IpBlock Instance CustomEmoji CanonicalEmailBlock Appeal - ).map { |type| Admin::ActionLog.new(account: account, action: 'destroy', target_type: type, target_id: 1312).save! } + orphaned_log_types.map do |type| + Fabricate(:action_log, account: account, action: 'destroy', target_type: type, target_id: 1312) + end end describe 'GET #index' do @@ -24,4 +22,27 @@ describe Admin::ActionLogsController do expect(response).to have_http_status(200) end end + + private + + def orphaned_log_types + %w( + Account + AccountWarning + Announcement + Appeal + CanonicalEmailBlock + CustomEmoji + DomainAllow + DomainBlock + EmailDomainBlock + Instance + IpBlock + Report + Status + UnavailableDomain + User + UserRole + ) + end end diff --git a/spec/requests/api/v1/admin/account_actions_spec.rb b/spec/requests/api/v1/admin/account_actions_spec.rb index c14e08c21c..4167911a13 100644 --- a/spec/requests/api/v1/admin/account_actions_spec.rb +++ b/spec/requests/api/v1/admin/account_actions_spec.rb @@ -21,12 +21,19 @@ RSpec.describe 'Account actions' do it 'logs action' do subject - log_item = Admin::ActionLog.last + expect(latest_admin_action_log) + .to be_present + .and have_attributes( + action: eq(action_type), + account_id: eq(user.account_id), + target_id: eq(target_type == :user ? target_account.user.id : target_account.id) + ) + end - expect(log_item).to be_present - expect(log_item.action).to eq(action_type) - expect(log_item.account_id).to eq(user.account_id) - expect(log_item.target_id).to eq(target_type == :user ? target_account.user.id : target_account.id) + private + + def latest_admin_action_log + Admin::ActionLog.last end end diff --git a/spec/requests/api/v1/admin/accounts_spec.rb b/spec/requests/api/v1/admin/accounts_spec.rb index 8e158f623d..1615581f0e 100644 --- a/spec/requests/api/v1/admin/accounts_spec.rb +++ b/spec/requests/api/v1/admin/accounts_spec.rb @@ -151,12 +151,13 @@ RSpec.describe 'Accounts' do it 'logs action', :aggregate_failures do subject - log_item = Admin::ActionLog.last - - expect(log_item).to be_present - expect(log_item.action).to eq :approve - expect(log_item.account_id).to eq user.account_id - expect(log_item.target_id).to eq account.user.id + expect(latest_admin_action_log) + .to be_present + .and have_attributes( + action: eq(:approve), + account_id: eq(user.account_id), + target_id: eq(account.user.id) + ) end end @@ -202,12 +203,13 @@ RSpec.describe 'Accounts' do it 'logs action', :aggregate_failures do subject - log_item = Admin::ActionLog.last - - expect(log_item).to be_present - expect(log_item.action).to eq :reject - expect(log_item.account_id).to eq user.account_id - expect(log_item.target_id).to eq account.user.id + expect(latest_admin_action_log) + .to be_present + .and have_attributes( + action: eq(:reject), + account_id: eq(user.account_id), + target_id: eq(account.user.id) + ) end end @@ -398,4 +400,10 @@ RSpec.describe 'Accounts' do end end end + + private + + def latest_admin_action_log + Admin::ActionLog.last + end end From 71e5a16ebaf67d5e55d7f4e31436c36e6801ce5a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 10:28:19 -0500 Subject: [PATCH 24/49] Remove triple subject call in `api/v1/lists` spec (#28210) --- spec/requests/api/v1/lists_spec.rb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/spec/requests/api/v1/lists_spec.rb b/spec/requests/api/v1/lists_spec.rb index 22dde43a19..4635e936f5 100644 --- a/spec/requests/api/v1/lists_spec.rb +++ b/spec/requests/api/v1/lists_spec.rb @@ -135,8 +135,11 @@ RSpec.describe 'Lists' do it_behaves_like 'forbidden for wrong scope', 'read read:lists' - it 'returns the updated list', :aggregate_failures do - subject + it 'returns the updated list and updates values', :aggregate_failures do + expect { subject } + .to change_list_title + .and change_list_replies_policy + .and change_list_exclusive expect(response).to have_http_status(200) list.reload @@ -149,16 +152,16 @@ RSpec.describe 'Lists' do }) end - it 'updates the list title' do - expect { subject }.to change { list.reload.title }.from('my list').to('list') + def change_list_title + change { list.reload.title }.from('my list').to('list') end - it 'updates the list replies_policy' do - expect { subject }.to change { list.reload.replies_policy }.from('list').to('followed') + def change_list_replies_policy + change { list.reload.replies_policy }.from('list').to('followed') end - it 'updates the list exclusive' do - expect { subject }.to change { list.reload.exclusive }.from(false).to(true) + def change_list_exclusive + change { list.reload.exclusive }.from(false).to(true) end context 'when the list does not exist' do From 89a8e6e6227eb901b5811d8417d81dc8ab1427a9 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 4 Dec 2023 10:41:43 -0500 Subject: [PATCH 25/49] Remove 2x double subject call in `models/form/account_batch` spec (#28209) --- spec/models/form/account_batch_spec.rb | 40 +++++++++++++++++++------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/spec/models/form/account_batch_spec.rb b/spec/models/form/account_batch_spec.rb index fd8e909010..26fb1b953a 100644 --- a/spec/models/form/account_batch_spec.rb +++ b/spec/models/form/account_batch_spec.rb @@ -37,12 +37,10 @@ RSpec.describe Form::AccountBatch do let(:select_all_matching) { '0' } let(:account_ids) { [target_account.id, target_account2.id] } - it 'suspends the expected users' do - expect { subject }.to change { [target_account.reload.suspended?, target_account2.reload.suspended?] }.from([false, false]).to([true, true]) - end - - it 'closes open reports targeting the suspended users' do - expect { subject }.to change { Report.unresolved.where(target_account: [target_account, target_account2]).count }.from(2).to(0) + it 'suspends the expected users and closes open reports' do + expect { subject } + .to change_account_suspensions + .and change_open_reports_for_accounts end end @@ -50,13 +48,33 @@ RSpec.describe Form::AccountBatch do let(:select_all_matching) { '1' } let(:query) { Account.where(id: [target_account.id, target_account2.id]) } - it 'suspends the expected users' do - expect { subject }.to change { [target_account.reload.suspended?, target_account2.reload.suspended?] }.from([false, false]).to([true, true]) + it 'suspends the expected users and closes open reports' do + expect { subject } + .to change_account_suspensions + .and change_open_reports_for_accounts end + end - it 'closes open reports targeting the suspended users' do - expect { subject }.to change { Report.unresolved.where(target_account: [target_account, target_account2]).count }.from(2).to(0) - end + private + + def change_account_suspensions + change { relevant_account_suspension_statuses } + .from([false, false]) + .to([true, true]) + end + + def change_open_reports_for_accounts + change(relevant_account_unresolved_reports, :count) + .from(2) + .to(0) + end + + def relevant_account_unresolved_reports + Report.unresolved.where(target_account: [target_account, target_account2]) + end + + def relevant_account_suspension_statuses + [target_account.reload, target_account2.reload].map(&:suspended?) end end end From f944a767c46e3d887e070d67958f4a9866c3d1f1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:57:16 +0100 Subject: [PATCH 26/49] Update dependency json-ld to v3.3.1 (#28229) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 037fe145d2..602df6a222 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -382,15 +382,15 @@ GEM reline (>= 0.3.8) jmespath (1.6.2) json (2.7.0) - json-canonicalization (0.3.2) + json-canonicalization (1.0.0) json-jwt (1.15.3) activesupport (>= 4.2) aes_key_wrap bindata httpclient - json-ld (3.3.0) + json-ld (3.3.1) htmlentities (~> 4.3) - json-canonicalization (~> 0.3, >= 0.3.2) + json-canonicalization (~> 1.0) link_header (~> 0.0, >= 0.0.8) multi_json (~> 1.15) rack (>= 2.2, < 4) From 2d2e23c68dde6ac6fa14fe8fbeb0efac02ad9803 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:59:31 +0000 Subject: [PATCH 27/49] Update dependency brakeman to v6.1.0 (#28231) 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 602df6a222..9308a41c8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -175,7 +175,7 @@ GEM blurhash (0.1.7) bootsnap (1.17.0) msgpack (~> 1.2) - brakeman (6.0.1) + brakeman (6.1.0) browser (5.3.1) brpoplpush-redis_script (0.1.3) concurrent-ruby (~> 1.0, >= 1.0.5) From d0a5ebf914f7ad74a69beb15d9c011e44e84c0dc Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Tue, 5 Dec 2023 14:59:15 +0100 Subject: [PATCH 28/49] Fix error when encountering malformed Tag objects from Kbin (#28235) --- app/services/activitypub/process_status_update_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/activitypub/process_status_update_service.rb b/app/services/activitypub/process_status_update_service.rb index 2db0e80e7c..fb2b33114e 100644 --- a/app/services/activitypub/process_status_update_service.rb +++ b/app/services/activitypub/process_status_update_service.rb @@ -170,9 +170,9 @@ class ActivityPub::ProcessStatusUpdateService < BaseService as_array(@json['tag']).each do |tag| if equals_or_includes?(tag['type'], 'Hashtag') - @raw_tags << tag['name'] + @raw_tags << tag['name'] if tag['name'].present? elsif equals_or_includes?(tag['type'], 'Mention') - @raw_mentions << tag['href'] + @raw_mentions << tag['href'] if tag['href'].present? elsif equals_or_includes?(tag['type'], 'Emoji') @raw_emojis << tag end From 4238ec844d61774a02daa4a677a69099ff494388 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:07:53 +0100 Subject: [PATCH 29/49] New Crowdin Translations (automated) (#28120) Co-authored-by: GitHub Actions Co-authored-by: Claire --- app/javascript/mastodon/locales/an.json | 1 + app/javascript/mastodon/locales/ca.json | 1 + app/javascript/mastodon/locales/es-MX.json | 2 +- app/javascript/mastodon/locales/fa.json | 7 +- app/javascript/mastodon/locales/fil.json | 1 + app/javascript/mastodon/locales/ko.json | 4 +- app/javascript/mastodon/locales/lt.json | 74 ++++++++++++++ app/javascript/mastodon/locales/ne.json | 1 + app/javascript/mastodon/locales/ry.json | 1 + app/javascript/mastodon/locales/sc.json | 36 +++++++ app/javascript/mastodon/locales/sk.json | 10 ++ app/javascript/mastodon/locales/sq.json | 1 + app/javascript/mastodon/locales/th.json | 14 +-- app/javascript/mastodon/locales/tlh.json | 1 + app/javascript/mastodon/locales/zh-TW.json | 2 +- config/i18n-tasks.yml | 1 + config/locales/activerecord.fil.yml | 1 + config/locales/activerecord.ne.yml | 1 + config/locales/activerecord.ry.yml | 1 + config/locales/activerecord.tlh.yml | 1 + config/locales/devise.fil.yml | 1 + config/locales/devise.ne.yml | 1 + config/locales/devise.ry.yml | 1 + config/locales/devise.tlh.yml | 1 + config/locales/doorkeeper.fil.yml | 1 + config/locales/doorkeeper.ne.yml | 1 + config/locales/doorkeeper.ry.yml | 1 + config/locales/doorkeeper.sc.yml | 15 +++ config/locales/doorkeeper.tlh.yml | 1 + config/locales/fil.yml | 1 + config/locales/fr-QC.yml | 1 + config/locales/fr.yml | 1 + config/locales/lt.yml | 26 ++++- config/locales/ne.yml | 1 + config/locales/ry.yml | 1 + config/locales/sc.yml | 113 +++++++++++++++++++++ config/locales/simple_form.fil.yml | 1 + config/locales/simple_form.lt.yml | 35 ++++++- config/locales/simple_form.ne.yml | 1 + config/locales/simple_form.ry.yml | 1 + config/locales/simple_form.sc.yml | 17 ++++ config/locales/simple_form.tlh.yml | 1 + config/locales/tlh.yml | 1 + 43 files changed, 366 insertions(+), 19 deletions(-) create mode 100644 app/javascript/mastodon/locales/fil.json create mode 100644 app/javascript/mastodon/locales/ne.json create mode 100644 app/javascript/mastodon/locales/ry.json create mode 100644 app/javascript/mastodon/locales/tlh.json create mode 100644 config/locales/activerecord.fil.yml create mode 100644 config/locales/activerecord.ne.yml create mode 100644 config/locales/activerecord.ry.yml create mode 100644 config/locales/activerecord.tlh.yml create mode 100644 config/locales/devise.fil.yml create mode 100644 config/locales/devise.ne.yml create mode 100644 config/locales/devise.ry.yml create mode 100644 config/locales/devise.tlh.yml create mode 100644 config/locales/doorkeeper.fil.yml create mode 100644 config/locales/doorkeeper.ne.yml create mode 100644 config/locales/doorkeeper.ry.yml create mode 100644 config/locales/doorkeeper.tlh.yml create mode 100644 config/locales/fil.yml create mode 100644 config/locales/ne.yml create mode 100644 config/locales/ry.yml create mode 100644 config/locales/simple_form.fil.yml create mode 100644 config/locales/simple_form.ne.yml create mode 100644 config/locales/simple_form.ry.yml create mode 100644 config/locales/simple_form.tlh.yml create mode 100644 config/locales/tlh.yml diff --git a/app/javascript/mastodon/locales/an.json b/app/javascript/mastodon/locales/an.json index a652272fad..b2134551bf 100644 --- a/app/javascript/mastodon/locales/an.json +++ b/app/javascript/mastodon/locales/an.json @@ -499,6 +499,7 @@ "report_notification.open": "Ubrir informe", "search.placeholder": "Buscar", "search.search_or_paste": "Buscar u apegar URL", + "search_popout.full_text_search_logged_out_message": "Nomás disponible iniciando la sesión.", "search_results.all": "Totz", "search_results.hashtags": "Etiquetas", "search_results.nothing_found": "No se podió trobar cosa pa estes termins de busqueda", diff --git a/app/javascript/mastodon/locales/ca.json b/app/javascript/mastodon/locales/ca.json index 87121b7c52..5ae49325f6 100644 --- a/app/javascript/mastodon/locales/ca.json +++ b/app/javascript/mastodon/locales/ca.json @@ -482,6 +482,7 @@ "onboarding.follows.lead": "La teva línia de temps inici només està a les teves mans. Com més gent segueixis, més activa i interessant serà. Aquests perfils poden ser un bon punt d'inici—sempre pots acabar deixant de seguir-los!:", "onboarding.follows.title": "Personalitza la pantalla d'inci", "onboarding.profile.discoverable": "Fes el meu perfil descobrible", + "onboarding.profile.discoverable_hint": "En acceptar d'ésser descobert a Mastodon els teus missatges poden aparèixer dins les tendències i els resultats de cerques, i el teu perfil es pot suggerir a qui tingui interessos semblants als teus.", "onboarding.profile.display_name": "Nom que es mostrarà", "onboarding.profile.display_name_hint": "El teu nom complet o el teu malnom…", "onboarding.profile.lead": "Sempre ho pots completar més endavant a la configuració, on hi ha encara més opcions disponibles.", diff --git a/app/javascript/mastodon/locales/es-MX.json b/app/javascript/mastodon/locales/es-MX.json index f7cd1b3305..0d26afef23 100644 --- a/app/javascript/mastodon/locales/es-MX.json +++ b/app/javascript/mastodon/locales/es-MX.json @@ -606,7 +606,7 @@ "search.quick_action.status_search": "Publicaciones que coinciden con {x}", "search.search_or_paste": "Buscar o pegar URL", "search_popout.full_text_search_disabled_message": "No disponible en {domain}.", - "search_popout.full_text_search_logged_out_message": "Solo disponible si inicias sesión.", + "search_popout.full_text_search_logged_out_message": "Sólo disponible al iniciar sesión.", "search_popout.language_code": "Código de idioma ISO", "search_popout.options": "Opciones de búsqueda", "search_popout.quick_actions": "Acciones rápidas", diff --git a/app/javascript/mastodon/locales/fa.json b/app/javascript/mastodon/locales/fa.json index 6951d5cb0b..8e8930bfea 100644 --- a/app/javascript/mastodon/locales/fa.json +++ b/app/javascript/mastodon/locales/fa.json @@ -1,7 +1,7 @@ { "about.blocks": "کارسازهای نظارت شده", "about.contact": "تماس:", - "about.disclaimer": "ماستودون نرم‌افزار آزاد و یک شرکت غیر انتفاعی آلمانی با مسئولیت محدود است.", + "about.disclaimer": "ماستودون نرم‌افزار آزاد و نشان تجاری یک شرکت غیر انتفاعی با مسئولیت محدود آلمانی است.", "about.domain_blocks.no_reason_available": "دلیلی موجود نیست", "about.domain_blocks.preamble": "ماستودون عموماً می‌گذارد محتوا را از از هر کارساز دیگری در دنیای شبکه‌های اجتماعی غیرمتمرکز دیده و با آنان برهم‌کنش داشته باشید. این‌ها استثناهایی هستند که روی این کارساز خاص وضع شده‌اند.", "about.domain_blocks.silenced.explanation": "عموماً نمایه‌ها و محتوا از این کارساز را نمی‌بینید، مگر این که به طور خاص دنبالشان گشته یا با پی گیری، داوطلب دیدنشان شوید.", @@ -21,6 +21,7 @@ "account.blocked": "مسدود", "account.browse_more_on_origin_server": "مرور بیش‌تر روی نمایهٔ اصلی", "account.cancel_follow_request": "رد کردن درخواست پی‌گیری", + "account.copy": "رونوشت از پیوند به نمایه", "account.direct": "اشارهٔ خصوصی به ‪@{name}‬", "account.disable_notifications": "آگاه کردن من هنگام فرسته‌های ‎@{name} را متوقّف کن", "account.domain_blocked": "دامنه مسدود شد", @@ -191,6 +192,7 @@ "conversation.mark_as_read": "علامت‌گذاری به عنوان خوانده شده", "conversation.open": "دیدن گفتگو", "conversation.with": "با {names}", + "copy_icon_button.copied": "در بریده‌دان رونوشت شد", "copypaste.copied": "رونوشت شد", "copypaste.copy_to_clipboard": "رونوشت به تخته‌گیره", "directory.federated": "از کارسازهای شناخته‌شده", @@ -486,6 +488,8 @@ "onboarding.profile.note_hint": "می‌توانید افراد دیگر را @نام‌بردن یا #برچسب بزنید…", "onboarding.profile.save_and_continue": "ذخیره کن و ادامه بده", "onboarding.profile.title": "تنظیم نمایه", + "onboarding.profile.upload_avatar": "بازگذاری تصویر نمایه", + "onboarding.profile.upload_header": "بارگذاری تصویر سردر نمایه", "onboarding.share.lead": "بگذارید افراد بدانند چگونه می‌توانند در ماستادون بیابندتان!", "onboarding.share.message": "من {username} روی #ماستودون هستم! مرا در {url} پی‌بگیرید", "onboarding.share.next_steps": "گام‌های ممکن بعدی:", @@ -600,6 +604,7 @@ "search.quick_action.status_search": "فرسته‌های جور با {x}", "search.search_or_paste": "جست‌وجو یا جایگذاری نشانی", "search_popout.full_text_search_disabled_message": "روی {domain} موجود نیست.", + "search_popout.full_text_search_logged_out_message": "تنها زمانی که وارد شده‌اید دردسترس است.", "search_popout.language_code": "کد زبان ایزو", "search_popout.options": "گزینه‌های جست‌وجو", "search_popout.quick_actions": "کنش‌های سریع", diff --git a/app/javascript/mastodon/locales/fil.json b/app/javascript/mastodon/locales/fil.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/app/javascript/mastodon/locales/fil.json @@ -0,0 +1 @@ +{} diff --git a/app/javascript/mastodon/locales/ko.json b/app/javascript/mastodon/locales/ko.json index 46caf32b07..5b76cd67c5 100644 --- a/app/javascript/mastodon/locales/ko.json +++ b/app/javascript/mastodon/locales/ko.json @@ -302,8 +302,8 @@ "hashtag.counter_by_accounts": "{count, plural, other {{counter} 명의 참여자}}", "hashtag.counter_by_uses": "{count, plural, other {{counter} 개의 게시물}}", "hashtag.counter_by_uses_today": "오늘 {count, plural, other {{counter} 개의 게시물}}", - "hashtag.follow": "해시태그 팔로우", - "hashtag.unfollow": "해시태그 팔로우 해제", + "hashtag.follow": "팔로우", + "hashtag.unfollow": "팔로우 해제", "hashtags.and_other": "…그리고 {count, plural,other {#개 더}}", "home.actions.go_to_explore": "무엇이 유행인지 보기", "home.actions.go_to_suggestions": "팔로우할 사람 찾기", diff --git a/app/javascript/mastodon/locales/lt.json b/app/javascript/mastodon/locales/lt.json index a976d5907f..e588b85385 100644 --- a/app/javascript/mastodon/locales/lt.json +++ b/app/javascript/mastodon/locales/lt.json @@ -180,29 +180,71 @@ "confirmations.logout.message": "Ar tikrai nori atsijungti?", "confirmations.mute.confirm": "Nutildyti", "confirmations.mute.explanation": "Tai paslėps jų įrašus ir įrašus, kuriuose jie menėmi, tačiau jie vis tiek galės matyti tavo įrašus ir sekti.", + "confirmations.mute.message": "Ar tikrai norite nutildyti {name}?", + "confirmations.redraft.confirm": "Ištrinti ir perrašyti", "confirmations.reply.confirm": "Atsakyti", "confirmations.reply.message": "Atsakant dabar, bus perrašyta metu kuriama žinutė. Ar tikrai nori tęsti?", "confirmations.unfollow.confirm": "Nebesekti", + "confirmations.unfollow.message": "Ar tikrai norite atsisakyti sekimo {name}?", + "conversation.delete": "Ištrinti pokalbį", "conversation.mark_as_read": "Žymėti kaip skaitytą", "conversation.open": "Peržiūrėti pokalbį", "conversation.with": "Su {names}", "copy_icon_button.copied": "Nukopijuota į iškarpinę", "copypaste.copied": "Nukopijuota", "copypaste.copy_to_clipboard": "Kopijuoti į iškarpinę", + "directory.local": "Iš {domain} tik", + "directory.new_arrivals": "Naujos prekės", + "directory.recently_active": "Neseniai aktyvus", "disabled_account_banner.account_settings": "Paskyros nustatymai", + "disabled_account_banner.text": "Jūsų paskyra {disabledAccount} šiuo metu yra išjungta.", + "dismissable_banner.dismiss": "Atmesti", "dismissable_banner.explore_links": "These news stories are being talked about by people on this and other servers of the decentralized network right now.", + "dismissable_banner.explore_statuses": "Tai įrašai iš viso socialinio tinklo, kurie šiandien sulaukia vis daugiau dėmesio. Naujesni įrašai, turintys daugiau boosts ir mėgstamiausių įrašų, yra vertinami aukščiau.", "dismissable_banner.explore_tags": "These hashtags are gaining traction among people on this and other servers of the decentralized network right now.", "embed.instructions": "Embed this status on your website by copying the code below.", "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.nature": "Gamta", + "emoji_button.not_found": "Nerasta jokių tinkamų jaustukų", "emoji_button.objects": "Objektai", + "emoji_button.people": "Žmonės", + "emoji_button.recent": "Dažniausiai naudojama", "emoji_button.search": "Paieška...", + "emoji_button.search_results": "Paieškos rezultatai", + "emoji_button.symbols": "Simboliai", + "emoji_button.travel": "Kelionės ir Vietos", "empty_column.account_hides_collections": "Šis naudotojas (-a) pasirinko nepadaryti šią informaciją prieinamą", + "empty_column.account_suspended": "Paskyra sustabdyta", "empty_column.account_timeline": "No toots here!", + "empty_column.account_unavailable": "Profilis neprieinamas", + "empty_column.blocks": "Dar neužblokavote nė vieno naudotojo.", "empty_column.bookmarked_statuses": "You don't have any bookmarked toots yet. When you bookmark one, it will show up here.", + "empty_column.community": "Vietinė laiko juosta yra tuščia. Parašykite ką nors viešai, kad pradėtumėte veikti!", + "empty_column.direct": "Dar neturite jokių privačių paminėjimų. Kai išsiųsite arba gausite tokį pranešimą, jis bus rodomas čia.", "empty_column.domain_blocks": "There are no hidden domains yet.", + "empty_column.favourited_statuses": "Dar neturite mėgstamiausių įrašų. Kai vieną iš jų pamėgsite, jis bus rodomas čia.", + "empty_column.follow_requests": "Dar neturite jokių sekimo užklausų. Kai gausite tokį prašymą, jis bus rodomas čia.", + "empty_column.followed_tags": "Dar nesekėte jokių grotažymių. Kai tai padarysite, jie bus rodomi čia.", "empty_column.hashtag": "Nėra nieko šiame saitažodyje kol kas.", "empty_column.home": "Your home timeline is empty! Follow more people to fill it up. {suggestions}", "empty_column.list": "There is nothing in this list yet. When members of this list post new statuses, they will appear here.", + "empty_column.lists": "Dar neturite jokių sąrašų. Kai jį sukursite, jis bus rodomas čia.", + "empty_column.mutes": "Dar nesate nutildę nė vieno naudotojo.", + "empty_column.notifications": "Dar neturite jokių pranešimų. Kai kiti žmonės su jumis bendraus, matysite tai čia.", + "empty_column.public": "Čia nieko nėra! Parašykite ką nors viešai arba rankiniu būdu sekite naudotojus iš kitų serverių, kad jį užpildytumėte", + "error.unexpected_crash.explanation": "Dėl mūsų kodo klaidos arba naršyklės suderinamumo problemos šis puslapis negalėjo būti rodomas teisingai.", + "error.unexpected_crash.explanation_addons": "Šį puslapį nepavyko teisingai parodyti. Šią klaidą greičiausiai sukėlė naršyklės priedas arba automatinio vertimo įrankiai.", + "error.unexpected_crash.next_steps": "Pabandykite atnaujinti puslapį. Jei tai nepadeda, galbūt vis dar galėsite naudotis \"Mastodon\" naudodami kitą naršyklę arba vietinę programėlę.", + "error.unexpected_crash.next_steps_addons": "Pabandykite juos išjungti ir atnaujinti puslapį. Jei tai nepadeda, galbūt vis dar galėsite naudotis \"Mastodon\" naudodami kitą naršyklę arba vietinę programėlę.", + "errors.unexpected_crash.report_issue": "Pranešti apie triktį", + "explore.search_results": "Paieškos rezultatai", + "explore.suggested_follows": "Žmonės", "explore.title": "Naršyti", "explore.trending_links": "Naujienos", "explore.trending_statuses": "Įrašai", @@ -304,7 +346,13 @@ "moved_to_account_banner.text": "Tavo paskyra {disabledAccount} šiuo metu yra išjungta, nes persikėlei į {movedToAccount}.", "mute_modal.duration": "Trukmė", "mute_modal.hide_notifications": "Slėpti šio naudotojo pranešimus?", + "mute_modal.indefinite": "Neribotas", + "navigation_bar.about": "Apie", + "navigation_bar.advanced_interface": "Atidarykite išplėstinę žiniatinklio sąsają", + "navigation_bar.blocks": "Užblokuoti naudotojai", + "navigation_bar.bookmarks": "Žymės", "navigation_bar.compose": "Compose new toot", + "navigation_bar.direct": "Privatūs paminėjimai", "navigation_bar.discover": "Atrasti", "navigation_bar.domain_blocks": "Hidden domains", "navigation_bar.edit_profile": "Redaguoti profilį", @@ -372,6 +420,7 @@ "notifications.permission_required": "Darbalaukio pranešimai nepasiekiami, nes nesuteiktas reikiamas leidimas.", "notifications_permission_banner.enable": "Įjungti darbalaukio pranešimus", "notifications_permission_banner.how_to_control": "Jei norite gauti pranešimus, kai \"Mastodon\" nėra atidarytas, įjunkite darbalaukio pranešimus. Įjungę darbalaukio pranešimus, galite tiksliai valdyti, kokių tipų sąveikos generuoja darbalaukio pranešimus, naudodamiesi pirmiau esančiu mygtuku {icon}.", + "notifications_permission_banner.title": "Niekada nieko nepraleiskite", "onboarding.action.back": "Gražinkite mane atgal", "onboarding.actions.back": "Gražinkite mane atgal", "onboarding.actions.go_to_explore": "See what's trending", @@ -394,8 +443,10 @@ "onboarding.share.lead": "Praneškite žmonėms, kaip jus rasti \"Mastodon\"!", "onboarding.share.message": "Aš {username} #Mastodon! Ateik sekti manęs adresu {url}", "onboarding.share.next_steps": "Galimi kiti žingsniai:", + "onboarding.share.title": "Bendrinkite savo profilį", "onboarding.start.lead": "Dabar esi Mastodon dalis – unikalios decentralizuotos socialinės žiniasklaidos platformos, kurioje tu, o ne algoritmas, pats nustatai savo patirtį. Pradėkime tavo kelionę šioje naujoje socialinėje erdvėje:", "onboarding.start.skip": "Want to skip right ahead?", + "onboarding.start.title": "Jums pavyko!", "onboarding.steps.follow_people.body": "You curate your own feed. Lets fill it with interesting people.", "onboarding.steps.follow_people.title": "Follow {count, plural, one {one person} other {# people}}", "onboarding.steps.publish_status.body": "Say hello to the world.", @@ -404,23 +455,46 @@ "onboarding.steps.setup_profile.title": "Customize your profile", "onboarding.steps.share_profile.body": "Let your friends know how to find you on Mastodon!", "onboarding.steps.share_profile.title": "Share your profile", + "picture_in_picture.restore": "Padėkite jį atgal", + "poll.closed": "Uždaryti", + "poll.refresh": "Atnaujinti", + "poll.reveal": "Peržiūrėti rezultatus", "poll.vote": "Balsuoti", "poll.voted": "Tu balsavai už šį atsakymą", "poll.votes": "{votes, plural, one {# balsas} few {# balsai} many {# balso} other {# balsų}}", + "poll_button.add_poll": "Pridėti apklausą", + "poll_button.remove_poll": "Šalinti apklausą", "privacy.change": "Adjust status privacy", "privacy.direct.long": "Post to mentioned users only", "privacy.direct.short": "Direct", "privacy.private.long": "Post to followers only", "privacy.private.short": "Followers-only", + "privacy.public.long": "Visiems matomas", + "privacy.public.short": "Viešas", "privacy.unlisted.long": "Matomas visiems, bet atsisakyta atradimo funkcijų", "privacy.unlisted.short": "Neįtrauktas į sąrašą", "privacy_policy.last_updated": "Paskutinį kartą atnaujinta {date}", + "privacy_policy.title": "Privatumo politika", "recommended": "Rekomenduojama", + "refresh": "Atnaujinti", + "regeneration_indicator.label": "Kraunasi…", + "relative_time.full.just_now": "ką tik", "relative_time.hours": "{number} val.", "relative_time.just_now": "dabar", "relative_time.minutes": "{number} min.", "relative_time.seconds": "{number} sek.", "relative_time.today": "šiandien", + "reply_indicator.cancel": "Atšaukti", + "report.block": "Blokuoti", + "report.categories.legal": "Legalus", + "report.categories.other": "Kita", + "report.categories.spam": "Šlamštas", + "report.categories.violation": "Turinys pažeidžia vieną ar daugiau serverio taisyklių", + "report.category.subtitle": "Pasirinkite tinkamiausią variantą", + "report.category.title_account": "profilis", + "report.category.title_status": "įrašas", + "report.close": "Atlikta", + "report.comment.title": "Ar yra dar kas nors, ką, jūsų manymu, turėtume žinoti?", "report.mute_explanation": "Jų įrašų nematysi. Jie vis tiek gali tave sekti ir matyti įrašus, bet nežinos, kad jie nutildyti.", "report.next": "Tęsti", "report.placeholder": "Papildomi komentarai", diff --git a/app/javascript/mastodon/locales/ne.json b/app/javascript/mastodon/locales/ne.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/app/javascript/mastodon/locales/ne.json @@ -0,0 +1 @@ +{} diff --git a/app/javascript/mastodon/locales/ry.json b/app/javascript/mastodon/locales/ry.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/app/javascript/mastodon/locales/ry.json @@ -0,0 +1 @@ +{} diff --git a/app/javascript/mastodon/locales/sc.json b/app/javascript/mastodon/locales/sc.json index 59c834b950..7f29525e73 100644 --- a/app/javascript/mastodon/locales/sc.json +++ b/app/javascript/mastodon/locales/sc.json @@ -14,6 +14,7 @@ "account.badges.group": "Grupu", "account.block": "Bloca @{name}", "account.block_domain": "Bloca su domìniu {domain}", + "account.block_short": "Bloca", "account.blocked": "Blocadu", "account.browse_more_on_origin_server": "Esplora de prus in su profilu originale", "account.cancel_follow_request": "Withdraw follow request", @@ -31,17 +32,20 @@ "account.follows.empty": "Custa persone non sighit ancora a nemos.", "account.follows_you": "Ti sighit", "account.hide_reblogs": "Cua is cumpartziduras de @{name}", + "account.in_memoriam": "In memoriam.", "account.joined_short": "At aderidu", "account.link_verified_on": "Sa propiedade de custu ligòngiu est istada controllada su {date}", "account.locked_info": "S'istadu de riservadesa de custu contu est istadu cunfiguradu comente blocadu. Sa persone chi tenet sa propiedade revisionat a manu chie dda podet sighire.", "account.media": "Cuntenutu multimediale", "account.mention": "Mèntova a @{name}", "account.mute": "Pone a @{name} a sa muda", + "account.mute_short": "A sa muda", "account.muted": "A sa muda", "account.posts": "Publicatziones", "account.posts_with_replies": "Publicatziones e rispostas", "account.report": "Signala @{name}", "account.requested": "Abetende s'aprovatzione. Incarca pro annullare sa rechesta de sighidura", + "account.requested_follow": "{name} at dimandadu de ti sighire", "account.share": "Cumpartzi su profilu de @{name}", "account.show_reblogs": "Ammustra is cumpartziduras de @{name}", "account.statuses_counter": "{count, plural, one {{counter} publicatzione} other {{counter} publicatziones}}", @@ -106,6 +110,7 @@ "compose_form.publish": "Pùblica", "compose_form.publish_form": "Publish", "compose_form.publish_loud": "{publish}!", + "compose_form.save_changes": "Sarva is modìficas", "compose_form.sensitive.hide": "{count, plural, one {Marca elementu multimediale comente a sensìbile} other {Marca elementos multimediales comente sensìbiles}}", "compose_form.sensitive.marked": "{count, plural, one {Elementu multimediale marcadu comente a sensìbile} other {Elementos multimediales marcados comente a sensìbiles}}", "compose_form.sensitive.unmarked": "{count, plural, one {Elementu multimediale non marcadu comente a sensìbile} other {Elementos multimediales non marcados comente a sensìbiles}}", @@ -122,6 +127,7 @@ "confirmations.delete_list.message": "Seguru chi boles cantzellare custa lista in manera permanente?", "confirmations.domain_block.confirm": "Bloca totu su domìniu", "confirmations.domain_block.message": "Boles de seguru, ma a beru a beru, blocare {domain}? In sa parte manna de is casos, pagos blocos o silentziamentos de persones sunt sufitzientes e preferìbiles. No as a bìdere cuntenutos dae custu domìniu in peruna lìnia de tempus pùblica o in is notìficas tuas. Sa gente chi ti sighit dae cussu domìniu at a èssere bogada.", + "confirmations.edit.confirm": "Modìfica", "confirmations.logout.confirm": "Essi·nche", "confirmations.logout.message": "Seguru chi boles essire?", "confirmations.mute.confirm": "A sa muda", @@ -140,6 +146,7 @@ "directory.local": "Isceti dae {domain}", "directory.new_arrivals": "Arribos noos", "directory.recently_active": "Cun atividade dae pagu", + "disabled_account_banner.account_settings": "Cunfiguratziones de su contu", "dismissable_banner.explore_links": "These news stories are being talked about by people on this and other servers of the decentralized network right now.", "dismissable_banner.explore_tags": "These hashtags are gaining traction among people on this and other servers of the decentralized network right now.", "embed.instructions": "Inserta custa publicatzione in su situ web tuo copiende su còdighe de suta.", @@ -180,13 +187,19 @@ "errors.unexpected_crash.copy_stacktrace": "Còpia stacktrace in punta de billete", "errors.unexpected_crash.report_issue": "Sinnala unu problema", "explore.search_results": "Resurtados de sa chirca", + "explore.suggested_follows": "Gente", + "explore.trending_statuses": "Publicatziones", + "explore.trending_tags": "Etichetas", "filter_modal.select_filter.expired": "iscadidu", + "firehose.all": "Totus", "follow_request.authorize": "Autoriza", "follow_request.reject": "Refuda", "follow_requests.unlocked_explanation": "Fintzas si su contu tuo no est blocadu, su personale de {domain} at pensadu chi forsis bolias revisionare a manu is rechestas de custos contos.", "footer.about": "Informatziones", "footer.invite": "Invita gente", + "footer.keyboard_shortcuts": "Incurtzaduras de tecladu", "footer.privacy_policy": "Polìtica de riservadesa", + "footer.status": "Istadu", "generic.saved": "Sarvadu", "getting_started.heading": "Comente cumintzare", "hashtag.column_header.tag_mode.all": "e {additional}", @@ -263,6 +276,7 @@ "lists.search": "Chirca intre sa gente chi ses sighende", "lists.subheading": "Is listas tuas", "load_pending": "{count, plural, one {# elementu nou} other {# elementos noos}}", + "loading_indicator.label": "Carrighende…", "media_gallery.toggle_visible": "Cua {number, plural, one {immàgine} other {immàgines}}", "mute_modal.duration": "Durada", "mute_modal.hide_notifications": "Boles cuare is notìficas de custa persone?", @@ -288,6 +302,7 @@ "navigation_bar.search": "Chirca", "navigation_bar.security": "Seguresa", "not_signed_in_indicator.not_signed_in": "You need to sign in to access this resource.", + "notification.favourite": "{name} at marcadu comente a preferidu s'istadu tuo", "notification.follow": "{name} ti sighit", "notification.follow_request": "{name} at dimandadu de ti sighire", "notification.mention": "{name} t'at mentovadu", @@ -328,6 +343,8 @@ "onboarding.actions.go_to_home": "Go to your home feed", "onboarding.follows.lead": "You curate your own home feed. The more people you follow, the more active and interesting it will be. These profiles may be a good starting point—you can always unfollow them later!", "onboarding.follows.title": "Popular on Mastodon", + "onboarding.profile.display_name": "Nòmine visìbile", + "onboarding.profile.note": "Biografia", "onboarding.start.lead": "Your new Mastodon account is ready to go. Here's how you can make the most of it:", "onboarding.start.skip": "Want to skip right ahead?", "onboarding.steps.follow_people.body": "You curate your own feed. Lets fill it with interesting people.", @@ -344,6 +361,7 @@ "poll.total_votes": "{count, plural, one {# votu} other {# votos}}", "poll.vote": "Vota", "poll.voted": "As votadu custa risposta", + "poll.votes": "{votes, plural, one {# votu} other {# votos}}", "poll_button.add_poll": "Agiunghe unu sondàgiu", "poll_button.remove_poll": "Cantzella su sondàgiu", "privacy.change": "Modìfica s'istadu de riservadesa", @@ -353,25 +371,41 @@ "privacy.private.short": "Followers-only", "privacy.public.short": "Pùblicu", "privacy.unlisted.short": "Esclùidu de sa lista", + "recommended": "Cussigiadu", "refresh": "Atualiza", "regeneration_indicator.label": "Carrighende…", "regeneration_indicator.sublabel": "Preparende sa lìnia de tempus printzipale tua.", "relative_time.days": "{number} dies a oe", + "relative_time.full.just_now": "immoe etotu", "relative_time.hours": "{number} oras a immoe", "relative_time.just_now": "immoe", "relative_time.minutes": "{number} minutos a immoe", "relative_time.seconds": "{number} segundos a immoe", "relative_time.today": "oe", "reply_indicator.cancel": "Annulla", + "report.block": "Bloca", + "report.categories.other": "Àteru", + "report.category.title_account": "profilu", + "report.category.title_status": "publicatzione", + "report.close": "Fatu", "report.forward": "Torra a imbiare a {target}", "report.forward_hint": "Custu contu est de un'àteru serbidore. Ddi boles imbiare puru una còpia anònima de custu informe?", + "report.mute": "A sa muda", + "report.next": "Imbeniente", "report.placeholder": "Cummentos additzionales", "report.submit": "Imbia", "report.target": "Informende de {target}", "report_notification.attached_statuses": "{count, plural, one {# post} other {# posts}} attached", + "report_notification.categories.other": "Àteru", "search.placeholder": "Chirca", + "search_popout.user": "utente", + "search_results.accounts": "Profilos", + "search_results.all": "Totus", "search_results.hashtags": "Etichetas", "search_results.statuses": "Publicatziones", + "server_banner.administered_by": "Amministradu dae:", + "server_banner.learn_more": "Àteras informatziones", + "server_banner.server_stats": "Istatìsticas de su serbidore:", "sign_in_banner.sign_in": "Sign in", "status.admin_account": "Aberi s'interfache de moderatzione pro @{name}", "status.admin_status": "Aberi custa publicatzione in s'interfache de moderatzione", @@ -382,6 +416,7 @@ "status.copy": "Còpia su ligòngiu a sa publicatzione tua", "status.delete": "Cantzella", "status.detailed_status": "Visualizatzione de detàlliu de arresonada", + "status.edit": "Modìfica", "status.edited_x_times": "Edited {count, plural, one {# time} other {# times}}", "status.embed": "Afissa", "status.filtered": "Filtradu", @@ -413,6 +448,7 @@ "status.title.with_attachments": "{user} posted {attachmentCount, plural, one {an attachment} other {# attachments}}", "status.unmute_conversation": "Torra a ativare s'arresonada", "status.unpin": "Boga dae pitzu de su profilu", + "subscribed_languages.save": "Sarva is modìficas", "tabs_bar.home": "Printzipale", "tabs_bar.notifications": "Notìficas", "time_remaining.days": "{number, plural, one {abarrat # die} other {abarrant # dies}}", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index 9115695d87..c4ce6f8cfd 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -391,6 +391,7 @@ "lists.search": "Vyhľadávaj medzi užívateľmi, ktorých sleduješ", "lists.subheading": "Tvoje zoznamy", "load_pending": "{count, plural, one {# nová položka} other {# nových položiek}}", + "loading_indicator.label": "Načítam…", "media_gallery.toggle_visible": "Zapni/Vypni viditeľnosť", "moved_to_account_banner.text": "Vaše konto {disabledAccount} je momentálne zablokované, pretože ste sa presunuli na {movedToAccount}.", "mute_modal.duration": "Trvanie", @@ -480,6 +481,14 @@ "onboarding.follows.lead": "You curate your own home feed. The more people you follow, the more active and interesting it will be. These profiles may be a good starting point—you can always unfollow them later!", "onboarding.follows.title": "Popular on Mastodon", "onboarding.profile.discoverable": "Urob môj profil objaviteľný", + "onboarding.profile.display_name": "Zobrazované meno", + "onboarding.profile.display_name_hint": "Tvoje plné meno, alebo tvoje zábavné meno…", + "onboarding.profile.lead": "Toto môžeš vždy dokončiť neskôr v nastaveniach, kde je dostupných ešte viac volieb na prispôsobenie.", + "onboarding.profile.note": "O tebe", + "onboarding.profile.note_hint": "Môžeš @spomenúť iných ľudí, alebo #haštagy…", + "onboarding.profile.save_and_continue": "Ulož a pokračuj", + "onboarding.profile.upload_avatar": "Nahraj profilový obrázok", + "onboarding.profile.upload_header": "Nahraj profilové záhlavie", "onboarding.share.lead": "Daj ľudom vedieť, ako ťa môžu na Mastodone nájsť!", "onboarding.share.message": "Na Mastodone som {username}. Príď ma nasledovať na {url}", "onboarding.share.next_steps": "Ďalšie možné kroky:", @@ -594,6 +603,7 @@ "search.quick_action.status_search": "Príspevky zodpovedajúce {x}", "search.search_or_paste": "Hľadaj, alebo vlož URL adresu", "search_popout.full_text_search_disabled_message": "Nie je k dispozícii v doméne {domain}.", + "search_popout.full_text_search_logged_out_message": "Dostupné iba keď si prihlásený/á.", "search_popout.language_code": "ISO kód jazyka", "search_popout.options": "Možnosti vyhľadávania", "search_popout.quick_actions": "Rýchle akcie", diff --git a/app/javascript/mastodon/locales/sq.json b/app/javascript/mastodon/locales/sq.json index 86042a91e5..710224e1cb 100644 --- a/app/javascript/mastodon/locales/sq.json +++ b/app/javascript/mastodon/locales/sq.json @@ -606,6 +606,7 @@ "search.quick_action.status_search": "Postime me përputhje me {x}", "search.search_or_paste": "Kërkoni, ose hidhni një URL", "search_popout.full_text_search_disabled_message": "Jo i passhëm në {domain}.", + "search_popout.full_text_search_logged_out_message": "E përdorshme vetëm kur keni bërë hyrjen në llogari.", "search_popout.language_code": "Kod ISO gjuhe", "search_popout.options": "Mundësi kërkimi", "search_popout.quick_actions": "Veprime të shpejta", diff --git a/app/javascript/mastodon/locales/th.json b/app/javascript/mastodon/locales/th.json index c020dc3625..0be9bf6d7a 100644 --- a/app/javascript/mastodon/locales/th.json +++ b/app/javascript/mastodon/locales/th.json @@ -60,7 +60,7 @@ "account.report": "รายงาน @{name}", "account.requested": "กำลังรอการอนุมัติ คลิกเพื่อยกเลิกคำขอติดตาม", "account.requested_follow": "{name} ได้ขอติดตามคุณ", - "account.share": "แบ่งปันโปรไฟล์ของ @{name}", + "account.share": "แชร์โปรไฟล์ของ @{name}", "account.show_reblogs": "แสดงการดันจาก @{name}", "account.statuses_counter": "{count, plural, other {{counter} โพสต์}}", "account.unblock": "เลิกปิดกั้น @{name}", @@ -319,7 +319,7 @@ "home.show_announcements": "แสดงประกาศ", "interaction_modal.description.favourite": "ด้วยบัญชีใน Mastodon คุณสามารถชื่นชอบโพสต์นี้เพื่อแจ้งให้ผู้สร้างทราบว่าคุณชื่นชมโพสต์และบันทึกโพสต์ไว้สำหรับภายหลัง", "interaction_modal.description.follow": "ด้วยบัญชีใน Mastodon คุณสามารถติดตาม {name} เพื่อรับโพสต์ของเขาในฟีดหน้าแรกของคุณ", - "interaction_modal.description.reblog": "ด้วยบัญชีใน Mastodon คุณสามารถดันโพสต์นี้เพื่อแบ่งปันโพสต์กับผู้ติดตามของคุณเอง", + "interaction_modal.description.reblog": "ด้วยบัญชีใน Mastodon คุณสามารถดันโพสต์นี้เพื่อแชร์โพสต์กับผู้ติดตามของคุณเอง", "interaction_modal.description.reply": "ด้วยบัญชีใน Mastodon คุณสามารถตอบกลับโพสต์นี้", "interaction_modal.login.action": "นำฉันกลับบ้าน", "interaction_modal.login.prompt": "โดเมนของเซิร์ฟเวอร์บ้านของคุณ เช่น mastodon.social", @@ -495,7 +495,7 @@ "onboarding.share.lead": "แจ้งให้ผู้คนทราบวิธีที่เขาสามารถค้นหาคุณใน Mastodon!", "onboarding.share.message": "ฉันคือ {username} ใน #Mastodon! มาติดตามฉันที่ {url}", "onboarding.share.next_steps": "ขั้นตอนถัดไปที่เป็นไปได้:", - "onboarding.share.title": "แบ่งปันโปรไฟล์ของคุณ", + "onboarding.share.title": "แชร์โปรไฟล์ของคุณ", "onboarding.start.lead": "ตอนนี้คุณเป็นส่วนหนึ่งของ Mastodon แพลตฟอร์มสื่อสังคมที่มีเอกลักษณ์เฉพาะตัว กระจายศูนย์ ที่ซึ่งคุณ—ไม่ใช่อัลกอริทึม—เรียบเรียงประสบการณ์ของคุณเอง มาช่วยให้คุณเริ่มต้นใช้งานพรมแดนทางสังคมใหม่นี้กันเลย:", "onboarding.start.skip": "ไม่ต้องการความช่วยเหลือในการเริ่มต้นใช้งาน?", "onboarding.start.title": "คุณทำสำเร็จแล้ว!", @@ -506,7 +506,7 @@ "onboarding.steps.setup_profile.body": "เพิ่มการโต้ตอบของคุณโดยการมีโปรไฟล์ที่ครอบคลุม", "onboarding.steps.setup_profile.title": "ปรับแต่งโปรไฟล์ของคุณ", "onboarding.steps.share_profile.body": "แจ้งให้เพื่อน ๆ ของคุณทราบวิธีค้นหาคุณใน Mastodon", - "onboarding.steps.share_profile.title": "แบ่งปันโปรไฟล์ Mastodon ของคุณ", + "onboarding.steps.share_profile.title": "แชร์โปรไฟล์ Mastodon ของคุณ", "onboarding.tips.2fa": "คุณทราบหรือไม่? คุณสามารถรักษาความปลอดภัยบัญชีของคุณได้โดยตั้งค่าการรับรองความถูกต้องด้วยสองปัจจัยในการตั้งค่าบัญชีของคุณ การรับรองความถูกต้องด้วยสองปัจจัยทำงานร่วมกับแอป TOTP ใด ๆ ที่คุณเลือก ไม่จำเป็นต้องมีหมายเลขโทรศัพท์!", "onboarding.tips.accounts_from_other_servers": "คุณทราบหรือไม่? เนื่องจาก Mastodon เป็นแบบกระจายศูนย์ โปรไฟล์บางส่วนที่คุณเจอจะได้รับการโฮสต์ในเซิร์ฟเวอร์อื่น ๆ ที่ไม่ใช่ของคุณ และคุณยังสามารถโต้ตอบกับเขาได้อย่างไร้รอยต่อ! เซิร์ฟเวอร์ของเขาอยู่ในครึ่งหลังของชื่อผู้ใช้ของเขา!", "onboarding.tips.migration": "คุณทราบหรือไม่? หากคุณรู้สึกว่า {domain} ไม่ใช่ตัวเลือกเซิร์ฟเวอร์ที่ยอดเยี่ยมสำหรับคุณในอนาคต คุณสามารถย้ายไปยังเซิร์ฟเวอร์ Mastodon อื่นได้โดยไม่สูญเสียผู้ติดตามของคุณ คุณยังสามารถโฮสต์เซิร์ฟเวอร์ของคุณเอง!", @@ -558,7 +558,7 @@ "report.categories.spam": "สแปม", "report.categories.violation": "เนื้อหาละเมิดกฎของเซิร์ฟเวอร์จำนวนหนึ่งหรือมากกว่า", "report.category.subtitle": "เลือกที่ตรงกันที่สุด", - "report.category.title": "บอกเราถึงสิ่งที่กำลังเกิดขึ้นกับ {type} นี้", + "report.category.title": "บอกเราถึงสิ่งที่กำลังเกิดขึ้นกับ{type}นี้", "report.category.title_account": "โปรไฟล์", "report.category.title_status": "โพสต์", "report.close": "เสร็จสิ้น", @@ -629,7 +629,7 @@ "sign_in_banner.create_account": "สร้างบัญชี", "sign_in_banner.sign_in": "เข้าสู่ระบบ", "sign_in_banner.sso_redirect": "เข้าสู่ระบบหรือลงทะเบียน", - "sign_in_banner.text": "เข้าสู่ระบบเพื่อติดตามโปรไฟล์หรือแฮชแท็ก ชื่นชอบ แบ่งปัน และตอบกลับโพสต์ คุณยังสามารถโต้ตอบจากบัญชีของคุณในเซิร์ฟเวอร์อื่น", + "sign_in_banner.text": "เข้าสู่ระบบเพื่อติดตามโปรไฟล์หรือแฮชแท็ก ชื่นชอบ แชร์ และตอบกลับโพสต์ คุณยังสามารถโต้ตอบจากบัญชีของคุณในเซิร์ฟเวอร์อื่น", "status.admin_account": "เปิดส่วนติดต่อการควบคุมสำหรับ @{name}", "status.admin_domain": "เปิดส่วนติดต่อการควบคุมสำหรับ {domain}", "status.admin_status": "เปิดโพสต์นี้ในส่วนติดต่อการควบคุม", @@ -675,7 +675,7 @@ "status.replyAll": "ตอบกลับกระทู้", "status.report": "รายงาน @{name}", "status.sensitive_warning": "เนื้อหาที่ละเอียดอ่อน", - "status.share": "แบ่งปัน", + "status.share": "แชร์", "status.show_filter_reason": "แสดงต่อไป", "status.show_less": "แสดงน้อยลง", "status.show_less_all": "แสดงน้อยลงทั้งหมด", diff --git a/app/javascript/mastodon/locales/tlh.json b/app/javascript/mastodon/locales/tlh.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/app/javascript/mastodon/locales/tlh.json @@ -0,0 +1 @@ +{} diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json index 7ba66ae8c3..e6dd008bf2 100644 --- a/app/javascript/mastodon/locales/zh-TW.json +++ b/app/javascript/mastodon/locales/zh-TW.json @@ -376,7 +376,7 @@ "lightbox.previous": "上一步", "limited_account_hint.action": "一律顯示個人檔案", "limited_account_hint.title": "此個人檔案已被 {domain} 的管理員隱藏。", - "link_preview.author": "由 {name} 提供", + "link_preview.author": "來自 {name}", "lists.account.add": "新增至列表", "lists.account.remove": "自列表中移除", "lists.delete": "刪除列表", diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index e2ea4153c9..8463d4297d 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -70,6 +70,7 @@ ignore_unused: - 'imports.preambles.{following,blocking,muting,domain_blocking,bookmarks,lists}_html' - 'mail_subscriptions.unsubscribe.emails.*' - 'preferences.other' # some locales are missing other keys, therefore leading i18n-tasks to detect `preferences` as plural and not finding use + - 'edit_profile.other' # some locales are missing other keys, therefore leading i18n-tasks to detect `preferences` as plural and not finding use ignore_inconsistent_interpolations: - '*.one' diff --git a/config/locales/activerecord.fil.yml b/config/locales/activerecord.fil.yml new file mode 100644 index 0000000000..4084bf2f90 --- /dev/null +++ b/config/locales/activerecord.fil.yml @@ -0,0 +1 @@ +fil: diff --git a/config/locales/activerecord.ne.yml b/config/locales/activerecord.ne.yml new file mode 100644 index 0000000000..db03c5186b --- /dev/null +++ b/config/locales/activerecord.ne.yml @@ -0,0 +1 @@ +ne: diff --git a/config/locales/activerecord.ry.yml b/config/locales/activerecord.ry.yml new file mode 100644 index 0000000000..6fe57b65cd --- /dev/null +++ b/config/locales/activerecord.ry.yml @@ -0,0 +1 @@ +ry: diff --git a/config/locales/activerecord.tlh.yml b/config/locales/activerecord.tlh.yml new file mode 100644 index 0000000000..884714fb71 --- /dev/null +++ b/config/locales/activerecord.tlh.yml @@ -0,0 +1 @@ +tlh: diff --git a/config/locales/devise.fil.yml b/config/locales/devise.fil.yml new file mode 100644 index 0000000000..4084bf2f90 --- /dev/null +++ b/config/locales/devise.fil.yml @@ -0,0 +1 @@ +fil: diff --git a/config/locales/devise.ne.yml b/config/locales/devise.ne.yml new file mode 100644 index 0000000000..db03c5186b --- /dev/null +++ b/config/locales/devise.ne.yml @@ -0,0 +1 @@ +ne: diff --git a/config/locales/devise.ry.yml b/config/locales/devise.ry.yml new file mode 100644 index 0000000000..6fe57b65cd --- /dev/null +++ b/config/locales/devise.ry.yml @@ -0,0 +1 @@ +ry: diff --git a/config/locales/devise.tlh.yml b/config/locales/devise.tlh.yml new file mode 100644 index 0000000000..884714fb71 --- /dev/null +++ b/config/locales/devise.tlh.yml @@ -0,0 +1 @@ +tlh: diff --git a/config/locales/doorkeeper.fil.yml b/config/locales/doorkeeper.fil.yml new file mode 100644 index 0000000000..4084bf2f90 --- /dev/null +++ b/config/locales/doorkeeper.fil.yml @@ -0,0 +1 @@ +fil: diff --git a/config/locales/doorkeeper.ne.yml b/config/locales/doorkeeper.ne.yml new file mode 100644 index 0000000000..db03c5186b --- /dev/null +++ b/config/locales/doorkeeper.ne.yml @@ -0,0 +1 @@ +ne: diff --git a/config/locales/doorkeeper.ry.yml b/config/locales/doorkeeper.ry.yml new file mode 100644 index 0000000000..6fe57b65cd --- /dev/null +++ b/config/locales/doorkeeper.ry.yml @@ -0,0 +1 @@ +ry: diff --git a/config/locales/doorkeeper.sc.yml b/config/locales/doorkeeper.sc.yml index 1f1d38f3a9..297d6bd8f0 100644 --- a/config/locales/doorkeeper.sc.yml +++ b/config/locales/doorkeeper.sc.yml @@ -69,6 +69,7 @@ sc: confirmations: revoke: Seguru? index: + scopes: Permissos title: Is aplicatziones autorizadas tuas errors: messages: @@ -104,6 +105,20 @@ sc: authorized_applications: destroy: notice: Aplicatzione revocada. + grouped_scopes: + title: + accounts: Contos + bookmarks: Sinnalibros + conversations: Arresonadas + filters: Filtros + follows: Sighende + lists: Listas + media: Allegados multimediales + notifications: Notìficas + push: Notìficas push + reports: Informes + search: Chirca + statuses: Publicatziones layouts: admin: nav: diff --git a/config/locales/doorkeeper.tlh.yml b/config/locales/doorkeeper.tlh.yml new file mode 100644 index 0000000000..884714fb71 --- /dev/null +++ b/config/locales/doorkeeper.tlh.yml @@ -0,0 +1 @@ +tlh: diff --git a/config/locales/fil.yml b/config/locales/fil.yml new file mode 100644 index 0000000000..4084bf2f90 --- /dev/null +++ b/config/locales/fil.yml @@ -0,0 +1 @@ +fil: diff --git a/config/locales/fr-QC.yml b/config/locales/fr-QC.yml index 3aba8713f6..00a59463cd 100644 --- a/config/locales/fr-QC.yml +++ b/config/locales/fr-QC.yml @@ -611,6 +611,7 @@ fr-QC: created_at: Signalé delete_and_resolve: Supprimer les messages forwarded: Transféré + forwarded_replies_explanation: Ce rapport provient d'un utilisateur sur une autre instance et concerne du contenu non-local. Il vous a été transmis car le contenu signalé est en réponse à l'un de vos utilisateurs. forwarded_to: Transféré à %{domain} mark_as_resolved: Marquer comme résolu mark_as_sensitive: Marquer comme sensible diff --git a/config/locales/fr.yml b/config/locales/fr.yml index a69a5b535d..0a6601bbc1 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -611,6 +611,7 @@ fr: created_at: Signalé delete_and_resolve: Supprimer les messages forwarded: Transféré + forwarded_replies_explanation: Ce rapport provient d'un utilisateur sur une autre instance et concerne du contenu non-local. Il vous a été transmis car le contenu signalé est en réponse à l'un de vos utilisateurs. forwarded_to: Transféré à %{domain} mark_as_resolved: Marquer comme résolu mark_as_sensitive: Marquer comme sensible diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 1111277494..b1d8772b6b 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -37,10 +37,12 @@ lt: accounts: add_email_domain_block: Blokuoti el. pašto domeną approve: Patvirtinti + approved_msg: Sėkmingai patvirtinta %{username} registracijos paraiška are_you_sure: Ar esi įsitikinęs (-usi)? avatar: Avataras by_domain: Domenas change_email: + changed_msg: El. paštas sėkmingai pakeistas! current_email: Dabartinis el paštas label: Pakeisti el pašto adresą new_email: Naujas el pašto adresas @@ -466,6 +468,8 @@ lt: prev: Ankstesnis preferences: other: Kita + privacy: + hint_html: "Tikrink, kaip nori, kad tavo profilis ir įrašai būtų randami. Įjungus įvairias Mastodon funkcijas, jos gali padėti pasiekti platesnę auditoriją. Akimirką peržiūrėk šiuos nustatymus, kad įsitikintum, jog jie atitinka tavo naudojimo būdą." remote_follow: missing_resource: Jūsų paskyros nukreipimo URL nerasta scheduled_statuses: @@ -515,6 +519,11 @@ lt: public_long: Visi gali matyti unlisted: Neįtrauktas į sąrašus unlisted_long: Matyti gali visi, tačiau nėra įtraukti į viešąsias laiko skales + statuses_cleanup: + enabled_hint: Automatiškai ištrina įrašus, kai jie pasiekia nustatytą amžiaus ribą, nebent jie atitinka vieną iš toliau nurodytų išimčių + 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) stream_entries: sensitive_content: Jautrus turinys themes: @@ -551,22 +560,31 @@ lt: explanation: Štai keletas patarimų, kaip pradėti final_action: Pradėti kelti įrašus final_step: 'Pradėk skelbti! Net jei ir neturi sekėjų, tavo viešus įrašus gali matyti kiti, pavyzdžiui, vietinėje laiko skalėje arba saitažodžiuose. Galbūt norėsi prisistatyti saitažodyje #introductions.' - full_handle: Jūsų pilnas slapyvardis - full_handle_hint: Štai ką jūs sakytumėte savo draugams, kad jie galėtų jums siųsti žinutes arba just sekti iš kitų serverių. + full_handle: Tavo pilnas slapyvardis + full_handle_hint: Štai ką pasakytum savo draugams, kad jie galėtų parašyti arba sekti tave iš kito serverio. subject: Sveiki atvykę į Mastodon title: Sveiki atvykę, %{name}! users: - follow_limit_reached: Negalite sekti daugiau nei %{limit} žmonių + follow_limit_reached: Negali sekti daugiau nei %{limit} žmonių + go_to_sso_account_settings: Eik į savo tapatybės teikėjo paskyros nustatymus invalid_otp_token: Netinkamas dviejų veiksnių kodas otp_lost_help_html: Jei praradai prieigą prie abiejų, gali susisiek su %{email} - seamless_external_login: Jūs esate prisijungę per išorini įrenginį, todėl slaptąžodis ir el pašto nustatymai neprieinami. + seamless_external_login: Esi prisijungęs (-usi) per išorinę paslaugą, todėl slaptažodžio ir el. pašto nustatymai nepasiekiami. signed_in_as: 'Prisijungta kaip:' verification: + extra_instructions_html: Patarimas: nuoroda tavo svetainėje gali būti nematoma. Svarbi dalis – tai, kas rel="me" neleidžia apsimesti interneto svetainėse, kuriose yra naudotojų sukurto turinio. Vietoj to gali naudoti net nuorodą puslapio antraštėje esančią žymę a, tačiau HTML turi būti pasiekiamas nevykdant JavaScript. hint_html: "Savo tapatybės patvirtinimas Mastodon skirtas visiems. Remiantis atviraisiais žiniatinklio standartais, dabar ir visam laikui nemokamas. Viskas, ko tau reikia, yra asmeninė svetainė, pagal kurią žmonės tave atpažįsta. Kai iš savo profilio pateiksi nuorodą į šią svetainę, patikrinsime, ar svetainėje yra nuoroda į tavo profilį, ir parodysime vizualinį indikatorių." + instructions_html: Nukopijuok ir įklijuok toliau pateiktą kodą į savo svetainės HTML. Tada į vieną iš papildomų profilio laukų skirtuke „Redaguoti profilį“ įrašyk savo svetainės adresą ir išsaugok pakeitimus. verification: Patvirtinimas verified_links: Tavo patikrintos nuorodos webauthn_credentials: create: error: Kilo problema pridedant saugumo raktą. Bandyk dar kartą. + success: Tavo saugumo raktas buvo sėkmingai pridėtas. + delete_confirmation: Ar tikrai nori ištrinti šį saugumo raktą? + description_html: Jei įjungsi saugumo rakto tapatybės nustatymą, prisijungiant reikės naudoti vieną iš savo saugumo raktų. + destroy: + error: Kilo problema ištrinant saugumo raktą. Bandyk dar kartą. + success: Tavo saugumo raktas buvo sėkmingai ištrintas. nickname_hint: Įvesk naujojo saugumo rakto slapyvardį not_enabled: Dar neįjungei WebAuthn diff --git a/config/locales/ne.yml b/config/locales/ne.yml new file mode 100644 index 0000000000..db03c5186b --- /dev/null +++ b/config/locales/ne.yml @@ -0,0 +1 @@ +ne: diff --git a/config/locales/ry.yml b/config/locales/ry.yml new file mode 100644 index 0000000000..6fe57b65cd --- /dev/null +++ b/config/locales/ry.yml @@ -0,0 +1 @@ +ry: diff --git a/config/locales/sc.yml b/config/locales/sc.yml index fa7603f2b1..d92b64783a 100644 --- a/config/locales/sc.yml +++ b/config/locales/sc.yml @@ -5,6 +5,7 @@ sc: contact_missing: No cunfiguradu contact_unavailable: No a disponimentu hosted_on: Mastodon allogiadu in %{domain} + title: Informatziones accounts: follow: Sighi followers: @@ -45,6 +46,7 @@ sc: confirm: Cunfirma confirmed: Cunfirmadu confirming: Cunfirmende + custom: Personalizadu delete: Cantzella datos deleted: Cantzelladu demote: Degrada @@ -81,7 +83,9 @@ sc: moderation: active: Ativu all: Totus + disabled: Disativadu pending: De imbiare + silenced: Limitadu suspended: Suspèndidu title: Moderatzione moderation_notes: Notas de moderatzione @@ -112,6 +116,7 @@ sc: search: Chirca search_same_email_domain: Àteras persones cun su pròpiu domìniu de posta search_same_ip: Àteras persones cun sa pròpiu IP + security: Seguresa sensitive: Sensìbile sensitized: marcadu comente a sensìbile shared_inbox_url: URL de intrada cumpartzida @@ -122,6 +127,7 @@ sc: silenced: Limitadas statuses: Tuts subscribe: Sutascrie·ti + suspend: Suspensione suspended: Suspèndidu suspension_irreversible: Is datos de custu contu sunt istados cantzellados in manera irreversìbile. Podes bogare sa suspensione a su contu pro chi si potzat impreare, ma no at a recuperare datu perunu de is chi teniat in antis. suspension_reversible_hint_html: Su contu est istadu suspèndidu, e is datos ant a èssere cantzelladu de su totu su %{date}. Finas a tando, su contu si podet ripristinare sena efetu malu perunu. Si boles cantzellare totu is datos de su contu immediatamente ddu podes fàghere inoghe in bassu. @@ -274,6 +280,7 @@ sc: updated_msg: Emoji atualizadu upload: Càrriga dashboard: + media_storage: Immagasinamentu software: Programmas space: Impreu de ispàtziu title: Pannellu @@ -281,21 +288,28 @@ sc: add_new: Permite sa federatzione cun domìniu created_msg: Sa federatzione cun su domìniu est istada permìtida destroyed_msg: Sa federatzione cun su domìniu no est istada permìtida + import: Importatzione undo: Non permitas sa federatzione cun su domìniu domain_blocks: add_new: Agiunghe blocu de domìniu nou + confirm_suspension: + cancel: Annulla + confirm: Suspensione created_msg: Protzessende su blocu de domìniu destroyed_msg: Su blocu de domìniu est istadu iscontzadu domain: Domìniu edit: Modìfica su blocu de su domìniu existing_domain_block_html: As giai impostu lìmites prus astrintos a %{name}, ddu dias dèpere isblocare prima. + import: Importatzione new: create: Crea unu blocu hint: Su blocu de domìniu no at a impedire sa creatzione de contos noos in sa base de datos, ma ant a èssere aplicados in manera retroativa mètodos de moderatzione ispetzìficos subra custos contos. severity: noop: Perunu + silence: A sa muda suspend: Suspensione title: Blocu de domìniu nou + not_permitted: Non tenes su permissu de fàghere custa atzione obfuscate: Cua su nòmine de domìniu obfuscate_hint: Cua una parte de su nòmine de domìniu in sa lista si sa visualizatzione de sa lista de domìnios limitados est ativa private_comment: Cummentu privadu @@ -326,9 +340,24 @@ sc: title: Cussìgios de sighidura unsuppress: Recùpera su cussìgiu de sighidura instances: + back_to_all: Totus + back_to_limited: Limitadu + back_to_warning: Atentzione by_domain: Domìniu + content_policies: + policies: + reject_reports: Refuda informes + silence: A sa muda + suspend: Suspensione + dashboard: + instance_reports_measure: informes a subra de àtere + delivery: + all: Totus delivery_available: Sa cunsigna est a disponimentu empty: Perunu domìniu agatadu. + known_accounts: + one: "%{count} contu connòschidu" + other: "%{count} contos connòschidos" moderation: all: Totus limited: Limitadas @@ -390,18 +419,23 @@ sc: notes: one: "%{count} nota" other: "%{count} notas" + action_log: Registru de controllu action_taken_by: Mesuras adotadas dae are_you_sure: Seguru? assign_to_self: Assigna a mie assigned: Moderatzione assignada by_target_domain: Domìniu de su contu signaladu + cancel: Annulla comment: none: Perunu + confirm: Cunfirma created_at: Sinnaladu forwarded: Torradu a imbiare forwarded_to: Torradu a imbiare a %{domain} mark_as_resolved: Marca comente a isòrvidu + mark_as_sensitive: Signala comente a sensìbile mark_as_unresolved: Marcare comente a non isòrvidu + no_one_assigned: Nemos notes: create: Agiunghe una nota create_and_resolve: Isorve cun una nota @@ -419,6 +453,15 @@ sc: unassign: Boga s'assignatzione unresolved: No isòrvidu updated_at: Atualizadu + view_profile: Visualiza profilu + roles: + categories: + administration: Amministratzione + invites: Invitos + moderation: Moderatzione + delete: Cantzella + privileges: + administrator: Amministratzione rules: add_new: Agiunghe règula delete: Cantzella @@ -427,10 +470,26 @@ sc: empty: Peruna règula de serbidore definida ancora. title: Règulas de su serbidore settings: + about: + manage_rules: Gesti is règulas de su serbidore + title: Informatziones + appearance: + title: Aspetu + default_noindex: + desc_html: Ìmplicat a totu is utentes chi no apant modificadu custa cunfiguratzione + title: Esclude in manera predefinida is utentes dae s'inditzamentu de is motores de chirca + discovery: + follow_recommendations: Cussìgios de sighidura + profile_directory: Diretòriu de profilos + public_timelines: Lìnias de tempos pùblicas + title: Iscoberta + trends: Tendèntzias domain_blocks: all: Pro totus disabled: Pro nemos users: Pro utentes locales in lìnia + registrations: + title: Registros registrations_mode: modes: approved: Aprovatzione rechesta pro si registrare @@ -439,7 +498,10 @@ sc: site_uploads: delete: Cantzella s'archìviu carrigadu destroyed_msg: Càrriga de su situ cantzellada. + software_updates: + documentation_link: Àteras informatziones statuses: + application: Aplicatzione back_to_account: Torra a sa pàgina de su contu deleted: Cantzelladu media: @@ -447,6 +509,10 @@ sc: no_status_selected: Perunu istadu est istadu mudadu dae chi non nd'as seletzionadu title: Istados de su contu with_media: Cun elementos multimediales + strikes: + actions: + none: "%{name} at imbiadu un'avisu a %{target}" + suspend: "%{name} at suspèndidu su contu de %{target}" system_checks: database_schema_check: message_html: Ddoe at tràmudas de base de datos in suspesu. Pone·ddas in esecutzione pro ti assegurare chi s'aplicatzione funtzionet comente si tocat @@ -459,12 +525,24 @@ sc: review: Revisiona s'istadu updated_msg: Cunfiguratzione de etichetas atualizada title: Amministratzione + trends: + pending_review: De revisionare + tags: + title: Etichetas de tendèntzia + title: Tendèntzias warning_presets: add_new: Agiunghe noa 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 + disabled: Disativadu + enable: Ativa + enabled: Ativu + status: Istadu admin_mailer: new_pending_account: body: Is detàllios de su contu nou sunt a suta. Podes aprovare o refudare custa rechesta. @@ -473,6 +551,9 @@ sc: body: "%{reporter} at sinnaladu %{target}" body_remote: Una persone de su domìniu %{domain} at sinnaladu %{target} subject: Informe nou pro %{instance} (#%{id}) + new_trends: + new_trending_tags: + title: Etichetas de tendèntzia aliases: add_new: Crea unu nomìngiu created_msg: Nomìngiu creadu. Immoe podes cumintzare a tramudare dae su contu betzu. @@ -495,17 +576,21 @@ sc: notification_preferences: Muda is preferèntzias de posta salutation: "%{name}," settings: 'Muda is preferèntzias de posta: %{link}' + unsubscribe: Annulla sa sutiscritzione view: 'Visualizatzione:' view_profile: Visualiza profilu view_status: Ammustra s'istadu applications: created: Aplicatzione creada destroyed: Aplicatzione cantzellada + logout: Essi regenerate_token: Torra a generare s'identificadore de atzessu token_regenerated: Identificadore de atzessu generadu warning: Dae cara a custos datos. Non ddos cumpartzas mai cun nemos! your_token: S'identificadore tuo de atzessu auth: + confirmations: + login_link: intra delete_account: Cantzella su contu delete_account_html: Si boles cantzellare su contu, ddu podes fàghere inoghe. T'amus a dimandare una cunfirmatzione. description: @@ -528,11 +613,14 @@ sc: register: Registru registration_closed: "%{instance} no atzetat àteras persones" reset_password: Reseta sa crae + rules: + back: A coa security: Seguresa set_new_password: Cunfigura una crae noa status: account_status: Istadu de su contu confirming: Isetende chi sa posta eletrònica siat cumpletada. + functional: Su contu tuo est operativu. pending: Sa dimanda tua est in protzessu de revisione dae su personale nostru. Podet serbire unu pagu de tempus. As a retzire unu messàgiu eletrònicu si sa dimanda est aprovada. redirecting_to: Su contu tuo est inativu pro ite in die de oe est torrende a indiritzare a %{acct}. too_fast: Formulàriu imbiadu tropu a lestru, torra a proare. @@ -581,8 +669,14 @@ sc: more_details_html: Pro àteros detàllios, bide sa normativa de riservadesa. username_available: Su nòmine de utente tuo at a torrare a èssere a disponimentu username_unavailable: Su nòmine de utente tuo no at a abarrare a disponimentu + disputes: + strikes: + title_actions: + none: Atentzione domain_validator: invalid_domain: no est unu nòmine de domìniu vàlidu + edit_profile: + other: Àteru errors: '400': Sa dimanda chi as imbiadu non fiat vàlida o non fiat curreta. '403': Non tenes permissu pro bìdere custa pàgina. @@ -638,11 +732,15 @@ sc: title: Agiunghe unu filtru nou generic: all: Totus + cancel: Annulla changes_saved_msg: Modìficas sarvadas. + confirm: Cunfirma copy: Còpia delete: Cantzella + none: Perunu order_by: Òrdina pro save_changes: Sarva is modìficas + today: oe validation_errors: one: Calicuna cosa ancora no est andende. Bide sa faddina in bàsciu other: Calicuna cosa ancora no est andende. Bide is %{count} faddinas in bàsciu @@ -655,12 +753,15 @@ sc: overwrite: Subrascrie overwrite_long: Sostitui is registros atuales cun cussos noos preface: Podes importare datos chi as esportadu dae unu àteru serbidore, che a sa lista de sa gente chi ses sighende o blochende. + status: Istadu success: Datos carrigados; ant a èssere protzessados luego + type: Casta de importatzione types: blocking: Lista de blocos bookmarks: Sinnalibros domain_blocking: Lista domìnios blocados following: Lista de sighiduras + lists: Listas muting: Lista gente a sa muda upload: Càrriga invites: @@ -685,6 +786,13 @@ sc: expires_at: Iscadit uses: Impreos title: Invita gente + login_activities: + authentication_methods: + password: crae + webauthn: craes de seguresa + mail_subscriptions: + unsubscribe: + title: Annulla sa sutiscritzione media_attachments: validations: images_and_video: Non si podet allegare unu vìdeu in una publicatzione chi cuntenet giai immàgines @@ -797,6 +905,8 @@ sc: other: Àteru posting_defaults: Valores predefinidos de publicatzione public_timelines: Lìnias de tempos pùblicas + privacy: + search: Chirca reactions: errors: limit_reached: Lìmite de reatziones diferentes cròmpidu @@ -850,6 +960,7 @@ sc: platforms: adobe_air: Adobe Air android: Android + chrome_os: ChromeOS firefox_os: Firefox OS ios: iOS linux: Linux @@ -934,6 +1045,7 @@ sc: '2629746': 1 mese '31556952': 1 annu '5259492': 2 meses + '604800': 1 chida '63113904': 2 annos '7889238': 3 meses stream_entries: @@ -969,6 +1081,7 @@ sc: subject: S'archìviu tuo est prontu pro èssere iscarrigadu title: Collida dae s'archìviu warning: + reason: 'Resone:' subject: disable: Su contu tuo %{acct} est istadu cungeladu none: Avisu pro %{acct} diff --git a/config/locales/simple_form.fil.yml b/config/locales/simple_form.fil.yml new file mode 100644 index 0000000000..4084bf2f90 --- /dev/null +++ b/config/locales/simple_form.fil.yml @@ -0,0 +1 @@ +fil: diff --git a/config/locales/simple_form.lt.yml b/config/locales/simple_form.lt.yml index 39caaf6baf..d53b7105ef 100644 --- a/config/locales/simple_form.lt.yml +++ b/config/locales/simple_form.lt.yml @@ -27,14 +27,33 @@ lt: none: Naudok šią parinktį norėdamas (-a) išsiųsti įspėjimą naudotojui, nesukeldamas (-a) jokio kito veiksmo. sensitive: Priversk visus šio naudotojo medijos priedus pažymėti kaip jautrius. silence: Neleisk naudotojui skelbti viešai matomų įrašų, paslėpk jų įrašus ir pranešimus nuo žmonių, kurie neseka jo. Uždaro visus su šia paskyra susijusius ataskaitas. + suspend: Neleisk jokios sąveikos iš šios paskyros arba į ją ir ištrink jos turinį. Sugrąžinama per 30 dienų. Uždaro visas su šia paskyra susijusias ataskaitas. + warning_preset_id: Pasirinktinai. Gali pridėti pasirinktinį tekstą iš anksto nustatyto rinkinio pabaigoje + announcement: + all_day: Jei pažymėta, bus rodomos tik laikotarpio datos + ends_at: Pasirinktinai. Skelbimas šiuo laiku bus automatiškai panaikintas + scheduled_at: Palik tuščią, kad skelbimas būtų paskelbtas iš karto + starts_at: Pasirinktinai. Jei skelbimas susietas su tam tikru laiko tarpu + text: Gali naudoti įrašo sintaksę. Būk dėmesingas (-a), kiek vietos naudotojo ekrane užims skelbimas + appeal: + text: Gali pateikti apeliaciją dėl streiko tik vieną kartą defaults: + autofollow: Žmonės, kurie užsiregistruos per kvietimą, automatiškai seks tave avatar: PNG, GIF arba JPG. Ne daugiau kaip %{size}. Bus sumažintas iki %{dimensions} tšk. - header: PNG, GIF arba JPG. Ne daugiau kaip %{size}. Bus sumažintas iki %{dimensions}tšk. + bot: Signalizuoti kitiems, kad paskyroje daugiausia atliekami automatiniai veiksmai ir kad ji gali būti nestebima + context: Vienas arba keli kontekstai, kuriems turėtų būti taikomas filtras + current_password: Saugumo sumetimais įvesk dabartinės paskyros slaptažodį + current_username: Kad patvirtintum, įvesk dabartinės paskyros naudotojo vardą + digest: Siunčiama tik po ilgo neaktyvumo laikotarpio ir tik tuo atveju, jei negavai jokių asmeninių žinučių + email: Tau bus išsiųstas patvirtinimo el. laiškas + header: 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 password: Naudok bent 8 simbolius - phrase: Bus suderinta, neatsižvelgiant į teksto korpusą arba įrašo turinio įspėjimą + 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. + setting_aggregate_reblogs: Nerodyti naujų pakėlimų įrašams, kurie neseniai buvo pakelti (taikoma tik naujai gautiems pakėlimams) setting_always_send_emails: Paprastai pranešimai el. paštu nebus siunčiami, kai aktyviai naudoji Mastodon setting_default_sensitive: Jautrioji medija pagal numatytuosius nustatymus yra paslėpta ir gali būti atskleista paspaudus setting_display_media_default: Slėpti mediją, pažymėtą kaip jautrią @@ -42,16 +61,26 @@ lt: setting_display_media_show_all: Visada rodyti mediją setting_use_blurhash: Gradientai pagrįsti paslėptų vaizdų spalvomis, tačiau užgožia bet kokias detales setting_use_pending_items: Slėpti laiko skalės naujienas po paspaudimo, vietoj automatinio kanalo slinkimo + username: Gali naudoti raides, skaičius ir pabraukimus + whole_word: Kai raktažodis ar frazė yra tik raidinis ir skaitmeninis, jis bus taikomas tik tada, jei atitiks visą žodį featured_tag: name: 'Štai keletas pastaruoju metu dažniausiai saitažodžių, kurių tu naudojai:' + filters: + action: Pasirink, kokį veiksmą atlikti, kai įrašas atitinka filtrą + actions: + hide: Visiškai paslėpti filtruotą turinį ir elgtis taip, tarsi jo neegzistuotų + warn: Slėpti filtruojamą turinį po įspėjimu, paminint filtro pavadinimą form_admin_settings: + activity_api_enabled: Vietinių paskelbtų įrašų, aktyvių naudotojų ir naujų registracijų skaičiai kas savaitę + backups_retention_period: Laikyti sukurtus naudotojų archyvus nurodytą dienų skaičių. 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. 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ę. trends: Trendai rodo, kurios įrašai, saitažodžiai ir naujienų istorijos tavo serveryje sulaukia didžiausio susidomėjimo. sessions: - webauthn: Jei tai USB raktas, būtinai jį įkišk ir, jei reikia, paliesk. + otp: 'Įvesk telefono programėlėje sugeneruotą dviejų tapatybės kodą arba naudok vieną iš atkūrimo kodų:' + webauthn: Jei tai USB raktas, būtinai jį įkišk ir, jei reikia, paspausk. settings: indexable: Tavo profilio puslapis gali būti rodomas paieškos rezultatuose Google, Bing ir kituose. labels: diff --git a/config/locales/simple_form.ne.yml b/config/locales/simple_form.ne.yml new file mode 100644 index 0000000000..db03c5186b --- /dev/null +++ b/config/locales/simple_form.ne.yml @@ -0,0 +1 @@ +ne: diff --git a/config/locales/simple_form.ry.yml b/config/locales/simple_form.ry.yml new file mode 100644 index 0000000000..6fe57b65cd --- /dev/null +++ b/config/locales/simple_form.ry.yml @@ -0,0 +1 @@ +ry: diff --git a/config/locales/simple_form.sc.yml b/config/locales/simple_form.sc.yml index 2c47259961..5f5d633079 100644 --- a/config/locales/simple_form.sc.yml +++ b/config/locales/simple_form.sc.yml @@ -53,6 +53,8 @@ sc: domain: Custu domìniu at a pòdere recuperare datos dae custu serbidore e is datos in intrada dae cue ant a èssere protzessados e archiviados email_domain_block: with_dns_records: S'at a fàghere unu tentativu de risòlvere is registros DNS de su domìniu e fintzas is risultados ant a èssere blocados + form_admin_settings: + activity_api_enabled: Nùmeru de tuts publicados in locale, utentes ativos e registros noos in perìodos chidajolos form_challenge: current_password: Ses intrende in un'àrea segura imports: @@ -155,6 +157,7 @@ sc: setting_use_pending_items: Modalidade lenta severity: Severidade sign_in_token_attempt: Còdighe de seguresa + title: Tìtulu type: Casta de importatzione username: Nòmine utente username_or_email: Nòmine utente o indiritzu de posta eletrònica @@ -163,6 +166,16 @@ sc: with_dns_records: Include registros MX e indiritzos IP de su domìniu featured_tag: name: Eticheta + form_admin_settings: + activity_api_enabled: Pùblica istatìsticas agregadas subra s'atividade de s'utente + custom_css: CSS personalizadu + peers_api_enabled: Pùblica sa lista de serbidores iscobertos in s'API + profile_directory: Ativa diretòriu de profilos + show_domain_blocks: Ammustra blocos de domìniu + site_contact_username: Nòmine de utente de su cuntatu + site_short_description: Descritzione de su serbidore + site_title: Nòmine de su serbidore + thumbnail: Miniadura de su serbidore interactions: must_be_follower: Bloca is notìficas dae chie non ti sighit must_be_following: Bloca is notìficas dae gente chi non sighis @@ -186,6 +199,7 @@ sc: mention: Una persone t'at mentovadu pending_account: Unu contu nou tenet bisòngiu de una revisione reblog: Una persone at cumpartzidu s'istadu tuo + report: Imbiu de un'informe nou rule: text: Règula tag: @@ -193,6 +207,9 @@ sc: name: Eticheta trendable: Permite a custa eticheta de apàrrere in is tendèntzias usable: Permite a is tuts de impreare custa eticheta + user_role: + name: Nòmine + permissions_as_keys: Permissos 'no': Nono recommended: Cussigiadu required: diff --git a/config/locales/simple_form.tlh.yml b/config/locales/simple_form.tlh.yml new file mode 100644 index 0000000000..884714fb71 --- /dev/null +++ b/config/locales/simple_form.tlh.yml @@ -0,0 +1 @@ +tlh: diff --git a/config/locales/tlh.yml b/config/locales/tlh.yml new file mode 100644 index 0000000000..884714fb71 --- /dev/null +++ b/config/locales/tlh.yml @@ -0,0 +1 @@ +tlh: From 996c13a24d941e02458fa21d30e8334d04bdb2b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:33:11 +0100 Subject: [PATCH 30/49] Update dependency core-js to v3.34.0 (#28241) 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 4226fcc0fd..9e16226809 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5960,9 +5960,9 @@ __metadata: linkType: hard "core-js@npm:^3.30.2": - version: 3.33.3 - resolution: "core-js@npm:3.33.3" - checksum: 08abdc9470c8228b9d09f61e62ab312738681202c4c34e9638889125b304b235f34c4fe22e9d41c20906ac0fcc807dca57c5ff7d6b90021bf64e8fe23461d9ab + version: 3.34.0 + resolution: "core-js@npm:3.34.0" + checksum: 408a77898abe03bf3e5dec2a451c36f4745081cca9022f8bdf9b817d57bb6d3a534d555f47a4b95e1daa5e21dbc79122eac2402e25720d425f5925127e55dcd8 languageName: node linkType: hard From 3b710b96cf4a7ff743313f20b054c6220da3dd6b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:33:27 +0100 Subject: [PATCH 31/49] Update dependency irb to v1.10.1 (#28240) 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 9308a41c8b..4a409a0ad6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -377,7 +377,7 @@ GEM terminal-table (>= 1.5.1) idn-ruby (0.1.5) io-console (0.6.0) - irb (1.10.0) + irb (1.10.1) rdoc reline (>= 0.3.8) jmespath (1.6.2) @@ -608,7 +608,7 @@ GEM link_header (~> 0.0, >= 0.0.8) rdf-normalize (0.6.1) rdf (~> 3.2) - rdoc (6.6.0) + rdoc (6.6.1) psych (>= 4.0.0) redcarpet (3.6.0) redis (4.8.1) From faffd81976092fc5a95fb359ec5844c2af76101d Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 03:44:07 -0500 Subject: [PATCH 32/49] Remove double subject call in `services/unsuspend_account_service` spec (#28215) --- .../unsuspend_account_service_spec.rb | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/spec/services/unsuspend_account_service_spec.rb b/spec/services/unsuspend_account_service_spec.rb index c555b661ec..2f737c6215 100644 --- a/spec/services/unsuspend_account_service_spec.rb +++ b/spec/services/unsuspend_account_service_spec.rb @@ -45,14 +45,19 @@ RSpec.describe UnsuspendAccountService, type: :service do remote_follower.follow!(account) end - it "merges back into local followers' feeds" do + it 'merges back into feeds of local followers and sends update' do subject + + expect_feeds_merged + expect_updates_sent + end + + def expect_feeds_merged expect(FeedManager.instance).to have_received(:merge_into_home).with(account, local_follower) expect(FeedManager.instance).to have_received(:merge_into_list).with(account, list) end - it 'sends an update actor to followers and reporters' do - subject + def expect_updates_sent expect(a_request(:post, remote_follower.inbox_url).with { |req| match_update_actor_request(req, account) }).to have_been_made.once expect(a_request(:post, remote_reporter.inbox_url).with { |req| match_update_actor_request(req, account) }).to have_been_made.once end @@ -73,19 +78,20 @@ RSpec.describe UnsuspendAccountService, type: :service do allow(resolve_account_service).to receive(:call).with(account).and_return(account) end - it 're-fetches the account' do - subject + it 're-fetches the account, merges feeds, and preserves suspended' do + expect { subject } + .to_not change_suspended_flag + expect_feeds_merged expect(resolve_account_service).to have_received(:call).with(account) end - it "merges back into local followers' feeds" do - subject + def expect_feeds_merged expect(FeedManager.instance).to have_received(:merge_into_home).with(account, local_follower) expect(FeedManager.instance).to have_received(:merge_into_list).with(account, list) end - it 'does not change the “suspended” flag' do - expect { subject }.to_not change(account, :suspended?) + def change_suspended_flag + change(account, :suspended?) end end @@ -97,19 +103,20 @@ RSpec.describe UnsuspendAccountService, type: :service do end end - it 're-fetches the account' do - subject + it 're-fetches the account, does not merge feeds, marks suspended' do + expect { subject } + .to change_suspended_to_true expect(resolve_account_service).to have_received(:call).with(account) + expect_feeds_not_merged end - it "does not merge back into local followers' feeds" do - subject + def expect_feeds_not_merged expect(FeedManager.instance).to_not have_received(:merge_into_home).with(account, local_follower) expect(FeedManager.instance).to_not have_received(:merge_into_list).with(account, list) end - it 'marks account as suspended' do - expect { subject }.to change(account, :suspended?).from(false).to(true) + def change_suspended_to_true + change(account, :suspended?).from(false).to(true) end end @@ -118,13 +125,14 @@ RSpec.describe UnsuspendAccountService, type: :service do allow(resolve_account_service).to receive(:call).with(account).and_return(nil) end - it 're-fetches the account' do + it 're-fetches the account and does not merge feeds' do subject + expect(resolve_account_service).to have_received(:call).with(account) + expect_feeds_not_merged end - it "does not merge back into local followers' feeds" do - subject + def expect_feeds_not_merged expect(FeedManager.instance).to_not have_received(:merge_into_home).with(account, local_follower) expect(FeedManager.instance).to_not have_received(:merge_into_list).with(account, list) end From 5517df61de1e867afa531268755ee893ffca3c99 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 03:44:51 -0500 Subject: [PATCH 33/49] Remove double subject call in `services/activitypub/process_account_service` spec (#28214) --- .../process_account_service_spec.rb | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/spec/services/activitypub/process_account_service_spec.rb b/spec/services/activitypub/process_account_service_spec.rb index c02a0800a3..09eb5ddee3 100644 --- a/spec/services/activitypub/process_account_service_spec.rb +++ b/spec/services/activitypub/process_account_service_spec.rb @@ -129,12 +129,10 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do stub_const 'ActivityPub::ProcessAccountService::SUBDOMAINS_RATELIMIT', 5 end - it 'creates at least some accounts' do - expect { subject }.to change { Account.remote.count }.by_at_least(2) - end - - it 'creates no more account than the limit allows' do - expect { subject }.to change { Account.remote.count }.by_at_most(5) + it 'creates accounts without exceeding rate limit' do + expect { subject } + .to create_some_remote_accounts + .and create_fewer_than_rate_limit_accounts end end @@ -195,12 +193,20 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do end end - it 'creates at least some accounts' do - expect { subject.call('user1', 'foo.test', payload) }.to change { Account.remote.count }.by_at_least(2) - end - - it 'creates no more account than the limit allows' do - expect { subject.call('user1', 'foo.test', payload) }.to change { Account.remote.count }.by_at_most(5) + it 'creates accounts without exceeding rate limit' do + expect { subject.call('user1', 'foo.test', payload) } + .to create_some_remote_accounts + .and create_fewer_than_rate_limit_accounts end end + + private + + def create_some_remote_accounts + change(Account.remote, :count).by_at_least(2) + end + + def create_fewer_than_rate_limit_accounts + change(Account.remote, :count).by_at_most(5) + end end From be6bb1a10d6f1f23151198c6487f44145a0692ee Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 03:45:19 -0500 Subject: [PATCH 34/49] Remove double subject call in `services/suspend_account_service` spec (#28213) --- spec/services/suspend_account_service_spec.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/services/suspend_account_service_spec.rb b/spec/services/suspend_account_service_spec.rb index edb7050083..c258995b7e 100644 --- a/spec/services/suspend_account_service_spec.rb +++ b/spec/services/suspend_account_service_spec.rb @@ -18,14 +18,15 @@ RSpec.describe SuspendAccountService, type: :service do account.suspend! end - it "unmerges from local followers' feeds" do - subject + it 'unmerges from feeds of local followers and preserves suspended flag' do + expect { subject } + .to_not change_suspended_flag expect(FeedManager.instance).to have_received(:unmerge_from_home).with(account, local_follower) expect(FeedManager.instance).to have_received(:unmerge_from_list).with(account, list) end - it 'does not change the “suspended” flag' do - expect { subject }.to_not change(account, :suspended?) + def change_suspended_flag + change(account, :suspended?) end end From ed7b5c091b62d63e695d2f1ff946e021fb37fa18 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 03:51:09 -0500 Subject: [PATCH 35/49] Remove double subject call in `services/delete_account_service` spec (#28212) --- spec/services/delete_account_service_spec.rb | 25 +++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/spec/services/delete_account_service_spec.rb b/spec/services/delete_account_service_spec.rb index 68ab491e4e..8a19d3cf74 100644 --- a/spec/services/delete_account_service_spec.rb +++ b/spec/services/delete_account_service_spec.rb @@ -27,8 +27,15 @@ RSpec.describe DeleteAccountService, type: :service do let!(:account_note) { Fabricate(:account_note, account: account) } - it 'deletes associated owned records' do - expect { subject }.to change { + it 'deletes associated owned and target records and target notifications' do + expect { subject } + .to delete_associated_owned_records + .and delete_associated_target_records + .and delete_associated_target_notifications + end + + def delete_associated_owned_records + change do [ account.statuses, account.media_attachments, @@ -39,23 +46,23 @@ RSpec.describe DeleteAccountService, type: :service do account.polls, account.account_notes, ].map(&:count) - }.from([2, 1, 1, 1, 1, 1, 1, 1]).to([0, 0, 0, 0, 0, 0, 0, 0]) + end.from([2, 1, 1, 1, 1, 1, 1, 1]).to([0, 0, 0, 0, 0, 0, 0, 0]) end - it 'deletes associated target records' do - expect { subject }.to change { + def delete_associated_target_records + change do [ AccountPin.where(target_account: account), ].map(&:count) - }.from([1]).to([0]) + end.from([1]).to([0]) end - it 'deletes associated target notifications' do - expect { subject }.to change { + def delete_associated_target_notifications + change do %w( poll favourite status mention follow ).map { |type| Notification.where(type: type).count } - }.from([1, 1, 1, 1, 1]).to([0, 0, 0, 0, 0]) + end.from([1, 1, 1, 1, 1]).to([0, 0, 0, 0, 0]) end end From 0e8ba19113182f74a0adde0ac75a35694833316c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 03:52:30 -0500 Subject: [PATCH 36/49] Add spec coverage for `CLI::Emoji` class (#28182) --- spec/fixtures/files/elite-assets.tar.gz | Bin 0 -> 17590 bytes spec/lib/mastodon/cli/emoji_spec.rb | 54 ++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 spec/fixtures/files/elite-assets.tar.gz diff --git a/spec/fixtures/files/elite-assets.tar.gz b/spec/fixtures/files/elite-assets.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7b4f4425705c62fe4b538fa52148937e51a69552 GIT binary patch literal 17590 zcmV(nK=QvIiwFRdRBB}a1MIp5RGrPTD7bO=;0aE!;O_43Zo%Ds;~s)r(2ctVcMCy- zyKf-424`c#f6jUL-Z^vMc{6X_H*03i)L!-V*WJ}6-Bs27_1a9v&i1D6HjW++#-^@j z)=bWhR)GI%U}0h5;@}|rtK{b5{9DPw_V@bVfP;&bjFp3vosENogPoI;jD?l!?FS%Z z`7hVxKLHOncT?9lRUB+h9qpXF-0W=rbGkP&OUr-3=kKPF{ag9}7J$P;06+r(il$~{ z%Iah~WdDG_+5kvz$o7V>Z}?V+V*NkIQdC1j?eA}Y8v%Yp)qf&^`A0h@06=8s}+qrWN+%`?%`%(Zf@#sL8+qt588`2L;(PB|DDd+)ydPs(bUn*;;;V4H{|-?^}BeO zx|%w^d9?*#Q{MJ(MDo#le1Fpj0DxRo(ss~F3Ar${u<@|-b8&K+a(p)D=I7^?aKVBr)KW8wIpo8@>`1k%V)8Jpg|HtE>jhD>9-NwN}kd>Q-m4l0eorRT&larT)_ia^> zSy@@h6lBFj)x>3FwIrFmP2JsHnf|jd6I7ItV^h-5vsRLpvs3bQ<5t$xWKm_& zWmWPObyxKj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 0 HcmV?d00001 diff --git a/spec/lib/mastodon/cli/emoji_spec.rb b/spec/lib/mastodon/cli/emoji_spec.rb index 5d109eb524..530da91e74 100644 --- a/spec/lib/mastodon/cli/emoji_spec.rb +++ b/spec/lib/mastodon/cli/emoji_spec.rb @@ -4,5 +4,59 @@ require 'rails_helper' require 'mastodon/cli/emoji' describe Mastodon::CLI::Emoji do + subject { cli.invoke(action, args, options) } + + let(:cli) { described_class.new } + let(:args) { [] } + let(:options) { {} } + it_behaves_like 'CLI Command' + + describe '#purge' do + let(:action) { :purge } + + context 'with existing custom emoji' do + before { Fabricate(:custom_emoji) } + + it 'reports a successful purge' do + expect { subject } + .to output_results('OK') + end + end + end + + describe '#import' do + context 'with existing custom emoji' do + let(:import_path) { Rails.root.join('spec', 'fixtures', 'files', 'elite-assets.tar.gz') } + let(:action) { :import } + let(:args) { [import_path] } + + it 'reports about imported emoji' do + expect { subject } + .to output_results('Imported 1') + .and change(CustomEmoji, :count).by(1) + end + end + end + + describe '#export' do + context 'with existing custom emoji' do + before { Fabricate(:custom_emoji) } + after { File.delete(export_path) } + + let(:export_path) { Rails.root.join('tmp', 'export.tar.gz') } + let(:args) { [Rails.root.join('tmp')] } + let(:action) { :export } + + it 'reports about exported emoji' do + expect { subject } + .to output_results('Exported 1') + .and change { File.exist?(export_path) }.from(false).to(true) + end + end + end + + def output_results(string) + output(a_string_including(string)).to_stdout + end end From 954169966b23214a044fa8deda16be4b903526d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 08:52:55 +0000 Subject: [PATCH 37/49] New Crowdin Translations (automated) (#28245) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/lt.json | 26 +++---- config/locales/simple_form.lt.yml | 91 ++++++++++++++++++++++++- 2 files changed, 104 insertions(+), 13 deletions(-) diff --git a/app/javascript/mastodon/locales/lt.json b/app/javascript/mastodon/locales/lt.json index e588b85385..58c80e4117 100644 --- a/app/javascript/mastodon/locales/lt.json +++ b/app/javascript/mastodon/locales/lt.json @@ -40,7 +40,7 @@ "account.follows.empty": "Šis (-i) naudotojas (-a) dar nieko neseka.", "account.follows_you": "Seka tave", "account.go_to_profile": "Eiti į profilį", - "account.hide_reblogs": "Slėpti \"boosts\" iš @{name}", + "account.hide_reblogs": "Slėpti pakėlimus iš @{name}", "account.in_memoriam": "Atminimui.", "account.joined_short": "Prisijungė", "account.languages": "Keisti prenumeruojamas kalbas", @@ -49,19 +49,19 @@ "account.media": "Medija", "account.mention": "Paminėti @{name}", "account.moved_to": "{name} nurodė, kad dabar jų nauja paskyra yra:", - "account.mute": "Užtildyti @{name}", + "account.mute": "Nutildyti @{name}", "account.mute_notifications_short": "Nutildyti pranešimus", "account.mute_short": "Nutildyti", - "account.muted": "Užtildytas", + "account.muted": "Nutildytas", "account.no_bio": "Nėra pateikto aprašymo.", - "account.open_original_page": "Atidaryti originalinį tinklalapį", + "account.open_original_page": "Atidaryti originalinį puslapį", "account.posts": "Įrašai", "account.posts_with_replies": "Įrašai ir atsakymai", "account.report": "Pranešti @{name}", - "account.requested": "Laukiama patvirtinimo. Spausk, kad atšaukti sekimo užklausą.", + "account.requested": "Laukiama patvirtinimo. Spausk, kad atšaukti sekimo užklausą", "account.requested_follow": "{name} paprašė tave sekti", "account.share": "Bendrinti @{name} profilį", - "account.show_reblogs": "Rodyti \"boosts\" iš @{name}", + "account.show_reblogs": "Rodyti pakėlimus iš @{name}", "account.statuses_counter": "{count, plural, one {{counter} įrašas} few {{counter} įrašai} many {{counter} įrašo} other {{counter} įrašų}}", "account.unblock": "Atblokuoti @{name}", "account.unblock_domain": "Atblokuoti domeną {domain}", @@ -73,7 +73,7 @@ "account.unmute_short": "Atitildyti", "account_note.placeholder": "Spausk norėdamas (-a) pridėti pastabą", "admin.dashboard.daily_retention": "Vartotojų išbuvimo rodiklis pagal dieną po registracijos", - "admin.dashboard.monthly_retention": "Vartotojų išbuvimo rodiklis pagal mėnesį po registracijos", + "admin.dashboard.monthly_retention": "Naudotojų išlaikymo rodiklis pagal mėnesį po registracijos", "admin.dashboard.retention.average": "Vidurkis", "admin.dashboard.retention.cohort": "Registravimo mėnuo", "admin.dashboard.retention.cohort_size": "Nauji naudotojai", @@ -117,9 +117,9 @@ "column.favourites": "Mėgstamiausi", "column.firehose": "Tiesioginiai padavimai", "column.follow_requests": "Sekti prašymus", - "column.home": "Pradžia", + "column.home": "Pagrindinis", "column.lists": "Sąrašai", - "column.mutes": "Užtildyti naudotojai", + "column.mutes": "Nutildyti naudotojai", "column.notifications": "Pranešimai", "column.pins": "Prisegti įrašai", "column.public": "Federacinė laiko skalė", @@ -141,13 +141,13 @@ "compose.saved.body": "Įrašas išsaugotas.", "compose_form.direct_message_warning_learn_more": "Sužinoti daugiau", "compose_form.encryption_warning": "Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.", - "compose_form.hashtag_warning": "This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag.", - "compose_form.lock_disclaimer": "Jūsų paskyra nėra {locked}. Kiekvienas gali jus sekti ir peržiūrėti tik sekėjams skirtus įrašus.", + "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.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?", "compose_form.poll.add_option": "Pridėti pasirinkimą", "compose_form.poll.duration": "Apklausos trukmė", - "compose_form.poll.option_placeholder": "Pasirinkimas {number}", + "compose_form.poll.option_placeholder": "{number} pasirinkimas", "compose_form.poll.remove_option": "Pašalinti šį pasirinkimą", "compose_form.poll.switch_to_multiple": "Keisti apklausą, kad būtų galima pasirinkti kelis pasirinkimus", "compose_form.poll.switch_to_single": "Pakeisti apklausą, kad būtų galima pasirinkti vieną variantą", @@ -528,6 +528,8 @@ "search_results.hashtags": "Saitažodžiai", "search_results.nothing_found": "Nepavyko rasti nieko pagal šiuos paieškos terminus.", "search_results.statuses": "Toots", + "server_banner.about_active_users": "Žmonės, kurie naudojosi šiuo serveriu per pastarąsias 30 dienų (mėnesio aktyvūs naudotojai)", + "server_banner.active_users": "aktyvūs naudotojai", "sign_in_banner.sign_in": "Prisijungimas", "sign_in_banner.text": "Prisijunk, kad galėtum sekti profilius arba saitažodžius, mėgsti, bendrinti ir atsakyti į įrašus. Taip pat gali bendrauti iš savo paskyros kitame serveryje.", "status.admin_status": "Open this status in the moderation interface", diff --git a/config/locales/simple_form.lt.yml b/config/locales/simple_form.lt.yml index d53b7105ef..6eb90340dc 100644 --- a/config/locales/simple_form.lt.yml +++ b/config/locales/simple_form.lt.yml @@ -63,6 +63,8 @@ lt: setting_use_pending_items: Slėpti laiko skalės naujienas po paspaudimo, vietoj automatinio kanalo slinkimo username: Gali naudoti raides, skaičius ir pabraukimus whole_word: Kai raktažodis ar frazė yra tik raidinis ir skaitmeninis, jis bus taikomas tik tada, jei atitiks visą žodį + email_domain_block: + with_dns_records: Bus bandoma išspręsti nurodyto domeno DNS įrašus, o rezultatai taip pat bus blokuojami featured_tag: name: 'Štai keletas pastaruoju metu dažniausiai saitažodžių, kurių tu naudojai:' filters: @@ -77,15 +79,98 @@ lt: 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ę. + 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. sessions: otp: 'Įvesk telefono programėlėje sugeneruotą dviejų tapatybės kodą arba naudok vieną iš atkūrimo kodų:' webauthn: Jei tai USB raktas, būtinai jį įkišk ir, jei reikia, paspausk. settings: indexable: Tavo profilio puslapis gali būti rodomas paieškos rezultatuose Google, Bing ir kituose. + user: + chosen_languages: Kai pažymėta, viešose laiko skalėse bus rodomi tik įrašai pasirinktomis kalbomis + role: Vaidmuo valdo, kokius leidimus naudotojas (-a) turi labels: + account: + indexable: Įtraukti viešus įrašus į paieškos rezultatus + show_collections: Rodyti sekimus ir sekėjus profilyje + unlocked: Automatiškai priimti naujus sekėjus + account_warning_preset: + title: Pavadinimas + admin_account_action: + include_statuses: Įtraukti praneštus įrašus į el. laišką + defaults: + avatar: Profilio nuotrauka + bot: Tai automatinė paskyra + chosen_languages: Filtruoti kalbas + display_name: Rodomas vardas + email: El. pašto adresas + expires_in: Nustoja galioti po + fields: Papildomi laukai + irreversible: Mesti vietoj slėpti + locale: Sąsajos kalba + max_uses: Maksimalus naudojimo skaičius + new_password: Naujas slaptažodis + note: Biografija + password: Slaptažodis + phrase: Raktažodis arba frazė + setting_auto_play_gif: Automatiškai leisti animuotų GIF + setting_boost_modal: Rodyti patvirtinimo dialogą prieš pakėliant įrašą + setting_default_language: Skelbimo kalba + setting_default_privacy: Skelbimo privatumas + setting_default_sensitive: Visada žymėti mediją kaip jautrią + setting_delete_modal: Rodyti patvirtinimo dialogą prieš ištrinant įrašą + setting_display_media: Medijos rodymas + setting_display_media_hide_all: Slėpti viską + setting_display_media_show_all: Rodyti viską + setting_expand_spoilers: Visada išplėsti įrašus, pažymėtus turinio įspėjimais + setting_hide_network: Slėpti savo socialinę diagramą + setting_system_font_ui: Naudoti numatytąjį sistemos šriftą + setting_theme: Svetainės tema + setting_use_pending_items: Lėtas režimas + title: Pavadinimas + type: Importo tipas + username: Naudotojo vardas + username_or_email: Naudotojo vardas arba el. paštas + whole_word: Visas žodis + email_domain_block: + with_dns_records: Įtraukti MX įrašus ir domeno IP adresus featured_tag: name: Saitažodis + filters: + actions: + hide: Slėpti visiškai + warn: Slėpti su įspėjimu + form_admin_settings: + activity_api_enabled: Skelbti suvestinį statistiką apie naudotojų veiklą per API + bootstrap_timeline_accounts: Visada rekomenduoti šias paskyras naujiems naudotojams + content_cache_retention_period: Turinio talpyklos išlaikymo laikotarpis + custom_css: Pasirinktinis CSS + mascot: Pasirinktinis talismanas (pasenęs) + registrations_mode: Kas gali užsiregistruoti + 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 + site_terms: Privatumo politika + site_title: Serverio pavadinimas + theme: Numatytoji tema + thumbnail: Serverio miniatūra + invite_request: + text: Kodėl nori prisijungti? + notification_emails: + favourite: Kažkas pamėgo tavo įrašą + follow: Kažkas seka tave + follow_request: Kažkas paprašė sekti tave + mention: Kažkas paminėjo tave + pending_account: Reikia peržiūros naujam paskyrui + reblog: Kažkas pakėlė tavo įrašą + software_updates: + label: Yra nauja Mastodon versija + patch: Pranešti apie klaidų ištaisymo atnaujinimus + rule: + text: Taisyklė + settings: + show_application: Rodyti, iš kurios programėles išsiuntei įrašą tag: listable: Leisti šį saitažodį rodyti paieškose ir pasiūlymuose name: Saitažodis @@ -93,11 +178,15 @@ lt: usable: Leisti įrašams naudoti šį saitažodį user: role: Vaidmuo + time_zone: Laiko juosta user_role: + color: Ženklelio spalva + highlighted: Rodyti vaidmenį kaip ženklelį naudotojo profiliuose + name: Pavadinimas permissions_as_keys: Leidimai position: Prioritetas webhook: - events: Įgalinti įvykiai + events: Įjungti įvykiai template: Naudingosios apkrovos šablonas url: Galutinio taško URL 'no': Ne From 42afd303246abe1cf61752ab53cca466ea3cefdf Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 05:19:24 -0500 Subject: [PATCH 38/49] Replace Sprockets with Propshaft (#28239) --- .github/renovate.json5 | 1 - Gemfile | 3 +-- Gemfile.lock | 15 ++++++--------- config/application.rb | 1 - config/environments/development.rb | 11 ----------- config/initializers/assets.rb | 16 ---------------- 6 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 config/initializers/assets.rb diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 895dbfbad2..a7998ddfdc 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -50,7 +50,6 @@ matchManagers: ['bundler'], matchPackageNames: [ 'rack', // Needs to be synced with Rails version - 'sprockets', // Requires manual upgrade https://github.com/rails/sprockets/blob/master/UPGRADING.md#guide-to-upgrading-from-sprockets-3x-to-4x 'strong_migrations', // Requires manual upgrade 'sidekiq', // Requires manual upgrade 'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version diff --git a/Gemfile b/Gemfile index e3fb39e169..cfcbcc0d3c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ ruby '>= 3.0.0' gem 'puma', '~> 6.3' gem 'rails', '~> 7.1.1' -gem 'sprockets', '~> 3.7.2' +gem 'propshaft' gem 'thor', '~> 1.2' gem 'rack', '~> 2.2.7' @@ -89,7 +89,6 @@ gem 'sidekiq-unique-jobs', '~> 7.1' gem 'sidekiq-bulk', '~> 0.2.0' gem 'simple-navigation', '~> 4.4' gem 'simple_form', '~> 5.2' -gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie' gem 'stoplight', '~> 3.0.1' gem 'strong_migrations', '1.6.4' gem 'tty-prompt', '~> 0.23', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 4a409a0ad6..738562116f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -534,6 +534,11 @@ GEM net-smtp premailer (~> 1.7, >= 1.7.9) private_address_check (0.5.0) + propshaft (0.8.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) psych (5.1.1.1) stringio public_suffix (5.0.4) @@ -736,13 +741,6 @@ GEM simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) stackprof (0.2.25) statsd-ruby (1.5.0) stoplight (3.0.2) @@ -911,6 +909,7 @@ DEPENDENCIES posix-spawn premailer-rails private_address_check (~> 0.5) + propshaft public_suffix (~> 5.0) puma (~> 6.3) pundit (~> 2.3) @@ -949,8 +948,6 @@ DEPENDENCIES simple_form (~> 5.2) simplecov (~> 0.22) simplecov-lcov (~> 0.8) - sprockets (~> 3.7.2) - sprockets-rails (~> 3.4) stackprof stoplight (~> 3.0.1) strong_migrations (= 1.6.4) diff --git a/config/application.rb b/config/application.rb index 99ee4ffd76..b6426516ee 100644 --- a/config/application.rb +++ b/config/application.rb @@ -14,7 +14,6 @@ require 'active_job/railtie' # require 'action_mailbox/engine' # require 'action_text/engine' # require 'rails/test_unit/railtie' -require 'sprockets/railtie' # Used to be implicitly required in action_mailbox/engine require 'mail' diff --git a/config/environments/development.rb b/config/environments/development.rb index e601fc014c..3c13ada380 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -71,17 +71,6 @@ Rails.application.configure do # Highlight code that enqueued background job in logs. config.active_job.verbose_enqueue_logs = true - # Debug mode disables concatenation and preprocessing of assets. - config.assets.debug = true - - # Suppress logger output for asset requests. - config.assets.quiet = true - - # Adds additional error checking when serving assets at runtime. - # Checks for improperly declared sprockets dependencies. - # Raises helpful error messages. - config.assets.raise_runtime_errors = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb deleted file mode 100644 index e1fd5f8ced..0000000000 --- a/config/initializers/assets.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' - -# Add additional assets to the asset load path. -# Rails.application.config.assets.paths << Emoji.images_path - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) - -Rails.application.config.assets.initialize_on_precompile = true From ee83d5c7600b2cdc96db78c5ec40d8747853ba30 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 6 Dec 2023 08:42:12 -0500 Subject: [PATCH 39/49] Enable the eslint `react/no-unknown-property` rule (#28217) --- .eslintrc.js | 1 - .../mastodon/features/interaction_modal/index.jsx | 6 +++--- .../mastodon/features/ui/components/navigation_panel.jsx | 2 +- app/javascript/mastodon/features/video/index.jsx | 1 - package.json | 2 +- yarn.lock | 4 ++-- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 176879034b..e2d16a54a8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -120,7 +120,6 @@ module.exports = defineConfig({ 'react/jsx-uses-react': 'off', // not needed with new JSX transform 'react/jsx-wrap-multilines': 'error', 'react/no-deprecated': 'off', - 'react/no-unknown-property': 'off', 'react/react-in-jsx-scope': 'off', // not needed with new JSX transform 'react/self-closing-comp': 'error', diff --git a/app/javascript/mastodon/features/interaction_modal/index.jsx b/app/javascript/mastodon/features/interaction_modal/index.jsx index 4f145f9ed2..216c63a7e6 100644 --- a/app/javascript/mastodon/features/interaction_modal/index.jsx +++ b/app/javascript/mastodon/features/interaction_modal/index.jsx @@ -298,9 +298,9 @@ class LoginForm extends React.PureComponent { onFocus={this.handleFocus} onBlur={this.handleBlur} onKeyDown={this.handleKeyDown} - autocomplete='off' - autocapitalize='off' - spellcheck='false' + autoComplete='off' + autoCapitalize='off' + spellCheck='false' /> diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx index 4b0e03a0fd..d1b2a0910b 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx @@ -82,7 +82,7 @@ class NavigationPanel extends Component { {banner && -