Skip to content

Commit

Permalink
Merge commit 'e6b903b21e0682c1156ffec583ac2836fda7d657' into glitch-s…
Browse files Browse the repository at this point in the history
…oc/merge-upstream
  • Loading branch information
ClearlyClaire committed Oct 8, 2023
2 parents ebd2017 + e6b903b commit 19ebf77
Show file tree
Hide file tree
Showing 26 changed files with 605 additions and 543 deletions.
11 changes: 4 additions & 7 deletions .haml-lint_todo.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-07-20 09:47:50 -0400 using Haml-Lint version 0.48.0.
# on 2023-08-28 13:08:37 -0400 using Haml-Lint version 0.50.0.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of Haml-Lint, may require this file to be generated again.

linters:
# Offense count: 951
# Offense count: 945
LineLength:
enabled: false

Expand All @@ -26,22 +26,19 @@ linters:
- 'app/views/admin/reports/show.html.haml'
- 'app/views/disputes/strikes/show.html.haml'

# Offense count: 32
# Offense count: 28
InstanceVariables:
exclude:
- 'app/views/admin/reports/_actions.html.haml'
- 'app/views/admin/roles/_form.html.haml'
- 'app/views/admin/webhooks/_form.html.haml'
- 'app/views/auth/registrations/_status.html.haml'
- 'app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml'
- 'app/views/authorize_interactions/_post_follow_actions.html.haml'
- 'app/views/invites/_form.html.haml'
- 'app/views/relationships/_account.html.haml'
- 'app/views/shared/_og.html.haml'

# Offense count: 3
# Offense count: 2
IdNames:
exclude:
- 'app/views/authorize_interactions/error.html.haml'
- 'app/views/oauth/authorizations/error.html.haml'
- 'app/views/shared/_error_messages.html.haml'
11 changes: 11 additions & 0 deletions app/helpers/invites_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module InvitesHelper
def invites_max_uses_options
[1, 5, 10, 25, 50, 100]
end

def invites_expires_options
[30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week]
end
end
1 change: 1 addition & 0 deletions app/helpers/languages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def standard_locale_name(locale)

def valid_locale_or_nil(str)
return if str.blank?
return str if valid_locale?(str)

code, = str.to_s.split(/[_-]/) # Strip out the region from e.g. en_US or ja-JP

