Merge remote-tracking branch 'parent/main' into kb_development
This commit is contained in:
commit
36f3bbb909
28 changed files with 135 additions and 92 deletions
4
.bundler-audit.yml
Normal file
4
.bundler-audit.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
ignore:
|
||||
# Sidekiq security issue, fixes in the latest Sidekiq 7 but we can not upgrade. Will be fixed in Sidekiq 6.5.10
|
||||
- CVE-2023-26141
|
|
@ -1,11 +1,24 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module DatabaseHelper
|
||||
def replica_enabled?
|
||||
ENV['REPLICA_DB_NAME'] || ENV.fetch('REPLICA_DATABASE_URL', nil)
|
||||
end
|
||||
module_function :replica_enabled?
|
||||
|
||||
def with_read_replica(&block)
|
||||
ApplicationRecord.connected_to(role: :reading, prevent_writes: true, &block)
|
||||
if replica_enabled?
|
||||
ApplicationRecord.connected_to(role: :reading, prevent_writes: true, &block)
|
||||
else
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
def with_primary(&block)
|
||||
ApplicationRecord.connected_to(role: :writing, &block)
|
||||
if replica_enabled?
|
||||
ApplicationRecord.connected_to(role: :writing, &block)
|
||||
else
|
||||
yield
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
export const DROPDOWN_MENU_OPEN = 'DROPDOWN_MENU_OPEN';
|
||||
export const DROPDOWN_MENU_CLOSE = 'DROPDOWN_MENU_CLOSE';
|
||||
|
||||
export function openDropdownMenu(id, keyboard, scroll_key) {
|
||||
return { type: DROPDOWN_MENU_OPEN, id, keyboard, scroll_key };
|
||||
}
|
||||
|
||||
export function closeDropdownMenu(id) {
|
||||
return { type: DROPDOWN_MENU_CLOSE, id };
|
||||
}
|
11
app/javascript/mastodon/actions/dropdown_menu.ts
Normal file
11
app/javascript/mastodon/actions/dropdown_menu.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
export const openDropdownMenu = createAction<{
|
||||
id: string;
|
||||
keyboard: boolean;
|
||||
scrollKey: string;
|
||||
}>('dropdownMenu/open');
|
||||
|
||||
export const closeDropdownMenu = createAction<{ id: string }>(
|
||||
'dropdownMenu/close',
|
||||
);
|
|
@ -1,12 +1,14 @@
|
|||
import { createAction } from '@reduxjs/toolkit';
|
||||
|
||||
import type { ModalProps } from 'mastodon/reducers/modal';
|
||||
|
||||
import type { MODAL_COMPONENTS } from '../features/ui/components/modal_root';
|
||||
|
||||
export type ModalType = keyof typeof MODAL_COMPONENTS;
|
||||
|
||||
interface OpenModalPayload {
|
||||
modalType: ModalType;
|
||||
modalProps: unknown;
|
||||
modalProps: ModalProps;
|
||||
}
|
||||
export const openModal = createAction<OpenModalPayload>('MODAL_OPEN');
|
||||
|
||||
|
|
|
@ -4,9 +4,14 @@ import { openDropdownMenu, closeDropdownMenu } from 'mastodon/actions/dropdown_m
|
|||
import { fetchHistory } from 'mastodon/actions/history';
|
||||
import DropdownMenu from 'mastodon/components/dropdown_menu';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import('mastodon/store').RootState} state
|
||||
* @param {*} props
|
||||
*/
|
||||
const mapStateToProps = (state, { statusId }) => ({
|
||||
openDropdownId: state.getIn(['dropdown_menu', 'openId']),
|
||||
openedViaKeyboard: state.getIn(['dropdown_menu', 'keyboard']),
|
||||
openDropdownId: state.dropdownMenu.openId,
|
||||
openedViaKeyboard: state.dropdownMenu.keyboard,
|
||||
items: state.getIn(['history', statusId, 'items']),
|
||||
loading: state.getIn(['history', statusId, 'loading']),
|
||||
});
|
||||
|
@ -15,11 +20,11 @@ const mapDispatchToProps = (dispatch, { statusId }) => ({
|
|||
|
||||
onOpen (id, onItemClick, keyboard) {
|
||||
dispatch(fetchHistory(statusId));
|
||||
dispatch(openDropdownMenu(id, keyboard));
|
||||
dispatch(openDropdownMenu({ id, keyboard }));
|
||||
},
|
||||
|
||||
onClose (id) {
|
||||
dispatch(closeDropdownMenu(id));
|
||||
dispatch(closeDropdownMenu({ id }));
|
||||
},
|
||||
|
||||
});
|
||||
|
|
|
@ -23,9 +23,14 @@ const MOUSE_IDLE_DELAY = 300;
|
|||
|
||||
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import('mastodon/store').RootState} state
|
||||
* @param {*} props
|
||||
*/
|
||||
const mapStateToProps = (state, { scrollKey }) => {
|
||||
return {
|
||||
preventScroll: scrollKey === state.getIn(['dropdown_menu', 'scroll_key']),
|
||||
preventScroll: scrollKey === state.dropdownMenu.scrollKey,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -7,9 +7,12 @@ import { openModal, closeModal } from '../actions/modal';
|
|||
import DropdownMenu from '../components/dropdown_menu';
|
||||
import { isUserTouching } from '../is_mobile';
|
||||
|
||||
/**
|
||||
* @param {import('mastodon/store').RootState} state
|
||||
*/
|
||||
const mapStateToProps = state => ({
|
||||
openDropdownId: state.getIn(['dropdown_menu', 'openId']),
|
||||
openedViaKeyboard: state.getIn(['dropdown_menu', 'keyboard']),
|
||||
openDropdownId: state.dropdownMenu.openId,
|
||||
openedViaKeyboard: state.dropdownMenu.keyboard,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch, { status, items, scrollKey }) => ({
|
||||
|
@ -25,7 +28,7 @@ const mapDispatchToProps = (dispatch, { status, items, scrollKey }) => ({
|
|||
actions: items,
|
||||
onClick: onItemClick,
|
||||
},
|
||||
}) : openDropdownMenu(id, keyboard, scrollKey));
|
||||
}) : openDropdownMenu({ id, keyboard, scrollKey }));
|
||||
},
|
||||
|
||||
onClose(id) {
|
||||
|
@ -33,7 +36,7 @@ const mapDispatchToProps = (dispatch, { status, items, scrollKey }) => ({
|
|||
modalType: 'ACTIONS',
|
||||
ignoreFocus: false,
|
||||
}));
|
||||
dispatch(closeDropdownMenu(id));
|
||||
dispatch(closeDropdownMenu({ id }));
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ const mapStateToProps = state => ({
|
|||
hasComposingText: state.getIn(['compose', 'text']).trim().length !== 0,
|
||||
hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0,
|
||||
canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < 4,
|
||||
dropdownMenuIsOpen: state.getIn(['dropdown_menu', 'openId']) !== null,
|
||||
dropdownMenuIsOpen: state.dropdownMenu.openId !== null,
|
||||
firstLaunch: state.getIn(['settings', 'introductionVersion'], 0) < INTRODUCTION_VERSION,
|
||||
username: state.getIn(['accounts', me, 'username']),
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"account.domain_blocked": "Блокиран домейн",
|
||||
"account.edit_profile": "Редактиране на профила",
|
||||
"account.enable_notifications": "Известяване при публикуване от @{name}",
|
||||
"account.endorse": "Характеристика на профила",
|
||||
"account.endorse": "Представи в профила",
|
||||
"account.featured_tags.last_status_at": "Последна публикация на {date}",
|
||||
"account.featured_tags.last_status_never": "Няма публикации",
|
||||
"account.featured_tags.title": "Главни хаштагове на {name}",
|
||||
|
@ -393,7 +393,7 @@
|
|||
"media_gallery.toggle_visible": "Скриване на {number, plural, one {изображение} other {изображения}}",
|
||||
"moved_to_account_banner.text": "Вашият акаунт {disabledAccount} сега е изключен, защото се преместихте в {movedToAccount}.",
|
||||
"mute_modal.duration": "Времетраене",
|
||||
"mute_modal.hide_notifications": "Скривате ли известията от потребителя?",
|
||||
"mute_modal.hide_notifications": "Скриване на известия от този потребител?",
|
||||
"mute_modal.indefinite": "Неопределено",
|
||||
"navigation_bar.about": "Относно",
|
||||
"navigation_bar.advanced_interface": "Отваряне в разширен уебинтерфейс",
|
||||
|
|
|
@ -590,6 +590,7 @@
|
|||
"search.quick_action.open_url": "Open URL in Mastodon",
|
||||
"search.quick_action.status_search": "Posts matching {x}",
|
||||
"search.search_or_paste": "Search or paste URL",
|
||||
"search_popout.full_text_search_disabled_message": "Unavailable on {domain}.",
|
||||
"search_popout.language_code": "ISO language code",
|
||||
"search_popout.options": "Search options",
|
||||
"search_popout.quick_actions": "Quick actions",
|
||||
|
|
|
@ -302,8 +302,8 @@
|
|||
"hashtag.follow": "Seguir etiqueta",
|
||||
"hashtag.unfollow": "Dejar de seguir etiqueta",
|
||||
"hashtags.and_other": "…y {count, plural, other {# más}}",
|
||||
"home.actions.go_to_explore": "Mirá qué está en tendencia",
|
||||
"home.actions.go_to_suggestions": "Encontrá cuentas para seguir",
|
||||
"home.actions.go_to_explore": "Ver qué está en tendencia",
|
||||
"home.actions.go_to_suggestions": "Encontrar cuentas para seguir",
|
||||
"home.column_settings.basic": "Básico",
|
||||
"home.column_settings.show_reblogs": "Mostrar adhesiones",
|
||||
"home.column_settings.show_replies": "Mostrar respuestas",
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
"compose.language.search": "언어 검색...",
|
||||
"compose.published.body": "게시하였습니다.",
|
||||
"compose.published.open": "열기",
|
||||
"compose.saved.body": "게시물을 저장했어요.",
|
||||
"compose.saved.body": "게시물이 저장되었습니다.",
|
||||
"compose_form.direct_message_warning_learn_more": "더 알아보기",
|
||||
"compose_form.encryption_warning": "마스토돈의 게시물들은 종단간 암호화가 되지 않습니다. 민감한 정보를 마스토돈을 통해 전달하지 마세요.",
|
||||
"compose_form.hashtag_warning": "이 게시물은 전체공개가 아니기 때문에 어떤 해시태그로도 검색 되지 않습니다. 전체공개로 게시 된 게시물만이 해시태그로 검색될 수 있습니다.",
|
||||
|
@ -307,12 +307,12 @@
|
|||
"home.column_settings.basic": "기본",
|
||||
"home.column_settings.show_reblogs": "부스트 표시",
|
||||
"home.column_settings.show_replies": "답글 표시",
|
||||
"home.explore_prompt.body": "홈 피드에는 내가 팔로우한 해시태그 그리고 팔로우한 사람과 부스트가 함께 나타나요. 너무 고요하게 느껴진다면, 다음 것들을 살펴볼 수 있어요:",
|
||||
"home.explore_prompt.body": "홈 피드에는 내가 팔로우한 해시태그 그리고 팔로우한 사람과 부스트가 함께 나타납니다. 너무 고요하게 느껴진다면, 다음 것들을 살펴볼 수 있습니다.",
|
||||
"home.explore_prompt.title": "이곳은 마스토돈의 내 본거지입니다.",
|
||||
"home.hide_announcements": "공지사항 숨기기",
|
||||
"home.pending_critical_update.body": "서둘러 마스토돈 서버를 업데이트 하세요!",
|
||||
"home.pending_critical_update.link": "업데이트 보기",
|
||||
"home.pending_critical_update.title": "긴급 보안 업데이트가 있어요!",
|
||||
"home.pending_critical_update.title": "긴급 보안 업데이트가 있습니다!",
|
||||
"home.show_announcements": "공지사항 보기",
|
||||
"interaction_modal.description.favourite": "마스토돈 계정을 통해, 게시물을 좋아하는 것으로 작성자에게 호의를 표하고 나중에 보기 위해 저장할 수 있습니다.",
|
||||
"interaction_modal.description.follow": "마스토돈 계정을 통해, {name} 님을 팔로우 하고 그의 게시물을 홈 피드에서 받아 볼 수 있습니다.",
|
||||
|
@ -554,7 +554,7 @@
|
|||
"report.mute_explanation": "당신은 해당 계정의 게시물을 보지 않게 됩니다. 해당 계정은 여전히 당신을 팔로우 하거나 당신의 게시물을 볼 수 있으며 해당 계정은 자신이 뮤트 되었는지 알지 못합니다.",
|
||||
"report.next": "다음",
|
||||
"report.placeholder": "코멘트",
|
||||
"report.reasons.dislike": "마음에 안듭니다",
|
||||
"report.reasons.dislike": "마음에 안 듭니다",
|
||||
"report.reasons.dislike_description": "내가 보기 싫은 종류에 속합니다",
|
||||
"report.reasons.legal": "불법입니다",
|
||||
"report.reasons.legal_description": "내 서버가 속한 국가의 법률을 위반한다고 생각합니다",
|
||||
|
@ -695,7 +695,7 @@
|
|||
"upload_area.title": "드래그 & 드롭으로 업로드",
|
||||
"upload_button.label": "이미지, 영상, 오디오 파일 추가",
|
||||
"upload_error.limit": "파일 업로드 제한에 도달했습니다.",
|
||||
"upload_error.poll": "파일 업로드는 설문과 함께 쓸 수 없어요.",
|
||||
"upload_error.poll": "파일 업로드는 투표와 함께 쓸 수 없습니다.",
|
||||
"upload_form.audio_description": "청각 장애인을 위한 설명",
|
||||
"upload_form.description": "시각장애인을 위한 설명",
|
||||
"upload_form.description_missing": "설명이 추가되지 않음",
|
||||
|
|
|
@ -310,6 +310,8 @@
|
|||
"home.explore_prompt.body": "Tidslinjen din inneholder en blanding av innlegg fra emneknagger du har valgt å følge, personene du har valgt å følge, og innleggene de fremhever. Hvis det føles for stille, kan det være lurt å:",
|
||||
"home.explore_prompt.title": "Dette er hjemmet ditt i Mastodon.",
|
||||
"home.hide_announcements": "Skjul kunngjøring",
|
||||
"home.pending_critical_update.link": "Se oppdateringer",
|
||||
"home.pending_critical_update.title": "Kritisk sikkerhetsoppdatering er tilgjengelig!",
|
||||
"home.show_announcements": "Vis kunngjøring",
|
||||
"interaction_modal.description.favourite": "Med en konto på Mastodon, kan du favorittmarkere dette innlegget for å la forfatteren vite at du satte pris på det, og lagre innlegget til senere.",
|
||||
"interaction_modal.description.follow": "Med en konto på Mastodon, kan du følge {name} for å få innleggene deres i tidslinjen din.",
|
||||
|
|
|
@ -590,6 +590,7 @@
|
|||
"search.quick_action.open_url": "Otvori URL adresu u Mastodon-u",
|
||||
"search.quick_action.status_search": "Podudaranje objava {x}",
|
||||
"search.search_or_paste": "Pretražite ili unesite adresu",
|
||||
"search_popout.full_text_search_disabled_message": "Nije dostupno na {domain}.",
|
||||
"search_popout.language_code": "ISO kod jezika",
|
||||
"search_popout.options": "Opcije pretrage",
|
||||
"search_popout.quick_actions": "Brze radnje",
|
||||
|
|
|
@ -590,6 +590,7 @@
|
|||
"search.quick_action.open_url": "Отвори 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": "Брзе радње",
|
||||
|
|
|
@ -592,7 +592,7 @@
|
|||
"search.search_or_paste": "Tìm kiếm hoặc nhập URL",
|
||||
"search_popout.full_text_search_disabled_message": "Không khả dụng trên {domain}.",
|
||||
"search_popout.language_code": "Mã ngôn ngữ ISO",
|
||||
"search_popout.options": "Tuỳ chọn tìm kiếm",
|
||||
"search_popout.options": "Tùy chọn tìm kiếm",
|
||||
"search_popout.quick_actions": "Thao tác nhanh",
|
||||
"search_popout.recent": "Tìm kiếm gần đây",
|
||||
"search_popout.specific_date": "ngày cụ thể",
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import Immutable from 'immutable';
|
||||
|
||||
import {
|
||||
DROPDOWN_MENU_OPEN,
|
||||
DROPDOWN_MENU_CLOSE,
|
||||
} from '../actions/dropdown_menu';
|
||||
|
||||
const initialState = Immutable.Map({ openId: null, keyboard: false, scroll_key: null });
|
||||
|
||||
export default function dropdownMenu(state = initialState, action) {
|
||||
switch (action.type) {
|
||||
case DROPDOWN_MENU_OPEN:
|
||||
return state.merge({ openId: action.id, keyboard: action.keyboard, scroll_key: action.scroll_key });
|
||||
case DROPDOWN_MENU_CLOSE:
|
||||
return state.get('openId') === action.id ? state.set('openId', null).set('scroll_key', null) : state;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
33
app/javascript/mastodon/reducers/dropdown_menu.ts
Normal file
33
app/javascript/mastodon/reducers/dropdown_menu.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { createReducer } from '@reduxjs/toolkit';
|
||||
|
||||
import { closeDropdownMenu, openDropdownMenu } from '../actions/dropdown_menu';
|
||||
|
||||
interface DropdownMenuState {
|
||||
openId: string | null;
|
||||
keyboard: boolean;
|
||||
scrollKey: string | null;
|
||||
}
|
||||
|
||||
const initialState: DropdownMenuState = {
|
||||
openId: null,
|
||||
keyboard: false,
|
||||
scrollKey: null,
|
||||
};
|
||||
|
||||
export const dropdownMenuReducer = createReducer(initialState, (builder) => {
|
||||
builder
|
||||
.addCase(
|
||||
openDropdownMenu,
|
||||
(state, { payload: { id, keyboard, scrollKey } }) => {
|
||||
state.openId = id;
|
||||
state.keyboard = keyboard;
|
||||
state.scrollKey = scrollKey;
|
||||
},
|
||||
)
|
||||
.addCase(closeDropdownMenu, (state, { payload: { id } }) => {
|
||||
if (state.openId === id) {
|
||||
state.openId = null;
|
||||
state.scrollKey = null;
|
||||
}
|
||||
});
|
||||
});
|
|
@ -24,7 +24,7 @@ import contexts from './contexts';
|
|||
import conversations from './conversations';
|
||||
import custom_emojis from './custom_emojis';
|
||||
import domain_lists from './domain_lists';
|
||||
import dropdown_menu from './dropdown_menu';
|
||||
import { dropdownMenuReducer } from './dropdown_menu';
|
||||
import filters from './filters';
|
||||
import followed_tags from './followed_tags';
|
||||
import height_cache from './height_cache';
|
||||
|
@ -56,7 +56,7 @@ import user_lists from './user_lists';
|
|||
|
||||
const reducers = {
|
||||
announcements,
|
||||
dropdown_menu,
|
||||
dropdownMenu: dropdownMenuReducer,
|
||||
timelines,
|
||||
meta,
|
||||
alerts,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { Record as ImmutableRecord, Stack } from 'immutable';
|
||||
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import type { Reducer } from '@reduxjs/toolkit';
|
||||
|
||||
import { COMPOSE_UPLOAD_CHANGE_SUCCESS } from '../actions/compose';
|
||||
import type { ModalType } from '../actions/modal';
|
||||
import { openModal, closeModal } from '../actions/modal';
|
||||
import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
|
||||
type ModalProps = Record<string, unknown>;
|
||||
export type ModalProps = Record<string, unknown>;
|
||||
interface Modal {
|
||||
modalType: ModalType;
|
||||
modalProps: ModalProps;
|
||||
|
@ -62,33 +62,22 @@ const pushModal = (
|
|||
});
|
||||
};
|
||||
|
||||
export function modalReducer(
|
||||
state: State = initialState,
|
||||
action: PayloadAction<{
|
||||
modalType: ModalType;
|
||||
ignoreFocus: boolean;
|
||||
modalProps: Record<string, unknown>;
|
||||
}>,
|
||||
) {
|
||||
switch (action.type) {
|
||||
case openModal.type:
|
||||
return pushModal(
|
||||
state,
|
||||
action.payload.modalType,
|
||||
action.payload.modalProps,
|
||||
);
|
||||
case closeModal.type:
|
||||
return popModal(state, action.payload);
|
||||
case COMPOSE_UPLOAD_CHANGE_SUCCESS:
|
||||
return popModal(state, { modalType: 'FOCAL_POINT', ignoreFocus: false });
|
||||
case TIMELINE_DELETE:
|
||||
return state.update('stack', (stack) =>
|
||||
stack.filterNot(
|
||||
// @ts-expect-error TIMELINE_DELETE action is not typed yet.
|
||||
(modal) => modal.get('modalProps').statusId === action.id,
|
||||
),
|
||||
);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
export const modalReducer: Reducer<State> = (state = initialState, action) => {
|
||||
if (openModal.match(action))
|
||||
return pushModal(
|
||||
state,
|
||||
action.payload.modalType,
|
||||
action.payload.modalProps,
|
||||
);
|
||||
else if (closeModal.match(action)) return popModal(state, action.payload);
|
||||
// TODO: type those actions
|
||||
else if (action.type === COMPOSE_UPLOAD_CHANGE_SUCCESS)
|
||||
return popModal(state, { modalType: 'FOCAL_POINT', ignoreFocus: false });
|
||||
else if (action.type === TIMELINE_DELETE)
|
||||
return state.update('stack', (stack) =>
|
||||
stack.filterNot(
|
||||
(modal) => modal.get('modalProps').statusId === action.id,
|
||||
),
|
||||
);
|
||||
else return state;
|
||||
};
|
||||
|
|
|
@ -41,13 +41,13 @@ class Admin::SystemCheck::ElasticsearchCheck < Admin::SystemCheck::BaseCheck
|
|||
elsif cluster_health['status'] == 'red'
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_health_red)
|
||||
elsif cluster_health['number_of_nodes'] < 2 && es_preset != 'single_node_cluster'
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_preset_single_node, nil, 'https://docs.joinmastodon.org/admin/optional/elasticsearch/#scaling')
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_preset_single_node, nil, 'https://docs.joinmastodon.org/admin/elasticsearch/#scaling')
|
||||
elsif Chewy.client.indices.get_settings[Chewy::Stash::Specification.index_name]&.dig('settings', 'index', 'number_of_replicas')&.to_i&.positive? && es_preset == 'single_node_cluster'
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_reset_chewy)
|
||||
elsif cluster_health['status'] == 'yellow'
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_health_yellow)
|
||||
else
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_preset, nil, 'https://docs.joinmastodon.org/admin/optional/elasticsearch/#scaling')
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_preset, nil, 'https://docs.joinmastodon.org/admin/elasticsearch/#scaling')
|
||||
end
|
||||
rescue Faraday::ConnectionFailed, Elasticsearch::Transport::Transport::Error
|
||||
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
|
||||
|
|
|
@ -5,7 +5,7 @@ class ApplicationRecord < ActiveRecord::Base
|
|||
|
||||
include Remotable
|
||||
|
||||
connects_to database: { writing: :primary, reading: ENV['REPLICA_DB_NAME'] || ENV['REPLICA_DATABASE_URL'] ? :replica : :primary }
|
||||
connects_to database: { writing: :primary, reading: :replica } if DatabaseHelper.replica_enabled?
|
||||
|
||||
class << self
|
||||
def update_index(_type_name, *_args, &_block)
|
||||
|
|
|
@ -382,7 +382,7 @@ ja:
|
|||
add_new: ドメインブロックを追加
|
||||
confirm_suspension:
|
||||
cancel: キャンセル
|
||||
confirm: ブロック
|
||||
confirm: 停止
|
||||
permanent_action: 失われたデータやフォロー関係は、ブロックを解除しても元に戻せません。
|
||||
preamble_html: "<strong>%{domain}</strong> と、そのサブドメインをブロックします。"
|
||||
remove_all_data: この操作により、対象のドメインにあるアカウントからのコンテンツやメディア、プロフィール情報はすべて削除されます。
|
||||
|
|
|
@ -830,7 +830,7 @@ ko:
|
|||
action: 문서 참조
|
||||
message_html: Elasticsearch 클러스터가 한 대의 노드만 사용하고 있습니다. <code>ES_PRESET</code>이 <code>single_node_cluster</code>로 설정되어야 합니다.
|
||||
elasticsearch_reset_chewy:
|
||||
message_html: 설정 변경으로 인해Elasticsearch 시스템 인덱스가 최신상태가 아닙니다. <code>tootctl search deploy --reset-chewy</code> 명령으로 업데이트 하세요.
|
||||
message_html: 설정 변경으로 인해 Elasticsearch 시스템 인덱스가 최신상태가 아닙니다. <code>tootctl search deploy --reset-chewy</code> 명령으로 업데이트 하세요.
|
||||
elasticsearch_running_check:
|
||||
message_html: Elasticsearch에 연결할 수 없습니다. 실행중인지 확인하거나, 전문검색을 비활성화하세요
|
||||
elasticsearch_version_check:
|
||||
|
|
|
@ -1769,6 +1769,7 @@ sr-Latn:
|
|||
default: "%d %b %Y, %H:%M"
|
||||
month: "%b %Y"
|
||||
time: "%H:%M"
|
||||
with_time_zone: "%d. %b %Y, %H:%M %Z"
|
||||
translation:
|
||||
errors:
|
||||
quota_exceeded: Prekoračena je kvota korišćenja usluge prevođenja na celom serveru.
|
||||
|
|
|
@ -1769,6 +1769,7 @@ sr:
|
|||
default: "%d %b %Y, %H:%M"
|
||||
month: "%b %Y"
|
||||
time: "%H:%M"
|
||||
with_time_zone: "%d. %b %Y, %H:%M %Z"
|
||||
translation:
|
||||
errors:
|
||||
quota_exceeded: Прекорачена је квота коришћења услуге превођења на целом серверу.
|
||||
|
|
|
@ -1512,7 +1512,7 @@ vi:
|
|||
activity: Tương tác
|
||||
confirm_follow_selected_followers: Bạn có chắc muốn theo dõi những người đã chọn?
|
||||
confirm_remove_selected_followers: Bạn có chắc muốn bỏ theo dõi những người đã chọn?
|
||||
confirm_remove_selected_follows: Bạn có chắc muốn xoá những người theo dõi bạn đã chọn không?
|
||||
confirm_remove_selected_follows: Bạn có chắc muốn xóa những người theo dõi bạn đã chọn không?
|
||||
dormant: Chưa
|
||||
follow_failure: Không thể theo dõi một số tài khoản đã chọn.
|
||||
follow_selected_followers: Theo dõi những người đã chọn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue