diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/v1/admin/accounts_controller.rb | 16 | ||||
-rw-r--r-- | app/controllers/api/v2/admin/accounts_controller.rb | 31 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/cs.json | 46 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/fa.json | 4 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/fr.json | 4 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/gd.json | 8 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/pt-BR.json | 40 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/sq.json | 8 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/th.json | 4 | ||||
-rw-r--r-- | app/javascript/mastodon/locales/uk.json | 10 | ||||
-rw-r--r-- | app/javascript/styles/mastodon/components.scss | 74 | ||||
-rw-r--r-- | app/models/account_filter.rb | 4 | ||||
-rw-r--r-- | app/services/notify_service.rb | 40 |
13 files changed, 157 insertions, 132 deletions
diff --git a/app/controllers/api/v1/admin/accounts_controller.rb b/app/controllers/api/v1/admin/accounts_controller.rb index 65330b8c8..4b6dab208 100644 --- a/app/controllers/api/v1/admin/accounts_controller.rb +++ b/app/controllers/api/v1/admin/accounts_controller.rb @@ -104,13 +104,27 @@ class Api::V1::Admin::AccountsController < Api::BaseController end def filtered_accounts - AccountFilter.new(filter_params).results + AccountFilter.new(translated_filter_params).results end def filter_params params.permit(*FILTER_PARAMS) end + def translated_filter_params + translated_params = { origin: 'local', status: 'active' }.merge(filter_params.slice(*AccountFilter::KEYS)) + + translated_params[:origin] = 'remote' if params[:remote].present? + + %i(active pending disabled silenced suspended).each do |status| + translated_params[:status] = status.to_s if params[status].present? + end + + translated_params[:permissions] = 'staff' if params[:staff].present? + + translated_params + end + def insert_pagination_headers set_pagination_headers(next_path, prev_path) end diff --git a/app/controllers/api/v2/admin/accounts_controller.rb b/app/controllers/api/v2/admin/accounts_controller.rb new file mode 100644 index 000000000..a89e6835e --- /dev/null +++ b/app/controllers/api/v2/admin/accounts_controller.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +class Api::V2::Admin::AccountsController < Api::V1::Admin::AccountsController + FILTER_PARAMS = %i( + origin + status + permissions + username + by_domain + display_name + email + ip + invited_by + ).freeze + + PAGINATION_PARAMS = (%i(limit) + FILTER_PARAMS).freeze + + private + + def filtered_accounts + AccountFilter.new(filter_params).results + end + + def filter_params + params.permit(*FILTER_PARAMS) + end + + def pagination_params(core_params) + params.slice(*PAGINATION_PARAMS).permit(*PAGINATION_PARAMS).merge(core_params) + end +end diff --git a/app/javascript/mastodon/locales/cs.json b/app/javascript/mastodon/locales/cs.json index d48780042..c6ffaa6f2 100644 --- a/app/javascript/mastodon/locales/cs.json +++ b/app/javascript/mastodon/locales/cs.json @@ -75,7 +75,7 @@ "column.domain_blocks": "Blokované domény", "column.favourites": "Oblíbené", "column.follow_requests": "Žádosti o sledování", - "column.home": "Domů", + "column.home": "Domovská časová osa", "column.lists": "Seznamy", "column.mutes": "Skrytí uživatelé", "column.notifications": "Oznámení", @@ -294,7 +294,7 @@ "navigation_bar.discover": "Objevujte", "navigation_bar.domain_blocks": "Blokované domény", "navigation_bar.edit_profile": "Upravit profil", - "navigation_bar.explore": "Explore", + "navigation_bar.explore": "Objevování", "navigation_bar.favourites": "Oblíbené", "navigation_bar.filters": "Skrytá slova", "navigation_bar.follow_requests": "Žádosti o sledování", @@ -318,7 +318,7 @@ "notification.poll": "Anketa, ve které jste hlasovali, skončila", "notification.reblog": "Uživatel {name} boostnul váš příspěvek", "notification.status": "Nový příspěvek od {name}", - "notification.update": "{name} edited a post", + "notification.update": "uživatel {name} upravil příspěvek", "notifications.clear": "Smazat oznámení", "notifications.clear_confirmation": "Opravdu chcete trvale smazat všechna vaše oznámení?", "notifications.column_settings.admin.sign_up": "New sign-ups:", @@ -338,7 +338,7 @@ "notifications.column_settings.status": "Nové příspěvky:", "notifications.column_settings.unread_notifications.category": "Nepřečtená oznámení", "notifications.column_settings.unread_notifications.highlight": "Zvýraznit nepřečtená oznámení", - "notifications.column_settings.update": "Edits:", + "notifications.column_settings.update": "Úpravy:", "notifications.filter.all": "Vše", "notifications.filter.boosts": "Boosty", "notifications.filter.favourites": "Oblíbení", @@ -380,7 +380,7 @@ "relative_time.days": "{number} d", "relative_time.full.days": "{number, plural, one {# day} other {# days}} ago", "relative_time.full.hours": "{number, plural, one {# hour} other {# hours}} ago", - "relative_time.full.just_now": "just now", + "relative_time.full.just_now": "právě teď", "relative_time.full.minutes": "{number, plural, one {# minute} other {# minutes}} ago", "relative_time.full.seconds": "{number, plural, one {# second} other {# seconds}} ago", "relative_time.hours": "{number} h", @@ -391,11 +391,11 @@ "reply_indicator.cancel": "Zrušit", "report.block": "Block", "report.block_explanation": "You will not see their posts. They will not be able to see your posts or follow you. They will be able to tell that they are blocked.", - "report.categories.other": "Other", + "report.categories.other": "Ostatní", "report.categories.spam": "Spam", - "report.categories.violation": "Content violates one or more server rules", - "report.category.subtitle": "Choose the best match", - "report.category.title": "Tell us what's going on with this {type}", + "report.categories.violation": "Obsah porušuje jedno nebo více pravidel serveru", + "report.category.subtitle": "Vyberte nejbližší možnost", + "report.category.title": "Povězte nám, proč chcete {type} nahlásit", "report.category.title_account": "profile", "report.category.title_status": "post", "report.close": "Done", @@ -404,20 +404,20 @@ "report.forward_hint": "Tento účet je z jiného serveru. Chcete na něj také poslat anonymizovanou kopii hlášení?", "report.mute": "Mute", "report.mute_explanation": "You will not see their posts. They can still follow you and see your posts and will not know that they are muted.", - "report.next": "Next", + "report.next": "Dále", "report.placeholder": "Dodatečné komentáře", - "report.reasons.dislike": "I don't like it", - "report.reasons.dislike_description": "It is not something you want to see", - "report.reasons.other": "It's something else", - "report.reasons.other_description": "The issue does not fit into other categories", - "report.reasons.spam": "It's spam", - "report.reasons.spam_description": "Malicious links, fake engagement, or repetitive replies", - "report.reasons.violation": "It violates server rules", - "report.reasons.violation_description": "You are aware that it breaks specific rules", - "report.rules.subtitle": "Select all that apply", - "report.rules.title": "Which rules are being violated?", - "report.statuses.subtitle": "Select all that apply", - "report.statuses.title": "Are there any posts that back up this report?", + "report.reasons.dislike": "Nelíbí se mi", + "report.reasons.dislike_description": "Není to něco, co chcete vidět", + "report.reasons.other": "Jde o něco jiného", + "report.reasons.other_description": "Problém neodpovídá ostatním kategoriím", + "report.reasons.spam": "Je to spam", + "report.reasons.spam_description": "Škodlivé odkazy, falešné interakce nebo opakované odpovědi", + "report.reasons.violation": "Porušuje pravidla serveru", + "report.reasons.violation_description": "Máte za to, že porušuje konkrétní pravidla", + "report.rules.subtitle": "Vyberte všechna relevantní", + "report.rules.title": "Která pravidla porušuje?", + "report.statuses.subtitle": "Vyberte všechny relevantní", + "report.statuses.title": "Existují příspěvky dokládající toto hlášení?", "report.submit": "Odeslat", "report.target": "Nahlášení uživatele {target}", "report.thanks.take_action": "Here are your options for controlling what you see on Mastodon:", @@ -490,7 +490,7 @@ "suggestions.dismiss": "Odmítnout návrh", "suggestions.header": "Mohlo by vás zajímat…", "tabs_bar.federated_timeline": "Federovaná", - "tabs_bar.home": "Domů", + "tabs_bar.home": "Domovská", "tabs_bar.local_timeline": "Místní", "tabs_bar.notifications": "Oznámení", "tabs_bar.search": "Hledat", diff --git a/app/javascript/mastodon/locales/fa.json b/app/javascript/mastodon/locales/fa.json index d5276039d..73a65ed78 100644 --- a/app/javascript/mastodon/locales/fa.json +++ b/app/javascript/mastodon/locales/fa.json @@ -9,7 +9,7 @@ "account.browse_more_on_origin_server": "مرور بیشتر روی نمایهٔ اصلی", "account.cancel_follow_request": "لغو درخواست پیگیری", "account.direct": "پیام مستقیم به @{name}", - "account.disable_notifications": "آگاهی به من هنگام فرستادنهای @{name} پایان یابد", + "account.disable_notifications": "آگاه کردن من هنگام فرستههای @{name} را متوقّف کن", "account.domain_blocked": "دامنه مسدود شد", "account.edit_profile": "ویرایش نمایه", "account.enable_notifications": "هنگام فرستههای @{name} مرا آگاه کن", @@ -444,7 +444,7 @@ "status.admin_status": "گشودن این فرسته در واسط مدیریت", "status.block": "مسدود کردن @{name}", "status.bookmark": "نشانک", - "status.cancel_reblog_private": "لغو تقویت", + "status.cancel_reblog_private": "ناتقویت", "status.cannot_reblog": "این فرسته قابل تقویت نیست", "status.copy": "رونوشت پیوند فرسته", "status.delete": "حذف", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 65d3c6ea1..13d89502b 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -229,7 +229,7 @@ "keyboard_shortcuts.blocked": "Ouvrir la liste des comptes bloqués", "keyboard_shortcuts.boost": "Partager le message", "keyboard_shortcuts.column": "Se placer dans une colonne", - "keyboard_shortcuts.compose": "se placer dans la zone de rédaction", + "keyboard_shortcuts.compose": "Se placer dans la zone de rédaction", "keyboard_shortcuts.description": "Description", "keyboard_shortcuts.direct": "Ouvrir la colonne des messages directs", "keyboard_shortcuts.down": "Descendre dans la liste", @@ -246,7 +246,7 @@ "keyboard_shortcuts.muted": "Ouvrir la liste des comptes masqués", "keyboard_shortcuts.my_profile": "Ouvrir votre profil", "keyboard_shortcuts.notifications": "Ouvrir la colonne de notifications", - "keyboard_shortcuts.open_media": "ouvrir le média", + "keyboard_shortcuts.open_media": "Ouvrir le média", "keyboard_shortcuts.pinned": "Ouvrir la liste des messages épinglés", "keyboard_shortcuts.profile": "Ouvrir le profil de l’auteur·rice", "keyboard_shortcuts.reply": "Répondre au message", diff --git a/app/javascript/mastodon/locales/gd.json b/app/javascript/mastodon/locales/gd.json index aae73a23e..9ca41b2f6 100644 --- a/app/javascript/mastodon/locales/gd.json +++ b/app/javascript/mastodon/locales/gd.json @@ -18,7 +18,7 @@ "account.followers": "Luchd-leantainn", "account.followers.empty": "Chan eil neach sam bith a’ leantainn air a’ chleachdaiche seo fhathast.", "account.followers_counter": "{count, plural, one {{counter} neach-leantainn} two {{counter} neach-leantainn} few {{counter} luchd-leantainn} other {{counter} luchd-leantainn}}", - "account.following": "Following", + "account.following": "A’ leantainn", "account.following_counter": "{count, plural, one {A’ leantainn air {counter}} two {A’ leantainn air {counter}} few {A’ leantainn air {counter}} other {A’ leantainn air {counter}}}", "account.follows.empty": "Chan eil an cleachdaiche seo a’ leantainn air neach sam bith fhathast.", "account.follows_you": "’Gad leantainn", @@ -41,12 +41,12 @@ "account.statuses_counter": "{count, plural, one {{counter} phost} two {{counter} phost} few {{counter} postaichean} other {{counter} post}}", "account.unblock": "Dì-bhac @{name}", "account.unblock_domain": "Dì-bhac an àrainn {domain}", - "account.unblock_short": "Unblock", + "account.unblock_short": "Dì-bhac", "account.unendorse": "Na brosnaich air a’ phròifil", "account.unfollow": "Na lean tuilleadh", "account.unmute": "Dì-mhùch @{name}", "account.unmute_notifications": "Dì-mhùch na brathan o @{name}", - "account.unmute_short": "Unmute", + "account.unmute_short": "Dì-mhùch", "account_note.placeholder": "Briog airson nòta a chur ris", "admin.dashboard.daily_retention": "Reat glèidheadh nan cleachdaichean às dèidh an clàradh a-rèir latha", "admin.dashboard.monthly_retention": "Reat glèidheadh nan cleachdaichean às dèidh an clàradh a-rèir mìos", @@ -294,7 +294,7 @@ "navigation_bar.discover": "Fidir", "navigation_bar.domain_blocks": "Àrainnean bacte", "navigation_bar.edit_profile": "Deasaich a’ phròifil", - "navigation_bar.explore": "Explore", + "navigation_bar.explore": "Rùraich", "navigation_bar.favourites": "Na h-annsachdan", "navigation_bar.filters": "Faclan mùchte", "navigation_bar.follow_requests": "Iarrtasan leantainn", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index c597aa20d..2b9755c06 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -18,7 +18,7 @@ "account.followers": "Seguidores", "account.followers.empty": "Nada aqui.", "account.followers_counter": "{count, plural, one {{counter} seguidor} other {{counter} seguidores}}", - "account.following": "Following", + "account.following": "Seguindo", "account.following_counter": "{count, plural, one {segue {counter}} other {segue {counter}}}", "account.follows.empty": "Nada aqui.", "account.follows_you": "te segue", @@ -41,14 +41,14 @@ "account.statuses_counter": "{count, plural, one {{counter} Toot} other {{counter} Toots}}", "account.unblock": "Desbloquear @{name}", "account.unblock_domain": "Desbloquear domínio {domain}", - "account.unblock_short": "Unblock", + "account.unblock_short": "Desbloquear", "account.unendorse": "Remover", "account.unfollow": "Deixar de seguir", "account.unmute": "Dessilenciar @{name}", "account.unmute_notifications": "Mostrar notificações de @{name}", - "account.unmute_short": "Unmute", + "account.unmute_short": "Reativar", "account_note.placeholder": "Nota pessoal sobre este perfil aqui", - "admin.dashboard.daily_retention": "User retention rate by day after sign-up", + "admin.dashboard.daily_retention": "Taxa de retenção de usuários por dia, após a inscrição", "admin.dashboard.monthly_retention": "Taxa de retenção de usuários por mês, após a inscrição", "admin.dashboard.retention.average": "Média", "admin.dashboard.retention.cohort": "Mês de inscrição", @@ -168,7 +168,7 @@ "empty_column.community": "A linha local está vazia. Publique algo para começar!", "empty_column.direct": "Nada aqui. Quando você enviar ou receber toots diretos, eles aparecerão aqui.", "empty_column.domain_blocks": "Nada aqui.", - "empty_column.explore_statuses": "Nothing is trending right now. Check back later!", + "empty_column.explore_statuses": "Nada está em alta no momento. Volte mais tarde!", "empty_column.favourited_statuses": "Nada aqui. Quando você favoritar um toot, ele aparecerá aqui.", "empty_column.favourites": "Nada aqui. Quando alguém favoritar, o autor aparecerá aqui.", "empty_column.follow_recommendations": "Parece que não há sugestões para você. Tente usar a pesquisa para encontrar pessoas que você possa conhecer ou explorar hashtags.", @@ -294,7 +294,7 @@ "navigation_bar.discover": "Descobrir", "navigation_bar.domain_blocks": "Domínios bloqueados", "navigation_bar.edit_profile": "Editar perfil", - "navigation_bar.explore": "Explore", + "navigation_bar.explore": "Explorar", "navigation_bar.favourites": "Favoritos", "navigation_bar.filters": "Palavras filtradas", "navigation_bar.follow_requests": "Seguidores pendentes", @@ -390,42 +390,42 @@ "relative_time.today": "hoje", "reply_indicator.cancel": "Cancelar", "report.block": "Bloquear", - "report.block_explanation": "You will not see their posts. They will not be able to see your posts or follow you. They will be able to tell that they are blocked.", + "report.block_explanation": "Você não verá suas postagens. Eles não poderão ver suas postagens ou segui-lo. Eles serão capazes de perceber que estão bloqueados.", "report.categories.other": "Outro", "report.categories.spam": "Spam", "report.categories.violation": "O conteúdo viola uma ou mais regras do servidor", - "report.category.subtitle": "Choose the best match", - "report.category.title": "Tell us what's going on with this {type}", + "report.category.subtitle": "Escolha a alternativa de melhor correspondência", + "report.category.title": "Conte-nos o que está acontecendo com esse {type}", "report.category.title_account": "perfil", "report.category.title_status": "publicação", "report.close": "Concluído", - "report.comment.title": "Is there anything else you think we should know?", + "report.comment.title": "Há algo mais que você acredita que devemos saber?", "report.forward": "Encaminhar para {target}", "report.forward_hint": "A conta está em outra instância. Enviar uma cópia anônima da denúncia para lá?", "report.mute": "Silenciar", - "report.mute_explanation": "You will not see their posts. They can still follow you and see your posts and will not know that they are muted.", + "report.mute_explanation": "Você não verá suas postagens. Eles ainda podem seguir você e ver suas postagens e não saberão que estão silenciados.", "report.next": "Próximo", "report.placeholder": "Comentários adicionais aqui", "report.reasons.dislike": "Eu não gosto disso", - "report.reasons.dislike_description": "It is not something you want to see", - "report.reasons.other": "It's something else", + "report.reasons.dislike_description": "Não é algo que você quer ver", + "report.reasons.other": "É outra coisa", "report.reasons.other_description": "O problema não se encaixa em outras categorias", "report.reasons.spam": "É spam", - "report.reasons.spam_description": "Malicious links, fake engagement, or repetitive replies", - "report.reasons.violation": "It violates server rules", + "report.reasons.spam_description": "Links maliciosos, envolvimento falso ou respostas repetitivas", + "report.reasons.violation": "Viola as regras do servidor", "report.reasons.violation_description": "Você está ciente de que isso quebra regras específicas", "report.rules.subtitle": "Selecione tudo que se aplica", - "report.rules.title": "Which rules are being violated?", + "report.rules.title": "Que regras estão sendo violadas?", "report.statuses.subtitle": "Selecione tudo que se aplica", - "report.statuses.title": "Are there any posts that back up this report?", + "report.statuses.title": "Existem postagens que respaldam esse relatório?", "report.submit": "Enviar", "report.target": "Denunciando {target}", - "report.thanks.take_action": "Here are your options for controlling what you see on Mastodon:", + "report.thanks.take_action": "Aqui estão suas opções para controlar o que você vê no Mastodon:", "report.thanks.take_action_actionable": "Enquanto revisamos isso, você pode tomar medidas contra @{name}:", "report.thanks.title": "Não quer ver isto?", "report.thanks.title_actionable": "Obrigado por reportar. Vamos analisar.", - "report.unfollow": "Unfollow @{name}", - "report.unfollow_explanation": "You are following this account. To not see their posts in your home feed anymore, unfollow them.", + "report.unfollow": "Deixar de seguir @{name}", + "report.unfollow_explanation": "Você está seguindo esta conta. Para não mais ver os posts dele em sua página inicial, deixe de segui-lo.", "search.placeholder": "Pesquisar", "search_popout.search_format": "Formato de pesquisa avançada", "search_popout.tips.full_text": "Texto simples retorna toots que você escreveu, favoritou, deu boost, ou em que foi mencionado, assim como nomes de usuário e de exibição, e hashtags correspondentes.", diff --git a/app/javascript/mastodon/locales/sq.json b/app/javascript/mastodon/locales/sq.json index d1047f5da..ce3cdabd0 100644 --- a/app/javascript/mastodon/locales/sq.json +++ b/app/javascript/mastodon/locales/sq.json @@ -18,7 +18,7 @@ "account.followers": "Ndjekës", "account.followers.empty": "Këtë përdorues ende s’e ndjek kush.", "account.followers_counter": "{count, plural, one {{counter} Ndjekës} other {{counter} Ndjekës}}", - "account.following": "Following", + "account.following": "Ndjekje", "account.following_counter": "{count, plural, one {{counter} i Ndjekur} other {{counter} të Ndjekur}}", "account.follows.empty": "Ky përdorues ende s’ndjek kënd.", "account.follows_you": "Ju ndjek", @@ -41,12 +41,12 @@ "account.statuses_counter": "{count, plural, one {{counter} Mesazh} other {{counter} Mesazhe}}", "account.unblock": "Zhbllokoje @{name}", "account.unblock_domain": "Zhblloko përkatësinë {domain}", - "account.unblock_short": "Unblock", + "account.unblock_short": "Zhbllokoje", "account.unendorse": "Mos e përfshi në profil", "account.unfollow": "Resht së ndjekuri", "account.unmute": "Ktheji zërin @{name}", "account.unmute_notifications": "Hiqua ndalimin e shfaqjes njoftimeve nga @{name}", - "account.unmute_short": "Unmute", + "account.unmute_short": "Çheshtoje", "account_note.placeholder": "Klikoni për të shtuar shënim", "admin.dashboard.daily_retention": "Shkallë mbajtjeje përdoruesi, në ditë, pas regjistrimit", "admin.dashboard.monthly_retention": "Shkallë mbajtjeje përdoruesi, në muaj, pas regjistrimit", @@ -294,7 +294,7 @@ "navigation_bar.discover": "Zbuloni", "navigation_bar.domain_blocks": "Përkatësi të bllokuara", "navigation_bar.edit_profile": "Përpunoni profilin", - "navigation_bar.explore": "Explore", + "navigation_bar.explore": "Eksploroni", "navigation_bar.favourites": "Të parapëlqyer", "navigation_bar.filters": "Fjalë të heshtuara", "navigation_bar.follow_requests": "Kërkesa për ndjekje", diff --git a/app/javascript/mastodon/locales/th.json b/app/javascript/mastodon/locales/th.json index f7eddd11b..f8477e8fd 100644 --- a/app/javascript/mastodon/locales/th.json +++ b/app/javascript/mastodon/locales/th.json @@ -128,7 +128,7 @@ "confirmations.logout.confirm": "ออกจากระบบ", "confirmations.logout.message": "คุณแน่ใจหรือไม่ว่าต้องการออกจากระบบ?", "confirmations.mute.confirm": "ซ่อน", - "confirmations.mute.explanation": "นี่จะซ่อนโพสต์จากเขาและโพสต์ที่กล่าวถึงเขา แต่จะยังอนุญาตให้เขาเห็นโพสต์ของคุณและติดตามคุณ", + "confirmations.mute.explanation": "นี่จะซ่อนโพสต์จากเขาและโพสต์ที่กล่าวถึงเขา แต่จะยังคงอนุญาตให้เขาเห็นโพสต์ของคุณและติดตามคุณ", "confirmations.mute.message": "คุณแน่ใจหรือไม่ว่าต้องการซ่อน {name}?", "confirmations.redraft.confirm": "ลบแล้วร่างใหม่", "confirmations.redraft.message": "คุณแน่ใจหรือไม่ว่าต้องการลบโพสต์นี้แล้วร่างโพสต์ใหม่? รายการโปรดและการดันจะหายไป และการตอบกลับโพสต์ดั้งเดิมจะไม่มีความเกี่ยวพัน", @@ -403,7 +403,7 @@ "report.forward": "ส่งต่อไปยัง {target}", "report.forward_hint": "บัญชีมาจากเซิร์ฟเวอร์อื่น ส่งสำเนาของรายงานที่ไม่ระบุตัวตนไปที่นั่นด้วย?", "report.mute": "ซ่อน", - "report.mute_explanation": "คุณจะไม่เห็นโพสต์ของเขา เขายังสามารถติดตามคุณและเห็นโพสต์ของคุณและจะไม่ทราบว่ามีการซ่อนเขา", + "report.mute_explanation": "คุณจะไม่เห็นโพสต์ของเขา เขายังคงสามารถติดตามคุณและเห็นโพสต์ของคุณและจะไม่ทราบว่ามีการซ่อนเขา", "report.next": "ถัดไป", "report.placeholder": "ความคิดเห็นเพิ่มเติม", "report.reasons.dislike": "ฉันไม่ชอบโพสต์", diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json index 876f8aa8a..e2e1386e6 100644 --- a/app/javascript/mastodon/locales/uk.json +++ b/app/javascript/mastodon/locales/uk.json @@ -18,7 +18,7 @@ "account.followers": "Підписники", "account.followers.empty": "Ніхто ще не підписався на цього користувача.", "account.followers_counter": "{count, plural, one {{counter} Підписник} few {{counter} Підписники} many {{counter} Підписників} other {{counter} Підписники}}", - "account.following": "Following", + "account.following": "Стежите", "account.following_counter": "{count, plural, one {{counter} Підписка} few {{counter} Підписки} many {{counter} Підписок} other {{counter} Підписки}}", "account.follows.empty": "Цей користувач ще ні на кого не підписався.", "account.follows_you": "Підписаний(-а) на вас", @@ -402,7 +402,7 @@ "report.comment.title": "Is there anything else you think we should know?", "report.forward": "Надіслати до {target}", "report.forward_hint": "Це акаунт з іншого серверу. Відправити анонімізовану копію скарги і туди?", - "report.mute": "Mute", + "report.mute": "Заглушити", "report.mute_explanation": "You will not see their posts. They can still follow you and see your posts and will not know that they are muted.", "report.next": "Далі", "report.placeholder": "Додаткові коментарі", @@ -415,8 +415,8 @@ "report.reasons.violation": "It violates server rules", "report.reasons.violation_description": "You are aware that it breaks specific rules", "report.rules.subtitle": "Select all that apply", - "report.rules.title": "Which rules are being violated?", - "report.statuses.subtitle": "Select all that apply", + "report.rules.title": "Які правила порушено?", + "report.statuses.subtitle": "Виберіть усі варіанти, що підходять", "report.statuses.title": "Are there any posts that back up this report?", "report.submit": "Відправити", "report.target": "Скаржимося на {target}", @@ -424,7 +424,7 @@ "report.thanks.take_action_actionable": "While we review this, you can take action against @{name}:", "report.thanks.title": "Don't want to see this?", "report.thanks.title_actionable": "Thanks for reporting, we'll look into this.", - "report.unfollow": "Unfollow @{name}", + "report.unfollow": "Відписатися від @{name}", "report.unfollow_explanation": "You are following this account. To not see their posts in your home feed anymore, unfollow them.", "search.placeholder": "Пошук", "search_popout.search_format": "Розширений формат пошуку", diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 713d24c0f..442ffd2c0 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1009,6 +1009,43 @@ .audio-player { margin-top: 8px; } + + &.light { + .status__relative-time, + .status__visibility-icon { + color: $light-text-color; + } + + .status__display-name { + color: $inverted-text-color; + } + + .display-name { + color: $light-text-color; + + strong { + color: $inverted-text-color; + } + } + + .status__content { + color: $inverted-text-color; + + a { + color: $highlight-text-color; + } + + a.status__content__spoiler-link { + color: $primary-text-color; + background: $ui-primary-color; + + &:hover, + &:focus { + background: lighten($ui-primary-color, 8%); + } + } + } + } } .status__relative-time, @@ -1154,43 +1191,6 @@ .audio-player { margin-top: 8px; } - - &.light { - .status__relative-time, - .status__visibility-icon { - color: $light-text-color; - } - - .status__display-name { - color: $inverted-text-color; - } - - .display-name { - color: $light-text-color; - - strong { - color: $inverted-text-color; - } - } - - .status__content { - color: $inverted-text-color; - - a { - color: $highlight-text-color; - } - - a.status__content__spoiler-link { - color: $primary-text-color; - background: $ui-primary-color; - - &:hover, - &:focus { - background: lighten($ui-primary-color, 8%); - } - } - } - } } .detailed-status__meta { diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb index 9da1522dd..ec309ce09 100644 --- a/app/models/account_filter.rb +++ b/app/models/account_filter.rb @@ -80,6 +80,10 @@ class AccountFilter accounts_with_users.merge(User.pending) when 'suspended' Account.suspended + when 'disabled' + accounts_with_users.merge(User.disabled) + when 'silenced' + Account.silenced else raise "Unknown status: #{value}" end diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index b1f9fd755..a90f17cfd 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -48,47 +48,23 @@ class NotifyService < BaseService return false if @notification.target_status.in_reply_to_id.nil? # Using an SQL CTE to avoid unneeded back-and-forth with SQL server in case of long threads - !Status.count_by_sql([<<-SQL.squish, id: @notification.target_status.in_reply_to_id, recipient_id: @recipient.id, sender_id: @notification.from_account.id]).zero? - WITH RECURSIVE ancestors(id, in_reply_to_id, replying_to_sender, path) AS ( - SELECT - s.id, - s.in_reply_to_id, - (CASE - WHEN s.account_id = :recipient_id THEN - EXISTS ( - SELECT * - FROM mentions m - WHERE m.silent = FALSE AND m.account_id = :sender_id AND m.status_id = s.id - ) - ELSE - FALSE - END), - ARRAY[s.id] + !Status.count_by_sql([<<-SQL.squish, id: @notification.target_status.in_reply_to_id, recipient_id: @recipient.id, sender_id: @notification.from_account.id, depth_limit: 100]).zero? + WITH RECURSIVE ancestors(id, in_reply_to_id, mention_id, path, depth) AS ( + SELECT s.id, s.in_reply_to_id, m.id, ARRAY[s.id], 0 FROM statuses s + LEFT JOIN mentions m ON m.silent = FALSE AND m.account_id = :sender_id AND m.status_id = s.id WHERE s.id = :id UNION ALL - SELECT - s.id, - s.in_reply_to_id, - (CASE - WHEN s.account_id = :recipient_id THEN - EXISTS ( - SELECT * - FROM mentions m - WHERE m.silent = FALSE AND m.account_id = :sender_id AND m.status_id = s.id - ) - ELSE - FALSE - END), - st.path || s.id + SELECT s.id, s.in_reply_to_id, m.id, st.path || s.id, st.depth + 1 FROM ancestors st JOIN statuses s ON s.id = st.in_reply_to_id - WHERE st.replying_to_sender IS FALSE AND NOT s.id = ANY(path) + LEFT JOIN mentions m ON m.silent = FALSE AND m.account_id = :sender_id AND m.status_id = s.id + WHERE st.mention_id IS NULL AND NOT s.id = ANY(path) AND st.depth < :depth_limit ) SELECT COUNT(*) FROM ancestors st JOIN statuses s ON s.id = st.id - WHERE st.replying_to_sender IS TRUE AND s.visibility = 3 + WHERE st.mention_id IS NOT NULL AND s.visibility = 3 SQL end |