From 948281070335c61657783702ef7d19e49909bed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=9F=E3=81=84=E3=81=A1=20=E3=81=B2?= Date: Tue, 24 Oct 2023 17:06:14 +0900 Subject: [PATCH 1/7] Rewrite `emoji_unicode_mapping_light` to TS (#25444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: taichi.fukuda ひ --- .../mastodon/components/autosuggest_emoji.jsx | 2 +- .../mastodon/features/emoji/emoji.js | 2 +- .../features/emoji/emoji_compressed.d.ts | 15 +++-- .../features/emoji/emoji_mart_data_light.ts | 15 +---- .../emoji/emoji_unicode_mapping_light.js | 37 ------------ .../emoji/emoji_unicode_mapping_light.ts | 60 +++++++++++++++++++ .../components/announcements.jsx | 2 +- 7 files changed, 76 insertions(+), 57 deletions(-) delete mode 100644 app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js create mode 100644 app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.ts diff --git a/app/javascript/mastodon/components/autosuggest_emoji.jsx b/app/javascript/mastodon/components/autosuggest_emoji.jsx index 5fa946f707..28f628b4ac 100644 --- a/app/javascript/mastodon/components/autosuggest_emoji.jsx +++ b/app/javascript/mastodon/components/autosuggest_emoji.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import { assetHost } from 'mastodon/utils/config'; -import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light'; +import { unicodeMapping } from '../features/emoji/emoji_unicode_mapping_light'; export default class AutosuggestEmoji extends PureComponent { diff --git a/app/javascript/mastodon/features/emoji/emoji.js b/app/javascript/mastodon/features/emoji/emoji.js index c11ef458c7..dd51dc621e 100644 --- a/app/javascript/mastodon/features/emoji/emoji.js +++ b/app/javascript/mastodon/features/emoji/emoji.js @@ -4,7 +4,7 @@ import { assetHost } from 'mastodon/utils/config'; import { autoPlayGif } from '../../initial_state'; -import unicodeMapping from './emoji_unicode_mapping_light'; +import { unicodeMapping } from './emoji_unicode_mapping_light'; const trie = new Trie(Object.keys(unicodeMapping)); diff --git a/app/javascript/mastodon/features/emoji/emoji_compressed.d.ts b/app/javascript/mastodon/features/emoji/emoji_compressed.d.ts index 9f0feba06c..bd41e5b838 100644 --- a/app/javascript/mastodon/features/emoji/emoji_compressed.d.ts +++ b/app/javascript/mastodon/features/emoji/emoji_compressed.d.ts @@ -13,15 +13,20 @@ export type Search = string; * This could be a potential area of refactoring or error handling. * The non-existence of 'skins' property is evident at [this location]{@link app/javascript/mastodon/features/emoji/emoji_compressed.js:121}. */ -export type Skins = null; +type Skins = null; -export type FilenameData = string[] | string[][]; +type Filename = string; +type UnicodeFilename = string; +export type FilenameData = [ + filename: Filename, + unicodeFilename?: UnicodeFilename, +][]; export type ShortCodesToEmojiDataKey = | EmojiData['id'] | BaseEmoji['native'] | keyof NimbleEmojiIndex['emojis']; -export type SearchData = [ +type SearchData = [ BaseEmoji['native'], Emoji['short_names'], Search, @@ -32,9 +37,9 @@ export type ShortCodesToEmojiData = Record< ShortCodesToEmojiDataKey, [FilenameData, SearchData] >; -export type EmojisWithoutShortCodes = FilenameData[]; +type EmojisWithoutShortCodes = FilenameData; -export type EmojiCompressed = [ +type EmojiCompressed = [ ShortCodesToEmojiData, Skins, Category[], diff --git a/app/javascript/mastodon/features/emoji/emoji_mart_data_light.ts b/app/javascript/mastodon/features/emoji/emoji_mart_data_light.ts index 142605b4bc..ffca1f8b06 100644 --- a/app/javascript/mastodon/features/emoji/emoji_mart_data_light.ts +++ b/app/javascript/mastodon/features/emoji/emoji_mart_data_light.ts @@ -30,22 +30,13 @@ const emojis: Emojis = {}; // decompress Object.keys(shortCodesToEmojiData).forEach((shortCode) => { const [_filenameData, searchData] = shortCodesToEmojiData[shortCode]; - const native = searchData[0]; - let short_names = searchData[1]; - const search = searchData[2]; - let unified = searchData[3]; + const [native, short_names, search, unified] = searchData; - if (!unified) { - // unified name can be derived from unicodeToUnifiedName - unified = unicodeToUnifiedName(native); - } - - if (short_names) short_names = [shortCode].concat(short_names); emojis[shortCode] = { native, search, - short_names, - unified, + short_names: short_names ? [shortCode].concat(short_names) : undefined, + unified: unified ?? unicodeToUnifiedName(native), }; }); diff --git a/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js deleted file mode 100644 index 3e3834580d..0000000000 --- a/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js +++ /dev/null @@ -1,37 +0,0 @@ -// A mapping of unicode strings to an object containing the filename -// (i.e. the svg filename) and a shortCode intended to be shown -// as a "title" attribute in an HTML element (aka tooltip). - -import emojiCompressed from './emoji_compressed'; -import { unicodeToFilename } from './unicode_to_filename'; - -const [ - shortCodesToEmojiData, - _skins, - _categories, - _short_names, - emojisWithoutShortCodes, -] = emojiCompressed; - -// decompress -const unicodeMapping = {}; - -function processEmojiMapData(emojiMapData, shortCode) { - let [ native, filename ] = emojiMapData; - if (!filename) { - // filename name can be derived from unicodeToFilename - filename = unicodeToFilename(native); - } - unicodeMapping[native] = { - shortCode: shortCode, - filename: filename, - }; -} - -Object.keys(shortCodesToEmojiData).forEach((shortCode) => { - let [ filenameData ] = shortCodesToEmojiData[shortCode]; - filenameData.forEach(emojiMapData => processEmojiMapData(emojiMapData, shortCode)); -}); -emojisWithoutShortCodes.forEach(emojiMapData => processEmojiMapData(emojiMapData)); - -export default unicodeMapping; diff --git a/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.ts b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.ts new file mode 100644 index 0000000000..191419496f --- /dev/null +++ b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.ts @@ -0,0 +1,60 @@ +// A mapping of unicode strings to an object containing the filename +// (i.e. the svg filename) and a shortCode intended to be shown +// as a "title" attribute in an HTML element (aka tooltip). + +import type { + FilenameData, + ShortCodesToEmojiDataKey, +} from './emoji_compressed'; +import emojiCompressed from './emoji_compressed'; +import { unicodeToFilename } from './unicode_to_filename'; + +type UnicodeMapping = { + [key in FilenameData[number][0]]: { + shortCode: ShortCodesToEmojiDataKey; + filename: FilenameData[number][number]; + }; +}; + +const [ + shortCodesToEmojiData, + _skins, + _categories, + _short_names, + emojisWithoutShortCodes, +] = emojiCompressed; + +// decompress +const unicodeMapping: UnicodeMapping = {}; + +function processEmojiMapData( + emojiMapData: FilenameData[number], + shortCode?: ShortCodesToEmojiDataKey, +) { + const [native, _filename] = emojiMapData; + let filename = emojiMapData[1]; + if (!filename) { + // filename name can be derived from unicodeToFilename + filename = unicodeToFilename(native); + } + unicodeMapping[native] = { + shortCode, + filename, + }; +} + +Object.keys(shortCodesToEmojiData).forEach( + (shortCode: ShortCodesToEmojiDataKey) => { + if (shortCode === undefined) return; + const [filenameData, _searchData] = shortCodesToEmojiData[shortCode]; + filenameData.forEach((emojiMapData) => { + processEmojiMapData(emojiMapData, shortCode); + }); + }, +); + +emojisWithoutShortCodes.forEach((emojiMapData) => { + processEmojiMapData(emojiMapData); +}); + +export { unicodeMapping }; diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.jsx b/app/javascript/mastodon/features/getting_started/components/announcements.jsx index 4182e5c932..a3f379ecee 100644 --- a/app/javascript/mastodon/features/getting_started/components/announcements.jsx +++ b/app/javascript/mastodon/features/getting_started/components/announcements.jsx @@ -18,7 +18,7 @@ import { AnimatedNumber } from 'mastodon/components/animated_number'; import { Icon } from 'mastodon/components/icon'; import { IconButton } from 'mastodon/components/icon_button'; import EmojiPickerDropdown from 'mastodon/features/compose/containers/emoji_picker_dropdown_container'; -import unicodeMapping from 'mastodon/features/emoji/emoji_unicode_mapping_light'; +import { unicodeMapping } from 'mastodon/features/emoji/emoji_unicode_mapping_light'; import { autoPlayGif, reduceMotion, disableSwiping, mascot } from 'mastodon/initial_state'; import { assetHost } from 'mastodon/utils/config'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; From 4fdc548fa52a526f2ec0a319315c370c3671826e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 24 Oct 2023 04:08:31 -0400 Subject: [PATCH 2/7] Regenerate lint todos (#27513) --- .haml-lint_todo.yml | 68 +++++++++++++++++++++++++++++++++++++-------- .rubocop_todo.yml | 62 ++--------------------------------------- 2 files changed, 58 insertions(+), 72 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 8a4dbaeff4..d5f6912a6c 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,30 +1,74 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2023-10-11 11:31:24 -0400 using Haml-Lint version 0.51.0. +# on 2023-10-23 10:16:00 -0400 using Haml-Lint version 0.51.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: 946 + # Offense count: 944 LineLength: enabled: false # Offense count: 22 UnnecessaryStringOutput: - enabled: false - - # Offense count: 44 - RuboCop: - enabled: false - - # Offense count: 3 - ViewLength: exclude: - - 'app/views/admin/accounts/show.html.haml' - - 'app/views/admin/reports/show.html.haml' + - 'app/views/accounts/show.html.haml' + - 'app/views/admin/custom_emojis/_custom_emoji.html.haml' + - 'app/views/admin/relays/_relay.html.haml' + - 'app/views/admin/rules/_rule.html.haml' + - 'app/views/admin/statuses/index.html.haml' + - 'app/views/auth/registrations/_session.html.haml' - 'app/views/disputes/strikes/show.html.haml' + - 'app/views/notification_mailer/_status.html.haml' + - 'app/views/settings/two_factor_authentication_methods/index.html.haml' + - 'app/views/statuses/_detailed_status.html.haml' + - 'app/views/statuses/_poll.html.haml' + - 'app/views/statuses/_simple_status.html.haml' + - 'app/views/user_mailer/suspicious_sign_in.html.haml' + - 'app/views/user_mailer/webauthn_credential_added.html.haml' + - 'app/views/user_mailer/webauthn_credential_deleted.html.haml' + - 'app/views/user_mailer/welcome.html.haml' + + # Offense count: 45 + RuboCop: + exclude: + - 'app/views/admin/accounts/_account.html.haml' + - 'app/views/admin/accounts/_buttons.html.haml' + - 'app/views/admin/accounts/_local_account.html.haml' + - 'app/views/admin/accounts/_remote_account.html.haml' + - 'app/views/admin/accounts/index.html.haml' + - 'app/views/admin/accounts/show.html.haml' + - 'app/views/admin/custom_emojis/index.html.haml' + - 'app/views/admin/dashboard/index.html.haml' + - 'app/views/admin/domain_blocks/confirm_suspension.html.haml' + - 'app/views/admin/follow_recommendations/show.html.haml' + - 'app/views/admin/invites/_invite.html.haml' + - 'app/views/admin/invites/index.html.haml' + - 'app/views/admin/ip_blocks/index.html.haml' + - 'app/views/admin/reports/_status.html.haml' + - 'app/views/admin/reports/show.html.haml' + - 'app/views/admin/roles/_form.html.haml' + - 'app/views/admin/software_updates/index.html.haml' + - 'app/views/admin/status_edits/_status_edit.html.haml' + - 'app/views/admin/statuses/index.html.haml' + - 'app/views/admin/tags/show.html.haml' + - 'app/views/admin/trends/tags/_tag.html.haml' + - 'app/views/auth/registrations/_session.html.haml' + - 'app/views/auth/registrations/new.html.haml' + - 'app/views/auth/sessions/two_factor.html.haml' + - 'app/views/auth/shared/_progress.html.haml' + - 'app/views/disputes/strikes/_card.html.haml' + - 'app/views/filters/statuses/index.html.haml' + - 'app/views/invites/_invite.html.haml' + - 'app/views/layouts/application.html.haml' + - 'app/views/layouts/error.html.haml' + - 'app/views/statuses/_detailed_status.html.haml' + - 'app/views/statuses/_og_image.html.haml' + - 'app/views/statuses/_simple_status.html.haml' + - 'app/views/statuses_cleanup/show.html.haml' + - 'app/views/user_mailer/warning.html.haml' # Offense count: 2 IdNames: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9e04be03c2..9609923434 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.56.1. +# using RuboCop version 1.57.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -215,19 +215,6 @@ Rails/ApplicationController: Exclude: - 'app/controllers/health_controller.rb' -# Configuration parameters: Include. -# Include: db/**/*.rb -Rails/CreateTableWithTimestamps: - Exclude: - - 'db/migrate/20170508230434_create_conversation_mutes.rb' - - 'db/migrate/20170823162448_create_status_pins.rb' - - 'db/migrate/20171116161857_create_list_accounts.rb' - - 'db/migrate/20180929222014_create_account_conversations.rb' - - 'db/migrate/20181007025445_create_pghero_space_stats.rb' - - 'db/migrate/20190103124649_create_scheduled_statuses.rb' - - 'db/migrate/20220824233535_create_status_trends.rb' - - 'db/migrate/20221006061337_create_preview_card_trends.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Severity. Rails/DuplicateAssociation: @@ -269,7 +256,6 @@ Rails/LexicallyScopedActionFilter: Exclude: - 'app/controllers/auth/passwords_controller.rb' - 'app/controllers/auth/registrations_controller.rb' - - 'app/controllers/auth/sessions_controller.rb' # This cop supports unsafe autocorrection (--autocorrect-all). Rails/NegateInclude: @@ -285,7 +271,6 @@ Rails/NegateInclude: - 'app/models/custom_filter.rb' - 'app/services/activitypub/process_status_update_service.rb' - 'app/services/fetch_link_card_service.rb' - - 'app/services/search_service.rb' - 'app/workers/web/push_notification_worker.rb' - 'lib/paperclip/color_extractor.rb' @@ -305,24 +290,6 @@ Rails/RakeEnvironment: - 'lib/tasks/repo.rake' - 'lib/tasks/statistics.rake' -# Configuration parameters: Include. -# Include: db/**/*.rb -Rails/ReversibleMigration: - Exclude: - - 'db/migrate/20160223164502_make_uris_nullable_in_statuses.rb' - - 'db/migrate/20161122163057_remove_unneeded_indexes.rb' - - 'db/migrate/20170205175257_remove_devices.rb' - - 'db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb' - - 'db/migrate/20170520145338_change_language_filter_to_opt_out.rb' - - 'db/migrate/20170609145826_remove_default_language_from_statuses.rb' - - 'db/migrate/20170711225116_fix_null_booleans.rb' - - 'db/migrate/20171129172043_add_index_on_stream_entries.rb' - - 'db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb' - - 'db/migrate/20171226094803_more_faster_index_on_notifications.rb' - - 'db/migrate/20180106000232_add_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb' - - 'db/migrate/20180617162849_remove_unused_indexes.rb' - - 'db/migrate/20220827195229_change_canonical_email_blocks_nullable.rb' - # Configuration parameters: ForbiddenMethods, AllowedMethods. # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all Rails/SkipsModelValidations: @@ -375,30 +342,6 @@ Rails/SkipsModelValidations: - 'spec/services/follow_service_spec.rb' - 'spec/services/update_account_service_spec.rb' -# Configuration parameters: Include. -# Include: db/**/*.rb -Rails/ThreeStateBooleanColumn: - Exclude: - - 'db/migrate/20160325130944_add_admin_to_users.rb' - - 'db/migrate/20161123093447_add_sensitive_to_statuses.rb' - - 'db/migrate/20170123203248_add_reject_media_to_domain_blocks.rb' - - 'db/migrate/20170127165745_add_devise_two_factor_to_users.rb' - - 'db/migrate/20170209184350_add_reply_to_statuses.rb' - - 'db/migrate/20170330163835_create_imports.rb' - - 'db/migrate/20170905165803_add_local_to_statuses.rb' - - 'db/migrate/20181203021853_add_discoverable_to_accounts.rb' - - 'db/migrate/20190509164208_add_by_moderator_to_tombstone.rb' - - 'db/migrate/20190805123746_add_capabilities_to_tags.rb' - - 'db/migrate/20191212163405_add_hide_collections_to_accounts.rb' - - 'db/migrate/20200309150742_add_forwarded_to_reports.rb' - - 'db/migrate/20210609202149_create_login_activities.rb' - - 'db/migrate/20210621221010_add_skip_sign_in_token_to_users.rb' - - 'db/migrate/20211031031021_create_preview_card_providers.rb' - - 'db/migrate/20211115032527_add_trendable_to_preview_cards.rb' - - 'db/migrate/20220202200743_add_trendable_to_accounts.rb' - - 'db/migrate/20220202200926_add_trendable_to_statuses.rb' - - 'db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb' - # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/UniqueValidationWithoutIndex: @@ -462,7 +405,7 @@ Style/CaseEquality: Exclude: - 'config/initializers/trusted_proxies.rb' -# This cop supports safe autocorrection (--autocorrect). +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: AllowedMethods, AllowedPatterns. # AllowedMethods: ==, equal?, eql? Style/ClassEqualityComparison: @@ -670,7 +613,6 @@ Style/RedundantReturn: Style/SafeNavigation: Exclude: - 'app/models/concerns/account_finder_concern.rb' - - 'app/models/status.rb' # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. From e923bb9ec989bc702949a384120196f9410fbdc4 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 24 Oct 2023 05:30:14 -0400 Subject: [PATCH 3/7] Use `ENV.fetch` in views, fixes rubocop haml-lint issue (#27527) --- app/views/auth/registrations/edit.html.haml | 2 +- app/views/errors/self_destruct.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/auth/registrations/edit.html.haml b/app/views/auth/registrations/edit.html.haml index f06410b37c..f5ef4e97e4 100644 --- a/app/views/auth/registrations/edit.html.haml +++ b/app/views/auth/registrations/edit.html.haml @@ -3,7 +3,7 @@ - if self_destruct? .flash-message.warning - = t('auth.status.self_destruct', domain: ENV['LOCAL_DOMAIN']) + = t('auth.status.self_destruct', domain: ENV.fetch('LOCAL_DOMAIN')) - else = render partial: 'status', locals: { user: @user, strikes: @strikes } diff --git a/app/views/errors/self_destruct.html.haml b/app/views/errors/self_destruct.html.haml index dc58f1c135..09b17a5a94 100644 --- a/app/views/errors/self_destruct.html.haml +++ b/app/views/errors/self_destruct.html.haml @@ -3,7 +3,7 @@ .simple_form %h1.title= t('self_destruct.title') - %p.lead= t('self_destruct.lead_html', domain: ENV['LOCAL_DOMAIN']) + %p.lead= t('self_destruct.lead_html', domain: ENV.fetch('LOCAL_DOMAIN')) .form-footer %ul.no-list From 50b7ea810e12b420ac72303d0b0938ea2d644f08 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:51:34 +0200 Subject: [PATCH 4/7] New Crowdin Translations (automated) (#27523) Co-authored-by: GitHub Actions --- app/javascript/mastodon/locales/cs.json | 2 ++ app/javascript/mastodon/locales/zh-HK.json | 1 + app/javascript/mastodon/locales/zh-TW.json | 4 ++-- config/locales/cs.yml | 1 + config/locales/cy.yml | 1 + config/locales/da.yml | 1 + config/locales/de.yml | 7 ++++++- config/locales/es-AR.yml | 5 +++++ config/locales/es-MX.yml | 5 +++++ config/locales/es.yml | 5 +++++ config/locales/eu.yml | 9 +++++++++ config/locales/fi.yml | 5 +++++ config/locales/fo.yml | 5 +++++ config/locales/fr-QC.yml | 5 +++++ config/locales/fr.yml | 5 +++++ config/locales/fy.yml | 5 +++++ config/locales/hu.yml | 1 + config/locales/is.yml | 5 +++++ config/locales/it.yml | 5 +++++ config/locales/ja.yml | 5 +++++ config/locales/ko.yml | 5 +++++ config/locales/nl.yml | 5 +++++ config/locales/pl.yml | 5 +++++ config/locales/pt-BR.yml | 4 ++++ config/locales/pt-PT.yml | 5 +++++ config/locales/simple_form.zh-TW.yml | 2 +- config/locales/sl.yml | 2 +- config/locales/sr-Latn.yml | 5 +++++ config/locales/sr.yml | 5 +++++ config/locales/sv.yml | 3 +++ config/locales/th.yml | 5 +++++ config/locales/tr.yml | 1 + config/locales/uk.yml | 5 +++++ config/locales/zh-CN.yml | 1 + config/locales/zh-HK.yml | 6 ++++++ config/locales/zh-TW.yml | 11 ++++++++--- 36 files changed, 144 insertions(+), 8 deletions(-) diff --git a/app/javascript/mastodon/locales/cs.json b/app/javascript/mastodon/locales/cs.json index 94d62a4889..33c7c31d9c 100644 --- a/app/javascript/mastodon/locales/cs.json +++ b/app/javascript/mastodon/locales/cs.json @@ -534,6 +534,7 @@ "reply_indicator.cancel": "Zrušit", "report.block": "Blokovat", "report.block_explanation": "Neuvidíte příspěvky tohoto uživatele. On neuvidí vaše příspěvky, ani vás nebude moci sledovat. Pozná, že je blokován.", + "report.categories.legal": "Právní ustanovení", "report.categories.other": "Ostatní", "report.categories.spam": "Spam", "report.categories.violation": "Obsah porušuje jedno nebo více pravidel serveru", @@ -590,6 +591,7 @@ "search_popout.options": "Možnosti hledání", "search_popout.quick_actions": "Rychlé akce", "search_popout.recent": "Nedávná vyhledávání", + "search_popout.specific_date": "konkrétní datum", "search_popout.user": "uživatel", "search_results.accounts": "Profily", "search_results.all": "Vše", diff --git a/app/javascript/mastodon/locales/zh-HK.json b/app/javascript/mastodon/locales/zh-HK.json index e5de8daa9d..47880f7112 100644 --- a/app/javascript/mastodon/locales/zh-HK.json +++ b/app/javascript/mastodon/locales/zh-HK.json @@ -590,6 +590,7 @@ "search.quick_action.open_url": "在 Mastodon 中打開網址", "search.quick_action.status_search": "符合的帖文 {x}", "search.search_or_paste": "搜尋或貼上網址", + "search_popout.full_text_search_disabled_message": "在 {domain} 上無法使用。", "search_popout.language_code": "ISO 語言代碼", "search_popout.options": "搜尋選項", "search_popout.quick_actions": "快速動作", diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json index 93db5c9e2e..dab8a72191 100644 --- a/app/javascript/mastodon/locales/zh-TW.json +++ b/app/javascript/mastodon/locales/zh-TW.json @@ -662,9 +662,9 @@ "status.share": "分享", "status.show_filter_reason": "仍要顯示", "status.show_less": "減少顯示", - "status.show_less_all": "減少顯示這類嘟文", + "status.show_less_all": "隱藏所有內容警告與額外標籤", "status.show_more": "顯示更多", - "status.show_more_all": "顯示更多這類嘟文", + "status.show_more_all": "顯示所有內容警告與額外標籤", "status.show_original": "顯示原文", "status.title.with_attachments": "{user} 嘟了 {attachmentCount, plural, other {{attachmentCount} 個附加檔案}}", "status.translate": "翻譯", diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 03ec9708d5..efadfc2c17 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -556,6 +556,7 @@ cs: total_reported: Hlášení o nich total_storage: Mediální přílohy totals_time_period_hint_html: Níže zobrazené součty zahrnují data za celou dobu. + unknown_instance: Na tomto serveru momentálně neexistuje žádný záznam o této doméně. invites: deactivate_all: Deaktivovat vše filter: diff --git a/config/locales/cy.yml b/config/locales/cy.yml index a975457cf9..09e201f55a 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -578,6 +578,7 @@ cy: total_reported: Adroddiadau amdanyn nhw total_storage: Atodiadau cyfryngau totals_time_period_hint_html: Mae'r cyfansymiau sy'n cael eu dangos isod yn cynnwys data am y cyfnod cyfan. + unknown_instance: Nid oes cofnod o'r parth hwn ar y gweinydd hwn ar hyn o bryd. invites: deactivate_all: Dadweithredu popeth filter: diff --git a/config/locales/da.yml b/config/locales/da.yml index ce53168fb3..9ffece04d7 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -534,6 +534,7 @@ da: total_reported: Anmeldelser om dem total_storage: Medievedhæftninger totals_time_period_hint_html: Nedenfor viste totaler omfatter data for alle tidsperioder. + unknown_instance: Der er i pt. ingen post for dette domæne på denne server. invites: deactivate_all: Deaktivér alle filter: diff --git a/config/locales/de.yml b/config/locales/de.yml index d72b0a608f..c6b3218ee9 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -534,6 +534,7 @@ de: total_reported: Beschwerden über sie total_storage: Medienanhänge totals_time_period_hint_html: Die unten angezeigten Summen enthalten Daten für alle Zeiten. + unknown_instance: Auf diesem Server gibt es derzeit keinen Eintrag dieser Domain. invites: deactivate_all: Alle deaktivieren filter: @@ -1101,6 +1102,7 @@ de: functional: Dein Konto ist voll funktionsfähig. pending: Die Prüfung deiner Bewerbung steht noch aus. Dies kann einige Zeit in Anspruch nehmen. Sobald deine Bewerbung genehmigt wurde, erhältst du eine E-Mail. redirecting_to: Dein Konto ist inaktiv, weil es zu %{acct} umgezogen ist. + self_destruct: Da %{domain} den Betrieb einstellen wird, wirst du nur begrenzten Zugriff auf dein Konto haben. view_strikes: Vorherige Verstöße deines Kontos ansehen too_fast: Formular zu schnell übermittelt. Bitte versuche es erneut. use_security_key: Sicherheitsschlüssel verwenden @@ -1570,6 +1572,9 @@ de: over_daily_limit: Du hast das Limit von %{limit} geplanten Beiträgen für heute erreicht over_total_limit: Du hast das Limit für geplante Beiträge, das %{limit} beträgt, erreicht too_soon: Das geplante Datum muss in der Zukunft liegen + self_destruct: + lead_html: Bedauerlicherweise wird %{domain} den Betrieb für immer einstellen. Wenn du dort ein Konto angelegt hast, wirst du es nicht weiter verwenden können. Du kannst allerdings eine Sicherung deiner Daten anfordern. + title: Dieser Server wird den Betrieb einstellen sessions: activity: Letzte Aktivität browser: Browser @@ -1769,7 +1774,7 @@ de: subject: Dein Einspruch vom %{date} wurde abgelehnt title: Einspruch abgelehnt backup_ready: - explanation: Du hast eine vollständige Sicherung deines Mastodon-Kontos angefordert. Das Backup kann jetzt heruntergeladen werden! + explanation: Du hast eine vollständige Sicherung deines Mastodon-Kontos angefordert. Die Sicherung kann jetzt heruntergeladen werden! subject: Dein persönliches Archiv kann heruntergeladen werden title: Archiv-Download suspicious_sign_in: diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml index 8357c31490..fcff946910 100644 --- a/config/locales/es-AR.yml +++ b/config/locales/es-AR.yml @@ -534,6 +534,7 @@ es-AR: total_reported: Denuncias sobre ellas total_storage: Adjuntos totals_time_period_hint_html: Los datos totales mostrados a continuación incluyen datos para todo el tiempo. + unknown_instance: Actualmente no hay ningún registro de este dominio en este servidor. invites: deactivate_all: Desactivar todas filter: @@ -1101,6 +1102,7 @@ es-AR: functional: Tu cuenta está totalmente operativa. pending: Tu solicitud está pendiente de revisión por nuestra administración. Eso puede tardar algún tiempo. Si se aprueba tu solicitud, vas a recibir un correo electrónico. redirecting_to: Tu cuenta se encuentra inactiva porque está siendo redirigida a %{acct}. + self_destruct: Como %{domain} está en proceso de cierre, solo tendrás acceso limitado a tu cuenta. view_strikes: Ver incumplimientos pasados contra tu cuenta too_fast: Formulario enviado demasiado rápido, probá de nuevo. use_security_key: Usar la llave de seguridad @@ -1570,6 +1572,9 @@ es-AR: over_daily_limit: Superaste el límite de %{limit} mensajes programados para ese día over_total_limit: Superaste el límite de %{limit} mensajes programados too_soon: La fecha programada debe estar en el futuro + self_destruct: + lead_html: Desafortunadamente, %{domain} va a cerrar permanentemente. Si tenías una cuenta ahí, no podrás continuar usándola, pero aún podés solicitar una copia de tus datos. + title: Este servidor está cerrando sessions: activity: Última actividad browser: Navegador web diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index 542478f716..e055ff4c79 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -534,6 +534,7 @@ es-MX: total_reported: Informes sobre ellas total_storage: Archivos multimedia totals_time_period_hint_html: Los totales mostrados a continuación incluyen datos para todo el tiempo. + unknown_instance: Actualmente no hay registros de este dominio en el servidor. invites: deactivate_all: Desactivar todos filter: @@ -1101,6 +1102,7 @@ es-MX: functional: Tu cuenta está completamente operativa. pending: Su solicitud está pendiente de revisión por nuestros administradores. Eso puede tardar algún tiempo. Usted recibirá un correo electrónico si el solicitud sea aprobada. redirecting_to: Tu cuenta se encuentra inactiva porque está siendo redirigida a %{acct}. + self_destruct: Como %{domain} está cerrando, solo tendrás acceso limitado a tu cuenta. view_strikes: Ver amonestaciones pasadas contra tu cuenta too_fast: Formulario enviado demasiado rápido, inténtelo de nuevo. use_security_key: Usar la clave de seguridad @@ -1570,6 +1572,9 @@ es-MX: over_daily_limit: Ha superado el límite de %{limit} toots programados para ese día over_total_limit: Ha superado el límite de %{limit} toots programados too_soon: La fecha programada debe estar en el futuro + self_destruct: + lead_html: Desafortunadamente, %{domain} está cerrando de manera permanente. Si tenías una cuenta ahí, no puedes continuar utilizándolo, pero puedes solicitar un respaldo de tus datos. + title: Este servidor está cerrando sessions: activity: Última actividad browser: Navegador diff --git a/config/locales/es.yml b/config/locales/es.yml index 4ad353e3aa..5dce6330d6 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -534,6 +534,7 @@ es: total_reported: Informes sobre ellas total_storage: Archivos multimedia totals_time_period_hint_html: Los totales mostrados a continuación incluyen datos para todo el tiempo. + unknown_instance: Actualmente no hay ningún registro de este dominio en este servidor. invites: deactivate_all: Desactivar todos filter: @@ -1101,6 +1102,7 @@ es: functional: Tu cuenta está completamente operativa. pending: Su solicitud está pendiente de revisión por nuestros administradores. Eso puede tardar algún tiempo. Usted recibirá un correo electrónico si el solicitud sea aprobada. redirecting_to: Tu cuenta se encuentra inactiva porque está siendo redirigida a %{acct}. + self_destruct: Como %{domain} está en proceso de cierre, solo tendrás acceso limitado a tu cuenta. view_strikes: Ver amonestaciones pasadas contra tu cuenta too_fast: Formulario enviado demasiado rápido, inténtelo de nuevo. use_security_key: Usar la clave de seguridad @@ -1570,6 +1572,9 @@ es: over_daily_limit: Ha superado el límite de %{limit} publicaciones programadas para ese día over_total_limit: Ha superado el límite de %{limit} publicaciones programadas too_soon: La fecha programada debe estar en el futuro + self_destruct: + lead_html: Desafortunadamente, %{domain} va a cerrar permanentemente. Si tenías una cuenta allí, no podrás continuar usándola, pero aún puedes solicitar una copia de tus datos. + title: Este servidor está cerrando sessions: activity: Última actividad browser: Navegador diff --git a/config/locales/eu.yml b/config/locales/eu.yml index d21259ee77..3ce8cc7287 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -536,6 +536,7 @@ eu: total_reported: Heiei buruzko txostenak total_storage: Multimedia eranskinak totals_time_period_hint_html: Behean bistaratutako guztizkoek datu guztiak hartzen dituzte barne. + unknown_instance: Ez dago domeinu honen erregistrorik zerbitzarian orain. invites: deactivate_all: Desgaitu guztiak filter: @@ -1093,6 +1094,7 @@ eu: functional: Zure kontua guztiz erabilgarri dago. pending: Zure eskaera gainbegiratzeko dago oraindik. Honek denbora behar lezake. Zure eskaera onartzen bada e-mail bat jasoko duzu. redirecting_to: Zure kontua ez dago aktibo orain %{acct} kontura birbideratzen duelako. + self_destruct: "%{domain} domeinua itxiko denez, konturako sarbide mugatua soilik izango duzu." view_strikes: Ikusi zure kontuaren aurkako neurriak too_fast: Formularioa azkarregi bidali duzu, saiatu berriro. use_security_key: Erabili segurtasun gakoa @@ -1564,6 +1566,9 @@ eu: over_daily_limit: 'Egun horretarako programatutako bidalketa kopuruaren muga gainditu duzu: %{limit}' over_total_limit: 'Programatutako bidalketa kopuruaren muga gainditu duzu: %{limit}' too_soon: Programatutako data etorkizunean egon behar du + self_destruct: + lead_html: Zoritxarrez, %{domain} betirako itxiko da. Kontu bat baduzu bertan, ezin izango duzu erabiltzen jarraitu, baina, oraindik zure datuen babeskopia bat eska dezakezu. + title: Zerbitzari hau ixtear dago sessions: activity: Azken jarduera browser: Nabigatzailea @@ -1733,6 +1738,10 @@ eu: month: "%Y(e)ko %b" time: "%H:%M" with_time_zone: "%Y(e)ko %b %d, %H:%M %Z" + translation: + errors: + quota_exceeded: Zerbitzari osoko itzulpen-zerbitzuaren erabileraren kuota gainditu da. + too_many_requests: Itzulpen-zerbitzurako eskaera gehiegi egon dira berriki. two_factor_authentication: add: Gehitu disable: Desgaitu diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 09d2a68779..c8c17b853a 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -534,6 +534,7 @@ fi: total_reported: Niitä koskevat raportit total_storage: Medialiitteet totals_time_period_hint_html: Alla näkyvät yhteenlasketut tiedot sisältävät koko ajan. + unknown_instance: Tällä palvelimella ei ole tällä hetkellä tähän verkkotunnukseen liittyviä tietueita. invites: deactivate_all: Poista kaikki käytöstä filter: @@ -1101,6 +1102,7 @@ fi: functional: Tilisi on täysin toiminnassa. pending: Hakemuksesi odottaa henkilökuntamme tarkastusta. Tämä voi kestää jonkin aikaa. Saat sähköpostiviestin, jos hakemuksesi hyväksytään. redirecting_to: Tilisi ei ole aktiivinen, koska se ohjaa tällä hetkellä tilille %{acct}. + self_destruct: Koska %{domain} sulkeutuu, voit käyttää tiliäsi vain rajoitetusti. view_strikes: Näytä tiliäsi koskevia aiempia varoituksia too_fast: Lomake lähetettiin liian nopeasti, yritä uudelleen. use_security_key: Käytä suojausavainta @@ -1570,6 +1572,9 @@ fi: over_daily_limit: Olet ylittänyt %{limit} ajoitetun julkaisun rajan tälle päivälle over_total_limit: Olet ylittänyt %{limit} ajoitetun julkaisun rajan too_soon: Ajoitetun päiväyksen pitää olla tulevaisuudessa + self_destruct: + lead_html: Valitettavasti %{domain} sulkeutuu pysyvästi. Jos sinulla on siellä tili, et voi jatkaa sen käyttöä mutta voit yhä pyytää varmuuskopiota tiedoistasi. + title: Tämä palvelin sulkeutuu sessions: activity: Viimeisin toiminta browser: Selain diff --git a/config/locales/fo.yml b/config/locales/fo.yml index 3c7fe4d997..bd716fa384 100644 --- a/config/locales/fo.yml +++ b/config/locales/fo.yml @@ -534,6 +534,7 @@ fo: total_reported: Meldingar um tey total_storage: Viðheftir miðlar totals_time_period_hint_html: Við í samanteljingunum niðanfyri eru dátur frá byrjan av. + unknown_instance: Í løtuni er hetta navnaøkið ikki skrásett á hesum ambætaranum. invites: deactivate_all: Ger allar óvirknar filter: @@ -1101,6 +1102,7 @@ fo: functional: Konta tín er fult virkin. pending: Umsókn tín verður eftirkannað av okkara starvsfeløgum. Tað kann taka eina løtu. Tú móttekur eitt teldubræv, um umsóknin er góðkend. redirecting_to: Konta tín er óvirkin, tí í løtuni verður hon víðaribeind til %{acct}. + self_destruct: Av tí at %{domain} er í ferð við at lukka, fært tú einans avmarkaða atgongd til tína kontu. view_strikes: Vís eldri atsóknir móti tíni kontu too_fast: Oyðublaðið innsent ov skjótt, royn aftur. use_security_key: Brúka trygdarlykil @@ -1570,6 +1572,9 @@ fo: over_daily_limit: Tú er komin at markinum, sum er %{limit} skrálagdir postar, í dag over_total_limit: Tú er komin at markinum, sum er %{limit} skrálagdir postar too_soon: Ætlanardagfestingin má vera í framtíðini + self_destruct: + lead_html: Tíverri, %{domain} er í ferð við at blíva lukkað niður med alla. Um tú hevði eina kontu har, so ber ikki til framhaldandi at brúka hana, men tú kann framvegis biðja um trygdaravrit av tínum dátum. + title: Hesin ambætarin er í ferð við at lukka sessions: activity: Seinasta virksemi browser: Kagi diff --git a/config/locales/fr-QC.yml b/config/locales/fr-QC.yml index b9605f3a6a..15e0fa6096 100644 --- a/config/locales/fr-QC.yml +++ b/config/locales/fr-QC.yml @@ -534,6 +534,7 @@ fr-QC: total_reported: Signalements à leur sujet total_storage: Attachements de média totals_time_period_hint_html: Les totaux affichés ci-dessous incluent des données sans limite de temps. + unknown_instance: Il n’y a actuellement aucune trace de ce domaine sur ce serveur. invites: deactivate_all: Tout désactiver filter: @@ -1101,6 +1102,7 @@ fr-QC: functional: Votre compte est entièrement opérationnel. pending: Votre demande est en attente d'examen par notre personnel. Cela peut prendre un certain temps. Vous recevrez un courriel si votre demande est approuvée. redirecting_to: Votre compte est inactif car il est actuellement redirigé vers %{acct}. + self_destruct: Comme %{domain} est en train de fermer, vous n’aurez qu’un accès limité à votre compte. view_strikes: Voir les sanctions précédemment appliquées à votre compte too_fast: Formulaire envoyé trop rapidement, veuillez réessayer. use_security_key: Utiliser la clé de sécurité @@ -1570,6 +1572,9 @@ fr-QC: over_daily_limit: Vous avez dépassé la limite de %{limit} messages planifiés par jour over_total_limit: Vous avez dépassé la limite de %{limit} messages planifiés too_soon: La date planifiée doit être dans le futur + self_destruct: + lead_html: Malheureusement, %{domain} ferme définitivement. Si vous y aviez un compte, vous ne pourrez pas continuer à l’utiliser, mais vous pouvez toujours demander une sauvegarde de vos données. + title: Ce serveur est en cours de fermeture sessions: activity: Dernière activité browser: Navigateur diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 821ef39dbe..1616f76726 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -534,6 +534,7 @@ fr: total_reported: Signalements à leur sujet total_storage: Attachements de média totals_time_period_hint_html: Les totaux affichés ci-dessous incluent des données sans limite de temps. + unknown_instance: Il n’y a actuellement aucune trace de ce domaine sur ce serveur. invites: deactivate_all: Tout désactiver filter: @@ -1101,6 +1102,7 @@ fr: functional: Votre compte est entièrement opérationnel. pending: Votre demande est en attente d'examen par notre personnel. Cela peut prendre un certain temps. Vous recevrez un courriel si votre demande est approuvée. redirecting_to: Votre compte est inactif car il est actuellement redirigé vers %{acct}. + self_destruct: Comme %{domain} est en train de fermer, vous n’aurez qu’un accès limité à votre compte. view_strikes: Voir les sanctions précédemment appliquées à votre compte too_fast: Formulaire envoyé trop rapidement, veuillez réessayer. use_security_key: Utiliser la clé de sécurité @@ -1570,6 +1572,9 @@ fr: over_daily_limit: Vous avez dépassé la limite de %{limit} messages planifiés par jour over_total_limit: Vous avez dépassé la limite de %{limit} messages planifiés too_soon: La date planifiée doit être dans le futur + self_destruct: + lead_html: Malheureusement, %{domain} ferme définitivement. Si vous y aviez un compte, vous ne pourrez pas continuer à l’utiliser, mais vous pouvez toujours demander une sauvegarde de vos données. + title: Ce serveur est en cours de fermeture sessions: activity: Dernière activité browser: Navigateur diff --git a/config/locales/fy.yml b/config/locales/fy.yml index 41ad60cf69..a7ab89fc87 100644 --- a/config/locales/fy.yml +++ b/config/locales/fy.yml @@ -534,6 +534,7 @@ fy: total_reported: Rapportaazjes oer harren total_storage: Mediabylagen totals_time_period_hint_html: De hjirûnder toande totalen befetsje gegevens sûnt it begjin. + unknown_instance: Der binne op dit stuit gjin gegevens fan dit domein op dizze server. invites: deactivate_all: Alles deaktivearje filter: @@ -1101,6 +1102,7 @@ fy: functional: Jo account kin folslein brûkt wurde. pending: Jo oanfraach moat noch beoardiele wurde troch ien fan ús meiwurkers. Dit kin miskien efkes duorje. Jo ûntfangt in e-mailberjocht wannear’t jo oanfraach goedkard is. redirecting_to: Jo account is ynaktyf, omdat it op dit stuit trochferwezen wurdt nei %{acct}. + self_destruct: Omdat %{domain} sluten sil, krije jo mar beheind tagong ta jo account. view_strikes: Besjoch de earder troch moderatoaren fêststelde skeiningen dy’t jo makke hawwe too_fast: Formulier is te fluch yntsjinne. Probearje it nochris. use_security_key: Befeiligingskaai brûke @@ -1570,6 +1572,9 @@ fy: over_daily_limit: Jo binne oer de limyt fan %{limit} yn te plannen berjochten foar hjoed over_total_limit: Jo binne oer de limyt fan %{limit} yn te plannen berjochten too_soon: De datum foar it ynplande berjocht moat yn de takomst lizze + self_destruct: + lead_html: Spitigernôch sil %{domain} permanint ôfslute. As jo dêr in account hiene, kinne jo dizze net mear brûke, mar jo kinne noch hieltyd in reservekopy fan jo gegevens opfreegje. + title: Deze server sil ôfslute sessions: activity: Lêst warber browser: Browser diff --git a/config/locales/hu.yml b/config/locales/hu.yml index f9eafb9081..b28e00892e 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -534,6 +534,7 @@ hu: total_reported: Bejelentés róluk total_storage: Média csatolmány totals_time_period_hint_html: Az alább mutatott összesítések minden eddigi adatot tartalmaznak. + unknown_instance: Jelenleg nincs rekord erről a domainről ezen a kiszolgálón. invites: deactivate_all: Összes deaktiválása filter: diff --git a/config/locales/is.yml b/config/locales/is.yml index c3608a7359..f5d89eca66 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -534,6 +534,7 @@ is: total_reported: Kærur um þá total_storage: Myndaviðhengi totals_time_period_hint_html: Samtölurnar sem birtar eru hér fyrir neðan innihalda gögn frá upphafi. + unknown_instance: Í augnablikinu er engin færsla um þetta lén á þessum netþjóni. invites: deactivate_all: Gera allt óvirkt filter: @@ -1105,6 +1106,7 @@ is: functional: Notandaaðgangurinn þinn er með fulla virkni. pending: Umsóknin þín bíður eftir að starfsfólkið okkar fari yfir hana. Það gæti tekið nokkurn tíma. Þú munt fá tölvupóst ef umsóknin er samþykkt. redirecting_to: Notandaaðgangurinn þinn er óvirkur vegna þess að hann endurbeinist á %{acct}. + self_destruct: Þar sem %{domain} er að hætta starfsemi, muntu aðeins halda takmörkuðum aðgangi að aðgangnum þínum. view_strikes: Skoða fyrri bönn notandaaðgangsins þíns too_fast: Innfyllingarform sent inn of hratt, prófaðu aftur. use_security_key: Nota öryggislykil @@ -1574,6 +1576,9 @@ is: over_daily_limit: Þú hefur farið fram úr hámarkinu með %{limit} áætlaðar færslur fyrir þennan dag over_total_limit: Þú hefur farið fram úr hámarkinu með %{limit} áætlaðar færslur too_soon: Áætluð dagsetning verður að vera í framtíðinni + self_destruct: + lead_html: Því miður, %{domain} er að hætta starfsemi endanlega. Ef þú varst með aðgang þar, muntu ekki geta haldið áfram að nota hann, en þú getur áfram beðið um afrit af gögnunum þínum. + title: Þessi netþjónn er að hætta starfsemi sessions: activity: Síðasta virkni browser: Vafri diff --git a/config/locales/it.yml b/config/locales/it.yml index 2438e7e62a..6e41389bc5 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -534,6 +534,7 @@ it: total_reported: Segnalazioni su di loro total_storage: Media allegati totals_time_period_hint_html: I totali sotto visualizzati includono i dati per tutti i tempi. + unknown_instance: Al momento non c'è alcun documento di questo dominio su questo server. invites: deactivate_all: Disattiva tutto filter: @@ -1103,6 +1104,7 @@ it: functional: Il tuo profilo è completamente operativo. pending: La tua richiesta è in attesa di esame da parte del nostro staff. Potrebbe richiedere un po' di tempo. Riceverai una e-mail se la richiesta è approvata. redirecting_to: Il tuo account è inattivo perché attualmente reindirizza a %{acct}. + self_destruct: Poiché %{domain} sta chiudendo, otterrai solo un accesso limitato al tuo account. view_strikes: Visualizza le sanzioni precedenti prese nei confronti del tuo account too_fast: Modulo inviato troppo velocemente, riprova. use_security_key: Usa la chiave di sicurezza @@ -1572,6 +1574,9 @@ it: over_daily_limit: Hai superato il limite di %{limit} post programmati per questo giorno over_total_limit: Hai superato il limite di %{limit} post programmati too_soon: La data di pubblicazione deve essere nel futuro + self_destruct: + lead_html: Sfortunatamente, %{domain} sta chiudendo definitivamente. Se hai un account lì, non potrai continuare a usarlo, ma puoi ancora richiedere un backup dei tuoi dati. + title: Questo server sta chiudendo sessions: activity: Ultima attività browser: Browser diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 10bc59812f..9df32b09dd 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -523,6 +523,7 @@ ja: total_reported: 通報合計 total_storage: 添付されたメディア totals_time_period_hint_html: 以下に表示される合計には、すべての時間のデータが含まれています。 + unknown_instance: 今のところ、このドメインについては何も記録されていません。 invites: deactivate_all: すべて無効化 filter: @@ -1083,6 +1084,7 @@ ja: functional: アカウントは完全に機能しています。 pending: あなたの申請は現在サーバー管理者による審査待ちです。これにはしばらくかかります。申請が承認されるとメールが届きます。 redirecting_to: アカウントは%{acct}に引っ越し設定されているため非アクティブになっています。 + self_destruct: "%{domain} は閉鎖されるため、今後このアカウントでは限られた操作しかできません。" view_strikes: 過去のストライクを表示 too_fast: フォームの送信が速すぎます。もう一度やり直してください。 use_security_key: セキュリティキーを使用 @@ -1544,6 +1546,9 @@ ja: over_daily_limit: その日予約できる投稿数 %{limit}を超えています over_total_limit: 予約できる投稿数 %{limit}を超えています too_soon: より先の時間を指定してください + self_destruct: + lead_html: 残念ながら、%{domain} は恒久的に閉鎖されます。ここにお持ちだったアカウントを今後使うことはできませんが、これまでのデータのバックアップを要求することはまだ可能です。 + title: このサーバーは閉鎖されます sessions: activity: 最後のアクティビティ browser: ブラウザ diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 720d65731b..bf8e050f8d 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -525,6 +525,7 @@ ko: total_reported: 이들에 대한 신고 total_storage: 미디어 첨부 totals_time_period_hint_html: 아래에 표시된 총계에는 모든 시간에 대한 데이터가 포함됩니다. + unknown_instance: 현재 이곳 서버에서 해당 도메인의 레코드는 없습니다. invites: deactivate_all: 전부 비활성화 filter: @@ -1085,6 +1086,7 @@ ko: functional: 계정이 완벽히 작동합니다. pending: 당신의 가입 신청은 스태프의 검사를 위해 대기 중입니다. 시간이 조금 걸릴 수 있습니다. 가입 신청이 승인되면 이메일을 받게 됩니다. redirecting_to: 계정이 %{acct}로 리다이렉트 중이기 때문에 비활성 상태입니다. + self_destruct: "%{domain} 도메인을 폐쇄하며, 계정에는 제한된 접근만 할 수 있습니다." view_strikes: 내 계정에 대한 과거 중재 기록 보기 too_fast: 너무 빠르게 양식이 제출되었습니다, 다시 시도하세요. use_security_key: 보안 키 사용 @@ -1546,6 +1548,9 @@ ko: over_daily_limit: 그 날짜에 대한 %{limit}개의 예약 게시물 제한을 초과합니다 over_total_limit: 예약 게시물 제한 %{limit}을 초과합니다 too_soon: 예약 날짜는 미래여야 합니다 + self_destruct: + lead_html: 안타깝게도, %{domain} 도메인을 영구히 폐쇄합니다. 이곳의 계정을 가졌다면, 이제 이용할 수 없으며, 당분간 백업 데이터를 요청할 수 있습니다. + title: 이곳 서버를 폐쇄 sessions: activity: 최근 활동 browser: 브라우저 diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 3e9d502ae9..f107cbeca1 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -534,6 +534,7 @@ nl: total_reported: Rapportages over hun total_storage: Mediabijlagen totals_time_period_hint_html: De hieronder getoonde totalen bevatten gegevens sinds het begin. + unknown_instance: Er zijn momenteel geen gegevens van dit domein op deze server. invites: deactivate_all: Alles deactiveren filter: @@ -1101,6 +1102,7 @@ nl: functional: Jouw account kan in diens geheel gebruikt worden. pending: Jouw aanvraag moet nog worden beoordeeld door een van onze medewerkers. Dit kan misschien eventjes duren. Je ontvangt een e-mail wanneer jouw aanvraag is goedgekeurd. redirecting_to: Jouw account is inactief omdat het momenteel wordt doorverwezen naar %{acct}. + self_destruct: Omdat %{domain} gaat sluiten, krijgt u slechts beperkt toegang tot uw account. view_strikes: Bekijk de eerder door moderatoren vastgestelde overtredingen die je hebt gemaakt too_fast: Formulier is te snel ingediend. Probeer het nogmaals. use_security_key: Beveiligingssleutel gebruiken @@ -1570,6 +1572,9 @@ nl: over_daily_limit: Je hebt de limiet van %{limit} in te plannen berichten voor vandaag overschreden over_total_limit: Je hebt de limiet van %{limit} in te plannen berichten overschreden too_soon: De datum voor het ingeplande bericht moet in de toekomst liggen + self_destruct: + lead_html: Helaas gaat %{domain} permanent afsluiten. Als u daar een account had, kunt u deze niet meer gebruiken, maar u kunt nog steeds een back-up van uw gegevens opvragen. + title: Deze server gaat afsluiten sessions: activity: Laatst actief browser: Webbrowser diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 3f585863a4..08df6e7fc9 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -556,6 +556,7 @@ pl: total_reported: Zgłoszenia dotyczące ich total_storage: Załączniki multimedialne totals_time_period_hint_html: Poniższe sumy zawierają dane od początku serwera. + unknown_instance: Obecnie ta domena jest nieznana na tym serwerze. invites: deactivate_all: Unieważnij wszystkie filter: @@ -1137,6 +1138,7 @@ pl: functional: Twoje konto jest w pełni funkcjonalne. pending: Twoje zgłoszenie czeka na zatwierdzenie przez nas. Może to trochę potrwać. Jeżeli zgłoszenie zostanie przyjęte, otrzymasz wiadomość e-mail. redirecting_to: Twoje konto jest nieaktywne, ponieważ obecnie przekierowuje je na %{acct}. + self_destruct: "%{domain} jest zamykane, dostęp do konta będzie ograniczony." view_strikes: Zobacz dawne ostrzeżenia nałożone na twoje konto too_fast: Zbyt szybko przesłano formularz, spróbuj ponownie. use_security_key: Użyj klucza bezpieczeństwa @@ -1622,6 +1624,9 @@ pl: over_daily_limit: Przekroczyłeś(-aś) limit %{limit} zaplanowanych wpisów na ten dzień over_total_limit: Przekroczyłeś(-aś) limit %{limit} zaplanowanych wpisów too_soon: Zaplanowana data musi wypadać w przyszłości + self_destruct: + lead_html: Niestety, %{domain} jest permanentnie zamykane. Konta z tego serwera nie będą dostępne, ale można jeszcze odzyskać kopię zapasową danych. + title: Ten serwer jest zamykany sessions: activity: Ostatnia aktywność browser: Przeglądarka diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 114a486e82..da79c7555c 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1101,6 +1101,7 @@ pt-BR: functional: Sua conta está totalmente operacional. pending: Sua solicitação está com revisão pendente por parte de nossa equipe. Você receberá um e-mail se ela for aprovada. redirecting_to: Sua conta está inativa porque atualmente está redirecionando para %{acct}. + self_destruct: Como %{domain} está se encerrando, você só terá acesso limitado à sua conta. view_strikes: Veja os avisos anteriores em relação à sua conta too_fast: O formulário foi enviado muito rapidamente, tente novamente. use_security_key: Usar chave de segurança @@ -1570,6 +1571,9 @@ pt-BR: over_daily_limit: Você excedeu o limite de %{limit} publicações agendadas para esse dia over_total_limit: Você excedeu o limite de %{limit} publicações agendadas too_soon: A data agendada precisa ser no futuro + self_destruct: + lead_html: Infelizmente, %{domain} está se encerrando de forma permanente. Se você tem uma conta lá, não poderá continuar a usá-la, mas ainda pode solicitar uma cópia dos seus dados. + title: Este servidor está sendo fechado sessions: activity: Última atividade browser: Navegador diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index f4c363324c..62b497d70b 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -534,6 +534,7 @@ pt-PT: total_reported: Denúncias sobre eles total_storage: Anexos de media totals_time_period_hint_html: Os totais exibidos abaixo incluem dados referentes ao tempo total. + unknown_instance: Atualmente não há registo deste domínio neste servidor. invites: deactivate_all: Desativar todos filter: @@ -1101,6 +1102,7 @@ pt-PT: functional: A sua conta está totalmente operacional. pending: A sua inscrição está pendente de revisão pela nossa equipa. Isso pode demorar algum tempo. Receberá um e-mail se a sua conta for aprovada. redirecting_to: A sua conta está inativa porque está atualmente a ser redirecionada para %{acct}. + self_destruct: Como %{domain} vai fechar, só terá acesso limitado à sua conta. view_strikes: Veja as reprimendas anteriores sobre a sua conta too_fast: Formulário enviado demasiado rapidamente, tente novamente. use_security_key: Usar chave de segurança @@ -1570,6 +1572,9 @@ pt-PT: over_daily_limit: Excedeste o limite de %{limit} publicações agendadas para esse dia over_total_limit: Tu excedeste o limite de %{limit} publicações agendadas too_soon: A data de agendamento tem de ser futura + self_destruct: + lead_html: Infelizmente, %{domain} vai fechar definitivamente. Se lá tinha conta, não pode continuar a usá-la, mas ainda pode pedir uma cópia dos seus dados. + title: Este servidor vai fechar sessions: activity: Última atividade browser: Navegador diff --git a/config/locales/simple_form.zh-TW.yml b/config/locales/simple_form.zh-TW.yml index 4580e772fc..be21f862f3 100644 --- a/config/locales/simple_form.zh-TW.yml +++ b/config/locales/simple_form.zh-TW.yml @@ -116,7 +116,7 @@ zh-TW: sign_up_requires_approval: 新註冊申請需要先經過您的審核 severity: 請選擇將如何處理來自這個 IP 位址的請求 rule: - text: 說明使用者在此伺服器上需遵守的規則或條款。試著維持各項條款簡短而明瞭。 + text: 說明使用者於此伺服器上需遵守的規則或條款。試著維持各項條款簡短而明瞭。 sessions: otp: 請輸入產生自您手機 App 的兩階段驗證碼,或輸入其中一個備用驗證碼: webauthn: 如果它是 USB 安全金鑰的話,請確認已正確插入,如有需要請觸擊。 diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 35230ceddb..00c696f6fd 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1,7 +1,7 @@ --- sl: about: - about_mastodon_html: 'Družbeno omrežje prihodnosti: brez oglasov, brez nadzora korporacij, etično oblikovanje in decentralizacija! Ohranite lastništvo nad svojimi podatki z Mastodonom!' + about_mastodon_html: 'Družbeno omrežje prihodnosti: brez oglasov, brez nadzora korporacij, etično oblikovano in decentralizirano! Ohranite lastništvo nad svojimi podatki z Mastodonom!' contact_missing: Ni nastavljeno contact_unavailable: Ni na voljo hosted_on: Mastodon gostuje na %{domain} diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml index 82fbbff49e..37166bc03b 100644 --- a/config/locales/sr-Latn.yml +++ b/config/locales/sr-Latn.yml @@ -545,6 +545,7 @@ sr-Latn: total_reported: Prijave vezane za njih total_storage: Multimedijalni prilozi totals_time_period_hint_html: Ukupne vrednosti prikazane ispod uključuju podatke za sva vremena. + unknown_instance: Trenutno ne postoji zapis o ovom domenu na ovom serveru. invites: deactivate_all: Deaktiviraj sve filter: @@ -1119,6 +1120,7 @@ sr-Latn: functional: Vaš nalog je potpuno operativan. pending: Vaš zahtev je na čekanju za pregled od strane našeg osoblja. Ovo može potrajati neko vreme. Primićete imejl poruku ukoliko Vam zahtev bude odobren. redirecting_to: Vaš nalog je neaktivan jer preusmerava na %{acct}. + self_destruct: Pošto se %{domain} zatvara, dobićete samo ograničen pristup svom nalogu. view_strikes: Pogledajte prethodne prestupe upisane na Vaše ime too_fast: Formular je podnet prebrzo, pokušajte ponovo. use_security_key: Koristite sigurnosni ključ @@ -1596,6 +1598,9 @@ sr-Latn: over_daily_limit: Prekoračili ste granicu od %{limit} planiranih objava za danas over_total_limit: Prekoračili ste granicu od %{limit} planiranih objava too_soon: Planirani datum mora biti u budućnosti + self_destruct: + lead_html: Nažalost, %{domain} se trajno zatvara. Ako ste tamo imali nalog, nećete moći da nastavite da ga koristite, ali i dalje možete da zatražite rezervnu kopiju svojih podataka. + title: Ovaj server se zatvara sessions: activity: Poslednja aktivnost browser: Veb čitač diff --git a/config/locales/sr.yml b/config/locales/sr.yml index ffddab8697..ba269488e4 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -545,6 +545,7 @@ sr: total_reported: Пријаве везане за њих total_storage: Мултимедијални прилози totals_time_period_hint_html: Укупне вредности приказане испод укључују податке за сва времена. + unknown_instance: Тренутно не постоји запис о овом домену на овом серверу. invites: deactivate_all: Деактивирај све filter: @@ -1119,6 +1120,7 @@ sr: functional: Ваш налог је потпуно оперативан. pending: Ваш захтев је на чекању за преглед од стране нашег особља. Ово може потрајати неко време. Примићете имејл поруку уколико Вам захтев буде одобрен. redirecting_to: Ваш налог је неактиван јер преусмерава на %{acct}. + self_destruct: Пошто се %{domain} затвара, добићете само ограничен приступ свом налогу. view_strikes: Погледајте претходне преступе уписане на Ваше име too_fast: Формулар је поднет пребрзо, покушајте поново. use_security_key: Користите сигурносни кључ @@ -1596,6 +1598,9 @@ sr: over_daily_limit: Прекорачили сте границу од %{limit} планираних објава за данас over_total_limit: Прекорачили сте границу од %{limit} планираних објава too_soon: Планирани датум мора бити у будућности + self_destruct: + lead_html: Нажалост, %{domain} се трајно затвара. Ако сте тамо имали налог, нећете моћи да наставите да га користите, али и даље можете да затражите резервну копију својих података. + title: Овај сервер се затвара sessions: activity: Последња активност browser: Веб читач diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 3194d7a8c2..b913ee0cd8 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1101,6 +1101,7 @@ sv: functional: Ditt konto fungerar som det ska. pending: Din ansökan inväntar granskning. Detta kan ta tid. Du kommer att få ett e-postmeddelande om din ansökan godkänns. redirecting_to: Ditt konto är inaktivt eftersom det för närvarande dirigeras om till %{acct}. + self_destruct: Eftersom %{domain} håller på att stängas ned, kommer du endast att ha begränsad tillgång till ditt konto. view_strikes: Visa tidigare prickar på ditt konto too_fast: Formuläret har skickats för snabbt, försök igen. use_security_key: Använd säkerhetsnyckel @@ -1570,6 +1571,8 @@ sv: over_daily_limit: Du har överskridit dygnsgränsen på %{limit} schemalagda inlägg over_total_limit: Du har överskridit gränsen på %{limit} schemalagda inlägg too_soon: Schemaläggningsdatumet måste vara i framtiden + self_destruct: + lead_html: Tyvärr stänger %{domain} för gott. Om du hade ett konto där kommer du inte längre kunna använda det, men du kan fortfarande begära en säkerhetskopia av din data. sessions: activity: Senaste aktivitet browser: Webbläsare diff --git a/config/locales/th.yml b/config/locales/th.yml index 781c3df29c..d8ab63730b 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -523,6 +523,7 @@ th: total_reported: รายงานเกี่ยวกับเขา total_storage: ไฟล์แนบสื่อ totals_time_period_hint_html: ยอดรวมที่แสดงด้านล่างรวมข้อมูลสำหรับเวลาทั้งหมด + unknown_instance: ไม่มีระเบียนของโดเมนนี้ในเซิร์ฟเวอร์นี้ในปัจจุบัน invites: deactivate_all: ปิดใช้งานทั้งหมด filter: @@ -1083,6 +1084,7 @@ th: functional: บัญชีของคุณทำงานได้อย่างเต็มที่ pending: ใบสมัครของคุณกำลังรอดำเนินการตรวจทานโดยพนักงานของเรา นี่อาจใช้เวลาสักครู่ คุณจะได้รับอีเมลหากมีการอนุมัติใบสมัครของคุณ redirecting_to: บัญชีของคุณไม่ได้ใช้งานเนื่องจากบัญชีกำลังเปลี่ยนเส้นทางไปยัง %{acct} ในปัจจุบัน + self_destruct: เนื่องจาก %{domain} กำลังปิดตัวลง คุณจะได้รับการเข้าถึงบัญชีของคุณแบบจำกัดเท่านั้น view_strikes: ดูการดำเนินการที่ผ่านมาต่อบัญชีของคุณ too_fast: ส่งแบบฟอร์มเร็วเกินไป ลองอีกครั้ง use_security_key: ใช้กุญแจความปลอดภัย @@ -1544,6 +1546,9 @@ th: over_daily_limit: คุณมีโพสต์ที่จัดกำหนดการไว้เกินขีดจำกัดที่ %{limit} สำหรับวันนี้แล้ว over_total_limit: คุณมีโพสต์ที่จัดกำหนดการไว้เกินขีดจำกัดที่ %{limit} แล้ว too_soon: วันที่จัดกำหนดการต้องอยู่ในอนาคต + self_destruct: + lead_html: น่าเสียดาย %{domain} กำลังปิดตัวลงอย่างถาวร หากคุณมีบัญชีที่นั่น คุณจะไม่สามารถใช้บัญชีต่อไปได้ แต่คุณยังสามารถขอข้อมูลสำรองของข้อมูลของคุณ + title: เซิร์ฟเวอร์นี้กำลังปิดตัวลง sessions: activity: กิจกรรมล่าสุด browser: เบราว์เซอร์ diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 862667f3ce..a66005a80d 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -534,6 +534,7 @@ tr: total_reported: Onlar hakkında şikayetler total_storage: Medya ekleri totals_time_period_hint_html: Aşağıdaki gösterilen toplamlar, gelmiş geçmiş tüm veriyi içeriyor. + unknown_instance: Bu sunucuda bu alan adının şu an bir kaydı yok. invites: deactivate_all: Tümünü devre dışı bırak filter: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 93cdc04174..afa85ae67b 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -556,6 +556,7 @@ uk: total_reported: Звітів про них total_storage: Мультимедійні вкладення totals_time_period_hint_html: Нижче зображена статистика за все існування сервера. + unknown_instance: Наразі на цьому сервері немає записів цього домену. invites: deactivate_all: Деактивувати всі filter: @@ -1137,6 +1138,7 @@ uk: functional: Ваш обліковий запис повністю робочий. pending: Ваша заява очікує на розгляд нашим персоналом. Це може зайняти деякий час. Ви отримаєте електронний лист, якщо ваша заява буде схвалена. redirecting_to: Ваш обліковий запис наразі неактивний, тому що він перенаправлений до %{acct}. + self_destruct: Оскільки %{domain} закривається, ви отримаєте тільки обмежений доступ до вашого облікового запису. view_strikes: Переглянути попередні попередження вашому обліковому запису too_fast: Форму подано занадто швидко, спробуйте ще раз. use_security_key: Використовувати ключ безпеки @@ -1622,6 +1624,9 @@ uk: over_daily_limit: Ви перевищили ліміт в %{limit} запланованих дописів на сьогодні over_total_limit: Ви перевищили ліміт в %{limit} запланованих дописів too_soon: Запланована дата має бути в майбутньому + self_destruct: + lead_html: На жаль, %{domain} остаточно закривається. Якщо у вас є обліковий запис там, ви не зможете продовжити його використання, але ви все ще можете надіслати запит на резервну копію даних. + title: Сервер закривається sessions: activity: Остання активність browser: Браузер diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 190c811dfd..eb9c67b9be 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -523,6 +523,7 @@ zh-CN: total_reported: 关于对方的举报 total_storage: 媒体文件 totals_time_period_hint_html: 下方显示的总数来自全部历史数据。 + unknown_instance: 本实例目前没有此域名的记录。 invites: deactivate_all: 撤销所有邀请链接 filter: diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 626cf22e71..236b2d0cf9 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -523,6 +523,7 @@ zh-HK: total_reported: 關於他們的舉報 total_storage: 媒體附件 totals_time_period_hint_html: 下面顯示的總數包括所有時間的數據。 + unknown_instance: 此伺服器目前沒有這個網域的紀錄。 invites: deactivate_all: 全部停用 filter: @@ -1083,6 +1084,7 @@ zh-HK: functional: 你的帳號已完全投入使用。 pending: 管理員正在處理你的申請。可能會需要一點時間處理。我們將會在申請被批準的時候馬上寄電郵給你。 redirecting_to: 你的帳戶因為正在重新定向到 %{acct},所以暫時被停用。 + self_destruct: 由於 %{domain} 即將停止服務,你只能有限存取你的帳號。 view_strikes: 查看針對你的帳戶的過往警告 too_fast: 你太快遞交了,請再試一次。 use_security_key: 使用安全密鑰裝置 @@ -1544,6 +1546,9 @@ zh-HK: over_daily_limit: 你已經超越了當天排定發文的限額 (%{limit}) over_total_limit: 你已經超越了排定發文的限額 (%{limit}) too_soon: 不可以改變過去哦,嘟文只可以排定在未來 + self_destruct: + lead_html: 很遺憾,%{domain} 即將永久停止服務。如果你在該處擁有帳號,你將無法繼續使用它,但你仍然可以要求備份你的數據。 + title: 這個伺服器即將停止服務 sessions: activity: 最近活動 browser: 瀏覽器 @@ -1706,6 +1711,7 @@ zh-HK: default: "%Y年%-m月%d日 %H:%M" month: "%b %Y" time: "%H:%M" + with_time_zone: "%b %d, %Y, %H:%M %Z" translation: errors: quota_exceeded: 已超出伺服器範圍的翻譯服務之使用配額。 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index fd93481509..28507b076a 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -523,6 +523,7 @@ zh-TW: total_reported: 關於他們的檢舉報告 total_storage: 多媒體附加檔案 totals_time_period_hint_html: 以下顯示之總和包含所有時間的資料。 + unknown_instance: 此伺服器目前沒有這個網域的紀錄。 invites: deactivate_all: 全部停用 filter: @@ -988,7 +989,7 @@ zh-TW: created_msg: 成功建立別名。您可以自舊帳號開始轉移。 deleted_msg: 成功移除別名。您將無法再由舊帳號轉移至目前的帳號。 empty: 您目前沒有任何別名。 - hint_html: 如果想由其他帳號轉移至此帳號,您可以在此處新增別名,稍後系統將容許您將跟隨者由舊帳號轉移至此。此項作業是無害且可復原的帳號的遷移程序需要在舊帳號啟動。 + hint_html: 如果想由其他帳號轉移至此帳號,您可以於此處新增別名,稍後系統將容許您將跟隨者由舊帳號轉移至此。此項作業是無害且可復原的帳號的遷移程序需要在舊帳號啟動。 remove: 取消連結別名 appearance: advanced_web_interface: 進階網頁介面 @@ -1073,7 +1074,7 @@ zh-TW: new_confirmation_instructions_sent: 您將於幾分鐘之內收到新的包含確認連結的電子郵件! title: 請檢查您的收件匣 sign_in: - preamble_html: 請使用您於 %{domain} 的帳號密碼登入。若您的帳號託管於其他伺服器,您將無法在此登入。 + preamble_html: 請使用您於 %{domain} 的帳號密碼登入。若您的帳號託管於其他伺服器,您將無法於此登入。 title: 登入 %{domain} sign_up: manual_review: "%{domain} 上的註冊由我們的管理員進行人工審核。為協助我們處理您的註冊,請寫一些關於您自己的資訊以及您想要在 %{domain} 上註冊帳號的原因。" @@ -1085,6 +1086,7 @@ zh-TW: functional: "您的帳號可以正常使用了。🎉" pending: 管管們正在處理您的申請,這可能需要一點時間處理。我們將於申請通過後以電子郵件方式通知您。 redirecting_to: 您的帳號因目前重定向至 %{acct} 而被停用。 + self_destruct: 由於 %{domain} 即將停止服務,您只能有限地存取您的帳號。 view_strikes: 檢視針對您帳號過去的警示 too_fast: 送出表單的速度太快跟不上,請稍後再試。 use_security_key: 使用安全金鑰 @@ -1294,7 +1296,7 @@ zh-TW: following_html: 您將要 跟隨%{filename} 中之 %{total_items} 個帳號。 lists_html: 您將自 %{filename} 新增 %{total_items} 個帳號至您的列表。若不存在列表用以新增帳號,則會建立新列表。 muting_html: 您將要 靜音%{filename} 中之 %{total_items} 個帳號。 - preface: 您可以在此匯入您在其他伺服器所匯出的資料檔,包括跟隨的使用者、封鎖的使用者名單。 + preface: 您能於此匯入您在其他伺服器所匯出的資料檔,包括跟隨中的使用者、封鎖的使用者名單等。 recent_imports: 最近匯入的 states: finished: 已完成 @@ -1546,6 +1548,9 @@ zh-TW: over_daily_limit: 您已經超過了本日排定發嘟的限額 (%{limit}) over_total_limit: 您已經超過排程發嘟的限額 (%{limit}) too_soon: 嘟文不可以改變過去哦,只能預定未來 (咦) + self_destruct: + lead_html: 很遺憾,%{domain} 即將永久停止服務。如果您於該伺服器擁有帳號,您將無法繼續使用它,但您仍然可以請求您的資料備份。 + title: 這個伺服器即將停止服務 sessions: activity: 最近活動 browser: 瀏覽器 From 714e3ae5b5c4b6cfb3d06d3e4db96577f181b612 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 24 Oct 2023 06:06:10 -0400 Subject: [PATCH 5/7] Use Rails 7.1 `normalizes` feature (#27521) --- app/models/account_alias.rb | 5 +---- app/models/account_migration.rb | 6 ++---- app/models/account_warning.rb | 8 +------- app/models/featured_tag.rb | 6 +----- app/models/relay.rb | 7 ++----- 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/app/models/account_alias.rb b/app/models/account_alias.rb index f859344fa2..3b75919afe 100644 --- a/app/models/account_alias.rb +++ b/app/models/account_alias.rb @@ -23,10 +23,7 @@ class AccountAlias < ApplicationRecord after_create :add_to_account after_destroy :remove_from_account - def acct=(val) - val = val.to_s.strip - super(val.start_with?('@') ? val[1..] : val) - end + normalizes :acct, with: ->(acct) { acct.strip.delete_prefix('@') } def pretty_acct username, domain = acct.split('@', 2) diff --git a/app/models/account_migration.rb b/app/models/account_migration.rb index b9da596172..dc22e32942 100644 --- a/app/models/account_migration.rb +++ b/app/models/account_migration.rb @@ -25,6 +25,8 @@ class AccountMigration < ApplicationRecord before_validation :set_target_account before_validation :set_followers_count + normalizes :acct, with: ->(acct) { acct.strip.delete_prefix('@') } + validates :acct, presence: true, domain: { acct: true } validate :validate_migration_cooldown validate :validate_target_account @@ -51,10 +53,6 @@ class AccountMigration < ApplicationRecord created_at + COOLDOWN_PERIOD end - def acct=(val) - super(val.to_s.strip.gsub(/\A@/, '')) - end - private def set_target_account diff --git a/app/models/account_warning.rb b/app/models/account_warning.rb index 4f8cc53200..9286577f51 100644 --- a/app/models/account_warning.rb +++ b/app/models/account_warning.rb @@ -27,7 +27,7 @@ class AccountWarning < ApplicationRecord suspend: 4_000, }, _suffix: :action - before_validation :before_validate + normalizes :text, with: ->(text) { text.to_s }, apply_to_nil: true belongs_to :account, inverse_of: :account_warnings belongs_to :target_account, class_name: 'Account', inverse_of: :strikes @@ -50,10 +50,4 @@ class AccountWarning < ApplicationRecord def to_log_human_identifier target_account.acct end - - private - - def before_validate - self.text = '' if text.blank? - end end diff --git a/app/models/featured_tag.rb b/app/models/featured_tag.rb index df23114a3e..7c36aa8b0b 100644 --- a/app/models/featured_tag.rb +++ b/app/models/featured_tag.rb @@ -23,7 +23,7 @@ class FeaturedTag < ApplicationRecord validate :validate_tag_uniqueness, on: :create validate :validate_featured_tags_limit, on: :create - before_validation :strip_name + normalizes :name, with: ->(name) { name.strip.delete_prefix('#') } before_create :set_tag before_create :reset_data @@ -50,10 +50,6 @@ class FeaturedTag < ApplicationRecord private - def strip_name - self.name = name&.strip&.delete_prefix('#') - end - def set_tag self.tag = Tag.find_or_create_by_names(name)&.first end diff --git a/app/models/relay.rb b/app/models/relay.rb index a5fa03a99c..8d697b891f 100644 --- a/app/models/relay.rb +++ b/app/models/relay.rb @@ -19,7 +19,8 @@ class Relay < ApplicationRecord scope :enabled, -> { accepted } - before_validation :strip_url + normalizes :inbox_url, with: ->(inbox_url) { inbox_url.strip } + before_destroy :ensure_disabled alias enabled? accepted? @@ -76,8 +77,4 @@ class Relay < ApplicationRecord def ensure_disabled disable! if enabled? end - - def strip_url - inbox_url&.strip! - end end From 6cf9f1211bf0944a386b9e2904ef0727706dc354 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Tue, 24 Oct 2023 13:43:24 +0200 Subject: [PATCH 6/7] Create custom Github Actions for common steps (#27518) --- .github/actions/setup-javascript/action.yml | 19 +++++ .github/actions/setup-ruby/action.yml | 23 +++++ .github/workflows/bundler-audit.yml | 10 +-- .github/workflows/check-i18n.yml | 22 +---- .github/workflows/crowdin-download.yml | 10 +-- .github/workflows/lint-css.yml | 10 +-- .github/workflows/lint-haml.yml | 12 +-- .github/workflows/lint-js.yml | 10 +-- .github/workflows/lint-json.yml | 10 +-- .github/workflows/lint-md.yml | 10 +-- .github/workflows/lint-ruby.yml | 10 +-- .github/workflows/lint-yml.yml | 10 +-- .github/workflows/test-js.yml | 10 +-- .../workflows/test-migrations-one-step.yml | 12 +-- .../workflows/test-migrations-two-step.yml | 12 +-- .github/workflows/test-ruby.yml | 85 +++++-------------- 16 files changed, 89 insertions(+), 186 deletions(-) create mode 100644 .github/actions/setup-javascript/action.yml create mode 100644 .github/actions/setup-ruby/action.yml diff --git a/.github/actions/setup-javascript/action.yml b/.github/actions/setup-javascript/action.yml new file mode 100644 index 0000000000..c0f2957fb1 --- /dev/null +++ b/.github/actions/setup-javascript/action.yml @@ -0,0 +1,19 @@ +name: 'Setup Javascript' +description: 'Setup a Javascript environment ready to run the Mastodon code' +inputs: + onlyProduction: + description: Only install production dependencies + default: 'false' + +runs: + using: 'composite' + steps: + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + cache: yarn + node-version-file: '.nvmrc' + + - name: Install all yarn packages + shell: bash + run: yarn --frozen-lockfile ${{ inputs.onlyProduction != 'false' && '--production' || '' }} diff --git a/.github/actions/setup-ruby/action.yml b/.github/actions/setup-ruby/action.yml new file mode 100644 index 0000000000..3a6fba9402 --- /dev/null +++ b/.github/actions/setup-ruby/action.yml @@ -0,0 +1,23 @@ +name: 'Setup RUby' +description: 'Setup a Ruby environment ready to run the Mastodon code' +inputs: + ruby-version: + description: The Ruby version to install + default: '.ruby-version' + additional-system-dependencies: + description: 'Additional packages to install' + +runs: + using: 'composite' + steps: + - name: Install system dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y libicu-dev libidn11-dev ${{ inputs.additional-system-dependencies }} + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ inputs.ruby-version }} + bundler-cache: true diff --git a/.github/workflows/bundler-audit.yml b/.github/workflows/bundler-audit.yml index bfb93a36cd..bbc31598c7 100644 --- a/.github/workflows/bundler-audit.yml +++ b/.github/workflows/bundler-audit.yml @@ -27,14 +27,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Install native Ruby dependencies - run: sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - name: Run bundler-audit run: bundle exec bundler-audit diff --git a/.github/workflows/check-i18n.yml b/.github/workflows/check-i18n.yml index 39cf32ddc4..ceb385933b 100644 --- a/.github/workflows/check-i18n.yml +++ b/.github/workflows/check-i18n.yml @@ -19,25 +19,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libicu-dev libidn11-dev + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Check for missing strings in English JSON run: | diff --git a/.github/workflows/crowdin-download.yml b/.github/workflows/crowdin-download.yml index 8268788be4..d3988d2f1a 100644 --- a/.github/workflows/crowdin-download.yml +++ b/.github/workflows/crowdin-download.yml @@ -44,14 +44,8 @@ jobs: run: sudo chown -R runner:docker . # This is needed to run the normalize step - - name: Install native Ruby dependencies - run: sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - name: Run i18n normalize task run: bundle exec i18n-tasks normalize diff --git a/.github/workflows/lint-css.yml b/.github/workflows/lint-css.yml index bd775dba20..7229bec582 100644 --- a/.github/workflows/lint-css.yml +++ b/.github/workflows/lint-css.yml @@ -35,14 +35,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - uses: xt0rted/stylelint-problem-matcher@v1 diff --git a/.github/workflows/lint-haml.yml b/.github/workflows/lint-haml.yml index ca9bd66a4a..8dcab845ee 100644 --- a/.github/workflows/lint-haml.yml +++ b/.github/workflows/lint-haml.yml @@ -30,16 +30,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Install native Ruby dependencies - run: | - sudo apt-get update - sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - name: Run haml-lint run: | diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 67d28589cb..1c1ecc2b22 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -39,14 +39,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: ESLint run: yarn lint:js --max-warnings 0 diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml index 1d98c52673..7796bf92c4 100644 --- a/.github/workflows/lint-json.yml +++ b/.github/workflows/lint-json.yml @@ -31,14 +31,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Prettier run: yarn lint:json diff --git a/.github/workflows/lint-md.yml b/.github/workflows/lint-md.yml index 1b3f92c972..51c59937a3 100644 --- a/.github/workflows/lint-md.yml +++ b/.github/workflows/lint-md.yml @@ -31,14 +31,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Prettier run: yarn lint:md diff --git a/.github/workflows/lint-ruby.yml b/.github/workflows/lint-ruby.yml index 92882a084d..411b323486 100644 --- a/.github/workflows/lint-ruby.yml +++ b/.github/workflows/lint-ruby.yml @@ -31,14 +31,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Install native Ruby dependencies - run: sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - name: Set-up RuboCop Problem Matcher uses: r7kamura/rubocop-problem-matchers-action@v1 diff --git a/.github/workflows/lint-yml.yml b/.github/workflows/lint-yml.yml index e77cc98891..908bdef5cc 100644 --- a/.github/workflows/lint-yml.yml +++ b/.github/workflows/lint-yml.yml @@ -33,14 +33,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Prettier run: yarn lint:yml diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 0ef1d9b7c8..79622b6c1f 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -35,14 +35,8 @@ jobs: - name: Clone repository uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install all yarn packages - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Jest testing run: yarn jest --reporters github-actions summary diff --git a/.github/workflows/test-migrations-one-step.yml b/.github/workflows/test-migrations-one-step.yml index 59287e88cf..5dca8e376d 100644 --- a/.github/workflows/test-migrations-one-step.yml +++ b/.github/workflows/test-migrations-one-step.yml @@ -72,16 +72,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install native Ruby dependencies - run: | - sudo apt-get update - sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up bundler cache - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - name: Create database run: './bin/rails db:create' diff --git a/.github/workflows/test-migrations-two-step.yml b/.github/workflows/test-migrations-two-step.yml index 8f3c84d8f3..59485d285d 100644 --- a/.github/workflows/test-migrations-two-step.yml +++ b/.github/workflows/test-migrations-two-step.yml @@ -71,16 +71,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install native Ruby dependencies - run: | - sudo apt-get update - sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up bundler cache - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby - name: Create database run: './bin/rails db:create' diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index f2d2d02fc0..117e751454 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -34,24 +34,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby + + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript with: - cache: yarn - node-version-file: '.nvmrc' + onlyProduction: 'true' - - name: Install native Ruby dependencies - run: | - sudo apt-get update - sudo apt-get install -y libicu-dev libidn11-dev - - - name: Set up bundler cache - uses: ruby/setup-ruby@v1 - with: - ruby-version: .ruby-version - bundler-cache: true - - - run: yarn --frozen-lockfile --production - name: Precompile assets # Previously had set this, but it's not supported # export NODE_OPTIONS=--openssl-legacy-provider @@ -135,20 +125,11 @@ jobs: path: './public' name: ${{ github.sha }} - - name: Update package index - run: sudo apt-get update - - - name: Install native Ruby dependencies - run: sudo apt-get install -y libicu-dev libidn11-dev - - - name: Install additional system dependencies - run: sudo apt-get install -y ffmpeg imagemagick libpam-dev - - - name: Set up bundler cache - uses: ruby/setup-ruby@v1 + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby with: ruby-version: ${{ matrix.ruby-version}} - bundler-cache: true + additional-system-dependencies: ffmpeg imagemagick libpam-dev - name: Load database schema run: './bin/rails db:create db:schema:load db:seed' @@ -210,28 +191,14 @@ jobs: path: './public' name: ${{ github.sha }} - - name: Update package index - run: sudo apt-get update - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install native Ruby dependencies - run: sudo apt-get install -y libicu-dev libidn11-dev - - - name: Install additional system dependencies - run: sudo apt-get install -y ffmpeg imagemagick - - - name: Set up bundler cache - uses: ruby/setup-ruby@v1 + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby with: ruby-version: ${{ matrix.ruby-version}} - bundler-cache: true + additional-system-dependencies: ffmpeg imagemagick - - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Load database schema run: './bin/rails db:create db:schema:load db:seed' @@ -328,28 +295,14 @@ jobs: path: './public' name: ${{ github.sha }} - - name: Update package index - run: sudo apt-get update - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - cache: yarn - node-version-file: '.nvmrc' - - - name: Install native Ruby dependencies - run: sudo apt-get install -y libicu-dev libidn11-dev - - - name: Install additional system dependencies - run: sudo apt-get install -y ffmpeg imagemagick - - - name: Set up bundler cache - uses: ruby/setup-ruby@v1 + - name: Set up Ruby environment + uses: ./.github/actions/setup-ruby with: ruby-version: ${{ matrix.ruby-version}} - bundler-cache: true + additional-system-dependencies: ffmpeg imagemagick - - run: yarn --frozen-lockfile + - name: Set up Javascript environment + uses: ./.github/actions/setup-javascript - name: Load database schema run: './bin/rails db:create db:schema:load db:seed' From 15182d1e5e595b21c47b48c5d258f30a0251e753 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 24 Oct 2023 15:24:57 +0200 Subject: [PATCH 7/7] Fix history handling not properly handling states after update to react-router v5 (#27526) --- app/javascript/mastodon/components/router.tsx | 66 ++++++++++++------- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/app/javascript/mastodon/components/router.tsx b/app/javascript/mastodon/components/router.tsx index 7779f52e22..e381571676 100644 --- a/app/javascript/mastodon/components/router.tsx +++ b/app/javascript/mastodon/components/router.tsx @@ -3,7 +3,11 @@ import React from 'react'; import { Router as OriginalRouter } from 'react-router'; -import type { LocationDescriptor, Path } from 'history'; +import type { + LocationDescriptor, + LocationDescriptorObject, + Path, +} from 'history'; import { createBrowserHistory } from 'history'; import { layoutFromWindow } from 'mastodon/is_mobile'; @@ -20,39 +24,55 @@ const browserHistory = createBrowserHistory< const originalPush = browserHistory.push.bind(browserHistory); const originalReplace = browserHistory.replace.bind(browserHistory); -function extractRealPath(path: HistoryPath) { - if (typeof path === 'string') return path; - else return path.pathname; +function normalizePath( + path: HistoryPath, + state?: MastodonLocationState, +): LocationDescriptorObject { + const location = typeof path === 'string' ? { pathname: path } : { ...path }; + + if (location.state === undefined && state !== undefined) { + location.state = state; + } else if ( + location.state !== undefined && + state !== undefined && + process.env.NODE_ENV === 'development' + ) { + // eslint-disable-next-line no-console + console.log( + 'You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored', + ); + } + + if ( + layoutFromWindow() === 'multi-column' && + !location.pathname?.startsWith('/deck') + ) { + location.pathname = `/deck${location.pathname}`; + } + + return location; } browserHistory.push = (path: HistoryPath, state?: MastodonLocationState) => { - state = state ?? {}; - state.fromMastodon = true; + const location = normalizePath(path, state); - const realPath = extractRealPath(path); - if (!realPath) return; + location.state = location.state ?? {}; + location.state.fromMastodon = true; - if (layoutFromWindow() === 'multi-column' && !realPath.startsWith('/deck')) { - originalPush(`/deck${realPath}`, state); - } else { - originalPush(path, state); - } + originalPush(location); }; browserHistory.replace = (path: HistoryPath, state?: MastodonLocationState) => { + const location = normalizePath(path, state); + + if (!location.pathname) return; + if (browserHistory.location.state?.fromMastodon) { - state = state ?? {}; - state.fromMastodon = true; + location.state = location.state ?? {}; + location.state.fromMastodon = true; } - const realPath = extractRealPath(path); - if (!realPath) return; - - if (layoutFromWindow() === 'multi-column' && !realPath.startsWith('/deck')) { - originalReplace(`/deck${realPath}`, state); - } else { - originalReplace(path, state); - } + originalReplace(location); }; export const Router: React.FC = ({ children }) => {