Add ability to manage which websites can credit you in link previews (#31819)

This commit is contained in:
Eugen Rochko 2024-09-10 14:00:40 +02:00 committed by GitHub
parent 3929e3c6d2
commit e0c27a5047
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
92 changed files with 381 additions and 160 deletions

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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!

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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.

View file

@ -1239,8 +1239,6 @@ ar:
your_appeal_approved: تمت الموافقة على طعنك
your_appeal_pending: لقد قمت بتقديم طعن
your_appeal_rejected: تم رفض طعنك
domain_validator:
invalid_domain: ليس بإسم نطاق صالح
edit_profile:
basic_information: معلومات أساسية
hint_html: "<strong>قم بتخصيص ما سيراه الناس في ملفك الشخصي العام وبجوار منشوراتك.</strong> من المرجح أن يتابعك أشخاص آخرون ويتفاعلون معك إن كان لديك صفحة شخصية مملوء وصورة."

View file

@ -1256,8 +1256,6 @@ be:
your_appeal_approved: Ваша абскарджанне было ўхвалена
your_appeal_pending: Вы адправілі апеляцыю
your_appeal_rejected: Ваша абскарджанне было адхілена
domain_validator:
invalid_domain: не з'яўляецца сапраўдным даменным імем
edit_profile:
basic_information: Асноўная інфармацыя
hint_html: "<strong>Наладзьце тое, што людзі будуць бачыць у вашым профілі і побач з вашымі паведамленнямі.</strong> Іншыя людзі з большай верагоднасцю будуць сачыць і ўзаемадзейнічаць з вамі, калі ў вас ёсць запоўнены профіль і фота профілю."

View file

@ -1179,8 +1179,6 @@ bg:
your_appeal_approved: Вашето обжалване е одобрено
your_appeal_pending: Подадохте обжалване
your_appeal_rejected: Вашето обжалване е отхвърлено
domain_validator:
invalid_domain: не е валидно име на домейн
edit_profile:
basic_information: Основна информация
hint_html: "<strong>Персонализирайте какво хората виждат в обществения ви профил и до публикациите ви.</strong> Другите хора са по-склонни да ви последват и да взаимодействат с вас, когато имате попълнен профил и снимка на профила."

View file

@ -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: "<strong>Personalitza el que la gent veu en el teu perfil públic i a prop dels teus tuts..</strong> És més probable que altres persones et segueixin i interaccionin amb tu quan tens emplenat el teu perfil i amb la teva imatge."

View file

@ -646,8 +646,6 @@ ckb:
strikes:
title_actions:
none: ئاگاداری
domain_validator:
invalid_domain: ناوی دۆمەین بڕوادار نییە
errors:
'400': داواکاریەکەی کە پێشکەشت کردووە نادروستە یان نەیپێکا.
'403': تۆ مۆڵەتت نیە بۆ بینینی ئەم لاپەڕەیە.

View file

@ -603,8 +603,6 @@ co:
more_details_html: Per più di ditagli, videte a <a href="%{terms_path}">pulitica di vita privata</a>.
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.

View file

@ -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: "<strong>Nastavte si, co lidé uvidí na vašem veřejném profilu a vedle vašich příspěvků.</strong> Ostatní lidé vás budou spíše sledovat a komunikovat s vámi, když budete mít vyplněný profil a profilový obrázek."

View file

@ -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: "<strong>Addaswch yr hyn y mae pobl yn ei weld ar eich proffil cyhoeddus ac wrth ymyl eich postiadau.</strong> Mae pobl eraill yn fwy tebygol o'ch dilyn yn ôl a rhyngweithio â chi pan fydd gennych broffil wedi'i lenwi a llun proffil."

View file

@ -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: "<strong>Tilpas hvad folk ser på din offentlige profil og ved siden af dine indlæg.</strong> Andre personer vil mere sandsynligt følge dig tilbage og interagere med dig, når du har en udfyldt profil og et profilbillede."

View file

@ -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: "<strong>Bestimme, was andere auf deinem öffentlichen Profil und neben deinen Beiträgen sehen können.</strong> Wenn du ein Profilbild festlegst und dein Profil vervollständigst, werden andere eher mit dir interagieren und dir folgen."

View file

@ -1192,8 +1192,6 @@ el:
your_appeal_approved: Η έφεση σου έχει εγκριθεί
your_appeal_pending: Υπέβαλλες έφεση
your_appeal_rejected: Η έφεση σου απορρίφθηκε
domain_validator:
invalid_domain: δεν είναι έγκυρο όνομα τομέα
edit_profile:
basic_information: Βασικές πληροφορίες
hint_html: "<strong>Τροποποίησε τί βλέπουν άτομα στο δημόσιο προφίλ σου και δίπλα στις αναρτήσεις σου.</strong> Είναι πιο πιθανό κάποιος να σε ακολουθήσει πίσω και να αλληλεπιδράσουν μαζί σου αν έχεις ολοκληρωμένο προφίλ και εικόνα προφίλ."

View file

@ -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: "<strong>Customise what people see on your public profile and next to your posts.</strong> Other people are more likely to follow you back and interact with you when you have a filled out profile and a profile picture."

View file

@ -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: "<strong>Tip:</strong> 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: "<strong>Customize what people see on your public profile and next to your posts.</strong> 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:

View file

@ -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

View file

@ -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: "<strong>Personalizá lo que la gente ve en tu perfil público y junto a tus publicaciones.</strong> Es más probable que otras personas te sigan e interactúen con vos cuando tengas un perfil completo y una foto de perfil."

View file

@ -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: "<strong>Personaliza lo que la gente ve en tu perfil público junto a tus publicaciones.</strong> Es más probable que otras personas te sigan e interactúen contigo cuando completes tu perfil y agregues una foto."

View file

@ -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: "<strong>Personaliza lo que la gente ve en tu perfil público junto a tus publicaciones.</strong> Es más probable que otras personas te sigan e interactúen contigo cuando completas tu perfil y foto."

View file

@ -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: "<strong>Kohanda, mida inimesed näevad su avalikul profiilil ja postituste kõrval.</strong> Inimesed alustavad tõenäolisemalt sinu jälgimist ja interakteeruvad sinuga, kui sul on täidetud profiil ja profiilipilt."

View file

@ -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: "<strong>Pertsonalizatu jendeak zer ikusi dezakeen zure profil publikoan eta zure bidalketen baitan.</strong> Segur aski, jende gehiagok jarraituko dizu eta interakzio gehiago izango dituzu profila osatuta baduzu, profil irudia eta guzti."

View file

@ -986,8 +986,6 @@ fa:
your_appeal_approved: درخواست تجدیدنظرتان پذیرفته شد
your_appeal_pending: شما یک درخواست تجدیدنظر فرستادید
your_appeal_rejected: درخواست تجدیدنظرتان رد شد
domain_validator:
invalid_domain: نام دامین معتبر نیست
edit_profile:
basic_information: اطلاعات پایه
hint_html: "<strong>شخصی‌سازی آن چه مردم روی نمایهٔ عمومیتان و کنار فرسته‌هایتان می‌بینند.</strong> هنگامی که نمایه‌ای کامل و یک تصویر نمایه داشته باشید،‌ احتمال پی‌گیری متقابل و تعامل با شما بیش‌تر است."

View file

@ -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: "<strong>Mukauta, mitä ihmiset näkevät julkisessa profiilissasi ja julkaisujesi vieressä.</strong> Sinua seurataan takaisin ja kanssasi ollaan vuorovaikutuksessa todennäköisemmin, kun sinulla on täytetty profiili ja profiilikuva."

View file

@ -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: "<strong>Tillaga tað, sum fólk síggja á tínum almenna vanga og við síðna av tínum postum.</strong> 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."

View file

@ -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: nest pas un nom de domaine valide
edit_profile:
basic_information: Informations de base
hint_html: "<strong>Personnalisez ce que les gens voient sur votre profil public et à côté de vos messages.</strong> Les autres personnes seront plus susceptibles de vous suivre et dinteragir avec vous lorsque vous avez un profil complet et une photo."

View file

@ -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: nest pas un nom de domaine valide
edit_profile:
basic_information: Informations de base
hint_html: "<strong>Personnalisez ce que les gens voient sur votre profil public et à côté de vos messages.</strong> Les autres personnes seront plus susceptibles de vous suivre et dinteragir avec vous lorsque vous avez un profil complet et une photo."

View file

@ -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: "<strong>Pas oan wat minsken op jo iepenbiere profyl en njonken jo berjochten sjogge.</strong> Oare minsken sille jo earder folgje en mei jo kommunisearje wanneart jo profyl ynfolle is en jo in profylfoto hawwe."

View file

@ -1288,8 +1288,6 @@ ga:
your_appeal_approved: Tá dachomharc 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: "<strong>Saincheap a bhfeiceann daoine ar do phróifíl phoiblí agus in aice le do phostálacha.</strong> 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."

View file

@ -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: "<strong>Gnàthaich na chithear air a phròifil phoblach agad is ri taobh nam postaichean agad.</strong> 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."

View file

@ -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: "<strong>Personaliza o que van ver no teu perfil público e ao lado das túas publicacións.</strong> 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."

View file

@ -1270,8 +1270,6 @@ he:
your_appeal_approved: ערעורך התקבל
your_appeal_pending: הגשת ערעור
your_appeal_rejected: ערעורך נדחה
domain_validator:
invalid_domain: הוא לא שם דומיין קביל
edit_profile:
basic_information: מידע בסיסי
hint_html: "<strong>התאמה אישית של מה שיראו אחרים בפרופיל הציבורי שלך וליד הודעותיך.</strong> אחרים עשויים יותר להחזיר עוקב וליצור אתך שיחה אם הפרופיל והתמונה יהיו מלאים."

View file

@ -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: "<strong>Tedd egyedivé, mi látnak mások a profilodon és a bejegyzéseid mellett.</strong> Mások nagyobb eséllyel követnek vissza és lépnek veled kapcsolatba, ha van kitöltött profilod és profilképed."

View file

@ -523,8 +523,6 @@ hy:
success_msg: Հաշիւդ բարեյաջող ջնջուեց
warning:
username_available: Քո օգտանունը կրկին հասանելի կը դառնայ
domain_validator:
invalid_domain: անվաւէր տիրոյթի անուն
errors:
'404': Էջը, որը փնտրում ես գոյութիւն չունի։
'429': Չափազանց շատ հարցումներ

View file

@ -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: "<strong>Personalisa lo que le personas vide sur tu profilo public e presso tu messages.</strong> Il es plus probabile que altere personas te seque e interage con te quando tu ha un profilo complete e un photo."

View file

@ -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.

View file

@ -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: "<strong>Customisa ti quel gente vide sur tui public profil e apu tui postas.</strong> Altri persones es plu probabil sequer te e interacter con te si tu have un detalliat profil e un profil-image."

View file

@ -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

View file

@ -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: "<strong>Sérsníddu hvað fólk sér á opinbera notandasniðinu þínu og næst færslunum þínum.</strong> 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."

View file

@ -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: "<strong>Personalizza ciò che le persone vedono sul tuo profilo pubblico e accanto ai tuoi post.</strong> È più probabile che altre persone ti seguano e interagiscano con te quando hai un profilo compilato e un'immagine del profilo."

View file

@ -1213,8 +1213,6 @@ ja:
your_appeal_approved: 申し立てが承認されました
your_appeal_pending: 申し立てを送信しました
your_appeal_rejected: 申し立ては拒否されました
domain_validator:
invalid_domain: は無効なドメイン名です
edit_profile:
basic_information: 基本情報
hint_html: "<strong>アカウントのトップページや投稿の隣に表示される公開情報です。</strong>プロフィールとアイコンを設定することで、ほかのユーザーは親しみやすく、またフォローしやすくなります。"

View file

@ -385,8 +385,6 @@ kk:
more_details_html: Қосымша мәліметтер алу үшін <a href="%{terms_path}"> құпиялылық саясатын </a> қараңыз.
username_available: Аккаунтыңыз қайтадан қолжетімді болады
username_unavailable: Логиніңіз қолжетімді болмайды
domain_validator:
invalid_domain: жарамды домен атауы емес
errors:
'400': Сіз жіберген сұрау жарамсыз немесе дұрыс емес.
'403': Бұны көру үшін сізде рұқсат жоқ.

View file

@ -1218,8 +1218,6 @@ ko:
your_appeal_approved: 소명이 받아들여졌습니다
your_appeal_pending: 소명을 제출했습니다
your_appeal_rejected: 소명이 기각되었습니다
domain_validator:
invalid_domain: 올바른 도메인 네임이 아닙니다
edit_profile:
basic_information: 기본 정보
hint_html: "<strong>사람들이 공개 프로필을 보고서 게시물을 볼 때를 위한 프로필을 꾸밉니다.</strong> 프로필과 프로필 사진을 채우면 다른 사람들이 나를 팔로우하고 나와 교류할 기회가 더 많아집니다."

View file

@ -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.

View file

@ -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: "<strong>Personaliza lo ke la djente ve en tu profil publiko i kon tus publikasyones.</strong> Es mas probavle ke otras personas te sigan i enteraktuen kontigo kuando kompletas tu profil i foto."

View file

@ -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: "<strong>Pielāgo, ko cilvēki redz Tavā publiskajā profilā un blakus Taviem ierakstiem.</strong> 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."

View file

@ -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: "<strong>Sesuaikan perkara yang orang lihat pada profil awam anda dan di sebelah siaran anda.</strong> Orang lain lebih berkemungkinan mengikuti anda kembali dan berinteraksi dengan anda apabila anda mempunyai profil dan gambar profil yang telah diisi."

View file

@ -1108,8 +1108,6 @@ my:
your_appeal_approved: သင့်တင်သွင်းခြင်းကို အတည်ပြုပြီးပါပြီ
your_appeal_pending: အယူခံဝင်ရန် တင်သွင်းထားသည်
your_appeal_rejected: အယူခံဝင်မှုကို ပယ်ချလိုက်သည်
domain_validator:
invalid_domain: တရားဝင်ဒိုမိန်းအမည်မဟုတ်ပါ
edit_profile:
basic_information: အခြေခံသတင်းအချက်အလက်
hint_html: "<strong>သင်၏ အများမြင်ပရိုဖိုင်နှင့် သင့်ပို့စ်များဘေးရှိ တွေ့မြင်ရသည့်အရာကို စိတ်ကြိုက်ပြင်ဆင်ပါ။ </strong> သင့်တွင် ပရိုဖိုင်နှင့် ပရိုဖိုင်ပုံတစ်ခု ဖြည့်သွင်းထားပါက အခြားသူများအနေဖြင့် သင်နှင့် အပြန်အလှန် တုံ့ပြန်နိုင်ခြေပိုများပါသည်။"

View file

@ -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: "<strong>Wat mensen op jouw openbare profiel en naast je berichten zien aanpassen.</strong> Andere mensen gaan je waarschijnlijk eerder volgen en hebben vaker interactie met je, wanneer je profiel is ingevuld en je een profielfoto hebt."

View file

@ -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: "<strong>Tilpass kva folk ser på den offentlege profilen din og ved sida av innlegga dine.</strong> Andre vil i større grad fylgja og samhandla med deg når du har eit profilbilete og har fyllt ut profilen din."

View file

@ -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: "<strong>Tilpass hva folk ser på din offentlige profil og ved siden av dine innlegg.</strong> 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."

View file

@ -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 lautorizacion de veire aquesta pagina.
'404': La pagina que cercatz existís pas aquí.

View file

@ -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: "<strong>Dostosuj to, co ludzie widzą na Twoim profilu publicznym i obok Twoich wpisów.</strong> Inne osoby są bardziej skłonne obserwować Cię i wchodzić z Tobą w interakcje, gdy masz wypełniony profil i zdjęcie profilowe."

View file

@ -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: "<strong>Personalize o que as pessoas veem no seu perfil público e ao lado de suas publicações.</strong> É 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."

View file

@ -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: "<strong>Personalize o que as pessoas veem no seu perfil público e junto das suas publicações.</strong> É mais provável que as outras pessoas o sigam de volta ou interajam consigo se tiver um perfil preenchido e uma imagem de perfil."

View file

@ -1193,8 +1193,6 @@ ru:
your_appeal_approved: Ваша апелляция одобрена
your_appeal_pending: Вы подали апелляцию
your_appeal_rejected: Ваша апелляция отклонена
domain_validator:
invalid_domain: не является корректным доменным именем
edit_profile:
basic_information: Основная информация
hint_html: "<strong>Настройте то, что люди видят в вашем публичном профиле и рядом с вашими сообщениями.</strong> Другие люди с большей вероятностью подпишутся на Вас и будут взаимодействовать с вами, если у Вас заполнен профиль и добавлено изображение."

View file

@ -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

View file

@ -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.

View file

@ -892,8 +892,6 @@ si:
your_appeal_approved: ඔබගේ අභියාචනය අනුමත කර ඇත
your_appeal_pending: ඔබ අභියාචනයක් ඉදිරිපත් කර ඇත
your_appeal_rejected: ඔබගේ අභියාචනය ප්‍රතික්ෂේප කර ඇත
domain_validator:
invalid_domain: වලංගු ඩොමේන් නාමයක් නොවේ
edit_profile:
basic_information: මූලික තොරතුරු
other: වෙනත්

View file

@ -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

View file

@ -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é

View file

@ -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: "<strong>Prilagodite, kaj ljudje vidijo na vašem javnem profilu in poleg vaših objav.</strong> Drugi vam bodo raje sledili nazaj in z vami klepetali, če boste imeli izpolnjen profil in nastavljeno profilno sliko."

View file

@ -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: "<strong>Përshtatni çshohin njerëzit në profilin tuaj publik dhe në krah të postimeve tuaja.</strong> Personat e tjerë ka më shumë gjasa tju ndjekin dhe ndërveprojnë me ju, kur keni të plotësuar profilin dhe një foto profili."

View file

@ -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: "<strong>Prilagodite šta ljudi vide na vašem javnom profilu i pored vaših objava.</strong> Veća je verovatnoća da će vas drugi pratiti i komunicirati sa vama kada imate popunjen profil i sliku profila."

View file

@ -1204,8 +1204,6 @@ sr:
your_appeal_approved: Ваша жалба је уважена
your_appeal_pending: Приложили сте жалбу
your_appeal_rejected: Ваша жалба је одбијена
domain_validator:
invalid_domain: нелегитимно име домена
edit_profile:
basic_information: Основне информације
hint_html: "<strong>Прилагодите шта људи виде на вашем јавном профилу и поред ваших објава.</strong> Већа је вероватноћа да ће вас други пратити и комуницирати са вама када имате попуњен профил и слику профила."

View file

@ -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: "<strong>Anpassa vad folk ser på din offentliga profil och bredvid dina inlägg.</strong> Andra personer är mer benägna att följa dig och interagera med dig när du har en ifylld profil och en profilbild."

View file

@ -1216,8 +1216,6 @@ th:
your_appeal_approved: อนุมัติการอุทธรณ์ของคุณแล้ว
your_appeal_pending: คุณได้ส่งการอุทธรณ์
your_appeal_rejected: ปฏิเสธการอุทธรณ์ของคุณแล้ว
domain_validator:
invalid_domain: ไม่ใช่ชื่อโดเมนที่ถูกต้อง
edit_profile:
basic_information: ข้อมูลพื้นฐาน
hint_html: "<strong>ปรับแต่งสิ่งที่ผู้คนเห็นในโปรไฟล์สาธารณะของคุณและถัดจากโพสต์ของคุณ</strong> ผู้คนอื่น ๆ มีแนวโน้มที่จะติดตามคุณกลับและโต้ตอบกับคุณมากขึ้นเมื่อคุณมีโปรไฟล์ที่กรอกแล้วและรูปภาพโปรไฟล์"

View file

@ -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: "<strong>İnsanlara herkese açık profilinizde ve gönderilerinizin yanında ne göstermek istediğinizi düzenleyin.</strong> 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."

View file

@ -1270,8 +1270,6 @@ uk:
your_appeal_approved: Вашу апеляцію було схвалено
your_appeal_pending: Ви не подавали апеляцій
your_appeal_rejected: Вашу апеляцію було відхилено
domain_validator:
invalid_domain: не є допустимим ім'ям домену
edit_profile:
basic_information: Основна інформація
hint_html: "<strong>Налаштуйте те, що люди бачитимуть у вашому загальнодоступному профілі та поруч із вашими дописами.</strong> Інші люди з більшою ймовірністю підпишуться на вас та взаємодіятимуть з вами, якщо у вас є заповнений профіль та зображення профілю."

View file

@ -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: "<strong>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.</strong> 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."

View file

@ -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: "<strong>自定义公开资料和嘟文旁边显示的内容。</strong>当您填写完整的个人资料并设置了头像时,其他人更有可能关注您并与您互动。"

View file

@ -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: "<strong>自訂你的公開個人檔案和帖文內容。</strong>當你有完整的個人檔案和頭像時,其他人更願意追蹤你和與你互動。"

View file

@ -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: "<strong>自訂人們能於您個人檔案及嘟文旁所見之內容。</strong>當您完成填寫個人檔案及設定大頭貼後,其他人們比較願意跟隨您並與您互動。"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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') }

View file

@ -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) }

View file

@ -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

View file

@ -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

View file

@ -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