Skip to content

Commit

Permalink
Merge commit '6dfe318f34d69066dc0f453a228fdfc6af84b62e' into glitch-s…
Browse files Browse the repository at this point in the history
…oc/merge-upstream
  • Loading branch information
ClearlyClaire committed Feb 29, 2024
2 parents 8dbdd75 + 6dfe318 commit 4d7e7cc
Show file tree
Hide file tree
Showing 24 changed files with 120 additions and 85 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/accounts/statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
before_action -> { authorize_if_got_token! :read, :'read:statuses' }
before_action :set_account

after_action :insert_pagination_headers, unless: -> { truthy_param?(:pinned) }
after_action :insert_pagination_headers

def index
cache_if_unauthenticated!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class EditedTimestamp extends PureComponent {
return (
<DropdownMenu statusId={statusId} renderItem={this.renderItem} scrollable renderHeader={this.renderHeader} onItemClick={this.handleItemClick}>
<button className='dropdown-menu__text-button'>
<FormattedMessage id='status.edited' defaultMessage='Edited {date}' values={{ date: intl.formatDate(timestamp, { hour12: false, month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) }} /> <Icon id='caret-down' icon={ArrowDropDownIcon} />
<FormattedMessage id='status.edited' defaultMessage='Edited {date}' values={{ date: intl.formatDate(timestamp, { month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) }} /> <Icon id='caret-down' icon={ArrowDropDownIcon} />
</button>
</DropdownMenu>
);
Expand Down
1 change: 0 additions & 1 deletion app/javascript/mastodon/components/relative_timestamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const messages = defineMessages({
});

const dateFormatOptions = {
hour12: false,
year: 'numeric',
month: 'short',
day: '2-digit',
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ class Status extends ImmutablePureComponent {
<div onClick={this.handleClick} className='status__info'>
<a href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} className='status__relative-time' target='_blank' rel='noopener noreferrer'>
<span className='status__visibility-icon'><VisibilityIcon visibility={status.get('visibility')} /></span>
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { hour12: false, year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
</a>

<a onClick={this.handleAccountClick} href={`/@${status.getIn(['account', 'acct'])}`} title={status.getIn(['account', 'acct'])} className='status__display-name' target='_blank' rel='noopener noreferrer'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const dateFormatOptions = {
month: 'short',
day: 'numeric',
year: 'numeric',
hour12: false,
hour: '2-digit',
minute: '2-digit',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class Announcement extends ImmutablePureComponent {
<div className='announcements__item'>
<strong className='announcements__item__range'>
<FormattedMessage id='announcement.announcement' defaultMessage='Announcement' />
{hasTimeRange && <span> · <FormattedDate value={startsAt} hour12={false} year={(skipYear || startsAt.getFullYear() === now.getFullYear()) ? undefined : 'numeric'} month='short' day='2-digit' hour={skipTime ? undefined : '2-digit'} minute={skipTime ? undefined : '2-digit'} /> - <FormattedDate value={endsAt} hour12={false} year={(skipYear || endsAt.getFullYear() === now.getFullYear()) ? undefined : 'numeric'} month={skipEndDate ? undefined : 'short'} day={skipEndDate ? undefined : '2-digit'} hour={skipTime ? undefined : '2-digit'} minute={skipTime ? undefined : '2-digit'} /></span>}
{hasTimeRange && <span> · <FormattedDate value={startsAt} year={(skipYear || startsAt.getFullYear() === now.getFullYear()) ? undefined : 'numeric'} month='short' day='2-digit' hour={skipTime ? undefined : '2-digit'} minute={skipTime ? undefined : '2-digit'} /> - <FormattedDate value={endsAt} year={(skipYear || endsAt.getFullYear() === now.getFullYear()) ? undefined : 'numeric'} month={skipEndDate ? undefined : 'short'} day={skipEndDate ? undefined : '2-digit'} hour={skipTime ? undefined : '2-digit'} minute={skipTime ? undefined : '2-digit'} /></span>}
</strong>

<Content announcement={announcement} />
Expand Down
6 changes: 5 additions & 1 deletion app/javascript/mastodon/features/status/components/card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export default class Card extends PureComponent {
this.setState({ embedded: true });
};

handleExternalLinkClick = (e) => {
e.stopPropagation();
};

setRef = c => {
this.node = c;
};
Expand Down Expand Up @@ -201,7 +205,7 @@ export default class Card extends PureComponent {
<div className='status-card__actions' onClick={this.handleEmbedClick} role='none'>
<div>
<button type='button' onClick={this.handleEmbedClick}><Icon id='play' icon={PlayArrowIcon} /></button>
<a href={card.get('url')} target='_blank' rel='noopener noreferrer'><Icon id='external-link' icon={OpenInNewIcon} /></a>
<a href={card.get('url')} onClick={this.handleExternalLinkClick} target='_blank' rel='noopener noreferrer'><Icon id='external-link' icon={OpenInNewIcon} /></a>
</div>
</div>
) : spoilerButton}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class DetailedStatus extends ImmutablePureComponent {

<div className='detailed-status__meta'>
<a className='detailed-status__datetime' href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} target='_blank' rel='noopener noreferrer'>
<FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />
<FormattedDate value={new Date(status.get('created_at'))} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />
</a>{edited}{visibilityLink}{applicationLink}{reblogLink} · {favouriteLink}
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions app/javascript/mastodon/locales/lt.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"about.blocks": "Prižiūrimi serveriai",
"about.contact": "Kontaktuoti:",
"about.contact": "Kontaktai:",
"about.disclaimer": "Mastodon – nemokama atvirojo kodo programa ir Mastodon gGmbH prekės ženklas.",
"about.domain_blocks.no_reason_available": "Priežastis nepateikta",
"about.domain_blocks.preamble": "Mastodon paprastai leidžia peržiūrėti turinį ir bendrauti su naudotojais iš bet kurio kito fediverse esančio serverio. Šios yra išimtys, kurios buvo padarytos šiame konkrečiame serveryje.",
Expand Down Expand Up @@ -424,7 +424,7 @@
"notifications.column_settings.mention": "Paminėjimai:",
"notifications.column_settings.poll": "Balsavimo rezultatai:",
"notifications.column_settings.push": "\"Push\" pranešimai",
"notifications.column_settings.reblog": "\"Boost\" kiekis:",
"notifications.column_settings.reblog": "Pakėlimai:",
"notifications.column_settings.show": "Rodyti stulpelyje",
"notifications.column_settings.sound": "Paleisti garsą",
"notifications.column_settings.status": "New toots:",
Expand Down Expand Up @@ -636,6 +636,7 @@
"status.translate": "Versti",
"status.translated_from_with": "Išversta iš {lang} naudojant {provider}",
"status.uncached_media_warning": "Peržiūra nepasiekiama",
"subscribed_languages.lead": "Po pakeitimo tavo pagrindinėje ir sąrašo laiko juostose bus rodomi tik įrašai pasirinktomis kalbomis. Jei nori gauti įrašus visomis kalbomis, pasirink nė vieno.",
"tabs_bar.home": "Pradžia",
"tabs_bar.notifications": "Pranešimai",
"time_remaining.days": "Liko {number, plural, one {# diena} few {# dienos} many {# dieno} other {# dienų}}",
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/mastodon/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@
"poll_button.add_poll": "Peiling toevoegen",
"poll_button.remove_poll": "Peiling verwijderen",
"privacy.change": "Zichtbaarheid van bericht aanpassen",
"privacy.direct.long": "Iedereen die in het bericht wordt vermeld",
"privacy.direct.short": "Bepaalde mensen",
"privacy.direct.long": "Alleen voor mensen die specifiek in het bericht worden vermeld",
"privacy.direct.short": "Specifieke mensen",
"privacy.private.long": "Alleen jouw volgers",
"privacy.private.short": "Volgers",
"privacy.public.long": "Iedereen op Mastodon en daarbuiten",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
"status.mute": "靜音 @{name}",
"status.mute_conversation": "靜音對話",
"status.open": "展開此嘟文",
"status.pin": "釘選到個人檔案頁面",
"status.pin": "釘選至個人檔案頁面",
"status.pinned": "釘選嘟文",
"status.read_more": "閱讀更多",
"status.reblog": "轉嘟",
Expand Down
1 change: 0 additions & 1 deletion app/javascript/packs/public.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function loaded() {

const timeFormat = new Intl.DateTimeFormat(locale, {
timeStyle: 'short',
hour12: false,
});

const formatMessage = ({ id, defaultMessage }, values) => {
Expand Down
6 changes: 1 addition & 5 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5210,10 +5210,6 @@ a.status-card {
pointer-events: auto;
opacity: 1;
}

@media screen and (min-width: $no-gap-breakpoint) {
inset-inline-start: 16px - 2px;
}
}

.icon-search {
Expand Down Expand Up @@ -8265,7 +8261,7 @@ noscript {
.search__input {
border: 1px solid lighten($ui-base-color, 8%);
padding: 10px;
padding-inline-end: 28px;
padding-inline-end: 30px;
}

.search__popout {
Expand Down
19 changes: 11 additions & 8 deletions app/lib/admin/metrics/measure/tag_servers_measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ def sql_array
def sql_query_string
<<~SQL.squish
SELECT axis.*, (
SELECT count(distinct accounts.domain) AS value
FROM statuses
INNER JOIN statuses_tags ON statuses.id = statuses_tags.status_id
INNER JOIN accounts ON statuses.account_id = accounts.id
WHERE statuses_tags.tag_id = :tag_id
AND statuses.id BETWEEN :earliest_status_id AND :latest_status_id
AND date_trunc('day', statuses.created_at)::date = axis.period
)
WITH tag_servers AS (
SELECT DISTINCT accounts.domain
FROM statuses
INNER JOIN statuses_tags ON statuses.id = statuses_tags.status_id
INNER JOIN accounts ON statuses.account_id = accounts.id
WHERE statuses_tags.tag_id = :tag_id
AND statuses.id BETWEEN :earliest_status_id AND :latest_status_id
AND date_trunc('day', statuses.created_at)::date = axis.period
)
SELECT COUNT(*) FROM tag_servers
) AS value
FROM (
SELECT generate_series(date_trunc('day', :start_at::timestamp)::date, date_trunc('day', :end_at::timestamp)::date, interval '1 day') AS period
) as axis
Expand Down
5 changes: 5 additions & 0 deletions config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,13 +823,15 @@ cy:
disabled: I neb
users: I ddefnyddwyr lleol wedi'u mewngofnodi
registrations:
moderation_recommandation: Gwnewch yn siŵr bod gennych chi dîm cymedroli digonol ac adweithiol cyn i chi agor cofrestriadau i bawb!
preamble: Rheoli pwy all greu cyfrif ar eich gweinydd.
title: Cofrestriadau
registrations_mode:
modes:
approved: Mae angen cymeradwyaeth i gofrestru
none: Nid oes neb yn gallu cofrestru
open: Gall unrhyw un cofrestru
warning_hint: Rydym yn argymell defnyddio “Mae angen cymeradwyaeth ar gyfer cofrestru” oni bai eich bod yn hyderus y gall eich tîm cymedroli ymdrin â chofrestriadau sbam a rhai maleisus mewn modd amserol.
security:
authorized_fetch: Mae angen dilysu gan weinyddion ffederal
authorized_fetch_hint: Mae gofyn am ddilysiad gan weinyddion ffederal yn galluogi gorfodi llymach ar flociau lefel defnyddiwr a lefel gweinydd. Fodd bynnag, daw hyn ar gost perfformiad arafach, mae'n lleihau cyrhaeddiad eich atebion, a gall gyflwyno materion cydnawsedd gyda rhai gwasanaethau ffederal. Yn ogystal, ni fydd hyn yn atal actorion ymroddedig rhag estyn eich postiadau a'ch cyfrifon cyhoeddus.
Expand Down Expand Up @@ -1038,6 +1040,9 @@ cy:
title: Bachau Gwe
webhook: Bachyn Gwe
admin_mailer:
auto_close_registrations:
body: Oherwydd diffyg gweithgarwch cymedrolwr diweddar, mae cofrestriadau ar %{instance} wedi'u newid yn awtomatig i'r angen i gael adolygiad â llaw, er mwyn atal %{instance} rhag cael ei ddefnyddio fel llwyfan ar gyfer actorion drwg posibl. Gallwch ei newid yn ôl i agor cofrestriadau ar unrhyw adeg.
subject: Mae cofrestriadau ar gyfer %{instance} wedi'u newid yn awtomatig i'r angen i gael cymeradwyaeth
new_appeal:
actions:
delete_statuses: i ddileu eu postiadau
Expand Down
5 changes: 5 additions & 0 deletions config/locales/is.yml
Original file line number Diff line number Diff line change
Expand Up @@ -769,13 +769,15 @@ is:
disabled: Til engra
users: Til innskráðra staðværra notenda
registrations:
moderation_recommandation: Tryggðu að þú hafir hæft og aðgengilegt umsjónarteymi til taks áður en þú opnar á skráningar fyrir alla!
preamble: Stýrðu því hverjir geta útbúið notandaaðgang á netþjóninum þínum.
title: Nýskráningar
registrations_mode:
modes:
approved: Krafist er samþykkt nýskráningar
none: Enginn getur nýskráð sig
open: Allir geta nýskráð sig
warning_hint: Við mælum með því að nota "Krafist er samþykkt nýskráningar" nema ef þú sért viss um að umsjónarteymið þitt geti brugðist tímanlega við ruslpósti og skráningum í misjöfnum tilgangi.
security:
authorized_fetch: Krefjast auðkenningar frá netþjónum í skýjasambandi
authorized_fetch_hint: Að krefjast auðkenningar frá netþjónum í skýjasambandi kallar fram strangari útfærslu á útilokunum, bæði varðandi notendur og netþjóna. Hins vegar kemur þetta niður á afköstum, minnkar útbreiðslu á svörum þínum og gæti valdið samhæfnivandamálum við sumar sambandsþjónustur. Að auki kemur þetta ekki í veg fyrir að aðilar sem ætla sér að ná í opinberar færslur og notendaaðganga frá þér geri það.
Expand Down Expand Up @@ -968,6 +970,9 @@ is:
title: Webhook-vefkrækjur
webhook: Webhook-vefkrækja
admin_mailer:
auto_close_registrations:
body: Vegna skorts á virkni umsjónaraðila að undanförnu, hafa nýskráningar á %{instance} sjálfkrafa verið stilltar á að þarfnast samþykktar umsjónaraðila, til að koma í veg fyrir að %{instance} verði mögulega misnotað af óprúttnum aðilum. Þú getur skipt hvenær sem er aftur yfir í opnar nýskráningar.
subject: Nýskráningar á %{instance} hafa sjálfkrafa verið stilltar á að krefjast samþykktar
new_appeal:
actions:
delete_statuses: að eyða færslum viðkomandi
Expand Down
2 changes: 1 addition & 1 deletion config/locales/lt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ lt:
guide_link_text: Visi gali prisidėti.
application_mailer:
notification_preferences: Keisti el pašto parinktis
settings: 'Keisti el pašto parinktis: %{link}'
settings: 'Keisti el. pašto nuostatas: %{link}'
view: 'Peržiūra:'
view_profile: Peržiurėti profilį
view_status: Peržiūrėti statusą
Expand Down
2 changes: 2 additions & 0 deletions config/locales/simple_form.cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ cy:
text: Dim ond unwaith y gallwch apelio yn erbyn rhybudd
defaults:
autofollow: Bydd pobl sy'n cofrestru drwy'r gwahoddiad yn eich dilyn yn awtomatig
avatar: WEBP, PNG, GIF neu JPG. %{size} ar y mwyaf. Bydd yn cael ei leihau i %{dimensions}px
bot: Mae'r cyfrif hwn yn perfformio gweithredoedd awtomatig yn bennaf ac mae'n bosib nad yw'n cael ei fonitro
context: Un neu fwy cyd-destun lle dylai'r hidlydd weithio
current_password: At ddibenion diogelwch, nodwch gyfrinair y cyfrif cyfredol
current_username: I gadarnhau, nodwch enw defnyddiwr y cyfrif cyfredol
digest: Ond yn cael eu hanfon ar ôl cyfnod hir o anweithgarwch ac ond os ydych wedi derbyn unrhyw negeseuon personol yn eich absenoldeb
email: Byddwch yn derbyn e-bost cadarnhau
header: WEBP, PNG, GIF neu JPG. %{size} ar y mwyaf. Bydd yn cael ei leihau i %{dimensions}px
inbox_url: Copïwch yr URL o dudalen flaen y relái yr ydych am ei ddefnyddio
irreversible: Bydd postiadau wedi'u hidlo'n diflannu'n ddiwrthdro, hyd yn oed os caiff yr hidlydd ei dynnu'n ddiweddarach
locale: Iaith y rhyngwyneb, e-byst a hysbysiadau gwthiadwy
Expand Down
2 changes: 2 additions & 0 deletions config/locales/simple_form.is.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ is:
text: Þú getur aðeins áfrýjað refsingu einu sinni
defaults:
autofollow: Fólk sem skráir sig í gegnum boðið mun sjálfkrafa fylgjast með þér
avatar: WEBP, PNG, GIF eða JPG. Mest %{size}. Verður smækkað í %{dimensions}px
bot: Þessi aðgangur er aðallega til að framkvæma sjálfvirkar aðgerðir og gæti verið án þess að hann sé vaktaður reglulega
context: Eitt eða fleiri samhengi þar sem sían ætti að gilda
current_password: Í öryggisskyni skaltu setja inn lykilorðið fyrir þennan notandaaðgang
current_username: Til að staðfesta skaltu setja inn notandanafnið fyrir þennan notandaaðgang
digest: Er aðeins sent eftir lengri tímabil án virkni og þá aðeins ef þú hefur fengið persónuleg skilaboð á meðan þú hefur ekki verið á línunni
email: Þú munt fá sendan staðfestingarpóst
header: WEBP, PNG, GIF eða JPG. Mest %{size}. Verður smækkað í %{dimensions}px
inbox_url: Afritaðu slóðina af forsíðu endurvarpans sem þú vilt nota
irreversible: Síaðar færslur munu hverfa óendurkræft, jafnvel þó sían sé seinna fjarlægð
locale: Tungumál notandaviðmótsins, tölvupósts og ýti-tilkynninga
Expand Down
4 changes: 2 additions & 2 deletions config/locales/simple_form.nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ nl:
text: Je kunt maar eenmalig bezwaar indienen tegen een vastgestelde overtreding
defaults:
autofollow: Mensen die zich via de uitnodiging hebben geregistreerd, volgen jou automatisch
avatar: WEBP, PNG, GIF of JPG. Hoogstens %{size}. Wordt verkleind naar %{dimensions}px
avatar: WEBP, PNG, GIF of JPG. Maximaal %{size}. Wordt verkleind naar %{dimensions}px
bot: Signaal aan anderen dat het account voornamelijk geautomatiseerde acties uitvoert en mogelijk niet wordt gecontroleerd
context: Een of meerdere locaties waar de filter actief moet zijn
current_password: Voer voor veiligheidsredenen het wachtwoord van je huidige account in
current_username: Voer ter bevestiging de gebruikersnaam van je huidige account in
digest: Wordt alleen na een lange periode van inactiviteit verzonden en alleen wanneer je tijdens jouw afwezigheid persoonlijke berichten hebt ontvangen
email: Je krijgt een bevestigingsmail
header: WEBP, PNG, GIF of JPG. Hoogstens %{size}. Wordt verkleind naar %{dimensions}px
header: WEBP, PNG, GIF of JPG. Maximaal %{size}. Wordt verkleind naar %{dimensions}px
inbox_url: Kopieer de URL van de voorpagina van de relayserver die je wil gebruiken
irreversible: Gefilterde berichten verdwijnen onomkeerbaar, zelfs als de filter later wordt verwijderd
locale: De taal van de gebruikersomgeving, e-mails en pushmeldingen
Expand Down
13 changes: 10 additions & 3 deletions spec/controllers/activitypub/replies_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
context 'when there are few self-replies' do
it 'points next to replies from other people' do
expect(page_json).to be_a Hash
expect(Addressable::URI.parse(page_json[:next]).query.split('&')).to include('only_other_accounts=true', 'page=true')
expect(parsed_uri_query_values(page_json[:next])).to include('only_other_accounts=true', 'page=true')
end
end

Expand All @@ -101,7 +101,7 @@

it 'points next to other self-replies' do
expect(page_json).to be_a Hash
expect(Addressable::URI.parse(page_json[:next]).query.split('&')).to include('only_other_accounts=false', 'page=true')
expect(parsed_uri_query_values(page_json[:next])).to include('only_other_accounts=false', 'page=true')
end
end
end
Expand Down Expand Up @@ -140,7 +140,7 @@

it 'points next to other replies' do
expect(page_json).to be_a Hash
expect(Addressable::URI.parse(page_json[:next]).query.split('&')).to include('only_other_accounts=true', 'page=true')
expect(parsed_uri_query_values(page_json[:next])).to include('only_other_accounts=true', 'page=true')
end
end
end
Expand Down Expand Up @@ -196,6 +196,13 @@

private

def parsed_uri_query_values(uri)
Addressable::URI
.parse(uri)
.query
.split('&')
end

def ap_public_collection
ActivityPub::TagManager::COLLECTIONS[:public]
end
Expand Down
Loading

0 comments on commit 4d7e7cc

Please sign in to comment.