Skip to content

Commit

Permalink
Merge pull request #2780 from ClearlyClaire/glitch-soc/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream changes up to 66430cb
  • Loading branch information
ClearlyClaire authored Jul 16, 2024
2 parents b7b6f1c + c546757 commit d6a2635
Show file tree
Hide file tree
Showing 53 changed files with 177 additions and 69 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ GEM
json-ld-preloaded (3.3.0)
json-ld (~> 3.3)
rdf (~> 3.3)
json-schema (4.3.0)
json-schema (4.3.1)
addressable (>= 2.8)
jsonapi-renderer (0.2.2)
jwt (2.7.1)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def create
@report = ReportService.new.call(
current_account,
reported_account,
report_params
report_params.merge(application: doorkeeper_token.application)
)

render json: @report, serializer: REST::ReportSerializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe('computeHashtagBarForStatus', () => {
);
});

it('puts the hashtags in the bar if a status content has hashtags in the only line and has a media', () => {
it('does not put the hashtags in the bar if a status content has hashtags in the only line and has a media', () => {
const status = createStatus(
'<p>This is my content! <a href="test">#hashtag</a></p>',
['hashtag'],
Expand Down
29 changes: 15 additions & 14 deletions app/javascript/mastodon/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"account.mention": "Crybwyll @{name}",
"account.moved_to": "Mae {name} wedi nodi fod eu cyfrif newydd yn:",
"account.mute": "Tewi @{name}",
"account.mute_notifications_short": "Distewi hysbysiadau",
"account.mute_short": "Tewi",
"account.mute_notifications_short": "Diffodd hysbysiadau",
"account.mute_short": "Anwybyddu",
"account.muted": "Wedi anwybyddu",
"account.mutual": "Cydgydnabod",
"account.no_bio": "Dim disgrifiad wedi'i gynnig.",
Expand Down Expand Up @@ -92,7 +92,7 @@
"block_modal.they_cant_mention": "Nid ydynt yn gallu eich crybwyll na'ch dilyn.",
"block_modal.they_cant_see_posts": "Nid ydynt yn gallu gweld eich postiadau ac ni fyddwch yn gweld eu rhai hwy.",
"block_modal.they_will_know": "Gallant weld eu bod wedi'u rhwystro.",
"block_modal.title": "Rhwystro defnyddiwr?",
"block_modal.title": "Blocio defnyddiwr?",
"block_modal.you_wont_see_mentions": "Ni welwch bostiadau sy'n sôn amdanynt.",
"boost_modal.combo": "Mae modd pwyso {combo} er mwyn hepgor hyn tro nesa",
"bundle_column_error.copy_stacktrace": "Copïo'r adroddiad gwall",
Expand Down Expand Up @@ -164,7 +164,7 @@
"compose_form.spoiler.marked": "Dileu rhybudd cynnwys",
"compose_form.spoiler.unmarked": "Ychwanegu rhybudd cynnwys",
"compose_form.spoiler_placeholder": "Rhybudd cynnwys (dewisol)",
"confirmation_modal.cancel": "Diddymu",
"confirmation_modal.cancel": "Canslo",
"confirmations.block.confirm": "Blocio",
"confirmations.cancel_follow_request.confirm": "Tynnu'r cais yn ôl",
"confirmations.cancel_follow_request.message": "Ydych chi'n siŵr eich bod am dynnu'ch cais i ddilyn {name} yn ôl?",
Expand All @@ -174,7 +174,7 @@
"confirmations.delete_list.message": "Ydych chi'n siŵr eich bod eisiau dileu'r rhestr hwn am byth?",
"confirmations.discard_edit_media.confirm": "Dileu",
"confirmations.discard_edit_media.message": "Mae gennych newidiadau heb eu cadw i'r disgrifiad cyfryngau neu'r rhagolwg - eu dileu beth bynnag?",
"confirmations.domain_block.confirm": "Rhwystro gweinydd",
"confirmations.domain_block.confirm": "Blocio gweinydd",
"confirmations.domain_block.message": "Ydych chi wir, wir eisiau blocio'r holl {domain}? Fel arfer, mae blocio neu dewi pobl penodol yn broses mwy effeithiol. Fyddwch chi ddim yn gweld cynnwys o'r parth hwnnw mewn ffrydiau cyhoeddus neu yn eich hysbysiadau. Bydd eich dilynwyr o'r parth hwnnw yn cael eu ddileu.",
"confirmations.edit.confirm": "Golygu",
"confirmations.edit.message": "Bydd golygu nawr yn trosysgrifennu'r neges rydych yn ei ysgrifennu ar hyn o bryd. Ydych chi'n siŵr eich bod eisiau gwneud hyn?",
Expand All @@ -201,17 +201,17 @@
"disabled_account_banner.account_settings": "Gosodiadau'r cyfrif",
"disabled_account_banner.text": "Mae eich cyfrif {disabledAccount} wedi ei analluogi ar hyn o bryd.",
"dismissable_banner.community_timeline": "Dyma'r postiadau cyhoeddus diweddaraf gan bobl sydd â chyfrifon ar {domain}.",
"dismissable_banner.dismiss": "Diddymu",
"dismissable_banner.dismiss": "Cau",
"dismissable_banner.explore_links": "Dyma straeon newyddion sy’n cael eu rhannu fwyaf ar y we gymdeithasol heddiw. Mae'r straeon newyddion diweddaraf sy'n cael eu postio gan fwy o unigolion gwahanol yn cael eu graddio'n uwch.",
"dismissable_banner.explore_statuses": "Mae'r rhain yn bostiadau o bob rhan o'r we gymdeithasol sydd ar gynnydd heddiw. Mae postiadau mwy diweddar sydd â mwy o hybiau a ffefrynu'n cael eu graddio'n uwch.",
"dismissable_banner.explore_tags": "Mae'r rhain yn hashnodau sydd ar gynnydd ar y we gymdeithasol heddiw. Mae hashnodau sy'n cael eu defnyddio gan fwy o unigolion gwahanol yn cael eu graddio'n uwch.",
"dismissable_banner.public_timeline": "Dyma'r postiadau cyhoeddus diweddaraf gan bobl ar y we gymdeithasol y mae pobl ar {domain} yn eu dilyn.",
"domain_block_modal.block": "Rhwystro gweinydd",
"domain_block_modal.block_account_instead": "Rhwystro @{name} yn lle hynny",
"domain_block_modal.block": "Blocio gweinydd",
"domain_block_modal.block_account_instead": "Blocio @{name} yn ei le",
"domain_block_modal.they_can_interact_with_old_posts": "Gall pobl o'r gweinydd hwn ryngweithio â'ch hen bostiadau.",
"domain_block_modal.they_cant_follow": "Ni all neb o'r gweinydd hwn eich dilyn.",
"domain_block_modal.they_wont_know": "Fyddan nhw ddim yn gwybod eu bod wedi cael eu rhwystro.",
"domain_block_modal.title": "Rhwystro parth?",
"domain_block_modal.they_wont_know": "Fyddan nhw ddim yn gwybod eu bod wedi cael eu blocio.",
"domain_block_modal.title": "Blocio parth?",
"domain_block_modal.you_will_lose_followers": "Bydd eich holl ddilynwyr o'r gweinydd hwn yn cael eu tynnu.",
"domain_block_modal.you_wont_see_posts": "Fyddwch chi ddim yn gweld postiadau na hysbysiadau gan ddefnyddwyr ar y gweinydd hwn.",
"domain_pill.activitypub_lets_connect": "Mae'n caniatáu ichi gysylltu a rhyngweithio â phobl nid yn unig ar Mastodon, ond ar draws gwahanol apiau cymdeithasol hefyd.",
Expand Down Expand Up @@ -252,7 +252,7 @@
"empty_column.bookmarked_statuses": "Nid oes gennych unrhyw bostiad wedi'u cadw fel llyfrnodau eto. Pan fyddwch yn gosod nod tudalen i un, mi fydd yn ymddangos yma.",
"empty_column.community": "Mae'r ffrwd lleol yn wag. Beth am ysgrifennu rhywbeth cyhoeddus!",
"empty_column.direct": "Nid oes gennych unrhyw grybwylliadau preifat eto. Pan fyddwch chi'n anfon neu'n derbyn un, bydd yn ymddangos yma.",
"empty_column.domain_blocks": "Nid oes yna unrhyw barthau cuddiedig eto.",
"empty_column.domain_blocks": "Nid oes unrhyw barthau wedi'u blocio eto.",
"empty_column.explore_statuses": "Does dim yn trendio ar hyn o bryd. Dewch nôl nes ymlaen!",
"empty_column.favourited_statuses": "Nid oes gennych unrhyw hoff bostiadau eto. Pan byddwch yn hoffi un, bydd yn ymddangos yma.",
"empty_column.favourites": "Nid oes unrhyw un wedi hoffi'r postiad hwn eto. Pan fydd rhywun yn gwneud hynny, byddan nhw'n ymddangos yma.",
Expand Down Expand Up @@ -411,6 +411,7 @@
"limited_account_hint.action": "Dangos y proffil beth bynnag",
"limited_account_hint.title": "Mae'r proffil hwn wedi cael ei guddio gan gymedrolwyr {domain}.",
"link_preview.author": "Gan {name}",
"link_preview.more_from_author": "Mwy gan {name}",
"lists.account.add": "Ychwanegu at restr",
"lists.account.remove": "Tynnu o'r rhestr",
"lists.delete": "Dileu rhestr",
Expand Down Expand Up @@ -484,9 +485,9 @@
"notification.reblog": "Hybodd {name} eich post",
"notification.relationships_severance_event": "Wedi colli cysylltiad â {name}",
"notification.relationships_severance_event.account_suspension": "Mae gweinyddwr o {from} wedi atal {target}, sy'n golygu na allwch dderbyn diweddariadau ganddynt mwyach na rhyngweithio â nhw.",
"notification.relationships_severance_event.domain_block": "Mae gweinyddwr o {from} wedi rhwystro {target}, gan gynnwys {followersCount} o'ch dilynwyr a {followingCount, plural, one {# cyfrif} other {# cyfrif}} arall rydych chi'n ei ddilyn.",
"notification.relationships_severance_event.domain_block": "Mae gweinyddwr o {from} wedi blocio {target}, gan gynnwys {followersCount} o'ch dilynwyr a {followingCount, plural, one {# cyfrif} other {# cyfrif}} arall rydych chi'n ei ddilyn.",
"notification.relationships_severance_event.learn_more": "Dysgu mwy",
"notification.relationships_severance_event.user_domain_block": "Rydych wedi rhwystro {target}, gan ddileu {followersCount} o'ch dilynwyr a {followingCount, plural, one {# cyfrif} other {#cyfrifon}} arall rydych yn ei ddilyn.",
"notification.relationships_severance_event.user_domain_block": "Rydych wedi blocio {target}, gan ddileu {followersCount} o'ch dilynwyr a {followingCount, plural, one {# cyfrif} other {#cyfrifon}} arall rydych yn ei ddilyn.",
"notification.status": "{name} newydd ei bostio",
"notification.update": "Golygodd {name} bostiad",
"notification_requests.accept": "Derbyn",
Expand Down Expand Up @@ -803,7 +804,7 @@
"video.expand": "Ymestyn fideo",
"video.fullscreen": "Sgrin llawn",
"video.hide": "Cuddio fideo",
"video.mute": "Tewi sain",
"video.mute": "Diffodd sain",
"video.pause": "Oedi",
"video.play": "Chwarae",
"video.unmute": "Dad-dewi sain"
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/mastodon/locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"block_modal.remote_users_caveat": "Ímoslle pedir ao servidor {domain} que respecte a túa decisión. Emporiso, non hai garantía de que atenda a petición xa que os servidores xestionan os bloqueos de formas diferentes. As publicacións públicas poderían aínda ser visibles para usuarias que non iniciaron sesión.",
"block_modal.show_less": "Mostrar menos",
"block_modal.show_more": "Mostrar máis",
"block_modal.they_cant_mention": "Non te poden seguir nin mencionar.",
"block_modal.they_cant_mention": "Non te pode seguir nin mencionar.",
"block_modal.they_cant_see_posts": "Non pode ver as túas publicacións nin ti as de ela.",
"block_modal.they_will_know": "Pode ver que a bloqueaches.",
"block_modal.title": "Bloquear usuaria?",
Expand Down Expand Up @@ -216,7 +216,7 @@
"domain_block_modal.they_wont_know": "Non saberá que a bloqueaches.",
"domain_block_modal.title": "Bloquear dominio?",
"domain_block_modal.you_will_lose_followers": "Vanse eliminar todas as túas seguidoras deste servidor.",
"domain_block_modal.you_wont_see_posts": "Non verás publicacións ou notificación das usuarias neste servidor.",
"domain_block_modal.you_wont_see_posts": "Non verás publicacións ou notificacións das usuarias deste servidor.",
"domain_pill.activitypub_lets_connect": "Permíteche conectar e interactuar con persoas non só de Mastodon, se non tamén con outras apps sociais.",
"domain_pill.activitypub_like_language": "ActivityPub é algo así como o idioma que Mastodon fala con outras redes sociais.",
"domain_pill.server": "Servidor",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/kab.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@
"status.mute_conversation": "Sgugem adiwenni",
"status.open": "Semɣeṛ tasuffeɣt-ayi",
"status.pin": "Senteḍ-itt deg umaɣnu",
"status.pinned": "Tijewwiqin yettwasentḍen",
"status.pinned": "Tisuffaɣ yettwasentḍen",
"status.read_more": "Issin ugar",
"status.reblog": "Bḍu",
"status.reblogged_by": "Yebḍa-tt {name}",
Expand Down
10 changes: 5 additions & 5 deletions app/javascript/mastodon/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"closed_registrations.other_server_instructions": "因為 Mastodon 是去中心化的,所以您也能於其他伺服器上建立帳號,並仍然與這個伺服器互動。",
"closed_registrations_modal.description": "目前無法於 {domain} 建立新帳號,但也請別忘了,您並不一定需要有 {domain} 伺服器的帳號,也能使用 Mastodon。",
"closed_registrations_modal.find_another_server": "尋找另一個伺服器",
"closed_registrations_modal.preamble": "Mastodon 是去中心化的,所以無論您於哪個伺服器新增帳號,都可以與此伺服器上的任何人跟隨及互動。您甚至能自行架設一個自己的伺服器",
"closed_registrations_modal.preamble": "Mastodon 是去中心化的,所以無論您於哪個伺服器新增帳號,都可以與此伺服器上的任何人跟隨及互動。您甚至能自行架設自己的伺服器",
"closed_registrations_modal.title": "註冊 Mastodon",
"column.about": "關於",
"column.blocks": "已封鎖的使用者",
Expand Down Expand Up @@ -271,7 +271,7 @@
"empty_column.public": "這裡什麼都沒有!嘗試寫些公開的嘟文,或者跟隨其他伺服器的使用者後,就會有嘟文出現了",
"error.unexpected_crash.explanation": "由於發生系統故障或瀏覽器相容性問題,無法正常顯示此頁面。",
"error.unexpected_crash.explanation_addons": "此頁面無法被正常顯示,這可能是由瀏覽器附加元件或網頁自動翻譯工具造成的。",
"error.unexpected_crash.next_steps": "請嘗試重新整理頁面。如果狀況沒有改善,您可以使用不同的瀏覽器或應用程式來檢視來使用 Mastodon。",
"error.unexpected_crash.next_steps": "請嘗試重新整理頁面。如果狀況沒有改善,您可以使用不同的瀏覽器或應用程式以檢視來使用 Mastodon。",
"error.unexpected_crash.next_steps_addons": "請嘗試關閉它們然後重新整理頁面。如果狀況沒有改善,您可以使用不同的瀏覽器或應用程式來檢視來使用 Mastodon。",
"errors.unexpected_crash.copy_stacktrace": "複製 stacktrace 到剪貼簿",
"errors.unexpected_crash.report_issue": "回報問題",
Expand Down Expand Up @@ -356,7 +356,7 @@
"home.show_announcements": "顯示公告",
"interaction_modal.description.favourite": "若於 Mastodon 上有個帳號,您可以將此嘟文加入最愛使作者知道您欣賞它且將它儲存下來。",
"interaction_modal.description.follow": "若於 Mastodon 上有個帳號,您可以跟隨 {name} 以於首頁時間軸接收他們的嘟文。",
"interaction_modal.description.reblog": "若於 Mastodon 上有個帳號,您可以轉嘟此嘟文以分享給您的跟隨者們",
"interaction_modal.description.reblog": "若於 Mastodon 上有個帳號,您可以轉嘟此嘟文以向您的跟隨者們分享",
"interaction_modal.description.reply": "若於 Mastodon 上有個帳號,您可以回覆此嘟文。",
"interaction_modal.login.action": "返回首頁",
"interaction_modal.login.prompt": "您帳號所屬伺服器之網域,例如:mastodon.social",
Expand Down Expand Up @@ -552,7 +552,7 @@
"onboarding.follows.lead": "您的首頁時間軸是 Mastodon 的核心體驗。若您跟隨更多人,它將會變得更活躍有趣。這些個人檔案也許是個好起點,您可以隨時取消跟隨他們!",
"onboarding.follows.title": "客製化您的首頁時間軸",
"onboarding.profile.discoverable": "使我的個人檔案可以被找到",
"onboarding.profile.discoverable_hint": "當您於 Mastodon 上選擇加入可發現性時,您的嘟文可能會顯示於搜尋結果與趨勢中。您的個人檔案可能會被推薦給與您志趣相投的人",
"onboarding.profile.discoverable_hint": "當您於 Mastodon 上選擇加入可發現性時,您的嘟文可能會顯示於搜尋結果與趨勢中。您的個人檔案可能會被推薦至與您志趣相投的人",
"onboarding.profile.display_name": "顯示名稱",
"onboarding.profile.display_name_hint": "完整名稱或暱稱...",
"onboarding.profile.lead": "您隨時可以稍候於設定中完成此操作,將有更多自訂選項可使用。",
Expand Down Expand Up @@ -797,7 +797,7 @@
"upload_modal.applying": "正在套用...",
"upload_modal.choose_image": "選擇圖片",
"upload_modal.description_placeholder": "我能吞下玻璃而不傷身體",
"upload_modal.detect_text": "從圖片中偵測文字",
"upload_modal.detect_text": "自圖片中偵測文字",
"upload_modal.edit_media": "編輯媒體",
"upload_modal.hint": "於預覽中點擊或拖曳圓圈以選擇將於所有縮圖中顯示的焦點。",
"upload_modal.preparing_ocr": "準備 OCR 中……",
Expand Down
2 changes: 1 addition & 1 deletion app/lib/webfinger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def link(rel, attribute)
private

def links
@links ||= @json['links'].index_by { |link| link['rel'] }
@links ||= @json.fetch('links', []).index_by { |link| link['rel'] }
end

def validate_response!
Expand Down
2 changes: 2 additions & 0 deletions app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# category :integer default("other"), not null
# action_taken_at :datetime
# rule_ids :bigint(8) is an Array
# application_id :bigint(8)
#

class Report < ApplicationRecord
Expand All @@ -31,6 +32,7 @@ class Report < ApplicationRecord
rate_limit by: :account, family: :reports

belongs_to :account
belongs_to :application, class_name: 'Doorkeeper::Application', optional: true

with_options class_name: 'Account' do
belongs_to :target_account
Expand Down
4 changes: 3 additions & 1 deletion app/services/report_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def call(source_account, target_account, options = {})
@comment = options.delete(:comment).presence || ''
@category = options[:rule_ids].present? ? 'violation' : (options.delete(:category).presence || 'other')
@rule_ids = options.delete(:rule_ids).presence
@application = options.delete(:application).presence
@options = options

raise ActiveRecord::RecordNotFound if @target_account.unavailable?
Expand All @@ -35,7 +36,8 @@ def create_report!
uri: @options[:uri],
forwarded: forward_to_origin?,
category: @category,
rule_ids: @rule_ids
rule_ids: @rule_ids,
application: @application
)
end

Expand Down
6 changes: 6 additions & 0 deletions app/views/admin/reports/_header_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
= admin_account_link_to report.account
- else
= report.account.domain
- if report.application.present?
.report-header__details__item
.report-header__details__item__header
%strong= t('admin.reports.reported_with_application')
.report-header__details__item__content
= report.application.name
.report-header__details__item
.report-header__details__item__header
%strong= t('admin.reports.status')
Expand Down
9 changes: 5 additions & 4 deletions config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ cy:
filter_by_action: Hidlo yn ôl gweithred
filter_by_user: Hidlo yn ôl defnyddiwr
title: Cofnod archwilio
unavailable_instance: "(nid yw enw'r parth ar gael)"
announcements:
destroyed_msg: Cyhoeddiad wedi'i ddileu'n llwyddiannus!
edit:
Expand Down Expand Up @@ -1436,7 +1437,7 @@ cy:
domain_blocking_html: Rydych ar fin <strong>rhwystro</strong> hyd at <strong>%{total_items} parth</strong> o <strong>%{filename}</strong> .
following_html: Rydych ar fin <strong>dilyn</strong> hyd at <strong>%{total_items} cyfrif</strong> gan <strong>%{filename}</strong> .
lists_html: Rydych ar fin ychwanegu hyd at <strong>%{total_items} o gyfrifon</strong> o <strong>%{filename}</strong> at eich <strong>rhestrau</strong> . Bydd rhestrau newydd yn cael eu creu os nad oes rhestr i ychwanegu ati.
muting_html: Rydych ar fin <strong>tewi</strong> hyd at <strong>%{total_items} cyfrif</strong> o <strong>%{filename}</strong> .
muting_html: Rydych ar fin <strong>anwybyddu</strong> hyd at <strong>%{total_items} cyfrif</strong> o <strong>%{filename}</strong>.
preface: Gallwch fewnforio data rydych chi wedi'i allforio o weinydd arall, fel rhestr o'r bobl rydych chi'n eu dilyn neu'n eu blocio.
recent_imports: Mewnforion diweddar
states:
Expand Down Expand Up @@ -1529,9 +1530,9 @@ cy:
too_many: Methu atodi mwy na 4 ffeil
migrations:
acct: Symudwyd i
cancel: Diddymu ailgyfeirio
cancel_explanation: Bydd diddymu'r ailgyfeiriad yn ail agor eich cyfrif cyfredol, ond ni fydd yn dod â dilynwyr sydd wedi'u symud i'r cyfrif hwnnw yn ôl.
cancelled_msg: Wedi diddymu'r ailgyfeiriad yn llwyddiannus.
cancel: Canslo ailgyfeirio
cancel_explanation: Bydd canslo'r ailgyfeiriad yn ail agor eich cyfrif cyfredol, ond ni fydd yn dod â dilynwyr sydd wedi'u symud i'r cyfrif hwnnw yn ôl.
cancelled_msg: Wedi canslo'r ailgyfeiriad yn llwyddiannus.
errors:
already_moved: yw'r un cyfrif rydych chi wedi symud iddo eisoes
missing_also_known_as: nid yw'n arallenw o'r cyfrif hwn
Expand Down
Loading

0 comments on commit d6a2635

Please sign in to comment.