From 3929e3c6d21226ad42f743a283576004d9c1c7eb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 10 Sep 2024 11:29:17 +0200 Subject: [PATCH 1/6] Change design of hide media button in web UI (#31807) --- .../mastodon/components/media_gallery.jsx | 32 +++++----- app/javascript/mastodon/locales/en.json | 2 +- .../styles/mastodon/components.scss | 60 +++++++++++-------- 3 files changed, 51 insertions(+), 43 deletions(-) diff --git a/app/javascript/mastodon/components/media_gallery.jsx b/app/javascript/mastodon/components/media_gallery.jsx index ed4805b05d..9a8f852128 100644 --- a/app/javascript/mastodon/components/media_gallery.jsx +++ b/app/javascript/mastodon/components/media_gallery.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import { PureComponent } from 'react'; -import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import { FormattedMessage } from 'react-intl'; import classNames from 'classnames'; @@ -10,17 +10,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; -import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; import { Blurhash } from 'mastodon/components/blurhash'; import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state'; -import { IconButton } from './icon_button'; - -const messages = defineMessages({ - toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: '{number, plural, one {Hide image} other {Hide images}}' }, -}); - class Item extends PureComponent { static propTypes = { @@ -215,7 +208,6 @@ class MediaGallery extends PureComponent { size: PropTypes.object, height: PropTypes.number.isRequired, onOpenMedia: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired, defaultWidth: PropTypes.number, cacheWidth: PropTypes.func, visible: PropTypes.bool, @@ -291,7 +283,7 @@ class MediaGallery extends PureComponent { } render () { - const { media, lang, intl, sensitive, defaultWidth, autoplay } = this.props; + const { media, lang, sensitive, defaultWidth, autoplay } = this.props; const { visible } = this.state; const width = this.state.width || defaultWidth; @@ -323,9 +315,7 @@ class MediaGallery extends PureComponent { ); - } else if (visible) { - spoilerButton = ; - } else { + } else if (!visible) { spoilerButton = ( + + )} ); } } -export default injectIntl(MediaGallery); +export default MediaGallery; diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 7c1d7f126d..39ee7b858f 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -457,7 +457,7 @@ "lists.subheading": "Your lists", "load_pending": "{count, plural, one {# new item} other {# new items}}", "loading_indicator.label": "Loading…", - "media_gallery.toggle_visible": "{number, plural, one {Hide image} other {Hide images}}", + "media_gallery.hide": "Hide", "moved_to_account_banner.text": "Your account {disabledAccount} is currently disabled because you moved to {movedToAccount}.", "mute_modal.hide_from_notifications": "Hide from notifications", "mute_modal.hide_options": "Hide options", diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 92d2034633..570c006faa 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4718,22 +4718,14 @@ a.status-card { position: absolute; z-index: 100; - &--minified { - display: block; - inset-inline-start: 4px; - top: 4px; - width: auto; - height: auto; + &--hidden { + display: none; } &--click-thru { pointer-events: none; } - &--hidden { - display: none; - } - &__overlay { display: flex; align-items: center; @@ -4745,19 +4737,20 @@ a.status-card { margin: 0; border: 0; color: $white; + line-height: 20px; + font-size: 14px; &__label { background-color: rgba($black, 0.45); backdrop-filter: blur(10px) saturate(180%) contrast(75%) brightness(70%); - border-radius: 6px; - padding: 10px 15px; + border-radius: 8px; + padding: 12px 16px; display: flex; align-items: center; justify-content: center; - gap: 8px; + gap: 4px; flex-direction: column; - font-weight: 500; - font-size: 14px; + font-weight: 600; } &__action { @@ -6838,10 +6831,32 @@ a.status-card { z-index: 9999; } -.media-gallery__item__badges { +.media-gallery__actions { position: absolute; bottom: 6px; - inset-inline-start: 6px; + inset-inline-end: 6px; + display: flex; + gap: 2px; + z-index: 2; + + &__pill { + display: block; + color: $white; + border: 0; + background: rgba($black, 0.65); + backdrop-filter: blur(10px) saturate(180%) contrast(75%) brightness(70%); + padding: 3px 12px; + border-radius: 99px; + font-size: 14px; + font-weight: 700; + line-height: 20px; + } +} + +.media-gallery__item__badges { + position: absolute; + bottom: 8px; + inset-inline-start: 8px; display: flex; gap: 2px; } @@ -6854,18 +6869,13 @@ a.status-card { color: $white; background: rgba($black, 0.65); backdrop-filter: blur(10px) saturate(180%) contrast(75%) brightness(70%); - padding: 2px 6px; + padding: 3px 8px; border-radius: 4px; - font-size: 11px; + font-size: 12px; font-weight: 700; z-index: 1; pointer-events: none; - line-height: 18px; - - .icon { - width: 15px; - height: 15px; - } + line-height: 20px; } .attachment-list { From e0c27a504788bdc6cd518072e557313e4ec5ee7a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 10 Sep 2024 14:00:40 +0200 Subject: [PATCH 2/6] Add ability to manage which websites can credit you in link previews (#31819) --- .../settings/verifications_controller.rb | 20 ++- app/helpers/context_helper.rb | 1 + app/javascript/styles/mastodon/forms.scss | 35 +++++ app/models/account.rb | 2 + .../concerns/account/attribution_domains.rb | 25 ++++ .../activitypub/actor_serializer.rb | 3 +- .../activitypub/process_account_service.rb | 1 + app/services/fetch_link_card_service.rb | 7 +- app/validators/domain_validator.rb | 21 ++- app/validators/lines_validator.rb | 9 ++ .../settings/verifications/show.html.haml | 34 ++++- config/locales/activerecord.en.yml | 6 + config/locales/an.yml | 2 - config/locales/ar.yml | 2 - config/locales/be.yml | 2 - config/locales/bg.yml | 2 - config/locales/ca.yml | 2 - config/locales/ckb.yml | 2 - config/locales/co.yml | 2 - config/locales/cs.yml | 2 - config/locales/cy.yml | 2 - config/locales/da.yml | 2 - config/locales/de.yml | 2 - config/locales/el.yml | 2 - config/locales/en-GB.yml | 2 - config/locales/en.yml | 9 +- config/locales/eo.yml | 2 - config/locales/es-AR.yml | 2 - config/locales/es-MX.yml | 2 - config/locales/es.yml | 2 - config/locales/et.yml | 2 - config/locales/eu.yml | 2 - config/locales/fa.yml | 2 - config/locales/fi.yml | 2 - config/locales/fo.yml | 2 - config/locales/fr-CA.yml | 2 - config/locales/fr.yml | 2 - config/locales/fy.yml | 2 - config/locales/ga.yml | 2 - config/locales/gd.yml | 2 - config/locales/gl.yml | 2 - config/locales/he.yml | 2 - config/locales/hu.yml | 2 - config/locales/hy.yml | 2 - config/locales/ia.yml | 2 - config/locales/id.yml | 2 - config/locales/ie.yml | 2 - config/locales/io.yml | 2 - config/locales/is.yml | 2 - config/locales/it.yml | 2 - config/locales/ja.yml | 2 - config/locales/kk.yml | 2 - config/locales/ko.yml | 2 - config/locales/ku.yml | 2 - config/locales/lad.yml | 2 - config/locales/lv.yml | 2 - config/locales/ms.yml | 2 - config/locales/my.yml | 2 - config/locales/nl.yml | 2 - config/locales/nn.yml | 2 - config/locales/no.yml | 2 - config/locales/oc.yml | 2 - config/locales/pl.yml | 2 - config/locales/pt-BR.yml | 2 - config/locales/pt-PT.yml | 2 - config/locales/ru.yml | 2 - config/locales/sc.yml | 2 - config/locales/sco.yml | 2 - config/locales/si.yml | 2 - config/locales/simple_form.en.yml | 2 + config/locales/sk.yml | 2 - config/locales/sl.yml | 2 - config/locales/sq.yml | 2 - config/locales/sr-Latn.yml | 2 - config/locales/sr.yml | 2 - config/locales/sv.yml | 2 - config/locales/th.yml | 2 - config/locales/tr.yml | 2 - config/locales/uk.yml | 2 - config/locales/vi.yml | 2 - config/locales/zh-CN.yml | 2 - config/locales/zh-HK.yml | 2 - config/locales/zh-TW.yml | 2 - config/routes/settings.rb | 2 +- ...637_add_attribution_domains_to_accounts.rb | 7 + db/schema.rb | 3 +- .../settings/migrations_controller_spec.rb | 1 + spec/models/account_spec.rb | 16 +++ .../process_account_service_spec.rb | 20 +++ spec/services/bulk_import_service_spec.rb | 8 +- spec/validators/domain_validator_spec.rb | 125 ++++++++++++++++++ spec/validators/lines_validator_spec.rb | 46 +++++++ 92 files changed, 381 insertions(+), 160 deletions(-) create mode 100644 app/models/concerns/account/attribution_domains.rb create mode 100644 app/validators/lines_validator.rb create mode 100644 db/migrate/20240909014637_add_attribution_domains_to_accounts.rb create mode 100644 spec/validators/domain_validator_spec.rb create mode 100644 spec/validators/lines_validator_spec.rb diff --git a/app/controllers/settings/verifications_controller.rb b/app/controllers/settings/verifications_controller.rb index fc4f23bb18..4e0663253c 100644 --- a/app/controllers/settings/verifications_controller.rb +++ b/app/controllers/settings/verifications_controller.rb @@ -2,14 +2,30 @@ class Settings::VerificationsController < Settings::BaseController before_action :set_account + before_action :set_verified_links - def show - @verified_links = @account.fields.select(&:verified?) + def show; end + + def update + if UpdateAccountService.new.call(@account, account_params) + ActivityPub::UpdateDistributionWorker.perform_async(@account.id) + redirect_to settings_verification_path, notice: I18n.t('generic.changes_saved_msg') + else + render :show + end end private + def account_params + params.require(:account).permit(:attribution_domains_as_text) + end + def set_account @account = current_account end + + def set_verified_links + @verified_links = @account.fields.select(&:verified?) + end end diff --git a/app/helpers/context_helper.rb b/app/helpers/context_helper.rb index cbefe0fe53..a0c1781d24 100644 --- a/app/helpers/context_helper.rb +++ b/app/helpers/context_helper.rb @@ -41,6 +41,7 @@ module ContextHelper 'cipherText' => 'toot:cipherText', }, suspended: { 'toot' => 'http://joinmastodon.org/ns#', 'suspended' => 'toot:suspended' }, + attribution_domains: { 'toot' => 'http://joinmastodon.org/ns#', 'attributionDomains' => { '@id' => 'toot:attributionDomains', '@type' => '@id' } }, }.freeze def full_context diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index 926df4e96f..56f7b893f3 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -12,6 +12,41 @@ code { margin: 50px auto; } +.form-section { + border-radius: 8px; + background: var(--surface-background-color); + padding: 24px; + margin-bottom: 24px; +} + +.fade-out-top { + position: relative; + overflow: hidden; + height: 160px; + + &::after { + content: ''; + display: block; + background: linear-gradient( + to bottom, + var(--surface-background-color), + transparent + ); + position: absolute; + top: 0; + inset-inline-start: 0; + width: 100%; + height: 100px; + pointer-events: none; + } + + & > div { + position: absolute; + inset-inline-start: 0; + bottom: 0; + } +} + .indicator-icon { display: flex; align-items: center; diff --git a/app/models/account.rb b/app/models/account.rb index 4a7c752e7c..0a2cff2fe8 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -51,6 +51,7 @@ # reviewed_at :datetime # requested_review_at :datetime # indexable :boolean default(FALSE), not null +# attribution_domains :string default([]), is an Array # class Account < ApplicationRecord @@ -88,6 +89,7 @@ class Account < ApplicationRecord include Account::Merging include Account::Search include Account::StatusesSearch + include Account::AttributionDomains include DomainMaterializable include DomainNormalizable include Paginable diff --git a/app/models/concerns/account/attribution_domains.rb b/app/models/concerns/account/attribution_domains.rb new file mode 100644 index 0000000000..37a498a150 --- /dev/null +++ b/app/models/concerns/account/attribution_domains.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module Account::AttributionDomains + extend ActiveSupport::Concern + + included do + validates :attribution_domains_as_text, domain: { multiline: true }, lines: { maximum: 100 }, if: -> { local? && will_save_change_to_attribution_domains? } + end + + def attribution_domains_as_text + self[:attribution_domains].join("\n") + end + + def attribution_domains_as_text=(str) + self[:attribution_domains] = str.split.filter_map do |line| + line.strip.delete_prefix('*.') + end + end + + def can_be_attributed_from?(domain) + segments = domain.split('.') + variants = segments.map.with_index { |_, i| segments[i..].join('.') }.to_set + self[:attribution_domains].to_set.intersect?(variants) + end +end diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb index 4ab48ff204..a6281e23b9 100644 --- a/app/serializers/activitypub/actor_serializer.rb +++ b/app/serializers/activitypub/actor_serializer.rb @@ -8,7 +8,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer context_extensions :manually_approves_followers, :featured, :also_known_as, :moved_to, :property_value, :discoverable, :olm, :suspended, - :memorial, :indexable + :memorial, :indexable, :attribution_domains attributes :id, :type, :following, :followers, :inbox, :outbox, :featured, :featured_tags, @@ -25,6 +25,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer attribute :moved_to, if: :moved? attribute :also_known_as, if: :also_known_as? attribute :suspended, if: :suspended? + attribute :attribution_domains, if: -> { object.attribution_domains.any? } class EndpointsSerializer < ActivityPub::Serializer include RoutingHelper diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index b667e97f4d..1e2d614d72 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -117,6 +117,7 @@ class ActivityPub::ProcessAccountService < BaseService @account.discoverable = @json['discoverable'] || false @account.indexable = @json['indexable'] || false @account.memorial = @json['memorial'] || false + @account.attribution_domains = as_array(@json['attributionDomains'] || []).map { |item| value_or_id(item) } end def set_fetchable_key! diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 36d5c490a6..7662fc1f29 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -153,12 +153,13 @@ class FetchLinkCardService < BaseService return if html.nil? link_details_extractor = LinkDetailsExtractor.new(@url, @html, @html_charset) - provider = PreviewCardProvider.matching_domain(Addressable::URI.parse(link_details_extractor.canonical_url).normalized_host) - linked_account = ResolveAccountService.new.call(link_details_extractor.author_account, suppress_errors: true) if link_details_extractor.author_account.present? && provider&.trendable? + domain = Addressable::URI.parse(link_details_extractor.canonical_url).normalized_host + provider = PreviewCardProvider.matching_domain(domain) + linked_account = ResolveAccountService.new.call(link_details_extractor.author_account, suppress_errors: true) if link_details_extractor.author_account.present? @card = PreviewCard.find_or_initialize_by(url: link_details_extractor.canonical_url) if link_details_extractor.canonical_url != @card.url @card.assign_attributes(link_details_extractor.to_preview_card_attributes) - @card.author_account = linked_account + @card.author_account = linked_account if linked_account&.can_be_attributed_from?(domain) || provider&.trendable? @card.save_with_optional_image! unless @card.title.blank? && @card.html.blank? end end diff --git a/app/validators/domain_validator.rb b/app/validators/domain_validator.rb index 3a951f9a7e..718fd190f1 100644 --- a/app/validators/domain_validator.rb +++ b/app/validators/domain_validator.rb @@ -1,22 +1,29 @@ # frozen_string_literal: true class DomainValidator < ActiveModel::EachValidator + MAX_DOMAIN_LENGTH = 256 + MIN_LABEL_LENGTH = 1 + MAX_LABEL_LENGTH = 63 + ALLOWED_CHARACTERS_RE = /^[a-z0-9\-]+$/i + def validate_each(record, attribute, value) return if value.blank? - domain = if options[:acct] - value.split('@').last - else - value - end + (options[:multiline] ? value.split : [value]).each do |domain| + _, domain = domain.split('@') if options[:acct] - record.errors.add(attribute, I18n.t('domain_validator.invalid_domain')) unless compliant?(domain) + next if domain.blank? + + record.errors.add(attribute, options[:multiline] ? :invalid_domain_on_line : :invalid, value: domain) unless compliant?(domain) + end end private def compliant?(value) - Addressable::URI.new.tap { |uri| uri.host = value } + uri = Addressable::URI.new + uri.host = value + uri.normalized_host.size < MAX_DOMAIN_LENGTH && uri.normalized_host.split('.').all? { |label| label.size.between?(MIN_LABEL_LENGTH, MAX_LABEL_LENGTH) && label =~ ALLOWED_CHARACTERS_RE } rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError false end diff --git a/app/validators/lines_validator.rb b/app/validators/lines_validator.rb new file mode 100644 index 0000000000..27a108bb2c --- /dev/null +++ b/app/validators/lines_validator.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class LinesValidator < ActiveModel::EachValidator + def validate_each(record, attribute, value) + return if value.blank? + + record.errors.add(attribute, :too_many_lines, limit: options[:maximum]) if options[:maximum].present? && value.split.size > options[:maximum] + end +end diff --git a/app/views/settings/verifications/show.html.haml b/app/views/settings/verifications/show.html.haml index 4fb2918018..5318b0767d 100644 --- a/app/views/settings/verifications/show.html.haml +++ b/app/views/settings/verifications/show.html.haml @@ -5,7 +5,9 @@ %h2= t('settings.profile') = render partial: 'settings/shared/profile_navigation' -.simple_form +.simple_form.form-section + %h3= t('verification.website_verification') + %p.lead= t('verification.hint_html') %h4= t('verification.here_is_how') @@ -28,3 +30,33 @@ %span.verified-badge = material_symbol 'check', class: 'verified-badge__mark' %span= field.value + += simple_form_for @account, url: settings_verification_path, html: { method: :put, class: 'form-section' } do |f| + = render 'shared/error_messages', object: @account + + %h3= t('author_attribution.title') + + %p.lead= t('author_attribution.hint_html') + + .fields-row + .fields-row__column.fields-row__column-6 + .fields-group + = f.input :attribution_domains_as_text, as: :text, wrapper: :with_block_label, input_html: { placeholder: "example1.com\nexample2.com\nexample3.com", rows: 4 } + .fields-row__column.fields-row__column-6 + .fields-group.fade-out-top + %div + .status-card.expanded.bottomless + .status-card__image + = image_tag frontend_asset_url('images/preview.png'), alt: '', class: 'status-card__image-image' + .status-card__content + %span.status-card__host + %span= t('author_attribution.s_blog', name: @account.username) + · + %time.time-ago{ datetime: 1.year.ago.to_date.iso8601 } + %strong.status-card__title= t('author_attribution.example_title') + .more-from-author + = logo_as_symbol(:icon) + = t('author_attribution.more_from_html', name: link_to(root_url, class: 'story__details__shared__author-link') { image_tag(@account.avatar.url, class: 'account__avatar', width: 16, height: 16, alt: '') + content_tag(:bdi, display_name(@account)) }) + + .actions + = f.button :button, t('generic.save_changes'), type: :submit diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml index a53c7c6e9e..e135856036 100644 --- a/config/locales/activerecord.en.yml +++ b/config/locales/activerecord.en.yml @@ -15,6 +15,12 @@ en: user/invite_request: text: Reason errors: + attributes: + domain: + invalid: is not a valid domain name + messages: + invalid_domain_on_line: "%{value} is not a valid domain name" + too_many_lines: is over the limit of %{limit} lines models: account: attributes: diff --git a/config/locales/an.yml b/config/locales/an.yml index 9afc9e881d..41eeee4614 100644 --- a/config/locales/an.yml +++ b/config/locales/an.yml @@ -1017,8 +1017,6 @@ an: your_appeal_approved: S'aprebó la tuya apelación your_appeal_pending: Has ninviau una apelación your_appeal_rejected: La tuya apelación ha estau refusada - domain_validator: - invalid_domain: no ye un nombre de dominio valido errors: '400': La solicitut que has ninviau no ye valida u yera malformada. '403': No tiens permiso pa acceder ta esta pachina. diff --git a/config/locales/ar.yml b/config/locales/ar.yml index ee05684b6c..06cea7ecb3 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1239,8 +1239,6 @@ ar: your_appeal_approved: تمت الموافقة على طعنك your_appeal_pending: لقد قمت بتقديم طعن your_appeal_rejected: تم رفض طعنك - domain_validator: - invalid_domain: ليس بإسم نطاق صالح edit_profile: basic_information: معلومات أساسية hint_html: "قم بتخصيص ما سيراه الناس في ملفك الشخصي العام وبجوار منشوراتك. من المرجح أن يتابعك أشخاص آخرون ويتفاعلون معك إن كان لديك صفحة شخصية مملوء وصورة." diff --git a/config/locales/be.yml b/config/locales/be.yml index fbeb55add7..31a31e9e61 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -1256,8 +1256,6 @@ be: your_appeal_approved: Ваша абскарджанне было ўхвалена your_appeal_pending: Вы адправілі апеляцыю your_appeal_rejected: Ваша абскарджанне было адхілена - domain_validator: - invalid_domain: не з'яўляецца сапраўдным даменным імем edit_profile: basic_information: Асноўная інфармацыя hint_html: "Наладзьце тое, што людзі будуць бачыць у вашым профілі і побач з вашымі паведамленнямі. Іншыя людзі з большай верагоднасцю будуць сачыць і ўзаемадзейнічаць з вамі, калі ў вас ёсць запоўнены профіль і фота профілю." diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 56ab759174..42a626c695 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1179,8 +1179,6 @@ bg: your_appeal_approved: Вашето обжалване е одобрено your_appeal_pending: Подадохте обжалване your_appeal_rejected: Вашето обжалване е отхвърлено - domain_validator: - invalid_domain: не е валидно име на домейн edit_profile: basic_information: Основна информация hint_html: "Персонализирайте какво хората виждат в обществения ви профил и до публикациите ви. Другите хора са по-склонни да ви последват и да взаимодействат с вас, когато имате попълнен профил и снимка на профила." diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 121266916f..e1025563eb 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1216,8 +1216,6 @@ ca: your_appeal_approved: La teva apel·lació s'ha aprovat your_appeal_pending: Has enviat una apel·lació your_appeal_rejected: La teva apel·lació ha estat rebutjada - domain_validator: - invalid_domain: no es un nom de domini vàlid edit_profile: basic_information: Informació bàsica hint_html: "Personalitza el que la gent veu en el teu perfil públic i a prop dels teus tuts.. És més probable que altres persones et segueixin i interaccionin amb tu quan tens emplenat el teu perfil i amb la teva imatge." diff --git a/config/locales/ckb.yml b/config/locales/ckb.yml index 15c5690cdd..3ecef4bb4d 100644 --- a/config/locales/ckb.yml +++ b/config/locales/ckb.yml @@ -646,8 +646,6 @@ ckb: strikes: title_actions: none: ئاگاداری - domain_validator: - invalid_domain: ناوی دۆمەین بڕوادار نییە errors: '400': داواکاریەکەی کە پێشکەشت کردووە نادروستە یان نەیپێکا. '403': تۆ مۆڵەتت نیە بۆ بینینی ئەم لاپەڕەیە. diff --git a/config/locales/co.yml b/config/locales/co.yml index 5ee69ff8ad..7c0695a770 100644 --- a/config/locales/co.yml +++ b/config/locales/co.yml @@ -603,8 +603,6 @@ co: more_details_html: Per più di ditagli, videte a pulitica di vita privata. username_available: U vostru cugnome riduvinterà dispunibule username_unavailable: U vostru cugnome ùn sarà sempre micca dispunibule - domain_validator: - invalid_domain: ùn hè micca un nome di duminiu currettu errors: '400': A richiesta mandata ùn era micca valida o curretta. '403': Ùn site micca auturizatu·a à vede sta pagina. diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 98e2c30526..7d4d2296ca 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1213,8 +1213,6 @@ cs: your_appeal_approved: Vaše odvolání bylo schváleno your_appeal_pending: Podali jste odvolání your_appeal_rejected: Vaše odvolání bylo zamítnuto - domain_validator: - invalid_domain: není platné doménové jméno edit_profile: basic_information: Základní informace hint_html: "Nastavte si, co lidé uvidí na vašem veřejném profilu a vedle vašich příspěvků. Ostatní lidé vás budou spíše sledovat a komunikovat s vámi, když budete mít vyplněný profil a profilový obrázek." diff --git a/config/locales/cy.yml b/config/locales/cy.yml index b3886ffeb2..d317efad3f 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -1306,8 +1306,6 @@ cy: your_appeal_approved: Mae eich apêl wedi'i chymeradwyo your_appeal_pending: Rydych wedi cyflwyno apêl your_appeal_rejected: Mae eich apêl wedi'i gwrthod - domain_validator: - invalid_domain: ddim yn enw parth dilys edit_profile: basic_information: Gwybodaeth Sylfaenol hint_html: "Addaswch yr hyn y mae pobl yn ei weld ar eich proffil cyhoeddus ac wrth ymyl eich postiadau. Mae pobl eraill yn fwy tebygol o'ch dilyn yn ôl a rhyngweithio â chi pan fydd gennych broffil wedi'i lenwi a llun proffil." diff --git a/config/locales/da.yml b/config/locales/da.yml index 89430e37ed..19ee9b9d81 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1235,8 +1235,6 @@ da: your_appeal_approved: Din appel er godkendt your_appeal_pending: Du har indgivet en appel your_appeal_rejected: Din appel er afvist - domain_validator: - invalid_domain: er ikke et gyldigt domænenavn edit_profile: basic_information: Oplysninger hint_html: "Tilpas hvad folk ser på din offentlige profil og ved siden af dine indlæg. Andre personer vil mere sandsynligt følge dig tilbage og interagere med dig, når du har en udfyldt profil og et profilbillede." diff --git a/config/locales/de.yml b/config/locales/de.yml index 975ec517f7..b75aada764 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1234,8 +1234,6 @@ de: your_appeal_approved: Dein Einspruch wurde angenommen your_appeal_pending: Du hast Einspruch erhoben your_appeal_rejected: Dein Einspruch wurde abgelehnt - domain_validator: - invalid_domain: ist keine gültige Domain edit_profile: basic_information: Allgemeine Informationen hint_html: "Bestimme, was andere auf deinem öffentlichen Profil und neben deinen Beiträgen sehen können. Wenn du ein Profilbild festlegst und dein Profil vervollständigst, werden andere eher mit dir interagieren und dir folgen." diff --git a/config/locales/el.yml b/config/locales/el.yml index 6b1d8bc0e5..3cb9075c38 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1192,8 +1192,6 @@ el: your_appeal_approved: Η έφεση σου έχει εγκριθεί your_appeal_pending: Υπέβαλλες έφεση your_appeal_rejected: Η έφεση σου απορρίφθηκε - domain_validator: - invalid_domain: δεν είναι έγκυρο όνομα τομέα edit_profile: basic_information: Βασικές πληροφορίες hint_html: "Τροποποίησε τί βλέπουν άτομα στο δημόσιο προφίλ σου και δίπλα στις αναρτήσεις σου. Είναι πιο πιθανό κάποιος να σε ακολουθήσει πίσω και να αλληλεπιδράσουν μαζί σου αν έχεις ολοκληρωμένο προφίλ και εικόνα προφίλ." diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index bcde9956c2..a3036c2f96 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1202,8 +1202,6 @@ en-GB: your_appeal_approved: Your appeal has been approved your_appeal_pending: You have submitted an appeal your_appeal_rejected: Your appeal has been rejected - domain_validator: - invalid_domain: is not a valid domain name edit_profile: basic_information: Basic information hint_html: "Customise what people see on your public profile and next to your posts. Other people are more likely to follow you back and interact with you when you have a filled out profile and a profile picture." diff --git a/config/locales/en.yml b/config/locales/en.yml index 980bd481b1..05300acea5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1161,6 +1161,12 @@ en: view_strikes: View past strikes against your account too_fast: Form submitted too fast, try again. use_security_key: Use security key + author_attribution: + example_title: Sample text + hint_html: Control how you're credited when links are shared on Mastodon. + more_from_html: More from %{name} + s_blog: "%{name}'s Blog" + title: Author attribution challenge: confirm: Continue hint_html: "Tip: We won't ask you for your password again for the next hour." @@ -1235,8 +1241,6 @@ en: your_appeal_approved: Your appeal has been approved your_appeal_pending: You have submitted an appeal your_appeal_rejected: Your appeal has been rejected - domain_validator: - invalid_domain: is not a valid domain name edit_profile: basic_information: Basic information hint_html: "Customize what people see on your public profile and next to your posts. Other people are more likely to follow you back and interact with you when you have a filled out profile and a profile picture." @@ -1952,6 +1956,7 @@ en: instructions_html: Copy and paste the code below into the HTML of your website. Then add the address of your website into one of the extra fields on your profile from the "Edit profile" tab and save changes. verification: Verification verified_links: Your verified links + website_verification: Website verification webauthn_credentials: add: Add new security key create: diff --git a/config/locales/eo.yml b/config/locales/eo.yml index 85aa3a1f31..c1873c2f24 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -1105,8 +1105,6 @@ eo: your_appeal_approved: Via apelacio aprobitas your_appeal_pending: Vi sendis apelacion your_appeal_rejected: Via apelacio malakceptitas - domain_validator: - invalid_domain: ne estas valida domajna nomo edit_profile: basic_information: Baza informo other: Alia diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml index bd15c9862d..f4d88d7323 100644 --- a/config/locales/es-AR.yml +++ b/config/locales/es-AR.yml @@ -1235,8 +1235,6 @@ es-AR: your_appeal_approved: Se aprobó tu apelación your_appeal_pending: Enviaste una apelación your_appeal_rejected: Se rechazó tu apelación - domain_validator: - invalid_domain: no es un nombre de dominio válido edit_profile: basic_information: Información básica hint_html: "Personalizá lo que la gente ve en tu perfil público y junto a tus publicaciones. Es más probable que otras personas te sigan e interactúen con vos cuando tengas un perfil completo y una foto de perfil." diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index 52e440ffed..84663aa895 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -1231,8 +1231,6 @@ es-MX: your_appeal_approved: Se aprobó tu apelación your_appeal_pending: Has enviado una apelación your_appeal_rejected: Tu apelación ha sido rechazada - domain_validator: - invalid_domain: no es un nombre de dominio válido edit_profile: basic_information: Información básica hint_html: "Personaliza lo que la gente ve en tu perfil público junto a tus publicaciones. Es más probable que otras personas te sigan e interactúen contigo cuando completes tu perfil y agregues una foto." diff --git a/config/locales/es.yml b/config/locales/es.yml index 21b900192a..e245dde5d6 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1231,8 +1231,6 @@ es: your_appeal_approved: Se aprobó tu apelación your_appeal_pending: Has enviado una apelación your_appeal_rejected: Tu apelación ha sido rechazada - domain_validator: - invalid_domain: no es un nombre de dominio válido edit_profile: basic_information: Información básica hint_html: "Personaliza lo que la gente ve en tu perfil público junto a tus publicaciones. Es más probable que otras personas te sigan e interactúen contigo cuando completas tu perfil y foto." diff --git a/config/locales/et.yml b/config/locales/et.yml index d2a4bc605e..88d48fefcb 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1212,8 +1212,6 @@ et: your_appeal_approved: Su vaidlustus on heakskiidetud your_appeal_pending: Vaidlustus on esitatud your_appeal_rejected: Vaidlustus on tagasi lükatud - domain_validator: - invalid_domain: ei ole sobiv domeeni nimi edit_profile: basic_information: Põhiinfo hint_html: "Kohanda, mida inimesed näevad su avalikul profiilil ja postituste kõrval. Inimesed alustavad tõenäolisemalt sinu jälgimist ja interakteeruvad sinuga, kui sul on täidetud profiil ja profiilipilt." diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 5e7d4a7f05..e5ae0ab79d 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1155,8 +1155,6 @@ eu: your_appeal_approved: Zure apelazioa onartu da your_appeal_pending: Apelazio bat bidali duzu your_appeal_rejected: Zure apelazioa baztertu da - domain_validator: - invalid_domain: ez da domeinu izen baliogarria edit_profile: basic_information: Oinarrizko informazioa hint_html: "Pertsonalizatu jendeak zer ikusi dezakeen zure profil publikoan eta zure bidalketen baitan. Segur aski, jende gehiagok jarraituko dizu eta interakzio gehiago izango dituzu profila osatuta baduzu, profil irudia eta guzti." diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 42782da204..ce8a61e3f0 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -986,8 +986,6 @@ fa: your_appeal_approved: درخواست تجدیدنظرتان پذیرفته شد your_appeal_pending: شما یک درخواست تجدیدنظر فرستادید your_appeal_rejected: درخواست تجدیدنظرتان رد شد - domain_validator: - invalid_domain: نام دامین معتبر نیست edit_profile: basic_information: اطلاعات پایه hint_html: "شخصی‌سازی آن چه مردم روی نمایهٔ عمومیتان و کنار فرسته‌هایتان می‌بینند. هنگامی که نمایه‌ای کامل و یک تصویر نمایه داشته باشید،‌ احتمال پی‌گیری متقابل و تعامل با شما بیش‌تر است." diff --git a/config/locales/fi.yml b/config/locales/fi.yml index c94f04a9bb..90c1e77760 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1235,8 +1235,6 @@ fi: your_appeal_approved: Valituksesi on hyväksytty your_appeal_pending: Olet lähettänyt valituksen your_appeal_rejected: Valituksesi on hylätty - domain_validator: - invalid_domain: ei ole kelvollinen verkkotunnus edit_profile: basic_information: Perustiedot hint_html: "Mukauta, mitä ihmiset näkevät julkisessa profiilissasi ja julkaisujesi vieressä. Sinua seurataan takaisin ja kanssasi ollaan vuorovaikutuksessa todennäköisemmin, kun sinulla on täytetty profiili ja profiilikuva." diff --git a/config/locales/fo.yml b/config/locales/fo.yml index f3d9aee4c2..5bc192e9db 100644 --- a/config/locales/fo.yml +++ b/config/locales/fo.yml @@ -1234,8 +1234,6 @@ fo: your_appeal_approved: Kæra tín er góðkend your_appeal_pending: Tú hevur kært your_appeal_rejected: Kæra tín er vrakað - domain_validator: - invalid_domain: er ikki eitt loyvt økisnavn edit_profile: basic_information: Grundleggjandi upplýsingar hint_html: "Tillaga tað, sum fólk síggja á tínum almenna vanga og við síðna av tínum postum. Sannlíkindini fyri, at onnur fylgja tær og virka saman við tær eru størri, tá tú hevur fylt út vangan og eina vangamynd." diff --git a/config/locales/fr-CA.yml b/config/locales/fr-CA.yml index 766ba71d8a..27e09d1f9c 100644 --- a/config/locales/fr-CA.yml +++ b/config/locales/fr-CA.yml @@ -1222,8 +1222,6 @@ fr-CA: your_appeal_approved: Votre appel a été approuvé your_appeal_pending: Vous avez soumis un appel your_appeal_rejected: Votre appel a été rejeté - domain_validator: - invalid_domain: n’est pas un nom de domaine valide edit_profile: basic_information: Informations de base hint_html: "Personnalisez ce que les gens voient sur votre profil public et à côté de vos messages. Les autres personnes seront plus susceptibles de vous suivre et d’interagir avec vous lorsque vous avez un profil complet et une photo." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 420a4d314e..055b50900c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1222,8 +1222,6 @@ fr: your_appeal_approved: Votre appel a été approuvé your_appeal_pending: Vous avez soumis un appel your_appeal_rejected: Votre appel a été rejeté - domain_validator: - invalid_domain: n’est pas un nom de domaine valide edit_profile: basic_information: Informations de base hint_html: "Personnalisez ce que les gens voient sur votre profil public et à côté de vos messages. Les autres personnes seront plus susceptibles de vous suivre et d’interagir avec vous lorsque vous avez un profil complet et une photo." diff --git a/config/locales/fy.yml b/config/locales/fy.yml index de7495dd55..27fcaf3af7 100644 --- a/config/locales/fy.yml +++ b/config/locales/fy.yml @@ -1231,8 +1231,6 @@ fy: your_appeal_approved: Jo beswier is goedkard your_appeal_pending: Jo hawwe in beswier yntsjinne your_appeal_rejected: Jo beswier is ôfwêzen - domain_validator: - invalid_domain: is in ûnjildige domeinnamme edit_profile: basic_information: Algemiene ynformaasje hint_html: "Pas oan wat minsken op jo iepenbiere profyl en njonken jo berjochten sjogge. Oare minsken sille jo earder folgje en mei jo kommunisearje wannear’t jo profyl ynfolle is en jo in profylfoto hawwe." diff --git a/config/locales/ga.yml b/config/locales/ga.yml index d2783a5a6a..870f79cba9 100644 --- a/config/locales/ga.yml +++ b/config/locales/ga.yml @@ -1288,8 +1288,6 @@ ga: your_appeal_approved: Tá d’achomharc ceadaithe your_appeal_pending: Chuir tú achomharc isteach your_appeal_rejected: Diúltaíodh do d'achomharc - domain_validator: - invalid_domain: nach ainm fearainn bailí é edit_profile: basic_information: Eolas bunúsach hint_html: "Saincheap a bhfeiceann daoine ar do phróifíl phoiblí agus in aice le do phostálacha. Is dóichí go leanfaidh daoine eile ar ais tú agus go n-idirghníomhóidh siad leat nuair a bhíonn próifíl líonta agus pictiúr próifíle agat." diff --git a/config/locales/gd.yml b/config/locales/gd.yml index c08ba60213..dda918d15c 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -1270,8 +1270,6 @@ gd: your_appeal_approved: Chaidh aontachadh ris an ath-thagradh agad your_appeal_pending: Chuir thu ath-thagradh a-null your_appeal_rejected: Chaidh an t-ath-thagradh agad a dhiùltadh - domain_validator: - invalid_domain: "– chan eil seo ’na ainm àrainne dligheach" edit_profile: basic_information: Fiosrachadh bunasach hint_html: "Gnàthaich na chithear air a’ phròifil phoblach agad is ri taobh nam postaichean agad. Bidh càch nas buailtiche do leantainn agus conaltradh leat nuair a bhios tu air a’ phròifil agad a lìonadh agus dealbh rithe." diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 657908922d..c8fa1d833d 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1235,8 +1235,6 @@ gl: your_appeal_approved: A apelación foi aprobada your_appeal_pending: Enviaches unha apelación your_appeal_rejected: A apelación foi rexeitada - domain_validator: - invalid_domain: non é un nome de dominio válido edit_profile: basic_information: Información básica hint_html: "Personaliza o que van ver no teu perfil público e ao lado das túas publicacións. As outras persoas estarán máis animadas a seguirte e interactuar contigo se engades algún dato sobre ti así como unha imaxe de perfil." diff --git a/config/locales/he.yml b/config/locales/he.yml index a838c69636..025b2de9e2 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1270,8 +1270,6 @@ he: your_appeal_approved: ערעורך התקבל your_appeal_pending: הגשת ערעור your_appeal_rejected: ערעורך נדחה - domain_validator: - invalid_domain: הוא לא שם דומיין קביל edit_profile: basic_information: מידע בסיסי hint_html: "התאמה אישית של מה שיראו אחרים בפרופיל הציבורי שלך וליד הודעותיך. אחרים עשויים יותר להחזיר עוקב וליצור אתך שיחה אם הפרופיל והתמונה יהיו מלאים." diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 71af138305..141f5b7d07 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1234,8 +1234,6 @@ hu: your_appeal_approved: A fellebbezésedet jóváhagyták your_appeal_pending: Beküldtél egy fellebbezést your_appeal_rejected: A fellebbezésedet visszautasították - domain_validator: - invalid_domain: nem egy valódi domain név edit_profile: basic_information: Általános információk hint_html: "Tedd egyedivé, mi látnak mások a profilodon és a bejegyzéseid mellett. Mások nagyobb eséllyel követnek vissza és lépnek veled kapcsolatba, ha van kitöltött profilod és profilképed." diff --git a/config/locales/hy.yml b/config/locales/hy.yml index dfb280ac48..c7128a2a46 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -523,8 +523,6 @@ hy: success_msg: Հաշիւդ բարեյաջող ջնջուեց warning: username_available: Քո օգտանունը կրկին հասանելի կը դառնայ - domain_validator: - invalid_domain: անվաւէր տիրոյթի անուն errors: '404': Էջը, որը փնտրում ես գոյութիւն չունի։ '429': Չափազանց շատ հարցումներ diff --git a/config/locales/ia.yml b/config/locales/ia.yml index 8827e084d2..073e5032b4 100644 --- a/config/locales/ia.yml +++ b/config/locales/ia.yml @@ -1220,8 +1220,6 @@ ia: your_appeal_approved: Tu appello ha essite approbate your_appeal_pending: Tu ha submittite un appello your_appeal_rejected: Tu appello ha essite rejectate - domain_validator: - invalid_domain: non es un nomine de dominio valide edit_profile: basic_information: Information basic hint_html: "Personalisa lo que le personas vide sur tu profilo public e presso tu messages. Il es plus probabile que altere personas te seque e interage con te quando tu ha un profilo complete e un photo." diff --git a/config/locales/id.yml b/config/locales/id.yml index 73b4218397..575daddca6 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1000,8 +1000,6 @@ id: your_appeal_approved: Banding Anda disetujui your_appeal_pending: Anda telah mengirim banding your_appeal_rejected: Banding Anda ditolak - domain_validator: - invalid_domain: bukan nama domain yang valid errors: '400': Permintaan yang dikirim tidak valid atau cacat. '403': Anda tidak mempunyai izin untuk melihat halaman ini. diff --git a/config/locales/ie.yml b/config/locales/ie.yml index 4ee869d92f..1529ea04b8 100644 --- a/config/locales/ie.yml +++ b/config/locales/ie.yml @@ -1153,8 +1153,6 @@ ie: your_appeal_approved: Tui apelle ha esset aprobat your_appeal_pending: Tu ha fat un apelle your_appeal_rejected: Tui apelle ha esset rejectet - domain_validator: - invalid_domain: ne es un valid dominia-nómine edit_profile: basic_information: Basic information hint_html: "Customisa ti quel gente vide sur tui public profil e apu tui postas. Altri persones es plu probabil sequer te e interacter con te si tu have un detalliat profil e un profil-image." diff --git a/config/locales/io.yml b/config/locales/io.yml index a1d268b9fa..d1b9aef3e5 100644 --- a/config/locales/io.yml +++ b/config/locales/io.yml @@ -1128,8 +1128,6 @@ io: your_appeal_approved: Vua konto aprobesis your_appeal_pending: Vu sendis apelo your_appeal_rejected: Vua apelo refuzesis - domain_validator: - invalid_domain: ne esas valida domennomo edit_profile: basic_information: Fundamentala informo other: Altra diff --git a/config/locales/is.yml b/config/locales/is.yml index 748d931ff8..1c84c45c80 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -1238,8 +1238,6 @@ is: your_appeal_approved: Áfrýjun þín hefur verið samþykkt your_appeal_pending: Þú hefur sent inn áfrýjun your_appeal_rejected: Áfrýjun þinni hefur verið hafnað - domain_validator: - invalid_domain: er ekki leyfilegt nafn á léni edit_profile: basic_information: Grunnupplýsingar hint_html: "Sérsníddu hvað fólk sér á opinbera notandasniðinu þínu og næst færslunum þínum. Annað fólk er líklegra til að fylgjast með þér og eiga í samskiptum við þig ef þú fyllir út notandasniðið og setur auðkennismynd." diff --git a/config/locales/it.yml b/config/locales/it.yml index a1ed71a7a0..a429c6339b 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1237,8 +1237,6 @@ it: your_appeal_approved: Il tuo appello è stato approvato your_appeal_pending: Hai presentato un appello your_appeal_rejected: Il tuo appello è stato respinto - domain_validator: - invalid_domain: non è un nome di dominio valido edit_profile: basic_information: Informazioni di base hint_html: "Personalizza ciò che le persone vedono sul tuo profilo pubblico e accanto ai tuoi post. È più probabile che altre persone ti seguano e interagiscano con te quando hai un profilo compilato e un'immagine del profilo." diff --git a/config/locales/ja.yml b/config/locales/ja.yml index af9173cfc4..3f50b0d7a6 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1213,8 +1213,6 @@ ja: your_appeal_approved: 申し立てが承認されました your_appeal_pending: 申し立てを送信しました your_appeal_rejected: 申し立ては拒否されました - domain_validator: - invalid_domain: は無効なドメイン名です edit_profile: basic_information: 基本情報 hint_html: "アカウントのトップページや投稿の隣に表示される公開情報です。プロフィールとアイコンを設定することで、ほかのユーザーは親しみやすく、またフォローしやすくなります。" diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 065cd801f7..f89bdee622 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -385,8 +385,6 @@ kk: more_details_html: Қосымша мәліметтер алу үшін құпиялылық саясатын қараңыз. username_available: Аккаунтыңыз қайтадан қолжетімді болады username_unavailable: Логиніңіз қолжетімді болмайды - domain_validator: - invalid_domain: жарамды домен атауы емес errors: '400': Сіз жіберген сұрау жарамсыз немесе дұрыс емес. '403': Бұны көру үшін сізде рұқсат жоқ. diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 962ecdd053..ab377df304 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1218,8 +1218,6 @@ ko: your_appeal_approved: 소명이 받아들여졌습니다 your_appeal_pending: 소명을 제출했습니다 your_appeal_rejected: 소명이 기각되었습니다 - domain_validator: - invalid_domain: 올바른 도메인 네임이 아닙니다 edit_profile: basic_information: 기본 정보 hint_html: "사람들이 공개 프로필을 보고서 게시물을 볼 때를 위한 프로필을 꾸밉니다. 프로필과 프로필 사진을 채우면 다른 사람들이 나를 팔로우하고 나와 교류할 기회가 더 많아집니다." diff --git a/config/locales/ku.yml b/config/locales/ku.yml index cbb6b76406..20fe6cf6de 100644 --- a/config/locales/ku.yml +++ b/config/locales/ku.yml @@ -1014,8 +1014,6 @@ ku: your_appeal_approved: Îtîraza te hate pejirandin your_appeal_pending: Te îtîrazek şand your_appeal_rejected: Îtîraza te nehate pejirandin - domain_validator: - invalid_domain: ne naveke navper a derbasdar e errors: '400': Daxwaza ku te şand nederbasdar an çewt bû. '403': Ji bo dîtina vê rûpelê mafê te nîn e. diff --git a/config/locales/lad.yml b/config/locales/lad.yml index 5d60e6e9a1..164967159b 100644 --- a/config/locales/lad.yml +++ b/config/locales/lad.yml @@ -1186,8 +1186,6 @@ lad: your_appeal_approved: Tu apelasyon fue achetada your_appeal_pending: Tienes enviado una apelasyon your_appeal_rejected: Tu apelasyon fue refuzada - domain_validator: - invalid_domain: no es un nombre de domeno valido edit_profile: basic_information: Enformasyon bazika hint_html: "Personaliza lo ke la djente ve en tu profil publiko i kon tus publikasyones. Es mas probavle ke otras personas te sigan i enteraktuen kontigo kuando kompletas tu profil i foto." diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 43b6995e28..5dd6ff9e1e 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1162,8 +1162,6 @@ lv: your_appeal_approved: Jūsu apelācija ir apstiprināta your_appeal_pending: Jūs esat iesniedzis apelāciju your_appeal_rejected: Jūsu apelācija ir noraidīta - domain_validator: - invalid_domain: nav derīgs domēna nosaukums edit_profile: basic_information: Pamata informācija hint_html: "Pielāgo, ko cilvēki redz Tavā publiskajā profilā un blakus Taviem ierakstiem. Ir lielāka iespējamība, ka citi clivēki sekos Tev un mijiedarbosies ar Tevi, ja Tev ir aizpildīts profils un profila attēls." diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 28a2993d36..c91a624230 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -1115,8 +1115,6 @@ ms: your_appeal_approved: Rayuan anda telah diluluskan your_appeal_pending: Anda telah menghantar rayuan your_appeal_rejected: Rayuan anda telah ditolak - domain_validator: - invalid_domain: bukan nama domain yang sah edit_profile: basic_information: Maklumat Asas hint_html: "Sesuaikan perkara yang orang lihat pada profil awam anda dan di sebelah siaran anda. Orang lain lebih berkemungkinan mengikuti anda kembali dan berinteraksi dengan anda apabila anda mempunyai profil dan gambar profil yang telah diisi." diff --git a/config/locales/my.yml b/config/locales/my.yml index 76372ba174..771fbba579 100644 --- a/config/locales/my.yml +++ b/config/locales/my.yml @@ -1108,8 +1108,6 @@ my: your_appeal_approved: သင့်တင်သွင်းခြင်းကို အတည်ပြုပြီးပါပြီ your_appeal_pending: အယူခံဝင်ရန် တင်သွင်းထားသည် your_appeal_rejected: အယူခံဝင်မှုကို ပယ်ချလိုက်သည် - domain_validator: - invalid_domain: တရားဝင်ဒိုမိန်းအမည်မဟုတ်ပါ edit_profile: basic_information: အခြေခံသတင်းအချက်အလက် hint_html: "သင်၏ အများမြင်ပရိုဖိုင်နှင့် သင့်ပို့စ်များဘေးရှိ တွေ့မြင်ရသည့်အရာကို စိတ်ကြိုက်ပြင်ဆင်ပါ။ သင့်တွင် ပရိုဖိုင်နှင့် ပရိုဖိုင်ပုံတစ်ခု ဖြည့်သွင်းထားပါက အခြားသူများအနေဖြင့် သင်နှင့် အပြန်အလှန် တုံ့ပြန်နိုင်ခြေပိုများပါသည်။" diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 725d3915c2..c74bf488b5 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1235,8 +1235,6 @@ nl: your_appeal_approved: Jouw bezwaar is goedgekeurd your_appeal_pending: Je hebt een bezwaar ingediend your_appeal_rejected: Jouw bezwaar is afgewezen - domain_validator: - invalid_domain: is een ongeldige domeinnaam edit_profile: basic_information: Algemene informatie hint_html: "Wat mensen op jouw openbare profiel en naast je berichten zien aanpassen. Andere mensen gaan je waarschijnlijk eerder volgen en hebben vaker interactie met je, wanneer je profiel is ingevuld en je een profielfoto hebt." diff --git a/config/locales/nn.yml b/config/locales/nn.yml index f7c2f74260..5c46a0d43e 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -1232,8 +1232,6 @@ nn: your_appeal_approved: Din klage har blitt godkjent your_appeal_pending: Du har levert en klage your_appeal_rejected: Din klage har blitt avvist - domain_validator: - invalid_domain: er ikkje eit gangbart domenenamn edit_profile: basic_information: Grunnleggande informasjon hint_html: "Tilpass kva folk ser på den offentlege profilen din og ved sida av innlegga dine. Andre vil i større grad fylgja og samhandla med deg når du har eit profilbilete og har fyllt ut profilen din." diff --git a/config/locales/no.yml b/config/locales/no.yml index e2ede9328b..b3eebd8ecc 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1147,8 +1147,6 @@ your_appeal_approved: Anken din har blitt godkjent your_appeal_pending: Du har levert en anke your_appeal_rejected: Anken din har blitt avvist - domain_validator: - invalid_domain: er ikke et gyldig domenenavn edit_profile: basic_information: Grunnleggende informasjon hint_html: "Tilpass hva folk ser på din offentlige profil og ved siden av dine innlegg. Det er mer sannsynlig at andre mennesker følger deg tilbake og samhandler med deg når du har fylt ut en profil og et profilbilde." diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 8373513c9b..e88f8a3f69 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -538,8 +538,6 @@ oc: strikes: title_actions: none: Avertiment - domain_validator: - invalid_domain: es pas un nom de domeni valid errors: '403': Avètz pas l’autorizacion de veire aquesta pagina. '404': La pagina que cercatz existís pas aquí. diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 7a8d208b06..c90d448a7f 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1270,8 +1270,6 @@ pl: your_appeal_approved: Twoje odwołanie zostało zatwierdzone your_appeal_pending: Zgłosiłeś odwołanie your_appeal_rejected: Twoje odwołanie zostało odrzucone - domain_validator: - invalid_domain: nie jest prawidłową nazwą domeny edit_profile: basic_information: Podstawowe informacje hint_html: "Dostosuj to, co ludzie widzą na Twoim profilu publicznym i obok Twoich wpisów. Inne osoby są bardziej skłonne obserwować Cię i wchodzić z Tobą w interakcje, gdy masz wypełniony profil i zdjęcie profilowe." diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 18496b9e1d..3c14589e6c 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1231,8 +1231,6 @@ pt-BR: your_appeal_approved: Sua revisão foi aprovada your_appeal_pending: Você enviou uma revisão your_appeal_rejected: Sua revisão foi rejeitada - domain_validator: - invalid_domain: não é um nome de domínio válido edit_profile: basic_information: Informações básicas hint_html: "Personalize o que as pessoas veem no seu perfil público e ao lado de suas publicações. É mais provável que outras pessoas o sigam de volta e interajam com você quando você tiver um perfil preenchido e uma foto de perfil." diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 96cb92efda..0f0d6f36ee 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -1199,8 +1199,6 @@ pt-PT: your_appeal_approved: O seu recurso foi deferido your_appeal_pending: Submeteu um recurso your_appeal_rejected: O seu recurso foi indeferido - domain_validator: - invalid_domain: não é um nome de domínio válido edit_profile: basic_information: Informação básica hint_html: "Personalize o que as pessoas veem no seu perfil público e junto das suas publicações. É mais provável que as outras pessoas o sigam de volta ou interajam consigo se tiver um perfil preenchido e uma imagem de perfil." diff --git a/config/locales/ru.yml b/config/locales/ru.yml index b9c582843d..9d6b2946ac 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1193,8 +1193,6 @@ ru: your_appeal_approved: Ваша апелляция одобрена your_appeal_pending: Вы подали апелляцию your_appeal_rejected: Ваша апелляция отклонена - domain_validator: - invalid_domain: не является корректным доменным именем edit_profile: basic_information: Основная информация hint_html: "Настройте то, что люди видят в вашем публичном профиле и рядом с вашими сообщениями. Другие люди с большей вероятностью подпишутся на Вас и будут взаимодействовать с вами, если у Вас заполнен профиль и добавлено изображение." diff --git a/config/locales/sc.yml b/config/locales/sc.yml index ee66cef834..fee79a1325 100644 --- a/config/locales/sc.yml +++ b/config/locales/sc.yml @@ -734,8 +734,6 @@ sc: title_actions: delete_statuses: Cantzelladura de publicatziones none: Atentzione - domain_validator: - invalid_domain: no est unu nòmine de domìniu vàlidu edit_profile: basic_information: Informatzione bàsica other: Àteru diff --git a/config/locales/sco.yml b/config/locales/sco.yml index 4b7b9e56d7..967706f03a 100644 --- a/config/locales/sco.yml +++ b/config/locales/sco.yml @@ -1004,8 +1004,6 @@ sco: your_appeal_approved: Yer appeal haes been approved your_appeal_pending: Ye hae submittit a appeal your_appeal_rejected: Yer appeal haes been rejectit - domain_validator: - invalid_domain: isnae a valid domain nemm errors: '400': The request thit ye submittit wisnae valid or it wis illformt. '403': Ye dinnae hae permission fir tae luik at this page. diff --git a/config/locales/si.yml b/config/locales/si.yml index e68da4321a..c7968e2479 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -892,8 +892,6 @@ si: your_appeal_approved: ඔබගේ අභියාචනය අනුමත කර ඇත your_appeal_pending: ඔබ අභියාචනයක් ඉදිරිපත් කර ඇත your_appeal_rejected: ඔබගේ අභියාචනය ප්‍රතික්ෂේප කර ඇත - domain_validator: - invalid_domain: වලංගු ඩොමේන් නාමයක් නොවේ edit_profile: basic_information: මූලික තොරතුරු other: වෙනත් diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index c1fae7e83e..8f6137c8c1 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -3,6 +3,7 @@ en: simple_form: hints: account: + attribution_domains_as_text: Protects from false attributions. discoverable: Your public posts and profile may be featured or recommended in various areas of Mastodon and your profile may be suggested to other users. display_name: Your full name or your fun name. fields: Your homepage, pronouns, age, anything you want. @@ -143,6 +144,7 @@ en: url: Where events will be sent to labels: account: + attribution_domains_as_text: Only allow specific websites discoverable: Feature profile and posts in discovery algorithms fields: name: Label diff --git a/config/locales/sk.yml b/config/locales/sk.yml index ad9f8fb5ee..c49da0fc38 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -905,8 +905,6 @@ sk: silence: Obmedzenie účtu your_appeal_approved: Tvoja námietka bola schválená your_appeal_pending: Odoslal si námietku - domain_validator: - invalid_domain: nieje správny tvar domény edit_profile: basic_information: Základné informácie other: Ostatné diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 3384049a11..d0440abb00 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1263,8 +1263,6 @@ sl: your_appeal_approved: Vaša pritožba je bila odobrena your_appeal_pending: Oddali ste pritožbo your_appeal_rejected: Vaša pritožba je bila zavržena - domain_validator: - invalid_domain: ni veljavno ime domene edit_profile: basic_information: Osnovni podatki hint_html: "Prilagodite, kaj ljudje vidijo na vašem javnem profilu in poleg vaših objav. Drugi vam bodo raje sledili nazaj in z vami klepetali, če boste imeli izpolnjen profil in nastavljeno profilno sliko." diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 6907c1ee3c..5e8a3c912c 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1226,8 +1226,6 @@ sq: your_appeal_approved: Apelimi juaj u miratua your_appeal_pending: Keni parashtruar një apelim your_appeal_rejected: Apelimi juaj është hedhur poshtë - domain_validator: - invalid_domain: s’është emër i vlefshëm përkatësie edit_profile: basic_information: Hollësi elementare hint_html: "Përshtatni ç’shohin njerëzit në profilin tuaj publik dhe në krah të postimeve tuaja. Personat e tjerë ka më shumë gjasa t’ju ndjekin dhe ndërveprojnë me ju, kur keni të plotësuar profilin dhe një foto profili." diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml index dfc8a635c8..428b9cb084 100644 --- a/config/locales/sr-Latn.yml +++ b/config/locales/sr-Latn.yml @@ -1174,8 +1174,6 @@ sr-Latn: your_appeal_approved: Vaša žalba je uvažena your_appeal_pending: Priložili ste žalbu your_appeal_rejected: Vaša žalba je odbijena - domain_validator: - invalid_domain: nelegitimno ime domena edit_profile: basic_information: Osnovne informacije hint_html: "Prilagodite šta ljudi vide na vašem javnom profilu i pored vaših objava. Veća je verovatnoća da će vas drugi pratiti i komunicirati sa vama kada imate popunjen profil i sliku profila." diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 2bbc4ef131..08fbf39fb8 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1204,8 +1204,6 @@ sr: your_appeal_approved: Ваша жалба је уважена your_appeal_pending: Приложили сте жалбу your_appeal_rejected: Ваша жалба је одбијена - domain_validator: - invalid_domain: нелегитимно име домена edit_profile: basic_information: Основне информације hint_html: "Прилагодите шта људи виде на вашем јавном профилу и поред ваших објава. Већа је вероватноћа да ће вас други пратити и комуницирати са вама када имате попуњен профил и слику профила." diff --git a/config/locales/sv.yml b/config/locales/sv.yml index df403e602a..0cc47ca92e 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1182,8 +1182,6 @@ sv: your_appeal_approved: Din överklagan har godkänts your_appeal_pending: Du har lämnat in en överklagan your_appeal_rejected: Din överklagan har avvisats - domain_validator: - invalid_domain: är inte ett giltigt domännamn edit_profile: basic_information: Allmän information hint_html: "Anpassa vad folk ser på din offentliga profil och bredvid dina inlägg. Andra personer är mer benägna att följa dig och interagera med dig när du har en ifylld profil och en profilbild." diff --git a/config/locales/th.yml b/config/locales/th.yml index f409a512d9..d1de9fd818 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1216,8 +1216,6 @@ th: your_appeal_approved: อนุมัติการอุทธรณ์ของคุณแล้ว your_appeal_pending: คุณได้ส่งการอุทธรณ์ your_appeal_rejected: ปฏิเสธการอุทธรณ์ของคุณแล้ว - domain_validator: - invalid_domain: ไม่ใช่ชื่อโดเมนที่ถูกต้อง edit_profile: basic_information: ข้อมูลพื้นฐาน hint_html: "ปรับแต่งสิ่งที่ผู้คนเห็นในโปรไฟล์สาธารณะของคุณและถัดจากโพสต์ของคุณ ผู้คนอื่น ๆ มีแนวโน้มที่จะติดตามคุณกลับและโต้ตอบกับคุณมากขึ้นเมื่อคุณมีโปรไฟล์ที่กรอกแล้วและรูปภาพโปรไฟล์" diff --git a/config/locales/tr.yml b/config/locales/tr.yml index d2d499077d..d8f5eff6e8 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1235,8 +1235,6 @@ tr: your_appeal_approved: İtirazınız onaylandı your_appeal_pending: Bir itiraz gönderdiniz your_appeal_rejected: İtirazınız reddedildi - domain_validator: - invalid_domain: geçerli bir alan adı değil edit_profile: basic_information: Temel bilgiler hint_html: "İnsanlara herkese açık profilinizde ve gönderilerinizin yanında ne göstermek istediğinizi düzenleyin. Dolu bir profile ve bir profil resmine sahip olduğunuzda diğer insanlar daha yüksek ihtimalle sizi takip etmek ve sizinle etkileşime geçmek isteyeceklerdir." diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 4e70b192d9..600239107e 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1270,8 +1270,6 @@ uk: your_appeal_approved: Вашу апеляцію було схвалено your_appeal_pending: Ви не подавали апеляцій your_appeal_rejected: Вашу апеляцію було відхилено - domain_validator: - invalid_domain: не є допустимим ім'ям домену edit_profile: basic_information: Основна інформація hint_html: "Налаштуйте те, що люди бачитимуть у вашому загальнодоступному профілі та поруч із вашими дописами. Інші люди з більшою ймовірністю підпишуться на вас та взаємодіятимуть з вами, якщо у вас є заповнений профіль та зображення профілю." diff --git a/config/locales/vi.yml b/config/locales/vi.yml index d211b9e740..dfb36c02da 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1216,8 +1216,6 @@ vi: your_appeal_approved: Khiếu nại của bạn được chấp nhận your_appeal_pending: Bạn đã gửi một khiếu nại your_appeal_rejected: Khiếu nại của bạn bị từ chối - domain_validator: - invalid_domain: không phải là một tên miền hợp lệ edit_profile: basic_information: Thông tin cơ bản hint_html: "Tùy chỉnh những gì mọi người nhìn thấy trên hồ sơ công khai và bên cạnh tút của bạn. Mọi người sẽ muốn theo dõi và tương tác với bạn hơn nếu bạn có ảnh đại diện và một hồ sơ hoàn chỉnh." diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 7407d81db9..b97ab65f04 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -1217,8 +1217,6 @@ zh-CN: your_appeal_approved: 你的申诉已被批准 your_appeal_pending: 你已提交申诉 your_appeal_rejected: 你的申诉已被驳回 - domain_validator: - invalid_domain: 不是一个有效的域名 edit_profile: basic_information: 基本信息 hint_html: "自定义公开资料和嘟文旁边显示的内容。当您填写完整的个人资料并设置了头像时,其他人更有可能关注您并与您互动。" diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 26743d2cb1..90227b911d 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -1135,8 +1135,6 @@ zh-HK: your_appeal_approved: 你的申訴已獲批准 your_appeal_pending: 你已提交申訴 your_appeal_rejected: 你的申訴已被駁回 - domain_validator: - invalid_domain: 不是一個可用域名 edit_profile: basic_information: 基本資料 hint_html: "自訂你的公開個人檔案和帖文內容。當你有完整的個人檔案和頭像時,其他人更願意追蹤你和與你互動。" diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index d92d53f391..052773e328 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1219,8 +1219,6 @@ zh-TW: your_appeal_approved: 您的申訴已被批准 your_appeal_pending: 您已遞交申訴 your_appeal_rejected: 您的申訴已被駁回 - domain_validator: - invalid_domain: 並非一個有效網域 edit_profile: basic_information: 基本資訊 hint_html: "自訂人們能於您個人檔案及嘟文旁所見之內容。當您完成填寫個人檔案及設定大頭貼後,其他人們比較願意跟隨您並與您互動。" diff --git a/config/routes/settings.rb b/config/routes/settings.rb index 297b80942c..cefa24316d 100644 --- a/config/routes/settings.rb +++ b/config/routes/settings.rb @@ -60,7 +60,7 @@ namespace :settings do resource :delete, only: [:show, :destroy] resource :migration, only: [:show, :create] - resource :verification, only: :show + resource :verification, only: [:show, :update] resource :privacy, only: [:show, :update], controller: 'privacy' namespace :migration do diff --git a/db/migrate/20240909014637_add_attribution_domains_to_accounts.rb b/db/migrate/20240909014637_add_attribution_domains_to_accounts.rb new file mode 100644 index 0000000000..e90f6f1ede --- /dev/null +++ b/db/migrate/20240909014637_add_attribution_domains_to_accounts.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddAttributionDomainsToAccounts < ActiveRecord::Migration[7.1] + def change + add_column :accounts, :attribution_domains, :string, array: true, default: [] + end +end diff --git a/db/schema.rb b/db/schema.rb index f01e11792d..540a971333 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_08_08_125420) do +ActiveRecord::Schema[7.1].define(version: 2024_09_09_014637) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -200,6 +200,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_08_08_125420) do t.datetime "reviewed_at", precision: nil t.datetime "requested_review_at", precision: nil t.boolean "indexable", default: false, null: false + t.string "attribution_domains", default: [], array: true t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin t.index "lower((username)::text), COALESCE(lower((domain)::text), ''::text)", name: "index_accounts_on_username_and_domain_lower", unique: true t.index ["domain", "id"], name: "index_accounts_on_domain_and_id" diff --git a/spec/controllers/settings/migrations_controller_spec.rb b/spec/controllers/settings/migrations_controller_spec.rb index 93c5de0899..67d5ab54f0 100644 --- a/spec/controllers/settings/migrations_controller_spec.rb +++ b/spec/controllers/settings/migrations_controller_spec.rb @@ -95,6 +95,7 @@ RSpec.describe Settings::MigrationsController do before do moved_to = Fabricate(:account, also_known_as: [ActivityPub::TagManager.instance.uri_for(user.account)]) + p moved_to.acct user.account.migrations.create!(acct: moved_to.acct) end diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 1e8e4b1e4d..2ec7aafc51 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -747,6 +747,22 @@ RSpec.describe Account do end end + describe '#can_be_attributed_from?' do + subject { Fabricate(:account, attribution_domains: %w(example.com)) } + + it 'returns true for a matching domain' do + expect(subject.can_be_attributed_from?('example.com')).to be true + end + + it 'returns true for a subdomain of a domain' do + expect(subject.can_be_attributed_from?('foo.example.com')).to be true + end + + it 'returns false for a non-matching domain' do + expect(subject.can_be_attributed_from?('hoge.com')).to be false + end + end + describe 'Normalizations' do describe 'username' do it { is_expected.to normalize(:username).from(" \u3000bob \t \u00a0 \n ").to('bob') } diff --git a/spec/services/activitypub/process_account_service_spec.rb b/spec/services/activitypub/process_account_service_spec.rb index 86314e6b48..e4a36cf182 100644 --- a/spec/services/activitypub/process_account_service_spec.rb +++ b/spec/services/activitypub/process_account_service_spec.rb @@ -63,6 +63,26 @@ RSpec.describe ActivityPub::ProcessAccountService do end end + context 'with attribution domains' do + let(:payload) do + { + id: 'https://foo.test', + type: 'Actor', + inbox: 'https://foo.test/inbox', + attributionDomains: [ + 'example.com', + ], + }.with_indifferent_access + end + + it 'parses attribution domains' do + account = subject.call('alice', 'example.com', payload) + + expect(account.attribution_domains) + .to match_array(%w(example.com)) + end + end + context 'when account is not suspended' do subject { described_class.new.call(account.username, account.domain, payload) } diff --git a/spec/services/bulk_import_service_spec.rb b/spec/services/bulk_import_service_spec.rb index e8bec96c85..0197f81a44 100644 --- a/spec/services/bulk_import_service_spec.rb +++ b/spec/services/bulk_import_service_spec.rb @@ -274,7 +274,7 @@ RSpec.describe BulkImportService do let(:rows) do [ { 'domain' => 'blocked.com' }, - { 'domain' => 'to_block.com' }, + { 'domain' => 'to-block.com' }, ] end @@ -286,7 +286,7 @@ RSpec.describe BulkImportService do it 'blocks all the new domains' do subject.call(import) - expect(account.domain_blocks.pluck(:domain)).to contain_exactly('alreadyblocked.com', 'blocked.com', 'to_block.com') + expect(account.domain_blocks.pluck(:domain)).to contain_exactly('alreadyblocked.com', 'blocked.com', 'to-block.com') end it 'marks the import as finished' do @@ -302,7 +302,7 @@ RSpec.describe BulkImportService do let(:rows) do [ { 'domain' => 'blocked.com' }, - { 'domain' => 'to_block.com' }, + { 'domain' => 'to-block.com' }, ] end @@ -314,7 +314,7 @@ RSpec.describe BulkImportService do it 'blocks all the new domains' do subject.call(import) - expect(account.domain_blocks.pluck(:domain)).to contain_exactly('blocked.com', 'to_block.com') + expect(account.domain_blocks.pluck(:domain)).to contain_exactly('blocked.com', 'to-block.com') end it 'marks the import as finished' do diff --git a/spec/validators/domain_validator_spec.rb b/spec/validators/domain_validator_spec.rb new file mode 100644 index 0000000000..0b4cb0d3f0 --- /dev/null +++ b/spec/validators/domain_validator_spec.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe DomainValidator do + let(:record) { record_class.new } + + context 'with no options' do + let(:record_class) do + Class.new do + include ActiveModel::Validations + + attr_accessor :domain + + validates :domain, domain: true + end + end + + describe '#validate_each' do + context 'with a nil value' do + it 'does not add errors' do + record.domain = nil + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with a valid domain' do + it 'does not add errors' do + record.domain = 'example.com' + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with a domain that is too long' do + it 'adds an error' do + record.domain = "#{'a' * 300}.com" + + expect(record).to_not be_valid + expect(record.errors.where(:domain)).to_not be_empty + end + end + + context 'with a domain with an empty segment' do + it 'adds an error' do + record.domain = '.example.com' + + expect(record).to_not be_valid + expect(record.errors.where(:domain)).to_not be_empty + end + end + + context 'with a domain with an invalid character' do + it 'adds an error' do + record.domain = '*.example.com' + + expect(record).to_not be_valid + expect(record.errors.where(:domain)).to_not be_empty + end + end + + context 'with a domain that would fail parsing' do + it 'adds an error' do + record.domain = '/' + + expect(record).to_not be_valid + expect(record.errors.where(:domain)).to_not be_empty + end + end + end + end + + context 'with acct option' do + let(:record_class) do + Class.new do + include ActiveModel::Validations + + attr_accessor :acct + + validates :acct, domain: { acct: true } + end + end + + describe '#validate_each' do + context 'with a nil value' do + it 'does not add errors' do + record.acct = nil + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with no domain' do + it 'does not add errors' do + record.acct = 'hoge_123' + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with a valid domain' do + it 'does not add errors' do + record.acct = 'hoge_123@example.com' + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with an invalid domain' do + it 'adds an error' do + record.acct = 'hoge_123@.example.com' + + expect(record).to_not be_valid + expect(record.errors.where(:acct)).to_not be_empty + end + end + end + end +end diff --git a/spec/validators/lines_validator_spec.rb b/spec/validators/lines_validator_spec.rb new file mode 100644 index 0000000000..a80dbbaf3e --- /dev/null +++ b/spec/validators/lines_validator_spec.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe LinesValidator do + let(:record_class) do + Class.new do + include ActiveModel::Validations + + attr_accessor :text + + validates :text, lines: { maximum: 5 } + end + end + + let(:record) { record_class.new } + + describe '#validate_each' do + context 'with a nil value' do + it 'does not add errors' do + record.text = nil + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with lines below the limit' do + it 'does not add errors' do + record.text = "hoge\n" * 5 + + expect(record).to be_valid + expect(record.errors).to be_empty + end + end + + context 'with more lines than limit' do + it 'adds an error' do + record.text = "hoge\n" * 6 + + expect(record).to_not be_valid + expect(record.errors.where(:text)).to_not be_empty + end + end + end +end From da07adfe6c2137b07f3def1716b370329a9ec9cb Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 10 Sep 2024 09:21:40 -0400 Subject: [PATCH 3/6] Add `CustomEmoji.enabled` scope (#31830) --- app/lib/entity_cache.rb | 2 +- app/models/announcement_reaction.rb | 2 +- app/models/custom_emoji.rb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/lib/entity_cache.rb b/app/lib/entity_cache.rb index 80b0046eea..e647dcab7f 100644 --- a/app/lib/entity_cache.rb +++ b/app/lib/entity_cache.rb @@ -27,7 +27,7 @@ class EntityCache end unless uncached_ids.empty? - uncached = CustomEmoji.where(shortcode: shortcodes, domain: domain, disabled: false).index_by(&:shortcode) + uncached = CustomEmoji.enabled.where(shortcode: shortcodes, domain: domain).index_by(&:shortcode) uncached.each_value { |item| Rails.cache.write(to_key(:emoji, item.shortcode, domain), item, expires_in: MAX_EXPIRATION) } end diff --git a/app/models/announcement_reaction.rb b/app/models/announcement_reaction.rb index 9881892c4b..f953402b7e 100644 --- a/app/models/announcement_reaction.rb +++ b/app/models/announcement_reaction.rb @@ -27,7 +27,7 @@ class AnnouncementReaction < ApplicationRecord private def set_custom_emoji - self.custom_emoji = CustomEmoji.local.find_by(disabled: false, shortcode: name) if name.present? + self.custom_emoji = CustomEmoji.local.enabled.find_by(shortcode: name) if name.present? end def queue_publish diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index 31ba91ad02..6e788c0c1c 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -48,9 +48,10 @@ class CustomEmoji < ApplicationRecord scope :local, -> { where(domain: nil) } scope :remote, -> { where.not(domain: nil) } + scope :enabled, -> { where(disabled: false) } scope :alphabetic, -> { order(domain: :asc, shortcode: :asc) } scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches("%.#{domain}"))) } - scope :listed, -> { local.where(disabled: false).where(visible_in_picker: true) } + scope :listed, -> { local.enabled.where(visible_in_picker: true) } remotable_attachment :image, LIMIT From c4b09d684e864d58fc5eaa171fafcc942e4d6937 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 10 Sep 2024 09:23:55 -0400 Subject: [PATCH 4/6] Extract method for account-referencing in CLI prune task (#31824) --- lib/mastodon/cli/accounts.rb | 37 +++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/mastodon/cli/accounts.rb b/lib/mastodon/cli/accounts.rb index 8a138323d4..08a28e5f5c 100644 --- a/lib/mastodon/cli/accounts.rb +++ b/lib/mastodon/cli/accounts.rb @@ -502,17 +502,7 @@ module Mastodon::CLI - not muted/blocked by us LONG_DESC def prune - query = Account.remote.non_automated - query = query.where('NOT EXISTS (SELECT 1 FROM mentions WHERE account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM favourites WHERE account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM statuses WHERE account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM follows WHERE account_id = accounts.id OR target_account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM blocks WHERE account_id = accounts.id OR target_account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM mutes WHERE target_account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM reports WHERE target_account_id = accounts.id)') - query = query.where('NOT EXISTS (SELECT 1 FROM follow_requests WHERE account_id = accounts.id OR target_account_id = accounts.id)') - - _, deleted = parallelize_with_progress(query) do |account| + _, deleted = parallelize_with_progress(prunable_accounts) do |account| next if account.bot? || account.group? next if account.suspended? next if account.silenced? @@ -577,6 +567,31 @@ module Mastodon::CLI private + def prunable_accounts + Account + .remote + .non_automated + .where.not(referencing_account(Mention, :account_id)) + .where.not(referencing_account(Favourite, :account_id)) + .where.not(referencing_account(Status, :account_id)) + .where.not(referencing_account(Follow, :account_id)) + .where.not(referencing_account(Follow, :target_account_id)) + .where.not(referencing_account(Block, :account_id)) + .where.not(referencing_account(Block, :target_account_id)) + .where.not(referencing_account(Mute, :target_account_id)) + .where.not(referencing_account(Report, :target_account_id)) + .where.not(referencing_account(FollowRequest, :account_id)) + .where.not(referencing_account(FollowRequest, :target_account_id)) + end + + def referencing_account(model, attribute) + model + .where(model.arel_table[attribute].eq Account.arel_table[:id]) + .select(1) + .arel + .exists + end + def report_errors(errors) message = errors.map do |error| <<~STRING From 4ffaced8bcbcb9227722c8e09756c7ca1909aa86 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 10 Sep 2024 16:00:23 +0200 Subject: [PATCH 5/6] Second attempt at disabling Codecov annotations (#31841) --- .github/codecov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index d9b43b2594..21af6d0d45 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -1,4 +1,3 @@ -annotations: false comment: false # Do not leave PR comments coverage: status: @@ -10,3 +9,5 @@ coverage: default: # GitHub status check is not blocking informational: true +github_checks: + annotations: false From 0c3c06f7cc50c9207a44f56e184ce6a41f953171 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 10 Sep 2024 13:32:58 -0400 Subject: [PATCH 6/6] Remove vendor prefix from `mobile-web-app-capable` meta tag (#31845) --- app/views/layouts/application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a6b34c8a36..99e89d45ce 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -21,7 +21,7 @@ %link{ rel: 'mask-icon', href: frontend_asset_path('images/logo-symbol-icon.svg'), color: '#6364FF' }/ %link{ rel: 'manifest', href: manifest_path(format: :json) }/ = theme_color_tags current_theme - %meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/ + %meta{ name: 'mobile-web-app-capable', content: 'yes' }/ %title= html_title