Expand Down
4 changes: 4 additions & 0 deletions app/javascript/mastodon/actions/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ export const openURL = (value, history, onFailure) => (dispatch, getState) => {
const signedIn = !!getState().getIn(['meta', 'me']);

if (!signedIn) {
if (onFailure) {
onFailure();
}

return;
}

Expand Down
5 changes: 3 additions & 2 deletions app/javascript/mastodon/components/admin/Retention.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import api from 'mastodon/api';
import { roundTo10 } from 'mastodon/utils/numbers';

const dateForCohort = cohort => {
const timeZone = 'UTC';
switch(cohort.frequency) {
case 'day':
return <FormattedDate value={cohort.period} month='long' day='2-digit' />;
return <FormattedDate value={cohort.period} month='long' day='2-digit' timeZone={timeZone} />;
default:
return <FormattedDate value={cohort.period} month='long' year='numeric' />;
return <FormattedDate value={cohort.period} month='long' year='numeric' timeZone={timeZone} />;
}
};

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
"lists.new.create": "Neue Liste erstellen",
"lists.new.title_placeholder": "Titel der neuen Liste",
"lists.replies_policy.followed": "Alle folgenden Profile",
"lists.replies_policy.list": "Mitglieder*innen der Liste",
"lists.replies_policy.list": "Mitglieder der Liste",
"lists.replies_policy.none": "Niemanden",
"lists.replies_policy.title": "Antworten anzeigen für:",
"lists.search": "Suche nach Leuten, denen du folgst",
Expand Down
230 changes: 115 additions & 115 deletions app/javascript/mastodon/locales/fi.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions app/javascript/mastodon/locales/hy.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"account.blocked": "Արգելափակուած է",
"account.browse_more_on_origin_server": "Դիտել աւելին իրական պրոֆիլում",
"account.cancel_follow_request": "Withdraw follow request",
"account.direct": "Մասնաւոր յիշատակում @{name}",
"account.disable_notifications": "Ծանուցումները անջատել @{name} գրառումների համար",
"account.domain_blocked": "Տիրոյթը արգելափակուած է",
"account.edit_profile": "Խմբագրել հաշիւը",
Expand Down Expand Up @@ -85,9 +86,11 @@
"column.blocks": "Արգելափակուած օգտատէրեր",
"column.bookmarks": "Էջանիշեր",
"column.community": "Տեղական հոսք",
"column.direct": "Մասնաւոր յիշատակումներ",
"column.directory": "Զննել անձնական էջերը",
"column.domain_blocks": "Թաքցուած տիրոյթները",
"column.favourites": "Հաւանածներ",
"column.firehose": "Հոսքեր",
"column.follow_requests": "Հետեւելու հայցեր",
"column.home": "Հիմնական",
"column.lists": "Ցանկեր",
Expand Down Expand Up @@ -135,6 +138,7 @@
"confirmations.block.block_and_report": "Արգելափակել եւ բողոքել",
"confirmations.block.confirm": "Արգելափակել",
"confirmations.block.message": "Վստա՞հ ես, որ ուզում ես արգելափակել {name}֊ին։",
"confirmations.cancel_follow_request.confirm": "Կասեցնել հայցը",
"confirmations.delete.confirm": "Ջնջել",
"confirmations.delete.message": "Վստա՞հ ես, որ ուզում ես ջնջել այս գրառումը։",
"confirmations.delete_list.confirm": "Ջնջել",
Expand Down Expand Up @@ -216,6 +220,8 @@
"filter_modal.select_filter.search": "Որոնել կամ ստեղծել",
"filter_modal.select_filter.title": "Զտել այս գրառումը",
"firehose.all": "Բոլորը",
"firehose.local": "Այս հանգոյցը",
"firehose.remote": "Այլ հանգոյցներ",
"follow_request.authorize": "Վաւերացնել",
"follow_request.reject": "Մերժել",
"follow_requests.unlocked_explanation": "Այս հարցումը ուղարկուած է հաշուից, որի համար {domain}-ի անձնակազմը միացրել է ձեռքով ստուգում։",
Expand Down Expand Up @@ -246,6 +252,8 @@
"home.column_settings.show_replies": "Ցուցադրել պատասխանները",
"home.hide_announcements": "Թաքցնել յայտարարութիւնները",
"home.show_announcements": "Ցուցադրել յայտարարութիւնները",
"interaction_modal.on_another_server": "Այլ հանգոյցում",
"interaction_modal.on_this_server": "Այս հանգոյցում",
"interaction_modal.title.favourite": "Հաւանել {name}-ի գրառումը",
"interaction_modal.title.follow": "Հետեւել {name}-ին",
"interaction_modal.title.reblog": "Տարածել {name}-ի գրառումը",
Expand Down Expand Up @@ -316,6 +324,7 @@
"navigation_bar.bookmarks": "Էջանիշեր",
"navigation_bar.community_timeline": "Տեղական հոսք",
"navigation_bar.compose": "Ստեղծել նոր գրառում",
"navigation_bar.direct": "Մասնաւոր յիշատակումներ",
"navigation_bar.discover": "Բացայայտել",
"navigation_bar.domain_blocks": "Թաքցուած տիրոյթներ",
"navigation_bar.edit_profile": "Խմբագրել հաշիւը",
Expand Down Expand Up @@ -451,11 +460,15 @@
"report_notification.attached_statuses": "{count, plural, one {# post} other {# posts}} attached",
"report_notification.categories.other": "Այլ",
"report_notification.categories.spam": "Սպամ",
"search.no_recent_searches": "Որոնման պատմութիւն չկայ",
"search.placeholder": "Փնտրել",
"search.search_or_paste": "Որոնել կամ դնել URL",
"search_popout.options": "Որոնման տեսակները",
"search_popout.recent": "Վերջին որոնումները",
"search_results.accounts": "Հաշիւներ",
"search_results.all": "Բոլորը",
"search_results.hashtags": "Պիտակներ",
"search_results.see_all": "Տեսնել բոլորը",
"search_results.statuses": "Գրառումներ",
"search_results.title": "Որոնել {q}-ն",
"server_banner.active_users": "ակտիւ մարդիկ",
Expand All @@ -475,6 +488,8 @@
"status.copy": "Պատճէնել գրառման յղումը",
"status.delete": "Ջնջել",
"status.detailed_status": "Շղթայի ընդլայնուած դիտում",
"status.direct": "Մասնաւոր յիշատակում @{name}",
"status.direct_indicator": "Մասնաւոր յիշատակում",
"status.edit": "Խմբագրել",
"status.edited": "Խմբագրուել է՝ {date}",
"status.edited_x_times": "Edited {count, plural, one {# time} other {# times}}",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/lv.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"dismissable_banner.community_timeline": "Šīs ir jaunākās publiskās ziņas no personām, kuru kontus mitina {domain}.",
"dismissable_banner.dismiss": "Atcelt",
"dismissable_banner.explore_links": "Par šiem jaunumiem šobrīd runā cilvēki šajā un citos decentralizētā tīkla serveros.",
"dismissable_banner.explore_statuses": "Šīs ir ziņas no visa sociālā tīkla, kas šodien kļūst arvien populārākas. Jaunākas ziņas ar vairāk uzlabojumiem un iecienītākajām ziņām tiek novērtētas augstāk.",
"dismissable_banner.explore_statuses": "Ieraksti, kas šobrīd gūst arvien lielāku ievērību visā sociālajā tīklā. Augstāk tiek kārtoti neseni ieraksti, kas pastiprināti un pievienoti izlasēm.",
"dismissable_banner.explore_tags": "Šie tēmturi šobrīd kļūst arvien populārāki cilvēku vidū šajā un citos decentralizētā tīkla serveros.",
"dismissable_banner.public_timeline": "Šīs ir jaunākās publiskās ziņas no lietotājiem sociālajā tīmeklī, kurām seko lietotāji domēnā {domain}.",
"embed.instructions": "Iestrādā šo ziņu savā mājaslapā, kopējot zemāk redzamo kodu.",
Expand Down
7 changes: 5 additions & 2 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9284,14 +9284,17 @@ noscript {
0 10px 15px -3px rgba($base-shadow-color, 0.25),
0 4px 6px -4px rgba($base-shadow-color, 0.25);
cursor: default;
transition: 0.5s cubic-bezier(0.89, 0.01, 0.5, 1.1);
transform: translateZ(0);
font-size: 15px;
line-height: 21px;

&.notification-bar-active {
inset-inline-start: 1rem;
}

.no-reduce-motion & {
transition: 0.5s cubic-bezier(0.89, 0.01, 0.5, 1.1);
transform: translateZ(0);
}
}

.notification-bar-title {
Expand Down
2 changes: 1 addition & 1 deletion app/models/admin/action_log_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Admin::ActionLogFilter
destroy_status: { target_type: 'Status', action: 'destroy' }.freeze,
destroy_user_role: { target_type: 'UserRole', action: 'destroy' }.freeze,
destroy_canonical_email_block: { target_type: 'CanonicalEmailBlock', action: 'destroy' }.freeze,
disable_2fa_user: { target_type: 'User', action: 'disable' }.freeze,
disable_2fa_user: { target_type: 'User', action: 'disable_2fa' }.freeze,
disable_custom_emoji: { target_type: 'CustomEmoji', action: 'disable' }.freeze,
disable_user: { target_type: 'User', action: 'disable' }.freeze,
enable_custom_emoji: { target_type: 'CustomEmoji', action: 'enable' }.freeze,
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/invites/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
- if policy(:invite).create?
%p= t('invites.prompt')

= render 'invites/form'
= simple_form_for(@invite, url: admin_invites_path) do |form|
= render partial: 'invites/form', object: form

%hr.spacer/

Expand Down
21 changes: 10 additions & 11 deletions app/views/invites/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
= simple_form_for(@invite, url: controller.is_a?(Admin::InvitesController) ? admin_invites_path : invites_path) do |f|
= render 'shared/error_messages', object: @invite
= render 'shared/error_messages', object: form.object

.fields-row
.fields-row__column.fields-row__column-6.fields-group
= f.input :max_uses, wrapper: :with_label, collection: [1, 5, 10, 25, 50, 100], label_method: ->(num) { I18n.t('invites.max_uses', count: num) }, prompt: I18n.t('invites.max_uses_prompt')
.fields-row__column.fields-row__column-6.fields-group
= f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: ->(i) { I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')
.fields-row
.fields-row__column.fields-row__column-6.fields-group
= form.input :max_uses, wrapper: :with_label, collection: invites_max_uses_options, label_method: ->(num) { I18n.t('invites.max_uses', count: num) }, prompt: I18n.t('invites.max_uses_prompt')
.fields-row__column.fields-row__column-6.fields-group
= form.input :expires_in, wrapper: :with_label, collection: invites_expires_options.map(&:to_i), label_method: ->(i) { I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')

.fields-group
= f.input :autofollow, wrapper: :with_label
.fields-group
= form.input :autofollow, wrapper: :with_label

.actions
= f.button :button, t('invites.generate'), type: :submit
.actions
= form.button :button, t('invites.generate'), type: :submit
3 changes: 2 additions & 1 deletion app/views/invites/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
- if policy(:invite).create?
%p= t('invites.prompt')

= render 'form'
= simple_form_for(@invite, url: invites_path) do |form|
= render partial: 'form', object: form

%hr.spacer/

Expand Down
2 changes: 1 addition & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ de:
cas: CAS
saml: SAML
register: Registrieren
registration_closed: "%{instance} akzeptiert keine neuen Mitglieder*innen"
registration_closed: "%{instance} akzeptiert keine neuen Mitglieder"
resend_confirmation: Bestätigungslink erneut zusenden
reset_password: Passwort zurücksetzen
rules:
Expand Down
24 changes: 12 additions & 12 deletions config/locales/devise.en-GB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ en-GB:
send_instructions: You will receive an email with instructions for how to confirm your email address in a few minutes. Please check your spam folder if you didn't receive this email.
send_paranoid_instructions: If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes. Please check your spam folder if you didn't receive this email.
failure:
already_authenticated: You are already signed in.
already_authenticated: You are already logged in.
inactive: Your account is not activated yet.
invalid: Invalid %{authentication_keys} or password.
last_attempt: You have one more attempt before your account is locked.
locked: Your account is locked.
not_found_in_database: Invalid %{authentication_keys} or password.
pending: Your account is still under review.
timeout: Your session expired. Please sign in again to continue.
unauthenticated: You need to sign in or sign up before continuing.
timeout: Your session expired. Please log in again to continue.
unauthenticated: You need to log in or sign up before continuing.
unconfirmed: You have to confirm your email address before continuing.
mailer:
confirmation_instructions:
action: Verify email address
action_with_app: Confirm and return to %{app}
explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email.
explanation_when_pending: You applied for an invite to %{host} with this email address. Once you confirm your e-mail address, we will review your application. You can login to change your details or delete your account, but you cannot access most of the functions until your account is approved. If your application is rejected, your data will be removed, so no further action will be required from you. If this wasn't you, please ignore this email.
explanation_when_pending: You applied for an invite to %{host} with this email address. Once you confirm your e-mail address, we will review your application. You can log in to change your details or delete your account, but you cannot access most of the functions until your account is approved. If your application is rejected, your data will be removed, so no further action will be required from you. If this wasn't you, please ignore this email.
extra_html: Please also check out <a href="%{terms_path}">the rules of the server</a> and <a href="%{policy_path}">our terms of service</a>.
subject: 'Mastodon: Confirmation instructions for %{instance}'
title: Verify email address
Expand Down Expand Up @@ -84,28 +84,28 @@ en-GB:
no_token: You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided.
send_instructions: If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes. Please check your spam folder if you didn't receive this email.
send_paranoid_instructions: If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes. Please check your spam folder if you didn't receive this email.
updated: Your password has been changed successfully. You are now signed in.
updated: Your password has been changed successfully. You are now logged in.
updated_not_active: Your password has been changed successfully.
registrations:
destroyed: Bye! Your account has been successfully cancelled. We hope to see you again soon.
signed_up: Welcome! You have signed up successfully.
signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated.
signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked.
signed_up_but_inactive: You have signed up successfully. However, we could not log you in because your account is not yet activated.
signed_up_but_locked: You have signed up successfully. However, we could not log you in because your account is locked.
signed_up_but_pending: A message with a confirmation link has been sent to your email address. After you click the link, we will review your application. You will be notified if it is approved.
signed_up_but_unconfirmed: A message with a confirmation link has been sent to your email address. Please follow the link to activate your account. Please check your spam folder if you didn't receive this email.
update_needs_confirmation: You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address. Please check your spam folder if you didn't receive this email.
updated: Your account has been updated successfully.
sessions:
already_signed_out: Signed out successfully.
signed_in: Signed in successfully.
signed_out: Signed out successfully.
already_signed_out: Logged out successfully.
signed_in: Logged in successfully.
signed_out: Logged out successfully.
unlocks:
send_instructions: You will receive an email with instructions for how to unlock your account in a few minutes. Please check your spam folder if you didn't receive this email.
send_paranoid_instructions: If your account exists, you will receive an email with instructions for how to unlock it in a few minutes. Please check your spam folder if you didn't receive this email.
unlocked: Your account has been unlocked successfully. Please sign in to continue.
unlocked: Your account has been unlocked successfully. Please log in to continue.
errors:
messages:
already_confirmed: was already confirmed, please try signing in
already_confirmed: was already confirmed, please try logging in
confirmation_period_expired: needs to be confirmed within %{period}, please request a new one
expired: has expired, please request a new one
not_found: not found
Expand Down
Loading

0 comments on commit 19ebf77

Please sign in to comment.