diff --git a/.gitignore b/.gitignore index 51e47bb52b326a..2ff9a2e23dbb53 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,5 @@ yarn-debug.log # Ignore Docker option files docker-compose.override.yml +dump.rdb +logfile diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index abc68d2a464f20..3e31c00a2a28c5 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -34,14 +34,14 @@ def show format.atom do mark_cacheable! - @entries = @account.stream_entries.where(hidden: false).with_includes.paginate_by_max_id(PAGE_SIZE, params[:max_id], params[:since_id]) + @entries = @account.stream_entries.where(hidden: false).with_includes.without_local_only.paginate_by_max_id(PAGE_SIZE, params[:max_id], params[:since_id]) render xml: OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, @entries.reject { |entry| entry.status.nil? })) end format.rss do mark_cacheable! - @statuses = cache_collection(default_statuses.without_reblogs.without_replies.limit(PAGE_SIZE), Status) + @statuses = cache_collection(default_statuses.without_local_only.without_reblogs.without_replies.limit(PAGE_SIZE), Status) render xml: RSS::AccountSerializer.render(@account, @statuses) end @@ -70,7 +70,11 @@ def filtered_statuses end def default_statuses - @account.statuses.where(visibility: [:public, :unlisted]) + if current_user.nil? + @account.statuses.without_local_only.where(visibility: [:public, :unlisted]) + else + @account.statuses.where(visibility: [:public, :unlisted]) + end end def only_media_scope diff --git a/app/controllers/api/v1/accounts/credentials_controller.rb b/app/controllers/api/v1/accounts/credentials_controller.rb index e77f57910b2bfb..b2fa720b6bcdde 100644 --- a/app/controllers/api/v1/accounts/credentials_controller.rb +++ b/app/controllers/api/v1/accounts/credentials_controller.rb @@ -33,6 +33,7 @@ def user_settings_params 'setting_default_privacy' => source_params.fetch(:privacy, @account.user.setting_default_privacy), 'setting_default_sensitive' => source_params.fetch(:sensitive, @account.user.setting_default_sensitive), 'setting_default_language' => source_params.fetch(:language, @account.user.setting_default_language), + 'setting_default_federation' => source_params.fetch(:federation, @account.user.setting_default_federation), } end end diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index f9506971a0c062..8d25603f32a85f 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -54,7 +54,8 @@ def create scheduled_at: status_params[:scheduled_at], application: doorkeeper_token.application, poll: status_params[:poll], - idempotency: request.headers['Idempotency-Key']) + idempotency: request.headers['Idempotency-Key'], + local_only: status_params[:local_only]) render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer end @@ -85,6 +86,7 @@ def status_params :spoiler_text, :visibility, :scheduled_at, + :local_only, media_ids: [], poll: [ :multiple, diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 5afdf0eec0d346..8bb5201cf94375 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -36,6 +36,7 @@ def user_settings_params :setting_default_privacy, :setting_default_sensitive, :setting_default_language, + :setting_default_federation, :setting_unfollow_modal, :setting_boost_modal, :setting_delete_modal, diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb index 8568b151cfaa4e..24435cf8aa2464 100644 --- a/app/controllers/stream_entries_controller.rb +++ b/app/controllers/stream_entries_controller.rb @@ -19,7 +19,7 @@ def show end format.atom do - unless @stream_entry.hidden? + unless @stream_entry.hidden? || @stream_entry.local_only? skip_session! expires_in 3.minutes, public: true end @@ -53,7 +53,7 @@ def set_stream_entry @type = @stream_entry.activity_type.downcase raise ActiveRecord::RecordNotFound if @stream_entry.activity.nil? - authorize @stream_entry.activity, :show? if @stream_entry.hidden? + authorize @stream_entry.activity, :show? if @stream_entry.hidden? || @stream_entry.local_only? rescue Mastodon::NotPermittedError # Reraise in order to get a 404 raise ActiveRecord::RecordNotFound diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js index 0ee663766ab368..dc7dd2ca68b4ae 100644 --- a/app/javascript/mastodon/actions/compose.js +++ b/app/javascript/mastodon/actions/compose.js @@ -42,6 +42,7 @@ export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE'; export const COMPOSE_SPOILERNESS_CHANGE = 'COMPOSE_SPOILERNESS_CHANGE'; export const COMPOSE_SPOILER_TEXT_CHANGE = 'COMPOSE_SPOILER_TEXT_CHANGE'; export const COMPOSE_VISIBILITY_CHANGE = 'COMPOSE_VISIBILITY_CHANGE'; +export const COMPOSE_FEDERATION_CHANGE = 'COMPOSE_FEDERATION_CHANGE'; export const COMPOSE_LISTABILITY_CHANGE = 'COMPOSE_LISTABILITY_CHANGE'; export const COMPOSE_COMPOSING_CHANGE = 'COMPOSE_COMPOSING_CHANGE'; @@ -140,6 +141,7 @@ export function submitCompose(routerHistory) { spoiler_text: getState().getIn(['compose', 'spoiler_text'], ''), visibility: getState().getIn(['compose', 'privacy']), poll: getState().getIn(['compose', 'poll'], null), + local_only: !getState().getIn(['compose', 'federation']), }, { headers: { 'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']), @@ -489,6 +491,13 @@ export function changeComposeVisibility(value) { }; }; +export function changeComposeFederation(value) { + return { + type: COMPOSE_FEDERATION_CHANGE, + value, + }; +}; + export function insertEmojiCompose(position, emoji, needsSpace) { return { type: COMPOSE_EMOJI_INSERT, diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index 0bfbd887945dab..27c2b466500780 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -22,6 +22,7 @@ const messages = defineMessages({ reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost to original audience' }, cancel_reblog_private: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' }, cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, + local_only: { id: 'status.local_only', defaultMessage: 'This post is only visible by other users of your instance' }, favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, open: { id: 'status.open', defaultMessage: 'Expand this status' }, report: { id: 'status.report', defaultMessage: 'Report @{name}' }, @@ -183,6 +184,7 @@ class StatusActionBar extends ImmutablePureComponent { const mutingConversation = status.get('muted'); const anonymousAccess = !me; const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); + const federated = !status.get('local_only'); let menu = []; let reblogIcon = 'retweet'; @@ -257,6 +259,9 @@ class StatusActionBar extends ImmutablePureComponent {
+ { !federated && + + } ); } diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index 2b9da20d7f369b..a353392aa1d271 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -10,6 +10,8 @@ import UploadButtonContainer from '../containers/upload_button_container'; import { defineMessages, injectIntl } from 'react-intl'; import SpoilerButtonContainer from '../containers/spoiler_button_container'; import PrivacyDropdownContainer from '../containers/privacy_dropdown_container'; +import FederationDropdownContainer from '../containers/federation_dropdown_container'; +import SensitiveButtonContainer from '../containers/sensitive_button_container'; import EmojiPickerDropdown from '../containers/emoji_picker_dropdown_container'; import PollFormContainer from '../containers/poll_form_container'; import UploadFormContainer from '../containers/upload_form_container'; @@ -43,6 +45,7 @@ class ComposeForm extends ImmutablePureComponent { spoiler: PropTypes.bool, privacy: PropTypes.string, spoilerText: PropTypes.string, + federation: PropTypes.bool, focusDate: PropTypes.instanceOf(Date), caretPosition: PropTypes.number, preselectDate: PropTypes.instanceOf(Date), @@ -214,6 +217,7 @@ class ComposeForm extends ImmutablePureComponent { +
diff --git a/app/javascript/mastodon/features/compose/components/federation_dropdown.js b/app/javascript/mastodon/features/compose/components/federation_dropdown.js new file mode 100644 index 00000000000000..571cbcb6b59aeb --- /dev/null +++ b/app/javascript/mastodon/features/compose/components/federation_dropdown.js @@ -0,0 +1,250 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { injectIntl, defineMessages } from 'react-intl'; +import IconButton from '../../../components/icon_button'; +import Overlay from 'react-overlays/lib/Overlay'; +import Motion from '../../ui/util/optional_motion'; +import spring from 'react-motion/lib/spring'; +import detectPassiveEvents from 'detect-passive-events'; +import classNames from 'classnames'; + +const messages = defineMessages({ + federate_short: { id: 'federation.federated.short', defaultMessage: 'Federated' }, + federate_long: { id: 'federation.federated.long', defaultMessage: 'Allow toot to reach other instances' }, + local_only_short: { id: 'federation.local_only.short', defaultMessage: 'Local-only' }, + local_only_long: { id: 'federation.local_only.long', defaultMessage: 'Restrict this toot only to my instance' }, + change_federation: { id: 'federation.change', defaultMessage: 'Adjust status federation' }, +}); + +const listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false; + +class FederationDropdownMenu extends React.PureComponent { + + static propTypes = { + style: PropTypes.object, + items: PropTypes.array.isRequired, + value: PropTypes.bool.isRequired, + onClose: PropTypes.func.isRequired, + onChange: PropTypes.func.isRequired, + }; + + state = { + mounted: false, + }; + + handleDocumentClick = e => { + if (this.node && !this.node.contains(e.target)) { + this.props.onClose(); + } + } + + handleKeyDown = e => { + const { items } = this.props; + const value = Boolean(e.currentTarget.getAttribute('data-index')); + const index = items.findIndex(item => { + return (item.value === value); + }); + let element; + + switch(e.key) { + case 'Escape': + this.props.onClose(); + break; + case 'Enter': + this.handleClick(e); + break; + case 'ArrowDown': + element = this.node.childNodes[index + 1]; + if (element) { + element.focus(); + this.props.onChange(Boolean(element.getAttribute('data-index'))); + } + break; + case 'ArrowUp': + element = this.node.childNodes[index - 1]; + if (element) { + element.focus(); + this.props.onChange(Boolean(element.getAttribute('data-index'))); + } + break; + case 'Home': + element = this.node.firstChild; + if (element) { + element.focus(); + this.props.onChange(Boolean(element.getAttribute('data-index'))); + } + break; + case 'End': + element = this.node.lastChild; + if (element) { + element.focus(); + this.props.onChange(Boolean(element.getAttribute('data-index'))); + } + break; + } + } + + handleClick = e => { + const value = Boolean(e.currentTarget.getAttribute('data-index')); + + e.preventDefault(); + + this.props.onClose(); + this.props.onChange(value); + } + + componentDidMount () { + document.addEventListener('click', this.handleDocumentClick, false); + document.addEventListener('touchend', this.handleDocumentClick, listenerOptions); + if (this.focusedItem) this.focusedItem.focus(); + this.setState({ mounted: true }); + } + + componentWillUnmount () { + document.removeEventListener('click', this.handleDocumentClick, false); + document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions); + } + + setRef = c => { + this.node = c; + } + + setFocusRef = c => { + this.focusedItem = c; + } + + render () { + const { mounted } = this.state; + const { style, items, value } = this.props; + + return ( + + {({ opacity, scaleX, scaleY }) => ( + // It should not be transformed when mounting because the resulting + // size will be used to determine the coordinate of the menu by + // react-overlays +
+ {items.map(item => ( +
+
+ +
+ +
+ {item.text} + {item.meta} +
+
+ ))} +
+ )} +
+ ); + } + +} + +@injectIntl +export default class FederationDropdown extends React.PureComponent { + + static propTypes = { + isUserTouching: PropTypes.func, + isModalOpen: PropTypes.bool.isRequired, + onModalOpen: PropTypes.func, + onModalClose: PropTypes.func, + value: PropTypes.bool.isRequired, + onChange: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired, + }; + + state = { + open: false, + placement: null, + }; + + handleToggle = ({ target }) => { + if (this.props.isUserTouching()) { + if (this.state.open) { + this.props.onModalClose(); + } else { + this.props.onModalOpen({ + actions: this.options.map(option => ({ ...option, active: option.value === this.props.value })), + onClick: this.handleModalActionClick, + }); + } + } else { + const { top } = target.getBoundingClientRect(); + this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' }); + this.setState({ open: !this.state.open }); + } + } + + handleModalActionClick = (e) => { + e.preventDefault(); + + const { value } = this.options[e.currentTarget.getAttribute('data-index')]; + + this.props.onModalClose(); + this.props.onChange(value); + } + + handleKeyDown = e => { + switch(e.key) { + case 'Escape': + this.handleClose(); + break; + } + } + + handleClose = () => { + this.setState({ open: false }); + } + + handleChange = value => { + this.props.onChange(value); + } + + componentWillMount () { + const { intl: { formatMessage } } = this.props; + + this.options = [ + { icon: 'link', value: true, text: formatMessage(messages.federate_short), meta: formatMessage(messages.federate_long) }, + { icon: 'chain-broken', value: false, text: formatMessage(messages.local_only_short), meta: formatMessage(messages.local_only_long) }, + ]; + } + + render () { + const { value, intl } = this.props; + const { open, placement } = this.state; + + const valueOption = this.options.find(item => item.value === value); + + return ( +
+
+ +
+ + + + +
+ ); + } + +} diff --git a/app/javascript/mastodon/features/compose/containers/compose_form_container.js b/app/javascript/mastodon/features/compose/containers/compose_form_container.js index f9f1fba36634d6..b8efea48b8a8eb 100644 --- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js +++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js @@ -17,6 +17,7 @@ const mapStateToProps = state => ({ spoiler: state.getIn(['compose', 'spoiler']), spoilerText: state.getIn(['compose', 'spoiler_text']), privacy: state.getIn(['compose', 'privacy']), + federation: state.getIn(['compose', 'federation']), focusDate: state.getIn(['compose', 'focusDate']), caretPosition: state.getIn(['compose', 'caretPosition']), preselectDate: state.getIn(['compose', 'preselectDate']), diff --git a/app/javascript/mastodon/features/compose/containers/federation_dropdown_container.js b/app/javascript/mastodon/features/compose/containers/federation_dropdown_container.js new file mode 100644 index 00000000000000..268f4da2dbb6dd --- /dev/null +++ b/app/javascript/mastodon/features/compose/containers/federation_dropdown_container.js @@ -0,0 +1,24 @@ +import { connect } from 'react-redux'; +import FederationDropdown from '../components/federation_dropdown'; +import { changeComposeFederation } from '../../../actions/compose'; +import { openModal, closeModal } from '../../../actions/modal'; +import { isUserTouching } from '../../../is_mobile'; + +const mapStateToProps = state => ({ + isModalOpen: state.get('modal').modalType === 'ACTIONS', + value: state.getIn(['compose', 'federation']), +}); + +const mapDispatchToProps = dispatch => ({ + + onChange (value) { + dispatch(changeComposeFederation(value)); + }, + + isUserTouching, + onModalOpen: props => dispatch(openModal('ACTIONS', props)), + onModalClose: () => dispatch(closeModal()), + +}); + +export default connect(mapStateToProps, mapDispatchToProps)(FederationDropdown); diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 84471f9a3f1cf1..c9ff30e8ec4e92 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -6,7 +6,7 @@ import DisplayName from '../../../components/display_name'; import StatusContent from '../../../components/status_content'; import MediaGallery from '../../../components/media_gallery'; import { Link } from 'react-router-dom'; -import { FormattedDate, FormattedNumber } from 'react-intl'; +import { defineMessages, injectIntl, FormattedDate, FormattedNumber } from 'react-intl'; import Card from './card'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Video from '../../video'; @@ -15,6 +15,11 @@ import classNames from 'classnames'; import Icon from 'mastodon/components/icon'; import PollContainer from 'mastodon/containers/poll_container'; +const messages = defineMessages({ + local_only: { id: 'status.local_only', defaultMessage: 'This post is only visible by other users of your instance' }, +}); + +@injectIntl export default class DetailedStatus extends ImmutablePureComponent { static contextTypes = { @@ -88,6 +93,7 @@ export default class DetailedStatus extends ImmutablePureComponent { render () { const status = (this.props.status && this.props.status.get('reblog')) ? this.props.status.get('reblog') : this.props.status; + const intl = this.props.intl; const outerStyle = { boxSizing: 'border-box' }; const { compact } = this.props; @@ -98,6 +104,7 @@ export default class DetailedStatus extends ImmutablePureComponent { let media = ''; let applicationLink = ''; let reblogLink = ''; + let localOnly = ''; let reblogIcon = 'retweet'; let favouriteLink = ''; @@ -171,6 +178,10 @@ export default class DetailedStatus extends ImmutablePureComponent { ); } + if(status.get('local_only')) { + localOnly = · ; + } + if (this.context.router) { favouriteLink = ( @@ -206,7 +217,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
- {applicationLink} · {reblogLink} · {favouriteLink} + {applicationLink} · {reblogLink} · {favouriteLink}{localOnly}
diff --git a/app/javascript/mastodon/locales/ar.json b/app/javascript/mastodon/locales/ar.json index e815d54d530828..f577f53d57d375 100644 --- a/app/javascript/mastodon/locales/ar.json +++ b/app/javascript/mastodon/locales/ar.json @@ -133,6 +133,11 @@ "empty_column.mutes": "لم تقم بكتم أي مستخدم بعد.", "empty_column.notifications": "لم تتلق أي إشعار بعدُ. تفاعل مع المستخدمين الآخرين لإنشاء محادثة.", "empty_column.public": "لا يوجد أي شيء هنا ! قم بنشر شيء ما للعامة، أو إتبع المستخدمين الآخرين المتواجدين على الخوادم الأخرى لملء خيط المحادثات", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "ترخيص", "follow_request.reject": "رفض", "getting_started.developers": "المُطوِّرون", @@ -323,6 +328,7 @@ "status.favourite": "أضف إلى المفضلة", "status.filtered": "مُصفّى", "status.load_more": "حمّل المزيد", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "الصورة مستترة", "status.mention": "أذكُر @{name}", "status.more": "المزيد", diff --git a/app/javascript/mastodon/locales/ast.json b/app/javascript/mastodon/locales/ast.json index a983f63a4594be..1be45cdaa58398 100644 --- a/app/javascript/mastodon/locales/ast.json +++ b/app/javascript/mastodon/locales/ast.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Entá nun silenciesti a dengún usuariu.", "empty_column.notifications": "Entá nun tienes dengún avisu. Interactua con otros p'aniciar la conversación.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizar", "follow_request.reject": "Refugar", "getting_started.developers": "Desendolcadores", @@ -323,6 +328,7 @@ "status.favourite": "Favourite", "status.filtered": "Filtered", "status.load_more": "Cargar más", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Mediu anubríu", "status.mention": "Mentar a @{name}", "status.more": "Más", diff --git a/app/javascript/mastodon/locales/bg.json b/app/javascript/mastodon/locales/bg.json index 36a08b26426b2c..4574c240fb3d1b 100644 --- a/app/javascript/mastodon/locales/bg.json +++ b/app/javascript/mastodon/locales/bg.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Authorize", "follow_request.reject": "Reject", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Предпочитани", "status.filtered": "Filtered", "status.load_more": "Load more", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media hidden", "status.mention": "Споменаване", "status.more": "More", diff --git a/app/javascript/mastodon/locales/ca.json b/app/javascript/mastodon/locales/ca.json index 18dd56d0df54a7..2a8618d3cccc88 100644 --- a/app/javascript/mastodon/locales/ca.json +++ b/app/javascript/mastodon/locales/ca.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Encara no has silenciat cap usuari.", "empty_column.notifications": "Encara no tens notificacions. Interactua amb altres per iniciar la conversa.", "empty_column.public": "No hi ha res aquí! Escriu públicament alguna cosa o manualment segueix usuaris d'altres servidors per omplir-ho", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autoritzar", "follow_request.reject": "Rebutjar", "getting_started.developers": "Desenvolupadors", @@ -323,6 +328,7 @@ "status.favourite": "Favorit", "status.filtered": "Filtrat", "status.load_more": "Carrega més", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Multimèdia amagat", "status.mention": "Esmentar @{name}", "status.more": "Més", diff --git a/app/javascript/mastodon/locales/co.json b/app/javascript/mastodon/locales/co.json index 016be39b39c8bb..ee6080dc4fc837 100644 --- a/app/javascript/mastodon/locales/co.json +++ b/app/javascript/mastodon/locales/co.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Per avà ùn avete manc'un utilizatore piattatu.", "empty_column.notifications": "Ùn avete ancu nisuna nutificazione. Interact with others to start the conversation.", "empty_column.public": "Ùn c'hè nunda quì! Scrivete qualcosa in pubblicu o seguitate utilizatori d'altri servori per empie a linea pubblica", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Auturizà", "follow_request.reject": "Righjittà", "getting_started.developers": "Sviluppatori", @@ -323,6 +328,7 @@ "status.favourite": "Aghjunghje à i favuriti", "status.filtered": "Filtratu", "status.load_more": "Vede di più", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media piattata", "status.mention": "Mintuvà @{name}", "status.more": "Più", diff --git a/app/javascript/mastodon/locales/cs.json b/app/javascript/mastodon/locales/cs.json index cbf303f3ca4bf6..81f27f8cd4a367 100644 --- a/app/javascript/mastodon/locales/cs.json +++ b/app/javascript/mastodon/locales/cs.json @@ -134,6 +134,11 @@ "empty_column.mutes": "Ještě jste neskryl/a žádné uživatele.", "empty_column.notifications": "Ještě nemáte žádná oznámení. Začněte konverzaci komunikováním s ostatními.", "empty_column.public": "Tady nic není! Napište něco veřejně, nebo začněte ručně sledovat uživatele z jiných serverů, aby tu něco přibylo", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizovat", "follow_request.reject": "Odmítnout", "getting_started.developers": "Vývojáři", @@ -325,6 +330,7 @@ "status.favourite": "Oblíbit", "status.filtered": "Filtrováno", "status.load_more": "Zobrazit více", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Média skryta", "status.mention": "Zmínit uživatele @{name}", "status.more": "Více", diff --git a/app/javascript/mastodon/locales/cy.json b/app/javascript/mastodon/locales/cy.json index d886b2b54d4b29..47a14779984f8f 100644 --- a/app/javascript/mastodon/locales/cy.json +++ b/app/javascript/mastodon/locales/cy.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Nid ydych wedi tawelu unrhyw ddefnyddwyr eto.", "empty_column.notifications": "Nid oes gennych unrhyw hysbysiadau eto. Rhyngweithiwch ac eraill i ddechrau'r sgwrs.", "empty_column.public": "Does dim byd yma! Ysgrifennwch rhywbeth yn gyhoeddus, neu dilynwch ddefnyddwyr o achosion eraill i'w lenwi", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Caniatau", "follow_request.reject": "Gwrthod", "getting_started.developers": "Datblygwyr", @@ -323,6 +328,7 @@ "status.favourite": "Hoffi", "status.filtered": "Wedi'i hidlo", "status.load_more": "Llwythwch mwy", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Cyfryngau wedi'u cuddio", "status.mention": "Crybwyll @{name}", "status.more": "Mwy", diff --git a/app/javascript/mastodon/locales/da.json b/app/javascript/mastodon/locales/da.json index 89096b29bfbdfa..e7317666cde469 100644 --- a/app/javascript/mastodon/locales/da.json +++ b/app/javascript/mastodon/locales/da.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Du har endnu ikke dæmpet nogen som helst bruger.", "empty_column.notifications": "Du har endnu ingen notifikationer. Tag ud og bland dig med folkemængden for at starte samtalen.", "empty_column.public": "Der er ikke noget at se her! Skriv noget offentligt eller start ud med manuelt at følge brugere fra andre server for at udfylde tomrummet", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Godkend", "follow_request.reject": "Afvis", "getting_started.developers": "Udviklere", @@ -323,6 +328,7 @@ "status.favourite": "Favorit", "status.filtered": "Filtreret", "status.load_more": "Indlæs mere", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Medie skjult", "status.mention": "Nævn @{name}", "status.more": "Mere", diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json index 13b8ccafa020b3..b7ec6293bbddc0 100644 --- a/app/javascript/mastodon/locales/de.json +++ b/app/javascript/mastodon/locales/de.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Du hast keine Profile stummgeschaltet.", "empty_column.notifications": "Du hast noch keine Mitteilungen. Interagiere mit anderen, um ins Gespräch zu kommen.", "empty_column.public": "Hier ist nichts zu sehen! Schreibe etwas öffentlich oder folge Profilen von anderen Servern, um die Zeitleiste aufzufüllen", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Erlauben", "follow_request.reject": "Ablehnen", "getting_started.developers": "Entwickler", @@ -323,6 +328,7 @@ "status.favourite": "Favorisieren", "status.filtered": "Gefiltert", "status.load_more": "Weitere laden", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Medien versteckt", "status.mention": "@{name} erwähnen", "status.more": "Mehr", diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index e7b4b479a21e1e..7b32cac576f3b9 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -325,6 +325,10 @@ "defaultMessage": "This post cannot be boosted", "id": "status.cannot_reblog" }, + { + "defaultMessage": "This post is only visible by other users of your instance", + "id": "status.local_only" + }, { "defaultMessage": "Favourite", "id": "status.favourite" @@ -885,6 +889,31 @@ ], "path": "app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.json" }, + { + "descriptors": [ + { + "defaultMessage": "Federated", + "id": "federation.federated.short" + }, + { + "defaultMessage": "Allow toot to reach other instances", + "id": "federation.federated.long" + }, + { + "defaultMessage": "Local-only", + "id": "federation.local_only.short" + }, + { + "defaultMessage": "Restrict this toot only to my instance", + "id": "federation.local_only.long" + }, + { + "defaultMessage": "Adjust status federation", + "id": "federation.change" + } + ], + "path": "app/javascript/mastodon/features/compose/components/federation_dropdown.json" + }, { "descriptors": [ { @@ -2060,6 +2089,15 @@ ], "path": "app/javascript/mastodon/features/status/components/action_bar.json" }, + { + "descriptors": [ + { + "defaultMessage": "This post is only visible by other users of your instance", + "id": "status.local_only" + } + ], + "path": "app/javascript/mastodon/features/status/components/detailed_status.json" + }, { "descriptors": [ { diff --git a/app/javascript/mastodon/locales/el.json b/app/javascript/mastodon/locales/el.json index 69c0dcbadca059..e0d0c539ec3f38 100644 --- a/app/javascript/mastodon/locales/el.json +++ b/app/javascript/mastodon/locales/el.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Δεν έχεις αποσιωπήσει κανένα χρήστη ακόμα.", "empty_column.notifications": "Δεν έχεις ειδοποιήσεις ακόμα. Αλληλεπίδρασε με άλλους χρήστες για να ξεκινήσεις την κουβέντα.", "empty_column.public": "Δεν υπάρχει τίποτα εδώ! Γράψε κάτι δημόσιο, ή ακολούθησε χειροκίνητα χρήστες από άλλους κόμβους για να τη γεμίσεις", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Ενέκρινε", "follow_request.reject": "Απέρριψε", "getting_started.developers": "Ανάπτυξη", @@ -323,6 +328,7 @@ "status.favourite": "Σημείωσε ως αγαπημένο", "status.filtered": "Φιλτραρισμένα", "status.load_more": "Φόρτωσε περισσότερα", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Κρυμμένο πολυμέσο", "status.mention": "Ανέφερε τον/την @{name}", "status.more": "Περισσότερα", diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index baed4939c4eaa0..aa4a69aa41a1d7 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other servers to fill it up", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Authorize", "follow_request.reject": "Reject", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Favourite", "status.filtered": "Filtered", "status.load_more": "Load more", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json index 740f2bfaed4573..973d0d57a5da6d 100644 --- a/app/javascript/mastodon/locales/eo.json +++ b/app/javascript/mastodon/locales/eo.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Vi ne ankoraŭ silentigis iun uzanton.", "empty_column.notifications": "Vi ankoraŭ ne havas sciigojn. Interagu kun aliaj por komenci konversacion.", "empty_column.public": "Estas nenio ĉi tie! Publike skribu ion, aŭ mane sekvu uzantojn de aliaj serviloj por plenigi la publikan tempolinion", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Rajtigi", "follow_request.reject": "Rifuzi", "getting_started.developers": "Programistoj", @@ -323,6 +328,7 @@ "status.favourite": "Stelumi", "status.filtered": "Filtrita", "status.load_more": "Ŝargi pli", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Aŭdovidaĵo kaŝita", "status.mention": "Mencii @{name}", "status.more": "Pli", diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json index 158a116d00f931..8ced8676b3e957 100644 --- a/app/javascript/mastodon/locales/es.json +++ b/app/javascript/mastodon/locales/es.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Aún no has silenciado a ningún usuario.", "empty_column.notifications": "No tienes ninguna notificación aún. Interactúa con otros para empezar una conversación.", "empty_column.public": "¡No hay nada aquí! Escribe algo públicamente, o sigue usuarios de otras instancias manualmente para llenarlo", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizar", "follow_request.reject": "Rechazar", "getting_started.developers": "Desarrolladores", @@ -323,6 +328,7 @@ "status.favourite": "Favorito", "status.filtered": "Filtrado", "status.load_more": "Cargar más", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Contenido multimedia oculto", "status.mention": "Mencionar", "status.more": "Más", diff --git a/app/javascript/mastodon/locales/eu.json b/app/javascript/mastodon/locales/eu.json index bd26ae232abc3d..ff9b08c078af3b 100644 --- a/app/javascript/mastodon/locales/eu.json +++ b/app/javascript/mastodon/locales/eu.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Ez duzu erabiltzailerik mututu oraindik.", "empty_column.notifications": "Ez duzu jakinarazpenik oraindik. Jarri besteekin harremanetan elkarrizketa abiatzeko.", "empty_column.public": "Ez dago ezer hemen! Idatzi zerbait publikoki edo jarraitu eskuz beste zerbitzari batzuetako erabiltzaileak hau betetzen joateko", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Baimendu", "follow_request.reject": "Ukatu", "getting_started.developers": "Garatzaileak", @@ -323,6 +328,7 @@ "status.favourite": "Gogokoa", "status.filtered": "Iragazita", "status.load_more": "Kargatu gehiago", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Multimedia ezkutatua", "status.mention": "Aipatu @{name}", "status.more": "Gehiago", diff --git a/app/javascript/mastodon/locales/fa.json b/app/javascript/mastodon/locales/fa.json index 6890fa971db639..7a5adcb1dbfd70 100644 --- a/app/javascript/mastodon/locales/fa.json +++ b/app/javascript/mastodon/locales/fa.json @@ -133,6 +133,11 @@ "empty_column.mutes": "شما هنوز هیچ کاربری را بی‌صدا نکرده‌اید.", "empty_column.notifications": "هنوز هیچ اعلانی ندارید. به نوشته‌های دیگران واکنش نشان دهید تا گفتگو آغاز شود.", "empty_column.public": "این‌جا هنوز چیزی نیست! خودتان چیزی بنویسید یا کاربران سرورهای دیگر را پی بگیرید تا این‌جا پر شود", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "اجازه دهید", "follow_request.reject": "اجازه ندهید", "getting_started.developers": "برای برنامه‌نویسان", @@ -323,6 +328,7 @@ "status.favourite": "پسندیدن", "status.filtered": "فیلترشده", "status.load_more": "بیشتر نشان بده", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "تصویر پنهان شده", "status.mention": "نام‌بردن از @{name}", "status.more": "بیشتر", diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json index 825cd4a75134e5..76fe6f3f2b22d6 100644 --- a/app/javascript/mastodon/locales/fi.json +++ b/app/javascript/mastodon/locales/fi.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Et ole mykistänyt vielä yhtään käyttäjää.", "empty_column.notifications": "Sinulle ei ole vielä ilmoituksia. Aloita keskustelu juttelemalla muille.", "empty_column.public": "Täällä ei ole mitään! Saat sisältöä, kun kirjoitat jotain julkisesti tai käyt seuraamassa muiden instanssien käyttäjiä", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Valtuuta", "follow_request.reject": "Hylkää", "getting_started.developers": "Kehittäjille", @@ -323,6 +328,7 @@ "status.favourite": "Tykkää", "status.filtered": "Suodatettu", "status.load_more": "Lataa lisää", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media piilotettu", "status.mention": "Mainitse @{name}", "status.more": "Lisää", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 58f3ce147675b5..d2e9b3da6adbbf 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Vous n’avez pas encore mis d'utilisateur·rice·s en silence.", "empty_column.notifications": "Vous n’avez pas encore de notification. Interagissez avec d’autres personnes pour débuter la conversation.", "empty_column.public": "Il n’y a rien ici ! Écrivez quelque chose publiquement, ou bien suivez manuellement des personnes d’autres instances pour remplir le fil public", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Accepter", "follow_request.reject": "Rejeter", "getting_started.developers": "Développeur·euse·s", @@ -323,6 +328,7 @@ "status.favourite": "Ajouter aux favoris", "status.filtered": "Filtré", "status.load_more": "Charger plus", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Média caché", "status.mention": "Mentionner @{name}", "status.more": "Plus", diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json index 723328ab467563..c787f2cbb294e5 100644 --- a/app/javascript/mastodon/locales/gl.json +++ b/app/javascript/mastodon/locales/gl.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Non acalou ningunha usuaria polo de agora.", "empty_column.notifications": "Aínda non ten notificacións. Interactúe con outras para iniciar unha conversa.", "empty_column.public": "Nada por aquí! Escriba algo de xeito público, ou siga manualmente usuarias de outros servidores para ir enchéndoa", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizar", "follow_request.reject": "Rexeitar", "getting_started.developers": "Desenvolvedoras", @@ -323,6 +328,7 @@ "status.favourite": "Favorita", "status.filtered": "Filtrado", "status.load_more": "Cargar máis", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Medios ocultos", "status.mention": "Mencionar @{name}", "status.more": "Máis", diff --git a/app/javascript/mastodon/locales/he.json b/app/javascript/mastodon/locales/he.json index c9228cffda6ab0..9c3254c72e7875 100644 --- a/app/javascript/mastodon/locales/he.json +++ b/app/javascript/mastodon/locales/he.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "אין התראות עדיין. יאללה, הגיע הזמן להתחיל להתערבב.", "empty_column.public": "אין פה כלום! כדי למלא את הטור הזה אפשר לכתוב משהו, או להתחיל לעקוב אחרי אנשים מקהילות אחרות", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "קבלה", "follow_request.reject": "דחיה", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "חיבוב", "status.filtered": "Filtered", "status.load_more": "עוד", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "מדיה מוסתרת", "status.mention": "פניה אל @{name}", "status.more": "עוד", diff --git a/app/javascript/mastodon/locales/hr.json b/app/javascript/mastodon/locales/hr.json index 55a4ec4eec7d01..df5cb5a56189cd 100644 --- a/app/javascript/mastodon/locales/hr.json +++ b/app/javascript/mastodon/locales/hr.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Još nemaš notifikacija. Komuniciraj sa drugima kako bi započeo razgovor.", "empty_column.public": "Ovdje nema ništa! Napiši nešto javno, ili ručno slijedi korisnike sa drugih instanci kako bi popunio", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autoriziraj", "follow_request.reject": "Odbij", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Označi omiljenim", "status.filtered": "Filtered", "status.load_more": "Učitaj više", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Sakriven media sadržaj", "status.mention": "Spomeni @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/hu.json b/app/javascript/mastodon/locales/hu.json index c5b0831c3a5ae6..c7812cb7f12bf9 100644 --- a/app/javascript/mastodon/locales/hu.json +++ b/app/javascript/mastodon/locales/hu.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Jelenleg nincsenek értesítései. Lépj kapcsolatba másokkal, hogy indítsd el a beszélgetést.", "empty_column.public": "Jelenleg semmi nincs itt! Írj valamit publikusan vagy kövess más szervereken levő felhasználókat, hogy megtöltsd", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Engedélyez", "follow_request.reject": "Visszautasít", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Kedvenc", "status.filtered": "Filtered", "status.load_more": "Többet", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Média elrejtve", "status.mention": "Említés", "status.more": "Többet", diff --git a/app/javascript/mastodon/locales/hy.json b/app/javascript/mastodon/locales/hy.json index ca7732d8515b95..6482b1ea5dfdce 100644 --- a/app/javascript/mastodon/locales/hy.json +++ b/app/javascript/mastodon/locales/hy.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Ոչ մի ծանուցում դեռ չունես։ Բզիր մյուսներին՝ խոսակցությունը սկսելու համար։", "empty_column.public": "Այստեղ բան չկա՛։ Հրապարակային մի բան գրիր կամ հետեւիր այլ հանգույցներից էակների՝ այն լցնելու համար։", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Վավերացնել", "follow_request.reject": "Մերժել", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Հավանել", "status.filtered": "Filtered", "status.load_more": "Բեռնել ավելին", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "մեդիաբովանդակությունը թաքցված է", "status.mention": "Նշել @{name}֊ին", "status.more": "Ավելին", diff --git a/app/javascript/mastodon/locales/id.json b/app/javascript/mastodon/locales/id.json index c4610c33054a0f..af3fb72c2a9363 100644 --- a/app/javascript/mastodon/locales/id.json +++ b/app/javascript/mastodon/locales/id.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Anda tidak memiliki notifikasi apapun. Berinteraksi dengan orang lain untuk memulai percakapan.", "empty_column.public": "Tidak ada apapun disini! Tulis sesuatu, atau ikuti pengguna lain dari server lain untuk mengisi ini", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Izinkan", "follow_request.reject": "Tolak", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Difavoritkan", "status.filtered": "Filtered", "status.load_more": "Tampilkan semua", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media disembunyikan", "status.mention": "Balasan @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/io.json b/app/javascript/mastodon/locales/io.json index dcdae5771f5ab6..d24470d00d96b5 100644 --- a/app/javascript/mastodon/locales/io.json +++ b/app/javascript/mastodon/locales/io.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Tu havas ankore nula savigo. Komunikez kun altri por debutar la konverso.", "empty_column.public": "Esas nulo hike! Skribez ulo publike, o manuale sequez uzeri de altra instaluri por plenigar ol.", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Yurizar", "follow_request.reject": "Refuzar", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Favorizar", "status.filtered": "Filtered", "status.load_more": "Kargar pluse", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Kontenajo celita", "status.mention": "Mencionar @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/it.json b/app/javascript/mastodon/locales/it.json index 792204830e218f..633331fad34239 100644 --- a/app/javascript/mastodon/locales/it.json +++ b/app/javascript/mastodon/locales/it.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Non hai ancora silenziato nessun utente.", "empty_column.notifications": "Non hai ancora nessuna notifica. Interagisci con altri per iniziare conversazioni.", "empty_column.public": "Qui non c'è nulla! Scrivi qualcosa pubblicamente, o aggiungi utenti da altri server per riempire questo spazio", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizza", "follow_request.reject": "Rifiuta", "getting_started.developers": "Sviluppatori", @@ -323,6 +328,7 @@ "status.favourite": "Apprezzato", "status.filtered": "Filtrato", "status.load_more": "Mostra di più", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Allegato nascosto", "status.mention": "Nomina @{name}", "status.more": "Altro", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index f80988d0d4f837..1fdc9882ef9a5d 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -133,6 +133,11 @@ "empty_column.mutes": "まだ誰もミュートしていません。", "empty_column.notifications": "まだ通知がありません。他の人とふれ合って会話を始めましょう。", "empty_column.public": "ここにはまだ何もありません! 公開で何かを投稿したり、他のサーバーのユーザーをフォローしたりしていっぱいにしましょう", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "許可", "follow_request.reject": "拒否", "getting_started.developers": "開発", @@ -323,6 +328,7 @@ "status.favourite": "お気に入り", "status.filtered": "フィルターされました", "status.load_more": "もっと見る", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "非表示のメディア", "status.mention": "@{name}さんにトゥート", "status.more": "もっと見る", diff --git a/app/javascript/mastodon/locales/ka.json b/app/javascript/mastodon/locales/ka.json index ac983a546e058d..663997b841658d 100644 --- a/app/javascript/mastodon/locales/ka.json +++ b/app/javascript/mastodon/locales/ka.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "ჯერ შეტყობინებები არ გაქვთ. საუბრის დასაწყებად იურთიერთქმედეთ სხვებთან.", "empty_column.public": "აქ არაფერია! შესავსებად, დაწერეთ რაიმე ღიად ან ხელით გაჰყევით მომხმარებლებს სხვა ინსტანციებისგან", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "ავტორიზაცია", "follow_request.reject": "უარყოფა", "getting_started.developers": "დეველოპერები", @@ -323,6 +328,7 @@ "status.favourite": "ფავორიტი", "status.filtered": "ფილტრირებული", "status.load_more": "მეტის ჩატვირთვა", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "მედია დამალულია", "status.mention": "ასახელე @{name}", "status.more": "მეტი", diff --git a/app/javascript/mastodon/locales/ko.json b/app/javascript/mastodon/locales/ko.json index a1e81a9d072b47..d6514d90478962 100644 --- a/app/javascript/mastodon/locales/ko.json +++ b/app/javascript/mastodon/locales/ko.json @@ -133,6 +133,11 @@ "empty_column.mutes": "아직 아무도 뮤트하지 않았습니다.", "empty_column.notifications": "아직 알림이 없습니다. 다른 사람과 대화를 시작해 보세요.", "empty_column.public": "여기엔 아직 아무 것도 없습니다! 공개적으로 무언가 포스팅하거나, 다른 서버의 유저를 팔로우 해서 채워보세요", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "허가", "follow_request.reject": "거부", "getting_started.developers": "개발자", @@ -323,6 +328,7 @@ "status.favourite": "즐겨찾기", "status.filtered": "필터링 됨", "status.load_more": "더 보기", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "미디어 숨겨짐", "status.mention": "답장", "status.more": "자세히", diff --git a/app/javascript/mastodon/locales/lv.json b/app/javascript/mastodon/locales/lv.json index ac33426995d7b1..fc14c64a562f1d 100644 --- a/app/javascript/mastodon/locales/lv.json +++ b/app/javascript/mastodon/locales/lv.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Tu neesi nevienu apklusinājis.", "empty_column.notifications": "Tev nav paziņojumu. Iesaisties sarunās ar citiem.", "empty_column.public": "Šeit nekā nav, tukšums! Ieraksti kaut ko publiski, vai uzmeklē un seko kādam no citas instances", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizēt", "follow_request.reject": "Noraidīt", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Favourite", "status.filtered": "Filtered", "status.load_more": "Load more", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/ms.json b/app/javascript/mastodon/locales/ms.json index 220cc86f9f0c0f..301768013cb6db 100644 --- a/app/javascript/mastodon/locales/ms.json +++ b/app/javascript/mastodon/locales/ms.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Authorize", "follow_request.reject": "Reject", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Favourite", "status.filtered": "Filtered", "status.load_more": "Load more", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index 96e39356b76c2e..c8f5dc73063151 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Jij hebt nog geen gebruikers genegeerd.", "empty_column.notifications": "Je hebt nog geen meldingen. Begin met iemand een gesprek.", "empty_column.public": "Er is hier helemaal niks! Toot iets in het openbaar of volg mensen van andere servers om het te vullen", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Goedkeuren", "follow_request.reject": "Afkeuren", "getting_started.developers": "Ontwikkelaars", @@ -323,6 +328,7 @@ "status.favourite": "Favoriet", "status.filtered": "Gefilterd", "status.load_more": "Meer laden", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media verborgen", "status.mention": "Vermeld @{name}", "status.more": "Meer", diff --git a/app/javascript/mastodon/locales/no.json b/app/javascript/mastodon/locales/no.json index fc2c3c57363f29..4af65f2a31eaed 100644 --- a/app/javascript/mastodon/locales/no.json +++ b/app/javascript/mastodon/locales/no.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Du har ingen varsler ennå. Kommuniser med andre for å begynne samtalen.", "empty_column.public": "Det er ingenting her! Skriv noe offentlig, eller følg brukere manuelt fra andre instanser for å fylle den opp", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorisér", "follow_request.reject": "Avvis", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Lik", "status.filtered": "Filtered", "status.load_more": "Last mer", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media skjult", "status.mention": "Nevn @{name}", "status.more": "Mer", diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index 4dfb9904e9a84e..98471100b72639 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Encara avètz pas mes en silenci degun.", "empty_column.notifications": "Avètz pas encara de notificacions. Respondètz a qualqu’un per començar una conversacion.", "empty_column.public": "I a pas res aquí ! Escrivètz quicòm de public, o seguètz de personas d’autres servidors per garnir lo flux public", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Acceptar", "follow_request.reject": "Regetar", "getting_started.developers": "Desvelopaires", @@ -323,6 +328,7 @@ "status.favourite": "Apondre als favorits", "status.filtered": "Filtrat", "status.load_more": "Cargar mai", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Mèdia rescondut", "status.mention": "Mencionar", "status.more": "Mai", diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json index b25a2c5f1fbe6f..f45bf218675b64 100644 --- a/app/javascript/mastodon/locales/pl.json +++ b/app/javascript/mastodon/locales/pl.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Nie wyciszyłeś(-aś) jeszcze żadnego użytkownika.", "empty_column.notifications": "Nie masz żadnych powiadomień. Rozpocznij interakcje z innymi użytkownikami.", "empty_column.public": "Tu nic nie ma! Napisz coś publicznie, lub dodaj ludzi z innych serwerów, aby to wyświetlić", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autoryzuj", "follow_request.reject": "Odrzuć", "getting_started.developers": "Dla programistów", @@ -323,6 +328,7 @@ "status.favourite": "Dodaj do ulubionych", "status.filtered": "Filtrowany(-a)", "status.load_more": "Załaduj więcej", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Zawartość multimedialna ukryta", "status.mention": "Wspomnij o @{name}", "status.more": "Więcej", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index e469344eca6293..d3e834a86c378a 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Você ainda não silenciou nenhum usuário.", "empty_column.notifications": "Você ainda não possui notificações. Interaja com outros usuários para começar a conversar.", "empty_column.public": "Não há nada aqui! Escreva algo publicamente ou siga manualmente usuários de outras instâncias", + "federation.change": "Ajustar federação do toot", + "federation.federated.long": "Permitir que o toot chegue a outras instâncias", + "federation.federated.short": "Federado", + "federation.local_only.long": "Restringir o toot somente à minha instância", + "federation.local_only.short": "Somente local", "follow_request.authorize": "Autorizar", "follow_request.reject": "Rejeitar", "getting_started.developers": "Desenvolvedores", @@ -323,6 +328,7 @@ "status.favourite": "Adicionar aos favoritos", "status.filtered": "Filtrado", "status.load_more": "Carregar mais", + "status.local_only": "Esse post só é visível para outros usuários da sua instância", "status.media_hidden": "Mídia escondida", "status.mention": "Mencionar @{name}", "status.more": "Mais", diff --git a/app/javascript/mastodon/locales/pt.json b/app/javascript/mastodon/locales/pt.json index 2abc3e2522e9cd..f9a094cd6a8921 100644 --- a/app/javascript/mastodon/locales/pt.json +++ b/app/javascript/mastodon/locales/pt.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Ainda não silenciaste qualquer utilizador.", "empty_column.notifications": "Não tens notificações. Interage com outros utilizadores para iniciar uma conversa.", "empty_column.public": "Não há nada aqui! Escreve algo publicamente ou segue outros utilizadores para veres aqui os conteúdos públicos", + "federation.change": "Ajustar federação do toot", + "federation.federated.long": "Permitir que o toot chegue a outras instâncias", + "federation.federated.short": "Federado", + "federation.local_only.long": "Restringir o toot somente à minha instância", + "federation.local_only.short": "Somente local", "follow_request.authorize": "Autorizar", "follow_request.reject": "Rejeitar", "getting_started.developers": "Responsáveis pelo desenvolvimento", @@ -323,6 +328,7 @@ "status.favourite": "Adicionar aos favoritos", "status.filtered": "Filtrada", "status.load_more": "Carregar mais", + "status.local_only": "Esse post só é visível para outros usuários da sua instância", "status.media_hidden": "Media escondida", "status.mention": "Mencionar @{name}", "status.more": "Mais", diff --git a/app/javascript/mastodon/locales/ro.json b/app/javascript/mastodon/locales/ro.json index c0ec77cc67fac0..15b7b91281e3b9 100644 --- a/app/javascript/mastodon/locales/ro.json +++ b/app/javascript/mastodon/locales/ro.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Nu ai oprit nici un utilizator incă.", "empty_column.notifications": "Nu ai nici o notificare încă. Interacționează cu alții pentru a începe o conversație.", "empty_column.public": "Nu este nimci aici încă! Scrie ceva public, sau urmărește alți utilizatori din alte instanțe pentru a porni fluxul", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Autorizează", "follow_request.reject": "Respinge", "getting_started.developers": "Dezvoltatori", @@ -323,6 +328,7 @@ "status.favourite": "Favorite", "status.filtered": "Sortate", "status.load_more": "Încarcă mai multe", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media ascunsă", "status.mention": "Mentionează @{name}", "status.more": "Mai mult", diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json index 47589979710223..ba0d8d417ba30f 100644 --- a/app/javascript/mastodon/locales/ru.json +++ b/app/javascript/mastodon/locales/ru.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Вы ещё никого не заглушили.", "empty_column.notifications": "У Вас еще нет уведомлений. Заведите знакомство с другими пользователями, чтобы начать разговор.", "empty_column.public": "Здесь ничего нет! Опубликуйте что-нибудь или подпишитесь на пользователей с других узлов, чтобы заполнить ленту.", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Авторизовать", "follow_request.reject": "Отказать", "getting_started.developers": "Для разработчиков", @@ -323,6 +328,7 @@ "status.favourite": "Нравится", "status.filtered": "Отфильтровано", "status.load_more": "Показать еще", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Медиа скрыто", "status.mention": "Упомянуть @{name}", "status.more": "Больше", diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json index c4fcb9f187ce46..212cf37451e142 100644 --- a/app/javascript/mastodon/locales/sk.json +++ b/app/javascript/mastodon/locales/sk.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Ešte si nestĺmil žiadných užívateľov.", "empty_column.notifications": "Ešte nemáš žiadne oznámenia. Začni komunikovať s ostatnými, aby diskusia mohla začať.", "empty_column.public": "Ešte tu nič nie je. Napíš niečo verejne, alebo začni sledovať užívateľov z iných serverov, aby tu niečo pribudlo", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Povoľ prístup", "follow_request.reject": "Odmietni", "getting_started.developers": "Vývojári", @@ -323,6 +328,7 @@ "status.favourite": "Páči sa mi", "status.filtered": "Filtrované", "status.load_more": "Ukáž viac", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Skryté médiá", "status.mention": "Spomeň @{name}", "status.more": "Viac", diff --git a/app/javascript/mastodon/locales/sl.json b/app/javascript/mastodon/locales/sl.json index f7a294cfe0a8a9..059abacf1eb0b6 100644 --- a/app/javascript/mastodon/locales/sl.json +++ b/app/javascript/mastodon/locales/sl.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Nimate še nobenih obvestil. Poveži se z drugimi, da začnete pogovor.", "empty_column.public": "Tukaj ni ničesar! Da ga napolnite, napišite nekaj javnega ali pa ročno sledite uporabnikom iz drugih vozlišč", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Odobri", "follow_request.reject": "Zavrni", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Favourite", "status.filtered": "Filtered", "status.load_more": "Load more", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/sr-Latn.json b/app/javascript/mastodon/locales/sr-Latn.json index 2fc5f985acd897..ae18feb1bf4556 100644 --- a/app/javascript/mastodon/locales/sr-Latn.json +++ b/app/javascript/mastodon/locales/sr-Latn.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Trenutno nemate obaveštenja. Družite se malo da započnete razgovore.", "empty_column.public": "Ovde nema ničega! Napišite nešto javno, ili nađite korisnike sa drugih instanci koje ćete zapratiti da popunite ovu prazninu", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Odobri", "follow_request.reject": "Odbij", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Omiljeno", "status.filtered": "Filtered", "status.load_more": "Učitaj još", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Multimedija sakrivena", "status.mention": "Pomeni korisnika @{name}", "status.more": "Još", diff --git a/app/javascript/mastodon/locales/sr.json b/app/javascript/mastodon/locales/sr.json index 2ae34adcad86ad..f7a15a21b8946d 100644 --- a/app/javascript/mastodon/locales/sr.json +++ b/app/javascript/mastodon/locales/sr.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Још увек немате ућутканих корисника.", "empty_column.notifications": "Тренутно немате обавештења. Дружите се мало да започнете разговор.", "empty_column.public": "Овде нема ничега! Напишите нешто јавно, или нађите кориснике са других инстанци које ћете запратити да попуните ову празнину", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Одобри", "follow_request.reject": "Одбиј", "getting_started.developers": "Програмери", @@ -323,6 +328,7 @@ "status.favourite": "Омиљено", "status.filtered": "Филтрирано", "status.load_more": "Учитај још", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Мултимедија сакривена", "status.mention": "Помени корисника @{name}", "status.more": "Још", diff --git a/app/javascript/mastodon/locales/sv.json b/app/javascript/mastodon/locales/sv.json index 71264ba526f23a..e8c5355b535302 100644 --- a/app/javascript/mastodon/locales/sv.json +++ b/app/javascript/mastodon/locales/sv.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "Du har inga meddelanden än. Interagera med andra för att starta konversationen.", "empty_column.public": "Det finns inget här! Skriv något offentligt, eller följ manuellt användarna från andra instanser för att fylla på det", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Godkänn", "follow_request.reject": "Avvisa", "getting_started.developers": "Utvecklare", @@ -323,6 +328,7 @@ "status.favourite": "Favorit", "status.filtered": "Filtered", "status.load_more": "Ladda fler", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media dold", "status.mention": "Omnämn @{name}", "status.more": "Mer", diff --git a/app/javascript/mastodon/locales/ta.json b/app/javascript/mastodon/locales/ta.json index 220cc86f9f0c0f..301768013cb6db 100644 --- a/app/javascript/mastodon/locales/ta.json +++ b/app/javascript/mastodon/locales/ta.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Authorize", "follow_request.reject": "Reject", "getting_started.developers": "Developers", @@ -323,6 +328,7 @@ "status.favourite": "Favourite", "status.filtered": "Filtered", "status.load_more": "Load more", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.more": "More", diff --git a/app/javascript/mastodon/locales/te.json b/app/javascript/mastodon/locales/te.json index 7e818c78785734..60831e9e5a16db 100644 --- a/app/javascript/mastodon/locales/te.json +++ b/app/javascript/mastodon/locales/te.json @@ -133,6 +133,11 @@ "empty_column.mutes": "మీరు ఇంకా ఏ వినియోగదారులనూ మ్యూట్ చేయలేదు.", "empty_column.notifications": "మీకు ఇంకా ఏ నోటిఫికేషన్లు లేవు. సంభాషణను ప్రారంభించడానికి ఇతరులతో ప్రతిస్పందించండి.", "empty_column.public": "ఇక్కడ ఏమీ లేదు! దీన్ని నింపడానికి బహిరంగంగా ఏదైనా వ్రాయండి, లేదా ఇతర సేవికల నుండి వినియోగదారులను అనుసరించండి", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "అనుమతించు", "follow_request.reject": "తిరస్కరించు", "getting_started.developers": "డెవలపర్లు", @@ -323,6 +328,7 @@ "status.favourite": "ఇష్టపడు", "status.filtered": "వడకట్టబడిన", "status.load_more": "మరిన్ని లోడ్ చేయి", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "మీడియా దాచబడింది", "status.mention": "@{name}ను ప్రస్తావించు", "status.more": "ఇంకొన్ని", diff --git a/app/javascript/mastodon/locales/th.json b/app/javascript/mastodon/locales/th.json index 630543ada70f0e..f8402281af0b37 100644 --- a/app/javascript/mastodon/locales/th.json +++ b/app/javascript/mastodon/locales/th.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "อนุญาต", "follow_request.reject": "ปฏิเสธ", "getting_started.developers": "นักพัฒนา", diff --git a/app/javascript/mastodon/locales/tr.json b/app/javascript/mastodon/locales/tr.json index 26eca82398bf05..93f9a5f774f2e5 100644 --- a/app/javascript/mastodon/locales/tr.json +++ b/app/javascript/mastodon/locales/tr.json @@ -133,6 +133,11 @@ "empty_column.mutes": "Henüz hiçbir kullanıcıyı sessize almadınız.", "empty_column.notifications": "Henüz hiçbir bildiriminiz yok. Diğer insanlarla sobhet edebilmek için etkileşime geçebilirsiniz.", "empty_column.public": "Burada hiçbir şey yok! Herkese açık bir şeyler yazın veya burayı doldurmak için diğer sunuculardaki kullanıcıları takip edin", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Yetkilendir", "follow_request.reject": "Reddet", "getting_started.developers": "Geliştiriciler", @@ -323,6 +328,7 @@ "status.favourite": "Favorilere ekle", "status.filtered": "Filtrelenmiş", "status.load_more": "Daha fazla", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Gizli görsel", "status.mention": "Bahset : @{name}", "status.more": "Daha fazla", diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json index 51a48a2b2efa23..ff3b59213eca3f 100644 --- a/app/javascript/mastodon/locales/uk.json +++ b/app/javascript/mastodon/locales/uk.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "У вас ще немає сповіщень. Переписуйтесь з іншими користувачами, щоб почати розмову.", "empty_column.public": "Тут поки нічого немає! Опублікуйте щось, або вручну підпишіться на користувачів інших інстанцій, щоб заповнити стрічку", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "Авторизувати", "follow_request.reject": "Відмовити", "getting_started.developers": "Розробникам", @@ -323,6 +328,7 @@ "status.favourite": "Подобається", "status.filtered": "Filtered", "status.load_more": "Завантажити більше", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "Медіаконтент приховано", "status.mention": "Згадати", "status.more": "More", diff --git a/app/javascript/mastodon/locales/zh-CN.json b/app/javascript/mastodon/locales/zh-CN.json index f9c6b4d4151b66..fdf0034001c6c0 100644 --- a/app/javascript/mastodon/locales/zh-CN.json +++ b/app/javascript/mastodon/locales/zh-CN.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "你还没有收到过任何通知,快向其他用户搭讪吧。", "empty_column.public": "这里神马都没有!写一些公开的嘟文,或者关注其他实例的用户后,这里就会有嘟文出现了哦!", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "同意", "follow_request.reject": "拒绝", "getting_started.developers": "开发", @@ -323,6 +328,7 @@ "status.favourite": "收藏", "status.filtered": "Filtered", "status.load_more": "加载更多", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "隐藏媒体内容", "status.mention": "提及 @{name}", "status.more": "更多", diff --git a/app/javascript/mastodon/locales/zh-HK.json b/app/javascript/mastodon/locales/zh-HK.json index ed448f65a70317..7c73059a7f31fd 100644 --- a/app/javascript/mastodon/locales/zh-HK.json +++ b/app/javascript/mastodon/locales/zh-HK.json @@ -133,6 +133,11 @@ "empty_column.mutes": "You haven't muted any users yet.", "empty_column.notifications": "你沒有任何通知紀錄,快向其他用戶搭訕吧。", "empty_column.public": "跨站時間軸暫時沒有內容!快寫一些公共的文章,或者關注另一些服務站的用戶吧!你和本站、友站的交流,將決定這裏出現的內容。", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "批准", "follow_request.reject": "拒絕", "getting_started.developers": "開發者", @@ -323,6 +328,7 @@ "status.favourite": "收藏", "status.filtered": "Filtered", "status.load_more": "載入更多", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "隱藏媒體內容", "status.mention": "提及 @{name}", "status.more": "更多", diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json index b43a0b72c08e0a..f2ee96d7399b44 100644 --- a/app/javascript/mastodon/locales/zh-TW.json +++ b/app/javascript/mastodon/locales/zh-TW.json @@ -133,6 +133,11 @@ "empty_column.mutes": "你還沒有靜音任何使用者。", "empty_column.notifications": "您尚未收到任何通知,和別人互動開啟對話吧。", "empty_column.public": "這裡什麼都沒有!嘗試寫些公開的嘟文,或著自己關注其他伺服器的使用者後就會有嘟文出現了", + "federation.change": "Adjust status federation", + "federation.federated.long": "Allow toot to reach other instances", + "federation.federated.short": "Federated", + "federation.local_only.long": "Restrict this toot only to my instance", + "federation.local_only.short": "Local-only", "follow_request.authorize": "授權", "follow_request.reject": "拒絕", "getting_started.developers": "開發者", @@ -323,6 +328,7 @@ "status.favourite": "最愛", "status.filtered": "已過濾", "status.load_more": "載入更多", + "status.local_only": "This post is only visible by other users of your instance", "status.media_hidden": "隱藏媒體內容", "status.mention": "提到 @{name}", "status.more": "更多", diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index b45def281b6d85..ed4981c48ef866 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -23,6 +23,7 @@ import { COMPOSE_SPOILERNESS_CHANGE, COMPOSE_SPOILER_TEXT_CHANGE, COMPOSE_VISIBILITY_CHANGE, + COMPOSE_FEDERATION_CHANGE, COMPOSE_COMPOSING_CHANGE, COMPOSE_EMOJI_INSERT, COMPOSE_UPLOAD_CHANGE_REQUEST, @@ -50,6 +51,7 @@ const initialState = ImmutableMap({ spoiler: false, spoiler_text: '', privacy: null, + federation: null, text: '', focusDate: null, caretPosition: null, @@ -65,6 +67,7 @@ const initialState = ImmutableMap({ suggestion_token: null, suggestions: ImmutableList(), default_privacy: 'public', + default_federation: true, default_sensitive: false, resetFileKey: Math.floor((Math.random() * 0x10000)), idempotencyKey: null, @@ -96,6 +99,7 @@ function clearAll(state) { map.set('is_changing_upload', false); map.set('in_reply_to', null); map.set('privacy', state.get('default_privacy')); + map.set('federation', state.get('default_federation')); map.set('sensitive', false); map.update('media_attachments', list => list.clear()); map.set('poll', null); @@ -225,6 +229,10 @@ export default function compose(state = initialState, action) { return state .set('spoiler_text', action.text) .set('idempotencyKey', uuid()); + case COMPOSE_FEDERATION_CHANGE: + return state + .set('federation', action.value) + .set('idempotencyKey', uuid()); case COMPOSE_VISIBILITY_CHANGE: return state .set('privacy', action.value) @@ -240,6 +248,7 @@ export default function compose(state = initialState, action) { map.set('in_reply_to', action.status.get('id')); map.set('text', statusToTextMentions(state, action.status)); map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy'))); + map.set('federation', !action.status.get('local_only')); map.set('focusDate', new Date()); map.set('caretPosition', null); map.set('preselectDate', new Date()); @@ -262,6 +271,7 @@ export default function compose(state = initialState, action) { map.set('spoiler_text', ''); map.set('privacy', state.get('default_privacy')); map.set('poll', null); + map.set('federation', state.get('default_federation')); map.set('idempotencyKey', uuid()); }); case COMPOSE_SUBMIT_REQUEST: @@ -332,6 +342,7 @@ export default function compose(state = initialState, action) { map.set('text', unescapeHTML(expandMentions(action.status))); map.set('in_reply_to', action.status.get('in_reply_to_id')); map.set('privacy', action.status.get('visibility')); + map.set('federation', !action.status.get('local_only')); map.set('media_attachments', action.status.get('media_attachments')); map.set('focusDate', new Date()); map.set('caretPosition', null); diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index daeb3d936fb6b4..83dff9c75b1c37 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -20,6 +20,7 @@ def process_update user.settings['default_privacy'] = default_privacy_preference if change?('setting_default_privacy') user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') user.settings['default_language'] = default_language_preference if change?('setting_default_language') + user.settings['default_federation'] = default_federation_preference if change?('setting_default_federation') user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') @@ -51,6 +52,10 @@ def default_sensitive_preference boolean_cast_setting 'setting_default_sensitive' end + def default_federation_preference + boolean_cast_setting 'setting_default_federation' + end + def unfollow_modal_preference boolean_cast_setting 'setting_unfollow_modal' end diff --git a/app/models/status.rb b/app/models/status.rb index 8d31fd3824de03..32cbfdd5d05d2f 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -22,6 +22,7 @@ # application_id :bigint(8) # in_reply_to_account_id :bigint(8) # poll_id :bigint(8) +# local_only :boolean # class Status < ApplicationRecord @@ -82,6 +83,7 @@ class Status < ApplicationRecord scope :without_replies, -> { where('statuses.reply = FALSE OR statuses.in_reply_to_account_id = statuses.account_id') } scope :without_reblogs, -> { where('statuses.reblog_of_id IS NULL') } + scope :without_local_only, -> { where(local_only: [false, nil]) } scope :with_public_visibility, -> { where(visibility: :public) } scope :tagged_with, ->(tag) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag }) } scope :excluding_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced: false }) } @@ -152,6 +154,10 @@ def local? attributes['local'] || uri.nil? end + def local_only? + local_only + end + def reblog? !reblog_of_id.nil? end @@ -257,6 +263,8 @@ def decrement_count!(key) around_create Mastodon::Snowflake::Callbacks + before_create :set_locality + before_validation :prepare_contents, if: :local? before_validation :set_reblog before_validation :set_visibility @@ -375,7 +383,7 @@ def permitted_for(target_account, account) visibility = [:public, :unlisted] if account.nil? - where(visibility: visibility) + where(visibility: visibility).without_local_only elsif target_account.blocking?(account) # get rid of blocked peeps none elsif account.id == target_account.id # author can see own stuff @@ -418,7 +426,7 @@ def filter_timeline_for_account(query, account, local_only) end def filter_timeline_default(query) - query.excluding_silenced_accounts + query.without_local_only.excluding_silenced_accounts end def account_silencing_filter(account) @@ -488,6 +496,10 @@ def set_local self.local = account.local? end + def set_locality + self.local_only = reblog.local_only if reblog? + end + def update_statistics return unless public_visibility? || unlisted_visibility? ActivityTracker.increment('activity:statuses:local') diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb index 1a9afc5c7b7432..b0990df90ccb9b 100644 --- a/app/models/stream_entry.rb +++ b/app/models/stream_entry.rb @@ -26,8 +26,9 @@ class StreamEntry < ApplicationRecord default_scope { where(activity_type: 'Status') } scope :recent, -> { reorder(id: :desc) } scope :with_includes, -> { includes(:account, status: STATUS_INCLUDES) } + scope :without_local_only, -> { where(statuses: { local_only: [false, nil] }) } - delegate :target, :title, :content, :thread, + delegate :target, :title, :content, :thread, :local_only?, to: :status, allow_nil: true diff --git a/app/models/user.rb b/app/models/user.rb index bce28aa5fb456b..9c10f5ca720c73 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -104,7 +104,7 @@ class User < ApplicationRecord delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal, :reduce_motion, :system_font_ui, :noindex, :theme, :display_media, :hide_network, - :expand_spoilers, :default_language, :aggregate_reblogs, :show_application, to: :settings, prefix: :setting, allow_nil: false + :expand_spoilers, :default_language, :aggregate_reblogs, :show_application, :default_federation, to: :settings, prefix: :setting, allow_nil: false attr_reader :invite_code attr_writer :external diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index 64a5111fc8f899..a5646d43a48c92 100644 --- a/app/policies/status_policy.rb +++ b/app/policies/status_policy.rb @@ -12,6 +12,8 @@ def index? end def show? + return false if local_only? && (current_account.nil? || !current_account.local?) + if requires_mention? owned? || mention_exists? elsif private? @@ -84,4 +86,8 @@ def following_author? def author record.account end + + def local_only? + record.local_only? + end end diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 0c9fc625f47905..d9eb40b7f872a7 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -44,6 +44,7 @@ def compose store[:me] = object.current_account.id.to_s store[:default_privacy] = object.current_account.user.setting_default_privacy store[:default_sensitive] = object.current_account.user.setting_default_sensitive + store[:default_federation] = object.current_account.user.setting_default_federation end store[:text] = object.text if object.text diff --git a/app/serializers/rest/credential_account_serializer.rb b/app/serializers/rest/credential_account_serializer.rb index fb195eb07d8bf2..f07f9f05802386 100644 --- a/app/serializers/rest/credential_account_serializer.rb +++ b/app/serializers/rest/credential_account_serializer.rb @@ -10,6 +10,7 @@ def source privacy: user.setting_default_privacy, sensitive: user.setting_default_sensitive, language: user.setting_default_language, + federation: user.setting_default_federation, note: object.note, fields: object.fields.map(&:to_h), } diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 106777b6e95969..d979c88f6b2589 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -4,7 +4,7 @@ class REST::StatusSerializer < ActiveModel::Serializer attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id, :sensitive, :spoiler_text, :visibility, :language, :uri, :content, :url, :replies_count, :reblogs_count, - :favourites_count + :favourites_count, :local_only attribute :favourited, if: :current_user? attribute :reblogged, if: :current_user? diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e7366c7e8c2363..74d13a0163d62f 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -85,12 +85,20 @@ def schedule_status! end end + def local_only_option(local_only, in_reply_to, federation_setting) + return in_reply_to&.local_only? if local_only.nil? # XXX temporary, just until clients implement to avoid leaking local_only posts + return federation_setting if local_only.nil? + local_only + end + def postprocess_status! LinkCrawlWorker.perform_async(@status.id) unless @status.spoiler_text? DistributionWorker.perform_async(@status.id) - Pubsubhubbub::DistributionWorker.perform_async(@status.stream_entry.id) - ActivityPub::DistributionWorker.perform_async(@status.id) - PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll + unless @status.local_only? + Pubsubhubbub::DistributionWorker.perform_async(@status.stream_entry.id) + ActivityPub::DistributionWorker.perform_async(@status.id) + PollExpirationNotifyWorker.perform_at(@status.poll.expires_at, @status.poll.id) if @status.poll + end end def validate_media! @@ -161,6 +169,7 @@ def status_attributes visibility: @visibility, language: language_from_option(@options[:language]) || @account.user&.setting_default_language&.presence || LanguageDetector.instance.detect(@text, @account), application: @options[:application], + local_only: local_only_option(@options[:local_only], @in_reply_to, @account.user&.setting_default_federation), }.compact end diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index 2595c5fd3668c9..1d9448e2136fc4 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -48,9 +48,9 @@ def create_notification(mention) if mentioned_account.local? LocalNotificationWorker.perform_async(mentioned_account.id, mention.id, mention.class.name) - elsif mentioned_account.ostatus? && !@status.stream_entry.hidden? + elsif mentioned_account.ostatus? && !@status.stream_entry.hidden? && !@status.local_only? NotificationWorker.perform_async(ostatus_xml, @status.account_id, mentioned_account.id) - elsif mentioned_account.activitypub? + elsif mentioned_account.activitypub? && !@status.local_only? ActivityPub::DeliveryWorker.perform_async(activitypub_json, mention.status.account_id, mentioned_account.inbox_url) end end diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index ff48d9c75ce8e9..deaa0549ea6b86 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -21,8 +21,11 @@ def call(account, reblogged_status, options = {}) reblog = account.statuses.create!(reblog: reblogged_status, text: '', visibility: options[:visibility] || account.user&.setting_default_privacy) DistributionWorker.perform_async(reblog.id) - Pubsubhubbub::DistributionWorker.perform_async(reblog.stream_entry.id) - ActivityPub::DistributionWorker.perform_async(reblog.id) + + unless reblogged_status.local_only? + Pubsubhubbub::DistributionWorker.perform_async(reblog.stream_entry.id) + ActivityPub::DistributionWorker.perform_async(reblog.id) + end create_notification(reblog) bump_potential_friendship(account, reblog) diff --git a/app/views/admin/reports/_status.html.haml b/app/views/admin/reports/_status.html.haml index b3c145120a08c5..9bb751a9c2bc0e 100644 --- a/app/views/admin/reports/_status.html.haml +++ b/app/views/admin/reports/_status.html.haml @@ -32,3 +32,7 @@ · = fa_icon('eye-slash fw') = t('stream_entries.sensitive_content') + - if status.proper.local_only + · + = fa_icon('chain-broken fw') + = t('statuses.local_only') diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index d81ee61add4345..5ee17dcd276334 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -27,6 +27,8 @@ = f.input :setting_default_sensitive, as: :boolean, wrapper: :with_label + = f.input :setting_default_federation, as: :boolean, wrapper: :with_label + %hr#settings_other/ .fields-group diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index 23f2920d89c860..f7d6e03f777cef 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -73,6 +73,10 @@ %span.detailed-status__favorites>= number_to_human status.favourites_count, strip_insignificant_zeros: true = " " + - if status.local_only + · + %span.detailed-status__link.modal-button.disabled< + = fa_icon 'chain-broken fw', 'title': t('statuses.local_only') - if user_signed_in? · = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'detailed-status__application', target: '_blank' diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index 0df7497e10b6d6..08150c23105291 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -57,3 +57,6 @@ = fa_icon 'envelope fw' = link_to remote_interaction_path(status, type: :favourite), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do = fa_icon 'star fw' + - if status.local_only + %span.status__action-bar-button.icon-button.disabled{style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;'}< + = fa_icon 'chain-broken fw', 'title': t('statuses.local_only') diff --git a/config/locales/en.yml b/config/locales/en.yml index c4f0289d98339a..5924590ac30529 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -895,6 +895,7 @@ en: one: 'contained a disallowed hashtag: %{tags}' other: 'contained the disallowed hashtags: %{tags}' language_detection: Automatically detect language + local_only: Local-only open_in_web: Open in web over_character_limit: character limit of %{max} exceeded pin_errors: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 22a3918a196deb..c1aa3bc51e12b7 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -894,6 +894,7 @@ pt-BR: one: 'continha a hashtag não permitida: %{tags}' other: 'continha as hashtags não permitidas: %{tags}' language_detection: Detectar idioma automaticamente + local_only: Somente local open_in_web: Abrir na web over_character_limit: limite de caracteres de %{max} excedido pin_errors: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 1534bdf04470b2..bec69f71de8366 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -93,6 +93,7 @@ en: setting_aggregate_reblogs: Group boosts in timelines setting_auto_play_gif: Auto-play animated GIFs setting_boost_modal: Show confirmation dialog before boosting + setting_default_federation: Allow my toots to reach other instances by default setting_default_language: Posting language setting_default_privacy: Post privacy setting_default_sensitive: Always mark media as sensitive diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index 734bd21d01311e..e8be448ad1792f 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -93,6 +93,7 @@ pt-BR: setting_aggregate_reblogs: Agrupar compartilhamentos nas timelines setting_auto_play_gif: Reproduzir GIFs automaticamente setting_boost_modal: Mostrar diálogo de confirmação antes de compartilhar postagem + setting_default_federation: Permitir que meus toots cheguem em outras instâncias por padrão setting_default_language: Idioma das postagens setting_default_privacy: Privacidade das postagens setting_default_sensitive: Sempre marcar mídia como sensível diff --git a/config/settings.yml b/config/settings.yml index 63f7c338038143..5810361f97a333 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -17,6 +17,7 @@ defaults: &defaults timeline_preview: true show_staff_badge: true default_sensitive: false + default_federation: true hide_network: false unfollow_modal: false boost_modal: false diff --git a/db/migrate/20171210213213_add_local_only_flag_to_statuses.rb b/db/migrate/20171210213213_add_local_only_flag_to_statuses.rb new file mode 100644 index 00000000000000..af1e29d6a141c9 --- /dev/null +++ b/db/migrate/20171210213213_add_local_only_flag_to_statuses.rb @@ -0,0 +1,5 @@ +class AddLocalOnlyFlagToStatuses < ActiveRecord::Migration[5.1] + def change + add_column :statuses, :local_only, :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index 8613539d644e80..8be67002e8a196 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -625,6 +625,7 @@ t.bigint "application_id" t.bigint "in_reply_to_account_id" t.bigint "poll_id" + t.boolean "local_only" t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20180106", order: { id: :desc } t.index ["in_reply_to_account_id"], name: "index_statuses_on_in_reply_to_account_id" t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id" diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index a63be018a561b0..95badc272138de 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -29,7 +29,7 @@ def to_a end def suffix - '+beachcity1.3.0' + '+beachcity1.4.0' end def to_s diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb index e8cf18af905978..e7229087ffd98c 100644 --- a/spec/models/status_spec.rb +++ b/spec/models/status_spec.rb @@ -574,6 +574,32 @@ end end end + + context 'with local-only statuses' do + let(:status) { Fabricate(:status, local_only: true) } + + subject { Status.as_public_timeline(viewer) } + + context 'without a viewer' do + let(:viewer) { nil } + + it 'excludes local-only statuses' do + expect(subject).to_not include(status) + end + end + + context 'with a viewer' do + let(:viewer) { Fabricate(:account, username: 'viewer') } + + it 'includes local-only statuses' do + expect(subject).to include(status) + end + end + + # TODO: What happens if the viewer is remote? + # Can the viewer be remote? + # What prevents the viewer from being remote? + end end describe '.as_tag_timeline' do @@ -595,6 +621,27 @@ results = Status.as_tag_timeline(tag) expect(results).to include(status) end + + context 'on a local-only status' do + let(:tag) { Fabricate(:tag) } + let(:status) { Fabricate(:status, local_only: true, tags: [tag]) } + + context 'without a viewer' do + let(:viewer) { nil } + + it 'filters the local-only status out of the result set' do + expect(Status.as_tag_timeline(tag, viewer)).not_to include(status) + end + end + + context 'with a viewer' do + let(:viewer) { Fabricate(:account, username: 'viewer', domain: nil) } + + it 'keeps the local-only status in the result set' do + expect(Status.as_tag_timeline(tag, viewer)).to include(status) + end + end + end end describe '.permitted_for' do diff --git a/spec/policies/status_policy_spec.rb b/spec/policies/status_policy_spec.rb index 1cddf4abd57da9..8bce29cad27e36 100644 --- a/spec/policies/status_policy_spec.rb +++ b/spec/policies/status_policy_spec.rb @@ -73,6 +73,18 @@ expect(subject).to_not permit(viewer, status) end + + it 'denies access when local-only and the viewer is not logged in' do + allow(status).to receive(:local_only?) { true } + + expect(subject).to_not permit(nil, status) + end + + it 'denies access when local-only and the viewer is from another domain' do + viewer = Fabricate(:account, domain: 'remote-domain') + allow(status).to receive(:local_only?) { true } + expect(subject).to_not permit(viewer, status) + end end permissions :reblog? do diff --git a/streaming/index.js b/streaming/index.js index 2a51a1a0daa1b4..d4fb8cad38e23f 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -339,6 +339,12 @@ const startWorker = (workerId) => { return; } + // Only send local-only statuses to logged-in users + if (payload.local_only && !req.accountId) { + log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`); + return; + } + // Only messages that may require filtering are statuses, since notifications // are already personalized and deletes do not matter if (!needsFiltering || event !== 'update') {