Merge branch 'master' into 454-allow-keyword-mutes-to-skip-mentions

This commit is contained in:
David Yip 2018-06-12 18:13:30 -05:00 committed by GitHub
commit 5cff053944
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 868 additions and 195 deletions

View file

@ -15,7 +15,8 @@ class Api::V1::DomainBlocksController < Api::BaseController
end
def create
BlockDomainFromAccountService.new.call(current_account, domain_block_params[:domain])
current_account.block_domain!(domain_block_params[:domain])
AfterAccountDomainBlockWorker.perform_async(current_account.id, domain_block_params[:domain])
render_empty
end

View file

@ -1,9 +1,10 @@
# frozen_string_literal: true
class IntentsController < ApplicationController
def show
uri = Addressable::URI.parse(params[:uri])
before_action :check_uri
rescue_from Addressable::URI::InvalidURIError, with: :handle_invalid_uri
def show
if uri.scheme == 'web+mastodon'
case uri.host
when 'follow'
@ -15,4 +16,18 @@ class IntentsController < ApplicationController
not_found
end
private
def check_uri
not_found if uri.blank?
end
def handle_invalid_uri
not_found
end
def uri
@uri ||= Addressable::URI.parse(params[:uri])
end
end

View file

@ -11,7 +11,7 @@ class Settings::FollowerDomainsController < Settings::BaseController
def update
domains = bulk_params[:select] || []
SoftBlockDomainFollowersWorker.push_bulk(domains) do |domain|
AfterAccountDomainBlockWorker.push_bulk(domains) do |domain|
[current_account.id, domain]
end

View file

@ -107,7 +107,7 @@ const mapDispatchToProps = (dispatch, { onPickEmoji }) => ({
const assetHost = process.env.CDN_HOST || '';
let EmojiPicker, Emoji; // load asynchronously
const backgroundImageFn = () => `${assetHost}/emoji/sheet.png`;
const backgroundImageFn = () => `${assetHost}/emoji/sheet_10.png`;
const listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;
const categoriesSort = [

View file

@ -9,7 +9,14 @@ const { unicodeToFilename } = require('./unicode_to_filename');
const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
const emojiMap = require('./emoji_map.json');
const { emojiIndex } = require('emoji-mart');
const { default: emojiMartData } = require('emoji-mart/dist/data');
const { uncompress: emojiMartUncompress } = require('emoji-mart/dist/utils/data');
let data = require('emoji-mart/data/all.json');
if(data.compressed) {
data = emojiMartUncompress(data);
}
const emojiMartData = data;
const excluded = ['®', '©', '™'];
const skins = ['🏻', '🏼', '🏽', '🏾', '🏿'];
@ -88,6 +95,6 @@ module.exports = JSON.parse(JSON.stringify([
shortCodesToEmojiData,
emojiMartData.skins,
emojiMartData.categories,
emojiMartData.short_names,
emojiMartData.aliases,
emojisWithoutShortCodes,
]));

View file

@ -8,6 +8,7 @@ let originalPool = {};
let index = {};
let emojisList = {};
let emoticonsList = {};
let customEmojisList = [];
for (let emoji in data.emojis) {
let emojiData = data.emojis[emoji];
@ -28,7 +29,18 @@ for (let emoji in data.emojis) {
originalPool[id] = emojiData;
}
function clearCustomEmojis(pool) {
customEmojisList.forEach((emoji) => {
let emojiId = emoji.id || emoji.short_names[0];
delete pool[emojiId];
delete emojisList[emojiId];
});
}
function addCustomToPool(custom, pool) {
if (customEmojisList.length) clearCustomEmojis(pool);
custom.forEach((emoji) => {
let emojiId = emoji.id || emoji.short_names[0];
@ -37,10 +49,14 @@ function addCustomToPool(custom, pool) {
emojisList[emojiId] = getSanitizedData(emoji);
}
});
customEmojisList = custom;
index = {};
}
function search(value, { emojisToShowFilter, maxResults, include, exclude, custom = [] } = {}) {
addCustomToPool(custom, originalPool);
if (customEmojisList !== custom)
addCustomToPool(custom, originalPool);
maxResults = maxResults || 75;
include = include || [];
@ -143,7 +159,7 @@ function search(value, { emojisToShowFilter, maxResults, include, exclude, custo
if (results) {
if (emojisToShowFilter) {
results = results.filter((result) => emojisToShowFilter(data.emojis[result.id].unified));
results = results.filter((result) => emojisToShowFilter(data.emojis[result.id]));
}
if (results && results.length > maxResults) {

View file

@ -1,5 +1,5 @@
import Picker from 'emoji-mart/dist-es/components/picker';
import Emoji from 'emoji-mart/dist-es/components/emoji';
import Picker from 'emoji-mart/dist-es/components/picker/picker';
import Emoji from 'emoji-mart/dist-es/components/emoji/emoji';
export {
Picker,

View file

@ -96,7 +96,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
onBlockDomain (domain) {
dispatch(openModal('CONFIRM', {
message: <FormattedMessage id='confirmations.domain_block.message' defaultMessage='Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.' values={{ domain: <strong>{domain}</strong> }} />,
message: <FormattedMessage id='confirmations.domain_block.message' defaultMessage='Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.' values={{ domain: <strong>{domain}</strong> }} />,
confirm: intl.formatMessage(messages.blockDomainConfirm),
onConfirm: () => dispatch(blockDomain(domain)),
}));

View file

@ -128,12 +128,24 @@ export default class ComposeForm extends ImmutablePureComponent {
} else if(prevProps.is_submitting && !this.props.is_submitting) {
this.autosuggestTextarea.textarea.focus();
}
if (this.props.spoiler !== prevProps.spoiler) {
if (this.props.spoiler) {
this.spoilerText.focus();
} else {
this.autosuggestTextarea.textarea.focus();
}
}
}
setAutosuggestTextarea = (c) => {
this.autosuggestTextarea = c;
}
setSpoilerText = (c) => {
this.spoilerText = c;
}
handleEmojiPick = (data) => {
const { text } = this.props;
const position = this.autosuggestTextarea.textarea.selectionStart;
@ -164,7 +176,7 @@ export default class ComposeForm extends ImmutablePureComponent {
<div className={`spoiler-input ${this.props.spoiler ? 'spoiler-input--visible' : ''}`}>
<label>
<span style={{ display: 'none' }}>{intl.formatMessage(messages.spoiler_placeholder)}</span>
<input placeholder={intl.formatMessage(messages.spoiler_placeholder)} value={this.props.spoiler_text} onChange={this.handleChangeSpoilerText} onKeyDown={this.handleKeyDown} type='text' className='spoiler-input__input' id='cw-spoiler-input' />
<input placeholder={intl.formatMessage(messages.spoiler_placeholder)} value={this.props.spoiler_text} onChange={this.handleChangeSpoilerText} onKeyDown={this.handleKeyDown} type='text' className='spoiler-input__input' id='cw-spoiler-input' ref={this.setSpoilerText} />
</label>
</div>

View file

@ -28,7 +28,7 @@ const messages = defineMessages({
const assetHost = process.env.CDN_HOST || '';
let EmojiPicker, Emoji; // load asynchronously
const backgroundImageFn = () => `${assetHost}/emoji/sheet.png`;
const backgroundImageFn = () => `${assetHost}/emoji/sheet_10.png`;
const listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;
const categoriesSort = [

View file

@ -51,7 +51,7 @@ describe('emoji', () => {
});
it('does an emoji that has no shortcode', () => {
expect(emojify('🕉️')).toEqual('<img draggable="false" class="emojione" alt="🕉️" title="" src="/emoji/1f549.svg" />');
expect(emojify('👁‍🗨')).toEqual('<img draggable="false" class="emojione" alt="👁‍🗨" title="" src="/emoji/1f441-200d-1f5e8.svg" />');
});
it('does an emoji whose filename is irregular', () => {

View file

@ -44,6 +44,57 @@ describe('emoji_index', () => {
expect(emojiIndex.search('apple').map(trimEmojis)).toEqual(expected);
});
it('can include/exclude categories', () => {
expect(search('flag', { include: ['people'] })).toEqual([]);
expect(emojiIndex.search('flag', { include: ['people'] })).toEqual([]);
});
it('(different behavior from emoji-mart) do not erases custom emoji if not passed again', () => {
const custom = [
{
id: 'mastodon',
name: 'mastodon',
short_names: ['mastodon'],
text: '',
emoticons: [],
keywords: ['mastodon'],
imageUrl: 'http://example.com',
custom: true,
},
];
search('', { custom });
emojiIndex.search('', { custom });
const expected = [];
const lightExpected = [
{
id: 'mastodon',
custom: true,
},
];
expect(search('masto').map(trimEmojis)).toEqual(lightExpected);
expect(emojiIndex.search('masto').map(trimEmojis)).toEqual(expected);
});
it('(different behavior from emoji-mart) erases custom emoji if another is passed', () => {
const custom = [
{
id: 'mastodon',
name: 'mastodon',
short_names: ['mastodon'],
text: '',
emoticons: [],
keywords: ['mastodon'],
imageUrl: 'http://example.com',
custom: true,
},
];
search('', { custom });
emojiIndex.search('', { custom });
const expected = [];
expect(search('masto', { custom: [] }).map(trimEmojis)).toEqual(expected);
expect(emojiIndex.search('masto').map(trimEmojis)).toEqual(expected);
});
it('handles custom emoji', () => {
const custom = [
{
@ -65,23 +116,18 @@ describe('emoji_index', () => {
custom: true,
},
];
expect(search('masto').map(trimEmojis)).toEqual(expected);
expect(emojiIndex.search('masto').map(trimEmojis)).toEqual(expected);
expect(search('masto', { custom }).map(trimEmojis)).toEqual(expected);
expect(emojiIndex.search('masto', { custom }).map(trimEmojis)).toEqual(expected);
});
it('should filter only emojis we care about, exclude pineapple', () => {
const emojisToShowFilter = unified => unified !== '1F34D';
const emojisToShowFilter = emoji => emoji.unified !== '1F34D';
expect(search('apple', { emojisToShowFilter }).map((obj) => obj.id))
.not.toContain('pineapple');
expect(emojiIndex.search('apple', { emojisToShowFilter }).map((obj) => obj.id))
.not.toContain('pineapple');
});
it('can include/exclude categories', () => {
expect(search('flag', { include: ['people'] })).toEqual([]);
expect(emojiIndex.search('flag', { include: ['people'] })).toEqual([]);
});
it('does an emoji whose unified name is irregular', () => {
const expected = [
{

View file

@ -9,7 +9,13 @@ const { unicodeToFilename } = require('./unicode_to_filename');
const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
const emojiMap = require('./emoji_map.json');
const { emojiIndex } = require('emoji-mart');
const { default: emojiMartData } = require('emoji-mart/dist/data');
const { uncompress: emojiMartUncompress } = require('emoji-mart/dist/utils/data');
let data = require('emoji-mart/data/all.json');
if(data.compressed) {
data = emojiMartUncompress(data);
}
const emojiMartData = data;
const excluded = ['®', '©', '™'];
const skins = ['🏻', '🏼', '🏽', '🏾', '🏿'];
@ -88,6 +94,6 @@ module.exports = JSON.parse(JSON.stringify([
shortCodesToEmojiData,
emojiMartData.skins,
emojiMartData.categories,
emojiMartData.short_names,
emojiMartData.aliases,
emojisWithoutShortCodes,
]));

View file

@ -8,6 +8,7 @@ let originalPool = {};
let index = {};
let emojisList = {};
let emoticonsList = {};
let customEmojisList = [];
for (let emoji in data.emojis) {
let emojiData = data.emojis[emoji];
@ -28,7 +29,18 @@ for (let emoji in data.emojis) {
originalPool[id] = emojiData;
}
function clearCustomEmojis(pool) {
customEmojisList.forEach((emoji) => {
let emojiId = emoji.id || emoji.short_names[0];
delete pool[emojiId];
delete emojisList[emojiId];
});
}
function addCustomToPool(custom, pool) {
if (customEmojisList.length) clearCustomEmojis(pool);
custom.forEach((emoji) => {
let emojiId = emoji.id || emoji.short_names[0];
@ -37,10 +49,18 @@ function addCustomToPool(custom, pool) {
emojisList[emojiId] = getSanitizedData(emoji);
}
});
customEmojisList = custom;
index = {};
}
function search(value, { emojisToShowFilter, maxResults, include, exclude, custom = [] } = {}) {
addCustomToPool(custom, originalPool);
function search(value, { emojisToShowFilter, maxResults, include, exclude, custom } = {}) {
if (custom !== undefined) {
if (customEmojisList !== custom)
addCustomToPool(custom, originalPool);
} else {
custom = [];
}
maxResults = maxResults || 75;
include = include || [];
@ -143,7 +163,7 @@ function search(value, { emojisToShowFilter, maxResults, include, exclude, custo
if (results) {
if (emojisToShowFilter) {
results = results.filter((result) => emojisToShowFilter(data.emojis[result.id].unified));
results = results.filter((result) => emojisToShowFilter(data.emojis[result.id]));
}
if (results && results.length > maxResults) {

View file

@ -1,5 +1,5 @@
import Picker from 'emoji-mart/dist-es/components/picker';
import Emoji from 'emoji-mart/dist-es/components/emoji';
import Picker from 'emoji-mart/dist-es/components/picker/picker';
import Emoji from 'emoji-mart/dist-es/components/emoji/emoji';
export {
Picker,

View file

@ -60,7 +60,7 @@
"column_header.unpin": "No fixis",
"column_subheading.settings": "Configuració",
"compose_form.direct_message_warning": "Aquest toot només serà enviat als usuaris esmentats. De totes maneres, els operadors de la teva o de qualsevol de les instàncies receptores poden inspeccionar aquest missatge.",
"compose_form.direct_message_warning_learn_more": "Learn more",
"compose_form.direct_message_warning_learn_more": "Aprèn més",
"compose_form.hashtag_warning": "Aquest toot no es mostrarà en cap etiqueta ja que no està llistat. Només els toots públics poden ser cercats per etiqueta.",
"compose_form.lock_disclaimer": "El teu compte no està bloquejat {locked}. Tothom pot seguir-te i veure els teus missatges a seguidors.",
"compose_form.lock_disclaimer.lock": "blocat",
@ -83,8 +83,8 @@
"confirmations.domain_block.message": "Estàs realment, realment segur que vols blocar totalment {domain}? En la majoria dels casos blocar o silenciar uns pocs objectius és suficient i preferible.",
"confirmations.mute.confirm": "Silencia",
"confirmations.mute.message": "Estàs segur que vols silenciar {name}?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "Esborrar i refer",
"confirmations.redraft.message": "Estàs segur que vols esborrar aquesta publicació i tornar a redactar-la? Perderàs totes les respostes, impulsos i favorits.",
"confirmations.unfollow.confirm": "Deixa de seguir",
"confirmations.unfollow.message": "Estàs segur que vols deixar de seguir {name}?",
"embed.instructions": "Incrusta aquest estat al lloc web copiant el codi a continuació.",
@ -116,7 +116,7 @@
"getting_started.documentation": "Documentation",
"getting_started.heading": "Començant",
"getting_started.open_source_notice": "Mastodon és un programari de codi obert. Pots contribuir o informar de problemes a GitHub a {github}.",
"getting_started.terms": "Terms of service",
"getting_started.terms": "Termes del servei",
"home.column_settings.advanced": "Avançat",
"home.column_settings.basic": "Bàsic",
"home.column_settings.filter_regex": "Filtrar per expressió regular",
@ -160,7 +160,7 @@
"navigation_bar.blocks": "Usuaris bloquejats",
"navigation_bar.community_timeline": "Línia de temps Local",
"navigation_bar.direct": "Missatges directes",
"navigation_bar.discover": "Discover",
"navigation_bar.discover": "Descobreix",
"navigation_bar.domain_blocks": "Dominis ocults",
"navigation_bar.edit_profile": "Editar perfil",
"navigation_bar.favourites": "Favorits",
@ -174,7 +174,7 @@
"navigation_bar.pins": "Toots fixats",
"navigation_bar.preferences": "Preferències",
"navigation_bar.public_timeline": "Línia de temps federada",
"navigation_bar.security": "Security",
"navigation_bar.security": "Seguretat",
"notification.favourite": "{name} ha afavorit el teu estat",
"notification.follow": "{name} et segueix",
"notification.mention": "{name} t'ha esmentat",
@ -190,7 +190,7 @@
"notifications.column_settings.reblog": "Impulsos:",
"notifications.column_settings.show": "Mostrar en la columna",
"notifications.column_settings.sound": "Reproduïr so",
"notifications.group": "{count} notifications",
"notifications.group": "{count} notificacions",
"onboarding.done": "Fet",
"onboarding.next": "Següent",
"onboarding.page_five.public_timelines": "La línia de temps local mostra missatges públics de tothom de {domain}. La línia de temps federada mostra els missatges públics de tothom que la gent de {domain} segueix. Aquests són les línies de temps Públiques, una bona manera de descobrir noves persones.",
@ -266,7 +266,7 @@
"status.reblog": "Impuls",
"status.reblog_private": "Impulsar a l'audiència original",
"status.reblogged_by": "{name} ha retootejat",
"status.redraft": "Delete & re-draft",
"status.redraft": "Esborrar i reescriure",
"status.reply": "Respondre",
"status.replyAll": "Respondre al tema",
"status.report": "Informar sobre @{name}",
@ -286,7 +286,7 @@
"tabs_bar.search": "Cerca",
"timeline.media": "Media",
"timeline.posts": "Toots",
"trends.count_by_accounts": "{count} {rawCount, plural, one {person} other {people}} talking",
"trends.count_by_accounts": "{count} {rawCount, plural, una {person} altres {people}} parlant",
"ui.beforeunload": "El vostre esborrany es perdrà si sortiu de Mastodon.",
"upload_area.title": "Arrossega i deixa anar per carregar",
"upload_button.label": "Afegir multimèdia",

View file

@ -449,7 +449,7 @@
"id": "confirmations.block.message"
},
{
"defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",
"defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",
"id": "confirmations.domain_block.message"
}
],

View file

@ -84,7 +84,7 @@
"confirmations.delete_list.confirm": "Delete",
"confirmations.delete_list.message": "Are you sure you want to permanently delete this list?",
"confirmations.domain_block.confirm": "Hide entire domain",
"confirmations.domain_block.message": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",
"confirmations.domain_block.message": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",
"confirmations.mute.confirm": "Mute",
"confirmations.mute.message": "Are you sure you want to mute {name}?",
"confirmations.redraft.confirm": "Delete & redraft",

View file

@ -10,7 +10,7 @@
"account.follow": "Jarraitu",
"account.followers": "Jarraitzaileak",
"account.follows": "Jarraitzen",
"account.follows_you": "Jarraitzen dizu",
"account.follows_you": "Jarraitzen zaitu",
"account.hide_reblogs": "Ezkutatu @{name}(r)en bultzadak",
"account.media": "Media",
"account.mention": "Aipatu @{name}",
@ -42,7 +42,7 @@
"column.blocks": "Blokeatutako erabiltzaileak",
"column.community": "Denbora-lerro lokala",
"column.direct": "Mezu zuzenak",
"column.domain_blocks": "Domeinu ezkutuak",
"column.domain_blocks": "Ezkutatutako domeinuak",
"column.favourites": "Gogokoak",
"column.follow_requests": "Jarraitzeko eskariak",
"column.home": "Hasiera",
@ -75,16 +75,16 @@
"confirmation_modal.cancel": "Utzi",
"confirmations.block.confirm": "Block",
"confirmations.block.message": "Ziur {name} blokeatu nahi duzula?",
"confirmations.delete.confirm": "Delete",
"confirmations.delete.confirm": "Ezabatu",
"confirmations.delete.message": "Ziur mezu hau ezabatu nahi duzula?",
"confirmations.delete_list.confirm": "Delete",
"confirmations.delete_list.confirm": "Ezabatu",
"confirmations.delete_list.message": "Ziur behin betiko ezabatu nahi duzula zerrenda hau?",
"confirmations.domain_block.confirm": "Ezkutatu domeinu osoa",
"confirmations.domain_block.message": "Ziur, erabat ziur, {domain} domeinu osoa blokeatu nahi duzula? Gehienetan gutxi batzuk blokeatu edo mututzearekin nahikoa da.",
"confirmations.mute.confirm": "Mututu",
"confirmations.mute.message": "Ziur {name} mututu nahi duzula?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "Ezabatu eta berridatzi",
"confirmations.redraft.message": "Ziur mezu hau ezabatu eta berridatzi nahi duzula? Berari egindako erantzun, bultzada eta gogokoak galduko dira.",
"confirmations.unfollow.confirm": "Utzi jarraitzeari",
"confirmations.unfollow.message": "Ziur {name} jarraitzeari utzi nahi diozula?",
"embed.instructions": "Txertatu mezu hau zure webgunean beheko kodea kopatuz.",
@ -114,7 +114,7 @@
"follow_request.authorize": "Baimendu",
"follow_request.reject": "Ukatu",
"getting_started.documentation": "Dokumentazioa",
"getting_started.heading": "Abiapuntua",
"getting_started.heading": "Menua",
"getting_started.open_source_notice": "Mastodon software librea da. Ekarpenak egin ditzakezu edo akatsen berri eman GitHub bidez: {github}.",
"getting_started.terms": "Erabilera baldintzak",
"home.column_settings.advanced": "Aurreratua",
@ -146,7 +146,7 @@
"lightbox.previous": "Aurrekoa",
"lists.account.add": "Gehitu zerrendara",
"lists.account.remove": "Kendu zerrendatik",
"lists.delete": "Delete list",
"lists.delete": "Ezabatu zerrenda",
"lists.edit": "Editatu zerrenda",
"lists.new.create": "Gehitu zerrenda",
"lists.new.title_placeholder": "Zerrenda berriaren izena",
@ -161,7 +161,7 @@
"navigation_bar.community_timeline": "Denbora-lerro lokala",
"navigation_bar.direct": "Mezu zuzenak",
"navigation_bar.discover": "Aurkitu",
"navigation_bar.domain_blocks": "Domeinu ezkutuak",
"navigation_bar.domain_blocks": "Ezkutatutako domeinuak",
"navigation_bar.edit_profile": "Aldatu profila",
"navigation_bar.favourites": "Gogokoak",
"navigation_bar.follow_requests": "Jarraitzeko eskariak",
@ -250,7 +250,7 @@
"status.block": "Block @{name}",
"status.cancel_reblog_private": "Kendu bultzada",
"status.cannot_reblog": "Mezu honi ezin zaio bultzada eman",
"status.delete": "Delete",
"status.delete": "Ezabatu",
"status.direct": "Mezu zuzena @{name}(r)i",
"status.embed": "Txertatu",
"status.favourite": "Gogokoa",
@ -266,7 +266,7 @@
"status.reblog": "Bultzada",
"status.reblog_private": "Bultzada jatorrizko hartzaileei",
"status.reblogged_by": "{name}(r)en bultzada",
"status.redraft": "Delete & re-draft",
"status.redraft": "Ezabatu eta berridatzi",
"status.reply": "Erantzun",
"status.replyAll": "Erantzun harian",
"status.report": "Salatu @{name}",

View file

@ -83,8 +83,8 @@
"confirmations.domain_block.message": "آیا جدی جدی می‌خواهید کل دامین {domain} را مسدود کنید؟ بیشتر وقت‌ها مسدودکردن یا بی‌صداکردن چند حساب کاربری خاص کافی است و توصیه می‌شود.",
"confirmations.mute.confirm": "بی‌صدا کن",
"confirmations.mute.message": "آیا واقعاً می‌خواهید {name} را بی‌صدا کنید؟",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "پاک‌کردن و بازنویسی",
"confirmations.redraft.message": "آیا واقعاً می‌خواهید این نوشته را پاک کنید و آن را از نو بنویسید؟ با این کار همهٔ پاسخ‌ها، بازبوق‌ها، و پسندیده‌شدن‌های آن از دست می‌رود.",
"confirmations.unfollow.confirm": "لغو پیگیری",
"confirmations.unfollow.message": "آیا واقعاً می‌خواهید به پیگیری از {name} پایان دهید؟",
"embed.instructions": "برای جاگذاری این نوشته در سایت خودتان، کد زیر را کپی کنید.",
@ -266,7 +266,7 @@
"status.reblog": "بازبوقیدن",
"status.reblog_private": "بازبوق به مخاطبان اولیه",
"status.reblogged_by": "{name} بازبوقید",
"status.redraft": "Delete & re-draft",
"status.redraft": "پاک‌کردن و بازنویسی",
"status.reply": "پاسخ",
"status.replyAll": "به نوشته پاسخ دهید",
"status.report": "گزارش دادن @{name}",

View file

@ -116,7 +116,7 @@
"getting_started.documentation": "Documentation",
"getting_started.heading": "Pour commencer",
"getting_started.open_source_notice": "Mastodon est un logiciel libre. Vous pouvez contribuer et envoyer vos commentaires et rapports de bogues via {github} sur GitHub.",
"getting_started.terms": "Terms of service",
"getting_started.terms": "Conditions dutilisation",
"home.column_settings.advanced": "Avancé",
"home.column_settings.basic": "Basique",
"home.column_settings.filter_regex": "Filtrer avec une expression rationnelle",
@ -160,7 +160,7 @@
"navigation_bar.blocks": "Comptes bloqués",
"navigation_bar.community_timeline": "Fil public local",
"navigation_bar.direct": "Messages directs",
"navigation_bar.discover": "Discover",
"navigation_bar.discover": "Découvrir",
"navigation_bar.domain_blocks": "Domaines cachés",
"navigation_bar.edit_profile": "Modifier le profil",
"navigation_bar.favourites": "Favoris",
@ -174,7 +174,7 @@
"navigation_bar.pins": "Pouets épinglés",
"navigation_bar.preferences": "Préférences",
"navigation_bar.public_timeline": "Fil public global",
"navigation_bar.security": "Security",
"navigation_bar.security": "Sécurité",
"notification.favourite": "{name} a ajouté à ses favoris:",
"notification.follow": "{name} vous suit",
"notification.mention": "{name} vous a mentionné⋅e:",

View file

@ -87,8 +87,8 @@
"confirmations.domain_block.message": "本当に{domain}全体を非表示にしますか? 多くの場合は個別にブロックやミュートするだけで充分であり、また好ましいです。",
"confirmations.mute.confirm": "ミュート",
"confirmations.mute.message": "本当に{name}さんをミュートしますか?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "削除し下書きに戻す",
"confirmations.redraft.message": "本当にこのトゥートを削除し下書きに戻しますか?このトゥートへの全ての返信やブースト、お気に入り登録を失うことになります。",
"confirmations.unfollow.confirm": "フォロー解除",
"confirmations.unfollow.message": "本当に{name}さんのフォローを解除しますか?",
"embed.instructions": "下記のコードをコピーしてウェブサイトに埋め込みます。",
@ -271,7 +271,7 @@
"status.reblog": "ブースト",
"status.reblog_private": "ブースト",
"status.reblogged_by": "{name}さんがブースト",
"status.redraft": "Delete & re-draft",
"status.redraft": "削除し下書きに戻す",
"status.reply": "返信",
"status.replyAll": "全員に返信",
"status.report": "@{name}さんを通報",

View file

@ -83,8 +83,8 @@
"confirmations.domain_block.message": "Weet je het echt heel erg zeker dat je alles van {domain} wil negeren? In de meeste gevallen is het blokkeren of negeren van een paar specifieke personen voldoende en gepaster.",
"confirmations.mute.confirm": "Negeren",
"confirmations.mute.message": "Weet je het zeker dat je {name} wilt negeren?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "Verwijderen en herschrijven",
"confirmations.redraft.message": "Weet je zeker dat je deze toot wilt verwijderen en herschrijven? Je verliest wel alle reacties, boosts en favorieten.",
"confirmations.unfollow.confirm": "Ontvolgen",
"confirmations.unfollow.message": "Weet je het zeker dat je {name} wilt ontvolgen?",
"embed.instructions": "Embed deze toot op jouw website, door de onderstaande code te kopiëren.",
@ -266,7 +266,7 @@
"status.reblog": "Boost",
"status.reblog_private": "Boost naar oorspronkelijke ontvangers",
"status.reblogged_by": "{name} boostte",
"status.redraft": "Delete & re-draft",
"status.redraft": "Verwijderen en herschrijven",
"status.reply": "Reageren",
"status.replyAll": "Reageer op iedereen",
"status.report": "Rapporteer @{name}",

View file

@ -59,7 +59,7 @@
"column_header.show_settings": "Mostrar configurações",
"column_header.unpin": "Desafixar",
"column_subheading.settings": "Configurações",
"compose_form.direct_message_warning": "Este toot só será enviado aos usuários mencionados. A mensagem não é encriptada e será armazenada nos servidores dos usuários mencionados.",
"compose_form.direct_message_warning": "Este toot só será enviado aos usuários mencionados.",
"compose_form.direct_message_warning_learn_more": "Saber mais",
"compose_form.hashtag_warning": "Esse toot não será listado em nenhuma hashtag por ser não listado. Somente toots públicos podem ser pesquisados por hashtag.",
"compose_form.lock_disclaimer": "A sua conta não está {locked}. Qualquer pessoa pode te seguir e visualizar postagens direcionadas a apenas seguidores.",
@ -83,8 +83,8 @@
"confirmations.domain_block.message": "Você quer mesmo bloquear {domain} inteiro? Na maioria dos casos, silenciar ou bloquear alguns usuários é o suficiente e o recomendado.",
"confirmations.mute.confirm": "Silenciar",
"confirmations.mute.message": "Você tem certeza de que quer silenciar {name}?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "Apagar & usar como rascunho",
"confirmations.redraft.message": "Você tem certeza que deseja apagar esse status e usá-lo como rascunho? Você vai perder todas as respostas, compartilhamentos e favoritos relacionados a ele.",
"confirmations.unfollow.confirm": "Deixar de seguir",
"confirmations.unfollow.message": "Você tem certeza de que quer deixar de seguir {name}?",
"embed.instructions": "Incorpore esta postagem em seu site copiando o código abaixo.",
@ -248,10 +248,10 @@
"search_results.total": "{count, number} {count, plural, one {resultado} other {resultados}}",
"standalone.public_title": "Dê uma espiada...",
"status.block": "Block @{name}",
"status.cancel_reblog_private": "Retirar o compartilhamento",
"status.cancel_reblog_private": "Desfazer compartilhamento",
"status.cannot_reblog": "Esta postagem não pode ser compartilhada",
"status.delete": "Excluir",
"status.direct": "Enviar mensagem direta à @{name}",
"status.direct": "Enviar mensagem direta a @{name}",
"status.embed": "Incorporar",
"status.favourite": "Adicionar aos favoritos",
"status.load_more": "Carregar mais",
@ -266,7 +266,7 @@
"status.reblog": "Compartilhar",
"status.reblog_private": "Compartilhar com a audiência original",
"status.reblogged_by": "{name} compartilhou",
"status.redraft": "Delete & re-draft",
"status.redraft": "Apagar & usar como rascunho",
"status.reply": "Responder",
"status.replyAll": "Responder à sequência",
"status.report": "Denunciar @{name}",

View file

@ -1,7 +1,7 @@
{
"account.badges.bot": "Bot",
"account.block": "Blokovať @{name}",
"account.block_domain": "Ukryť všetko z {domain}",
"account.block": "Blokuj @{name}",
"account.block_domain": "Ukry všetko z {domain}",
"account.blocked": "Blokovaný/á",
"account.direct": "Súkromná správa pre @{name}",
"account.disclaimer_full": "Inofrmácie nižšie nemusia byť úplným odrazom uživateľovho účtu.",
@ -16,7 +16,7 @@
"account.mention": "Spomeň @{name}",
"account.moved_to": "{name} sa presunul/a na:",
"account.mute": "Ignorovať @{name}",
"account.mute_notifications": "Stĺmiť notifikácie od @{name}",
"account.mute_notifications": "Stĺmiť oznámenia od @{name}",
"account.muted": "Utíšený/á",
"account.posts": "Hlášky",
"account.posts_with_replies": "Príspevky s odpoveďami",
@ -48,7 +48,7 @@
"column.home": "Domov",
"column.lists": "Zoznamy",
"column.mutes": "Ignorovaní užívatelia",
"column.notifications": "Notifikácie",
"column.notifications": "Oznámenia",
"column.pins": "Pripnuté tooty",
"column.public": "Federovaná časová os",
"column_back_button.label": "Späť",
@ -83,8 +83,8 @@
"confirmations.domain_block.message": "Ste si naozaj istý, že chcete blokovať celú {domain}? Vo väčšine prípadov stačí blokovať alebo ignorovať daných používateľov, čiže to sa doporučuje.",
"confirmations.mute.confirm": "Ignoruj",
"confirmations.mute.message": "Naozaj chcete ignorovať {name}?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "Vyčistiť a prepísať",
"confirmations.redraft.message": "Si si istý/á, že chceš vymazať a prepísať tento príspevok? Stratíš všetky jeho nadobudnuté odpovede, povýšenia a obľúbenia.",
"confirmations.unfollow.confirm": "Nesledovať",
"confirmations.unfollow.message": "Naozaj chcete prestať sledovať {name}?",
"embed.instructions": "Umiestni kód uvedený nižšie pre pridanie tohto statusu na tvoju web stránku.",
@ -109,11 +109,11 @@
"empty_column.home": "Vaša lokálna osa je zatiaľ prázdna! Pre začiatok pozrite {public} alebo použite vyhľadávanie a nájdite tak ostatných používateľov.",
"empty_column.home.public_timeline": "verejná časová os",
"empty_column.list": "Tento zoznam je ešte prázdny. Keď ale členovia tohoto zoznamu napíšu nové správy, tak tie sa objavia priamo tu.",
"empty_column.notifications": "Nemáte ešte žiadne notifikácie. Napíšte niekomu, následujte niekoho a komunikujte s ostatnými aby diskusia mohla začať.",
"empty_column.public": "Ešte tu nič nie je. Napíšte niečo verejne alebo začnite sledovať používateľov z iných Mastodon serverov aby tu niečo pribudlo",
"empty_column.notifications": "Nemáš ešte žiadne oznámenia. Zapoj sa s niekym do debaty a komunikuj s ostatnými aby diskusia mohla začať.",
"empty_column.public": "Ešte tu nič nie je. Napíš niečo verejne alebo začnite sledovať používateľov z iných Mastodon serverov aby tu niečo pribudlo",
"follow_request.authorize": "Povoľ prístup",
"follow_request.reject": "Odmietni",
"getting_started.documentation": "Documentation",
"getting_started.documentation": "Dokumentácia",
"getting_started.heading": "Začni tu",
"getting_started.open_source_notice": "Mastodon má otvorený kód. Nahlásiť chyby, alebo prispieť môžeš na GitHube v {github}.",
"getting_started.terms": "Podmienky prevozu",
@ -168,9 +168,9 @@
"navigation_bar.info": "O tomto Mastodon serveri",
"navigation_bar.keyboard_shortcuts": "Klávesové skratky",
"navigation_bar.lists": "Zoznamy",
"navigation_bar.logout": "Odhlás",
"navigation_bar.logout": "Odhlás sa",
"navigation_bar.mutes": "Ignorovaní užívatelia",
"navigation_bar.personal": "Personal",
"navigation_bar.personal": "Osobné",
"navigation_bar.pins": "Pripnuté tooty",
"navigation_bar.preferences": "Voľby",
"navigation_bar.public_timeline": "Federovaná časová os",
@ -248,7 +248,7 @@
"search_results.total": "{count, number} {count, plural, jeden {výsledok} ostatné {výsledky}}",
"standalone.public_title": "Náhľad dovnútra...",
"status.block": "Blokovať @{name}",
"status.cancel_reblog_private": "Unboost",
"status.cancel_reblog_private": "Nezdieľaj",
"status.cannot_reblog": "Tento príspevok nemôže byť re-tootnutý",
"status.delete": "Zmazať",
"status.direct": "Súkromná správa @{name}",
@ -266,7 +266,7 @@
"status.reblog": "Povýšiť",
"status.reblog_private": "Boost to original audience",
"status.reblogged_by": "{name} povýšil/a",
"status.redraft": "Delete & re-draft",
"status.redraft": "Vymaž a prepíš",
"status.reply": "Odpovedať",
"status.replyAll": "Odpovedať na diskusiu",
"status.report": "Nahlásiť @{name}",
@ -284,11 +284,11 @@
"tabs_bar.local_timeline": "Lokálna",
"tabs_bar.notifications": "Notifikácie",
"tabs_bar.search": "Hľadaj",
"timeline.media": "Media",
"timeline.media": "Médiá",
"timeline.posts": "Príspevky",
"trends.count_by_accounts": "{count} {rawCount, plural, one {person} other {people}} talking",
"ui.beforeunload": "Čo máte rozpísané sa stratí, ak opustíte Mastodon.",
"upload_area.title": "Ťahaj a pusti pre nahratie",
"trends.count_by_accounts": "{count} {rawCount, viacerí, jeden {person} iní {people}} diskutujú",
"ui.beforeunload": "Čo máš rozpísané sa stratí, ak opustíš Mastodon.",
"upload_area.title": "Pretiahni a pusť pre nahratie",
"upload_button.label": "Pridať médiá",
"upload_form.description": "Opis pre slabo vidiacich",
"upload_form.focus": "Vystrihni",

View file

@ -83,8 +83,8 @@
"confirmations.domain_block.message": "你真的确定要隐藏所有来自 {domain} 的内容吗?多数情况下,屏蔽或隐藏几个特定的用户应该就能满足你的需要了。",
"confirmations.mute.confirm": "隐藏",
"confirmations.mute.message": "你确定要隐藏 {name} 吗?",
"confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.",
"confirmations.redraft.confirm": "删除并重新编辑",
"confirmations.redraft.message": "你确定要删除这条嘟文并重新编辑它吗?所有相关的回复、转嘟和收藏都会被清除。",
"confirmations.unfollow.confirm": "取消关注",
"confirmations.unfollow.message": "你确定要取消关注 {name} 吗?",
"embed.instructions": "要在你的网站上嵌入这条嘟文,请复制以下代码。",
@ -113,10 +113,10 @@
"empty_column.public": "这里神马都没有!写一些公开的嘟文,或者关注其他实例的用户后,这里就会有嘟文出现了哦!",
"follow_request.authorize": "同意",
"follow_request.reject": "拒绝",
"getting_started.documentation": "Documentation",
"getting_started.documentation": "文档",
"getting_started.heading": "开始使用",
"getting_started.open_source_notice": "Mastodon 是一个开源软件。欢迎前往 GitHub{github})贡献代码或反馈问题。",
"getting_started.terms": "Terms of service",
"getting_started.terms": "使用条款",
"home.column_settings.advanced": "高级设置",
"home.column_settings.basic": "基本设置",
"home.column_settings.filter_regex": "使用正则表达式regex过滤",
@ -160,7 +160,7 @@
"navigation_bar.blocks": "已屏蔽的用户",
"navigation_bar.community_timeline": "本站时间轴",
"navigation_bar.direct": "私信",
"navigation_bar.discover": "Discover",
"navigation_bar.discover": "发现",
"navigation_bar.domain_blocks": "已屏蔽的网站",
"navigation_bar.edit_profile": "修改个人资料",
"navigation_bar.favourites": "收藏的内容",
@ -170,11 +170,11 @@
"navigation_bar.lists": "列表",
"navigation_bar.logout": "注销",
"navigation_bar.mutes": "已隐藏的用户",
"navigation_bar.personal": "Personal",
"navigation_bar.personal": "个人",
"navigation_bar.pins": "置顶嘟文",
"navigation_bar.preferences": "首选项",
"navigation_bar.public_timeline": "跨站公共时间轴",
"navigation_bar.security": "Security",
"navigation_bar.security": "安全",
"notification.favourite": "{name} 收藏了你的嘟文",
"notification.follow": "{name} 开始关注你",
"notification.mention": "{name} 提及你",
@ -266,7 +266,7 @@
"status.reblog": "转嘟",
"status.reblog_private": "转嘟给原有关注者",
"status.reblogged_by": "{name} 转嘟了",
"status.redraft": "Delete & re-draft",
"status.redraft": "删除并重新编辑",
"status.reply": "回复",
"status.replyAll": "回复所有人",
"status.report": "举报 @{name}",
@ -286,7 +286,7 @@
"tabs_bar.search": "搜索",
"timeline.media": "媒体",
"timeline.posts": "嘟文",
"trends.count_by_accounts": "{count} {rawCount, plural, one {person} other {people}} talking",
"trends.count_by_accounts": "{count} 人正在讨论",
"ui.beforeunload": "如果你现在离开 Mastodon你的草稿内容将会被丢弃。",
"upload_area.title": "将文件拖放到此处开始上传",
"upload_button.label": "上传媒体文件",

View file

@ -47,6 +47,19 @@
background: darken($ui-base-color, 6%);
}
.emoji-mart-bar {
border-color: lighten($ui-base-color, 8%);
&:first-child {
background: $ui-base-color;
}
}
.emoji-mart-search input {
background: rgba($ui-base-color, 0.3);
border-color: $ui-base-color;
}
.focusable:focus {
background: $ui-base-color;
}
@ -74,6 +87,17 @@
}
}
// Change the background colors of media and video spoiler
.media-spoiler,
.video-player__spoiler {
background: $ui-base-color;
}
.account-gallery__item a {
background-color: $ui-base-color;
}
// Change the colors used in the dropdown menu
.dropdown-menu {
background: $ui-base-color;

View file

@ -4555,7 +4555,7 @@ a.status-card {
height: 100%;
z-index: 4;
border: 0;
background: $base-shadow-color;
background: $base-overlay-background;
color: $darker-text-color;
transition: none;
pointer-events: none;

View file

@ -62,16 +62,16 @@
}
.emoji-mart-anchor-bar {
bottom: 0;
bottom: -1px;
}
}
.emoji-mart-anchor-bar {
position: absolute;
bottom: -3px;
bottom: -5px;
left: 0;
width: 100%;
height: 3px;
height: 4px;
background-color: $highlight-text-color;
}

View file

@ -1,6 +1,7 @@
.footer {
text-align: center;
margin-top: 30px;
padding-bottom: 60px;
font-size: 12px;
color: $darker-text-color;

View file

@ -6,6 +6,11 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
return if target_account.nil? || !target_account.local? || delete_arrived_first?(@json['id']) || @account.requested?(target_account)
if target_account.blocking?(@account) || target_account.domain_blocking?(@account.domain)
reject_follow_request!(target_account)
return
end
# Fast-forward repeat follow requests
if @account.following?(target_account)
AuthorizeFollowService.new.call(@account, target_account, skip_follow_request: true)
@ -21,4 +26,9 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
NotifyService.new.call(target_account, ::Follow.find_by(account: @account, target_account: target_account))
end
end
def reject_follow_request!(target_account)
json = Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new(FollowRequest.new(account: @account, target_account: target_account, uri: @json['id']), serializer: ActivityPub::RejectFollowSerializer, adapter: ActivityPub::Adapter).as_json).sign!(target_account))
ActivityPub::DeliveryWorker.perform_async(json, target_account.id, @account.inbox_url)
end
end

View file

@ -18,7 +18,7 @@ class Web::PushSubscription < ApplicationRecord
belongs_to :user, optional: true
belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', optional: true
has_one :session_activation
has_one :session_activation, foreign_key: 'web_push_subscription_id', inverse_of: :web_push_subscription
def push(notification)
I18n.with_locale(associated_user&.locale || I18n.default_locale) do

View file

@ -0,0 +1,42 @@
# frozen_string_literal: true
class AfterBlockDomainFromAccountService < BaseService
# This service does not create an AccountDomainBlock record,
# it's meant to be called after such a record has been created
# synchronously, to "clean up"
def call(account, domain)
@account = account
@domain = domain
reject_existing_followers!
reject_pending_follow_requests!
end
private
def reject_existing_followers!
@account.passive_relationships.where(account: Account.where(domain: @domain)).includes(:account).find_each do |follow|
reject_follow!(follow)
end
end
def reject_pending_follow_requests!
FollowRequest.where(target_account: @account).where(account: Account.where(domain: @domain)).includes(:account).find_each do |follow_request|
reject_follow!(follow_request)
end
end
def reject_follow!(follow)
follow.destroy
return unless follow.account.activitypub?
json = Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new(
follow,
serializer: ActivityPub::RejectFollowSerializer,
adapter: ActivityPub::Adapter
).as_json).sign!(@account))
ActivityPub::DeliveryWorker.perform_async(json, @account.id, follow.account.inbox_url)
end
end

View file

@ -1,8 +0,0 @@
# frozen_string_literal: true
class BlockDomainFromAccountService < BaseService
def call(account, domain)
account.block_domain!(domain)
account.passive_relationships.where(account: Account.where(domain: domain)).delete_all
end
end

View file

@ -15,6 +15,11 @@
= link_to (account.local? ? account_follow_path(account) : authorize_follow_path(acct: account.acct)), data: { method: :post }, class: 'icon-button' do
= fa_icon 'user-plus'
= t('accounts.follow')
- elsif user_signed_in? && current_account.id == account.id
.controls
= link_to settings_profile_url, class: 'icon-button' do
= fa_icon 'pencil'
= t('settings.edit_profile')
- elsif !user_signed_in?
.controls
.remote-follow

View file

@ -0,0 +1,11 @@
# frozen_string_literal: true
class AfterAccountDomainBlockWorker
include Sidekiq::Worker
def perform(account_id, domain)
AfterBlockDomainFromAccountService.new.call(Account.find(account_id), domain)
rescue ActiveRecord::RecordNotFound
true
end
end

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
class SoftBlockDomainFollowersWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull'
def perform(account_id, domain)
followers_id = Account.find(account_id).followers.where(domain: domain).pluck(:id)
SoftBlockWorker.push_bulk(followers_id) do |follower_id|
[account_id, follower_id]
end
end
end

View file

@ -1,17 +0,0 @@
# frozen_string_literal: true
class SoftBlockWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull'
def perform(account_id, target_account_id)
account = Account.find(account_id)
target_account = Account.find(target_account_id)
BlockService.new.call(account, target_account)
UnblockService.new.call(account, target_account)
rescue ActiveRecord::RecordNotFound
true
end
end

View file

@ -424,7 +424,7 @@ ca:
following: 'Perfecte! Ara segueixes:'
post_follow:
close: O bé, pots tancar aquesta finestra.
return: Torna al perfil de l'usuari
return: Mostra el perfil de l'usuari
web: Vés a la web
title: Segueix %{acct}
datetime:

View file

@ -215,11 +215,13 @@ el:
create: Δημιουργία αποκλεισμού
hint: Ο αποκλεισμός τομέα δεν θα αποτρέψει νέες καταχωρίσεις λογαριασμών στην βάση δεδομένων, αλλά θα εφαρμόσει αναδρομικά και αυτόματα συγκεκριμένες πολιτικές μεσολάβησης σε αυτούς τους λογαριασμούς.
severity:
desc_html: Η <strong>αποσιώπηση</strong> θα κάνει αόρατες τις δημοσιεύσεις ενός λογαριασμού σε όσους δεν τον ακολουθούν. Η <strong>αναστολή</strong> θα αφαιρέσει όλο το περιεχόμενο, τα πολυμέσα και τα στοιχεία προφίλ ενός λογαριασμού. Το <strong>κανένα</strong> απλά απορρίπτει τα αρχεία πολυμέσων.
noop: Κανένα
silence: Σίγαση
suspend: Αναστολή
title: Αποκλεισμός νέου τομέα
reject_media: Απόρριψη πολυμέσων
reject_media_hint: Αφαιρεί τα τοπικά αποθηκευμένα αρχεία πολυμέσων και αποτρέπει το κατέβασμα άλλων στο μέλλον. Δεν έχει σημασία για τις αναστολές
severities:
noop: Κανένα
silence: Αποσιώπηση
@ -294,30 +296,190 @@ el:
suspend_account: Ανέστειλε λογαριασμό
target: Στόχος
title: Αναφορές
unassign: Αποσύνδεση
unresolved: Άλυτη
updated_at: Ενημερωμένη
view: Εμφάνιση
settings:
activity_api_enabled:
desc_html: Καταμέτρηση τοπικών δημοσιεύσεων, ενεργών χρηστών και νέων εγγραφών σε εβδομαδιαίες ομαδοποιήσεις
title: Δημοσίευση συγκεντρωτικών στατιστικών για τη δραστηριότητα χρηστών
bootstrap_timeline_accounts:
desc_html: Διαχωρίστε πολλαπλά ονόματα χρηστών με κόμματα. Λειτουργεί μόνο με τοπικούς και ανοιχτούς λογαριασμούς. Αν είναι κενό, περιλαμβάνει όλους τους τοπικούς διαχειριστές.
title: Προεπιλεγμένοι λογαριασμοί για ακολούθηση από τους νέους χρήστες
contact_information:
email: Επαγγελματικό email
username: Όνομα χρήστη επικοινωνίας
hero:
desc_html: Εμφανίζεται στην μπροστινή σελίδα. Συνίσταται τουλάχιστον 600x100px. Όταν λείπει, χρησιμοποιείται η μικρογραφία του κόμβου
title: Εικόνα ήρωα
peers_api_enabled:
desc_html: Ονόματα τομέων που αυτός ο κόμβος έχει πετύχει στο fediverse
title: Δημοσίευση λίστας κόμβων που έχουν ανακαλυφθεί
registrations:
closed_message:
desc_html: Εμφανίζεται στην αρχική σελίδα όταν οι εγγραφές είναι κλειστές. Μπορείς να χρησιμοποιήσεις HTML tags
title: Μήνυμα κλεισμένων εγγραφών
deletion:
desc_html: Επέτρεψε σε οποιονδήποτε να διαγράψει το λογαριασμό του/της
title: Άνοιξε τη διαγραφή λογαριασμού
min_invite_role:
disabled: Κανείς
title: Επέτρεψε προσκλήσεις από
open:
desc_html: Επέτρεψε σε οποιονδήποτε να δημιουργήσει λογαριασμό
title: Άνοιξε τις εγγραφές
show_known_fediverse_at_about_page:
desc_html: Όταν αντιστραφεί, θα δείχνει τα τουτ από όλο το γνωστό fediverse στην προεπισκόπηση. Διαφορετικά θα δείχνει μόνο τοπικά τουτ.
title: Εμφάνιση του γνωστού fediverse στην προεπισκόπηση ροής
show_staff_badge:
desc_html: Δείξε ένα σήμα προσωπικού σε μια σελίδα χρήστη
title: Δείξε σήμα προσωπικού
site_description:
desc_html: Εισαγωγική παράγραφος στην αρχική σελίδα και στα meta tags. Μπορείς να χρησιμοποιήσεις HTML tags, συγκεκριμένα <code>&lt; a&gt;</code> και <code> &lt; em&gt;</code>.
title: Περιγραφή κόμβου
site_description_extended:
desc_html: Ένα καλό μέρος για τον κώδικα δεοντολογίας, τους κανόνες, τις οδηγίες και ό,τι άλλο διαφοροποιεί τον κόμβο σου. Δέχεται και κώδικα HTML
title: Προσαρμοσμένες εκτεταμένες πληροφορίες
site_terms:
desc_html: Μπορείς να γράψεις τη δική σου πολιτική απορρήτου, όρους χρήσης ή άλλους νομικούς όρους. Μπορείς να χρησιμοποιήσεις HTML tags
title: Προσαρμοσμένοι όροι χρήσης της υπηρεσίας
site_title: Όνομα κόμβου
thumbnail:
desc_html: Χρησιμοποιείται για προεπισκοπήσεις μέσω του OpenGraph και του API. Συστήνεται 1200x630px
title: Μικρογραφία κόμβου
timeline_preview:
desc_html: Εμφάνισε τη δημόσια ροή στην αρχική σελίδα
title: Προεπισκόπιση ροής
title: Ρυθμίσεις ιστότοπου
statuses:
back_to_account: Επιστροφή στη σελίδα λογαριασμού
batch:
delete: Διαγραφή
nsfw_off: Σημείωσε ως μη ευαίσθητο
nsfw_on: Σημείωσε ως ευαίσθητο
failed_to_execute: Αποτυχία εκτέλεσης
media:
title: Πολυμέσα
no_media: Χωρίς πολυμέσα
title: Καταστάσεις λογαριασμού
with_media: Με πολυμέσα
subscriptions:
callback_url: URL επιστροφής (Callback)
confirmed: Επιβεβαιωμένες
expires_in: Λήγει σε
last_delivery: Τελευταία παράδοση
title: WebSub
topic: Θέμα
title: Διαχείριση
admin_mailer:
new_report:
body: Ο/Η %{reporter} κατήγγειλε τον/την %{target}
body_remote: Κάποιος/α από τον τομέα %{domain} κατήγγειλε τον/την %{target}
subject: Νέα καταγγελία για %{instance} (#%{id})
application_mailer:
notification_preferences: Αλλαγή προτιμήσεων email
salutation: "%{name},"
settings: 'Άλλαξε τις προτιμήσεις email: %{link}'
view: 'Προβολή:'
view_profile: Προβολή προφίλ
view_status: Προβολή κατάστασης
applications:
created: Η εφαρμογή δημιουργήθηκε επιτυχώς
destroyed: Η εφαρμογή διαγράφηκε επιτυχώς
invalid_url: Το URL δεν είναι έγκυρο
regenerate_token: Αναδημιουργία του διακριτικού πρόσβασης (access token)
token_regenerated: Το διακριτικό πρόσβασης (access token) αναδημιουργήθηκε επιτυχώς
warning: Μεγάλη προσοχή με αυτά τα στοιχεία. Μην τα μοιραστείς ποτέ με κανέναν!
your_token: Το διακριτικό πρόσβασής σου (access token)
auth:
agreement_html: Με την εγγραφή σου, συμφωνείς να ακολουθείς <a href="%{rules_path}">τους κανόνες αυτού του κόμβου</a> και <a href="%{terms_path}">τους όρους χρήσης του</a>.
change_password: Συνθηματικό
confirm_email: Επιβεβαίωση email
delete_account: Διαγραφή email
delete_account_html: Αν θέλεις να διαγράψεις το λογαριασμό σου, μπορείς <a href="%{path}">να συνεχίσεις εδώ</a>. Θα σου ζητηθεί επιβεβαίωση.
didnt_get_confirmation: Δεν έλαβες τις οδηγίες επιβεβαίωσης;
forgot_password: Ξέχασες το συνθηματικό σου;
invalid_reset_password_token: Το διακριτικό επαναφοράς συνθηματικού είναι άκυρο ή ληγμένο. Παρακαλώ αιτήσου νέο.
login: Σύνδεση
logout: Αποσύνδεση
migrate_account: Μετακόμισε σε διαφορετικό λογαριασμό
migrate_account_html: Αν θέλεις να ανακατευθύνεις αυτό τον λογαριασμό σε έναν διαφορετικό, μπορείς να το <a href="%{path}">διαμορφώσεις εδώ</a>.
or: ή
or_log_in_with: Ή συνδέσου με
providers:
cas: Υπηρεσία Κεντρικής Πιστοποίησης (CAS)
saml: SAML
register: Εγγραφή
register_elsewhere: Εγγραφή σε διαφορετικό εξυπηρετητή
resend_confirmation: Στείλε ξανά τις οδηγίες επιβεβαίωσης
reset_password: Επαναφορά συνθηματικού
security: Ασφάλεια
set_new_password: Ορισμός νέου συνθηματικού
authorize_follow:
already_following: Ήδη ακολουθείς αυτό το λογαριασμό
error: Δυστυχώς παρουσιάστηκε ένα σφάλμα κατά την αναζήτηση του απομακρυσμένου λογαριασμού
follow: Ακολούθησε
follow_request: 'Έστειλες αίτημα παρακολούθησης προς:'
following: 'Επιτυχία! Πλέον ακολουθείς τον/την:'
post_follow:
close: Ή, μπορείς απλά να κλείσεις αυτό το παράθυρο.
return: Δείξε το προφίλ του χρήστη
web: Πήγαινε στο δίκτυο
title: Ακολούθησε %{acct}
datetime:
distance_in_words:
about_x_hours: "%{count}ω"
about_x_months: "%{count}μη"
about_x_years: "%{count}ε"
almost_x_years: "%{count}ε"
half_a_minute: Μόλις τώρα
less_than_x_minutes: "%{count}λ"
less_than_x_seconds: Μόλις τώρα
over_x_years: "%{count}ε"
x_days: "%{count}η"
x_minutes: "%{count}λ"
x_months: "%{count}μ"
x_seconds: "%{count}δ"
deletes:
bad_password_msg: Καλή προσπάθεια χάκερς! Λάθος συνθηματικό
confirm_password: Γράψε το τρέχον συνθηματικό σου για να πιστοποιήσεις την ταυτότητά σου
description_html: Αυτό θα <strong>οριστικά και αμετάκλητα</strong> διαγράψει το περιεχόμενο του λογαριασμού σου και θα τον απενεργοποιήσει. Το όνομα χρήστη θα παραμείνει δεσμευμένο για να αποφευχθούν μελλοντικές πλαστοπροσωπίες.
proceed: Διαγραφή λογαριασμού
success_msg: Ο λογαριασμός σου διαγράφηκε με επιτυχία
warning_html: Μόνο η διαγραφή περιεχομένου από αυτό τον συγκεκριμένο κόμβο είναι εγγυημένη. Το περιεχόμενο που έχει διαμοιραστεί ευρέως είναι πιθανό να αφήσει ίχνη. Όσοι διακομιστές είναι εκτός σύνδεσης και όσοι έχουν διακόψει τη λήψη των ενημερώσεων του κόμβου σου, δε θα ενημερώσουν τις βάσεις δεδομένων τους.
warning_title: Διαθεσιμότητα περιεχομένου προς διανομή
errors:
'403': Δεν έχεις δικαίωμα πρόσβασης σε αυτή τη σελίδα.
'404': Η σελίδα που ψάχνεις δεν υπάρχει.
'410': Η σελίδα που έψαχνες δεν υπάρχει πια.
'422':
content: Απέτυχε η επιβεβαίωση ασφαλείας. Μήπως μπλοκάρεις τα cookies;
title: Η επιβεβαίωση ασφαλείας απέτυχε
'429': Περιορισμένο
'500':
content: Λυπούμαστε, κάτι πήγε στραβά από τη δική μας μεριά.
title: Η σελίδα αυτή δεν είναι σωστή
noscript_html: Για να χρησιμοποιήσετε τη δικτυακή εφαρμογή του Mastodon, ενεργοποίησε την Javascript. Εναλλακτικά, δοκίμασε μια από τις <a href="https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md">εφαρμογές</a> για το Mastodon στην πλατφόρμα σου.
exports:
archive_takeout:
date: Ημερομηνία
download: Κατέβασε το αρχείο σου
hint_html: Μπορείς να αιτηθείς ένα αρχείο των <strong>τουτ και των ανεβασμένων πολυμέσων</strong> σου. Τα δεδομένα θα είναι σε μορφή ActivityPub, προσιτά από οποιοδήποτε συμβατό πρόγραμμα. Μπορείς να αιτηθείς αρχείο κάθε 7 μέρες.
in_progress: Συγκεντρώνουμε το αρχείο σου...
request: Αιτήσου το αρχείο σου
size: Μέγεθος
blocks: Μπλοκάρεις
csv: CSV
follows: Ακολουθείς
mutes: Αποσιωπάς
storage: Αποθήκευση πολυμέσων
followers:
domain: Τομέας
explanation_html: Αν θέλεις να διασφαλίσεις την ιδιωτικότητα των ενημερώσεών σου, πρέπει να ξέρεις ποιος σε ακολουθεί. <strong>Οι ιδιωτικές ενημερώσεις σου μεταφέρονται σε όλους τους κόμβους στους οποίους έχεις ακόλουθους</strong>. Ίσως να θέλεις να κάνεις μια ανασκόπηση σε αυτούς και να αφαιρέσεις ακολούθους αν δεν εμπιστεύεσαι το προσωπικό αυτών των κόμβων πως θα σεβαστούν την ιδιωτικότητά σου.
followers_count: Πλήθος ακολούθων
lock_link: Κλείδωσε το λογαριασμό σου
purge: Αφαίρεσε από ακόλουθο
imports:
preface: Μπορείς να εισάγεις τα δεδομένα που έχεις εξάγει από άλλο κόμβο, όπως τη λίστα των ανθρώπων που ακολουθείς ή μπλοκάρεις.
invites:

View file

@ -424,7 +424,7 @@ eu:
following: 'Ongi! Orain jarraitzen duzu:'
post_follow:
close: Edo, leiho hau besterik gabe itxi dezakezu.
return: Itzuli erabiltzailearen profilera
return: Erakutsi erabiltzailearen profila
web: Joan webera
title: Jarraitu %{acct}
datetime:
@ -488,7 +488,7 @@ eu:
unlocked_warning_title: Zure kontua ez dago giltzapetuta
generic:
changes_saved_msg: Aldaketak ongi gorde dira!
powered_by: eskerrak %{link}
powered_by: "(e)k %{link} darabil"
save_changes: Gorde aldaketak
validation_errors:
one: Zerbait ez dabil ongi! Egiaztatu beheko errorea mesedez
@ -693,7 +693,7 @@ eu:
stream_entries:
click_to_show: Klik erakusteko
pinned: Finkatutako toot-a
reblogged: bultzatua
reblogged: "(r)en bultzada"
sensitive_content: Eduki hunkigarria
terms:
body_html: |
@ -703,7 +703,7 @@ eu:
<ul>
<li><em>Kontuaren oinarrizko informazioa</em>: Zerbitzari honetan izena ematen baduzu, erabiltzaile-izena, e-mail helbidea eta pasahitza sartzea galdetu dakizuke. Profilean bestelako informazioa sartu dezakezu esaterako pantaila.-izena eta biografia, eta profileko eta goiburuko irudiak igo ditzakezu. Erabiltzaile-izena, pantaiula-izena, biografia, profileko irudia eta goiburuko irudia beti dira publikoak.</li>
<li><em>Mezuak, jarraitzea eta beste informazioa</em>: Jarraitzen duzun jendearen zerrenda publikoa da, baita zure jarraitzaileena. Mezu bat bidaltzean, data eta ordua eta mezua bidaltzeko erabilitako aplikazioa gordetzen dira. Mezuen eranskinak izan ditzakete, esaterako irudiak eta bideoak. Mezu publikoak eta zerrendatu gabeak publikoki ikusi daitezke. Zure profilean mezu bat sustatzen duzunean, informazio hori ere publikoki eskuragarri dago. Zure mezuak zure jarraitzaileei bidaltzen zaie, kasu batzuetan honek esan nahi du beste zerbitzari batzuetara bidaltzen dela eta han kopiak gordetzen dituzte. Mezuak ezabatzen dituzunean, hau zure jarraitzaileei bidaltzen zaie ere, beste mezu batzuk zabaltzea edo gogoko izatea beti da informazio publikoa.</li>
<li><em>mezu zuzenak eta soilik jarraitzaileentzako mezuak</em>: Mezu guztiak zerbitzarian gorde eta prozesatzen dira. Soilik jarraitzaileentzako diren mezuak zure jarraitzaileei bidaltzen zaie eta bertan aipatutako erabiltzaileei, mezu zuzenak soilik aipatutako erabiltzaileei bidaltzen zaie. Honek esan nahi du kasu batzuetan beste zerbitzari batzuetara bidaltzen dela mezua eta han kopiak gordetzen direla. Borondate oneko ahalegin bat egiten dugu mezuok soilik baimena duten pertsonek ikus ditzaten, baina beste zerbitzariek agian ez. Hortaz, zure jarraitzaileen zerbitzaria zein den egiaztatzea garrantzitsua da. Jarraitzaileak eskuz onartu eta ukatzeko aukera aldatu dezakezu. <em>Kontuan izan zerbitzariaren operadoreak eta mezua jasotzen duen edozein zerbitzarik operadoreek mezuok ikus ditzaketela. <em>Ez partekatu informazio arriskutsua Mastodon bidez.</em></li>
<li><em>Mezu zuzenak eta soilik jarraitzaileentzako mezuak</em>: Mezu guztiak zerbitzarian gorde eta prozesatzen dira. Soilik jarraitzaileentzako diren mezuak zure jarraitzaileei bidaltzen zaie eta bertan aipatutako erabiltzaileei, mezu zuzenak soilik aipatutako erabiltzaileei bidaltzen zaie. Honek esan nahi du kasu batzuetan beste zerbitzari batzuetara bidaltzen dela mezua eta han kopiak gordetzen direla. Borondate oneko ahalegin bat egiten dugu mezuok soilik baimena duten pertsonek ikus ditzaten, baina beste zerbitzariek agian ez. Hortaz, zure jarraitzaileen zerbitzaria zein den egiaztatzea garrantzitsua da. Jarraitzaileak eskuz onartu eta ukatzeko aukera aldatu dezakezu. <em>Kontuan izan zerbitzariaren operadoreak eta mezua jasotzen duen edozein zerbitzarik operadoreek mezuok ikus ditzaketela</em> eta edonork atera dezakeela pantaila argazki bat, kopiatu edo beste modu batean partekatu.<em>Ez partekatu informazio arriskutsua Mastodon bidez.</em></li>
<li><em>IP-ak eta bestelako meta-datuak</em>: Saioa hasten duzunean, zure IP helbidea gordetzen dugu, eta erabiltzen duzun nabigatzaile edo aplikazioa. Hasitako saio guztiak zuk ikusteko mopduan daude eta ezarpenetan indargabetu ditzakezu. Erabilitako azken IP helbidea 12 hilabetez gordetzen da. Gure zerbitzariak jasotako eskari guztiak eta IP-a duten zerbitzariko egunkariak gorde genitzake.</li>
</ul>

View file

@ -424,7 +424,7 @@ fa:
following: 'انجام شد! شما هم‌اینک پیگیر این کاربر هستید:'
post_follow:
close: یا این پنجره را ببندید.
return: به نمایهٔ این کاربر بازگردید
return: نمایهٔ این کاربر را نشان بده
web: رفتن به وب
title: پیگیری %{acct}
datetime:

View file

@ -424,7 +424,7 @@ gl:
following: 'Parabéns! Está a seguir a:'
post_follow:
close: Ou, pode pechar esta ventá.
return: Voltar ao perfil da usuaria
return: Mostrar o perfil da usuaria
web: Ir a web
title: Seguir %{acct}
datetime:
@ -488,7 +488,7 @@ gl:
unlocked_warning_title: A súa conta non está pechada
generic:
changes_saved_msg: Cambios gardados correctamente!!
powered_by: a funcionar grazas a %{link}
powered_by: grazas a %{link}
save_changes: Gardar cambios
validation_errors:
one: Algo non está ben de todo! Por favor revise abaixo o erro

View file

@ -791,6 +791,7 @@ ja:
title: "%{instance} 利用規約・プライバシーポリシー"
themes:
default: Mastodon
mastodon-light: Mastodon (ライト)
time:
formats:
default: "%Y年%m月%d日 %H:%M"

View file

@ -426,7 +426,7 @@ ko:
following: '성공! 당신은 다음 계정을 팔로우 하고 있습니다:'
post_follow:
close: 혹은, 당신은 이 윈도우를 닫을 수 있습니다.
return: 유저 프로필로 돌아가
return: 유저 프로필
web: 웹으로 가기
title: "%{acct} 를 팔로우"
datetime:

View file

@ -424,7 +424,7 @@ nl:
following: 'Succes! Jij volgt nu:'
post_follow:
close: Of je kan dit venster gewoon sluiten.
return: Ga terug naar het profiel van de gebruiker
return: Profiel van deze gebruiker tonen
web: Ga naar de webapp
title: Volg %{acct}
datetime:

View file

@ -208,7 +208,7 @@ oc:
updated_msg: Emoji ben mes a jorn!
upload: Enviar
domain_blocks:
add_new: Najustar un nòu
add_new: Ajustar
created_msg: Domeni blocat es a èsser tractat
destroyed_msg: Lo blocatge del domeni es estat levat
domain: Domeni
@ -303,7 +303,7 @@ oc:
view: Veire
settings:
activity_api_enabled:
desc_html: Nombre destatuts publicats, utilizaires actius e novèlas inscripcions en rapòrt setmanièr
desc_html: Nombre destatuts publicats, dutilizaires actius e de novèlas inscripcions en rapòrt setmanièr
title: Publica las estatisticas totalas de lactivitat dels utilizaires
bootstrap_timeline_accounts:
desc_html: Separatz los noms dutilizaire amb de virgula. Pas que los comptes locals e pas clavats foncionaràn. Se lo camp es void los admins seràn selecionats.
@ -425,7 +425,7 @@ oc:
following: 'Felicitacion! Seguètz ara:'
post_follow:
close: O podètz tampar aquesta fenèstra.
return: Tornar al perfil
return: Veire lo perfil a la persona
web: Tornar a linterfàcia Web
title: Sègre %{acct}
date:
@ -639,7 +639,7 @@ oc:
follow_request:
action: Gerir las demandas dabonament
body: "%{name} a demandat a vos sègre"
subject: 'Demanda dabonament: %{name}'
subject: 'Demandas en espèra: %{name}'
title: Novèla demanda dabonament
mention:
action: Respondre
@ -791,7 +791,7 @@ oc:
recovery_codes: Salvar los còdis de recuperacion
recovery_codes_regenerated: Los còdis de recuperacion son ben estats tornats generar
recovery_instructions_html: Se vos arriba de perdre vòstre mobil, podètz utilizar un dels còdis de recuperacion cai-jos per poder tornar accedir a vòstre compte. <strong>Gardatz los còdis en seguretat</strong>, per exemple, imprimissètz los e gardatz los amb vòstres documents importants.
setup: Paramètres
setup: Parametrar
wrong_code: Lo còdi picat es invalid! Lora es bona sul servidor e lo mobil?
user_mailer:
backup_ready:

View file

@ -40,7 +40,7 @@ pt-BR:
following: Seguindo
media: Mídia
moved_html: "%{name} se mudou para %{new_profile_link}:"
network_hidden: Essa informação não está disponível
network_hidden: Esta informação não está disponível
nothing_here: Não há nada aqui!
people_followed_by: Pessoas que %{name} segue
people_who_follow: Pessoas que seguem %{name}
@ -122,7 +122,7 @@ pt-BR:
remove_avatar: Remover avatar
resend_confirmation:
already_confirmed: Este usuário já está confirmado
send: Re-enviar o email de confirmação
send: Re-enviar o e-mail de confirmação
success: E-mail de confirmação enviado com sucesso!
reset: Anular
reset_password: Modificar senha
@ -312,7 +312,7 @@ pt-BR:
username: Contate usuário
hero:
desc_html: Aparece na página inicial. Ao menos 600x100px é recomendado. Se não estiver definido, o thumbnail da instância é usado no lugar
title: Imagem do herói
title: Imagem de capa
peers_api_enabled:
desc_html: Nomes de domínio que essa instância encontrou no fediverso
title: Publicar lista de instâncias descobertas
@ -424,7 +424,7 @@ pt-BR:
following: 'Sucesso! Você agora está seguindo:'
post_follow:
close: Ou você pode simplesmente fechar esta janela.
return: Retornar ao perfil do usuário
return: Exibir o perfil do usuário
web: Voltar para a página inicial
title: Seguir %{acct}
datetime:
@ -466,7 +466,7 @@ pt-BR:
date: Data
download: Baixe o seu arquivo
hint_html: Você pode pedir um arquivo dos seus <strong>toots e mídia enviada</strong>. Os dados exportados estarão no formato ActivityPub, que podem ser lidos por qualquer software compatível. Você pode pedir um arquivo a cada 7 dias.
in_progress: Preparando seu arquivo...
in_progress: Preparando o seu arquivo...
request: Solicitar o seu arquivo
size: Tamanho
blocks: Você bloqueou
@ -603,6 +603,7 @@ pt-BR:
remote_unfollow:
error: Erro
title: Título
unfollowed: Deixou de seguir
sessions:
activity: Última atividade
browser: Navegador
@ -668,7 +669,7 @@ pt-BR:
video:
one: "%{count} vídeo"
other: "%{count} vídeos"
boosted_from_html: Compartilhada à partir de %{acct_link}
boosted_from_html: Compartilhada de %{acct_link}
content_warning: 'Aviso de conteúdo: %{warning}'
disallowed_hashtags:
one: 'continha a hashtag não permitida: %{tags}'
@ -800,7 +801,7 @@ pt-BR:
backup_ready:
explanation: Você pediu um backup completo da sua conta no Mastodon. E agora está pronto para ser baixado!
subject: Seu arquivo está pronto para ser baixado
title: Arquivo "pra viagem"
title: Baixar arquivo
welcome:
edit_profile_action: Configurar perfil
edit_profile_step: Você pode customizar o seu perfil enviando um avatar, uma imagem de topo, mudando seu nome de exibição, dentre outros. Se você gostaria de aprovar novos seguidores antes que eles possam seguir você, você pode trancar a sua conta.
@ -823,5 +824,5 @@ pt-BR:
invalid_email: O endereço de e-mail é inválido
invalid_otp_token: Código de autenticação inválido
otp_lost_help_html: Se você perder o acesso à ambos, você pode entrar em contato com %{email}
seamless_external_login: Você está logado usando um serviço externo, então configurações de e-mail e password não estão disponíveis.
seamless_external_login: Você está logado usando um serviço externo, então configurações de e-mail e senha não estão disponíveis.
signed_in_as: 'Acesso como:'

View file

@ -215,7 +215,7 @@ sk:
create: Blokovať doménu
hint: Blokovanie domény stále dovolí vytvárať nové účty v databáze, ale tieto budú automaticky moderované.
severity:
desc_html: "<strong>Stíšenie</strong> urobí všetky príspevky účtu neviditeľné pre všetkých ktorý nenásledujú daný účet. <strong>Suspendácia</strong> zmaže všetky príspevky, médiá a profilové informácie. Použi <strong>Žiadne</strong>, ak chceš iba neprijímať súbory médií."
desc_html: "<strong>Stíšenie</strong> urobí všetky príspevky daného účtu neviditeľné pre všetkých ktorí nenásledujú tento účet. <strong>Suspendácia</strong> zmaže všetky príspevky, médiá a profilové informácie. Použi <strong>Žiadne</strong>, ak chceš iba neprijímať súbory médií."
noop: Nič
silence: Stíšiť
suspend: Suspendovať
@ -425,7 +425,7 @@ sk:
following: 'Podarilo sa! Teraz už následujete užívateľa:'
post_follow:
close: Alebo môžete iba zatvoriť toto okno.
return: Vrátiť sa na užívateľov profil
return: Ukáž užívateľov profil
web: Ísť na web
title: Následovať %{acct}
datetime:
@ -655,7 +655,11 @@ sk:
few: "%{count} videá"
one: "%{count} video"
other: "%{count} videí"
boosted_from_html: Povýšené od %{acct_link}
content_warning: 'Varovanie o obsahu: %{warning}'
disallowed_hashtags:
one: 'obsahuje nepovolený haštag: %{tags}'
other: 'obsahuje nepovolené haštagy: %{tags}'
open_in_web: Otvor v okne prehliadača
over_character_limit: limit počtu %{max} znakov bol presiahnutý
pin_errors:

View file

@ -422,7 +422,7 @@ zh-CN:
following: 成功!你正在关注:
post_follow:
close: 你也可以直接关闭这个窗口。
return: 返回至个人资料页
return: 查看用户个人资料
web: 返回本站
title: 关注 %{acct}
datetime:

View file

@ -92,7 +92,7 @@ module.exports = merge(sharedConfig, {
},
externals: [
'/emoji/1f602.svg', // used for emoji picker dropdown
'/emoji/sheet.png', // used in emoji-mart
'/emoji/sheet_10.png', // used in emoji-mart
],
excludes: [
'**/*.gz',

View file

@ -0,0 +1,40 @@
class RejectFollowingBlockedUsers < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
blocked_follows = Follow.find_by_sql(<<-SQL)
select f.* from follows f
inner join blocks b on
f.account_id = b.target_account_id and
f.target_account_id = b.account_id
SQL
domain_blocked_follows = Follow.find_by_sql(<<-SQL)
select f.* from follows f
inner join accounts following on f.account_id = following.id
inner join account_domain_blocks b on
lower(b.domain) = lower(following.domain) and
f.target_account_id = b.account_id
SQL
follows = (blocked_follows + domain_blocked_follows).uniq
say "Destroying #{follows.size} blocked follow relationships..."
follows.each do |follow|
blocked_account = follow.account
followed_acccount = follow.target_account
next follow.destroy! if blocked_account.local?
reject_follow_json = Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new(follow, serializer: ActivityPub::RejectFollowSerializer, adapter: ActivityPub::Adapter).as_json).sign!(followed_acccount))
ActivityPub::DeliveryWorker.perform_async(reject_follow_json, followed_acccount, blocked_account.inbox_url)
follow.destroy!
end
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View file

@ -0,0 +1,17 @@
class MigrateWebPushSubscriptions2 < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
Web::PushSubscription.where(user_id: nil).select(:id).includes(:session_activation).find_each do |subscription|
if subscription.session_activation.nil?
subscription.delete
else
subscription.update_attribute(:user_id, subscription.session_activation.user_id)
end
end
end
def down
# Nothing to do
end
end

View file

@ -10,8 +10,9 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_06_04_000556) do
ActiveRecord::Schema.define(version: 2018_06_09_104432) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

View file

@ -21,7 +21,7 @@ module Mastodon
end
def flags
'rc3'
''
end
def to_a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

BIN
public/emoji/sheet_10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 KiB

View file

@ -3,13 +3,11 @@ require 'rails_helper'
RSpec.describe Admin::AccountsController, type: :controller do
render_views
let(:user) { Fabricate(:user, admin: true) }
before do
sign_in user, scope: :user
end
before { sign_in current_user, scope: :user }
describe 'GET #index' do
let(:current_user) { Fabricate(:user, admin: true) }
around do |example|
default_per_page = Account.default_per_page
Account.paginates_per 1
@ -68,6 +66,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
end
describe 'GET #show' do
let(:current_user) { Fabricate(:user, admin: true) }
let(:account) { Fabricate(:account, username: 'bob') }
it 'returns http success' do
@ -75,4 +74,219 @@ RSpec.describe Admin::AccountsController, type: :controller do
expect(response).to have_http_status(200)
end
end
describe 'POST #subscribe' do
subject { post :subscribe, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: admin) }
let(:account) { Fabricate(:account) }
context 'when user is admin' do
let(:admin) { true }
it { is_expected.to redirect_to admin_account_path(account.id) }
end
context 'when user is not admin' do
let(:admin) { false }
it { is_expected.to have_http_status :forbidden }
end
end
describe 'POST #unsubscribe' do
subject { post :unsubscribe, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: admin) }
let(:account) { Fabricate(:account) }
context 'when user is admin' do
let(:admin) { true }
it { is_expected.to redirect_to admin_account_path(account.id) }
end
context 'when user is not admin' do
let(:admin) { false }
it { is_expected.to have_http_status :forbidden }
end
end
describe 'POST #memorialize' do
subject { post :memorialize, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: current_user_admin) }
let(:account) { Fabricate(:account, user: user) }
let(:user) { Fabricate(:user, admin: target_user_admin) }
context 'when user is admin' do
let(:current_user_admin) { true }
context 'when target user is admin' do
let(:target_user_admin) { true }
it 'fails to memorialize account' do
is_expected.to have_http_status :forbidden
expect(account.reload).not_to be_memorial
end
end
context 'when target user is not admin' do
let(:target_user_admin) { false }
it 'succeeds in memorializing account' do
is_expected.to redirect_to admin_account_path(account.id)
expect(account.reload).to be_memorial
end
end
end
context 'when user is not admin' do
let(:current_user_admin) { false }
context 'when target user is admin' do
let(:target_user_admin) { true }
it 'fails to memorialize account' do
is_expected.to have_http_status :forbidden
expect(account.reload).not_to be_memorial
end
end
context 'when target user is not admin' do
let(:target_user_admin) { false }
it 'fails to memorialize account' do
is_expected.to have_http_status :forbidden
expect(account.reload).not_to be_memorial
end
end
end
end
describe 'POST #enable' do
subject { post :enable, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: admin) }
let(:account) { Fabricate(:account, user: user) }
let(:user) { Fabricate(:user, disabled: true) }
context 'when user is admin' do
let(:admin) { true }
it 'succeeds in enabling account' do
is_expected.to redirect_to admin_account_path(account.id)
expect(user.reload).not_to be_disabled
end
end
context 'when user is not admin' do
let(:admin) { false }
it 'fails to enable account' do
is_expected.to have_http_status :forbidden
expect(user.reload).to be_disabled
end
end
end
describe 'POST #disable' do
subject { post :disable, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: current_user_admin) }
let(:account) { Fabricate(:account, user: user) }
let(:user) { Fabricate(:user, disabled: false, admin: target_user_admin) }
context 'when user is admin' do
let(:current_user_admin) { true }
context 'when target user is admin' do
let(:target_user_admin) { true }
it 'fails to disable account' do
is_expected.to have_http_status :forbidden
expect(user.reload).not_to be_disabled
end
end
context 'when target user is not admin' do
let(:target_user_admin) { false }
it 'succeeds in disabling account' do
is_expected.to redirect_to admin_account_path(account.id)
expect(user.reload).to be_disabled
end
end
end
context 'when user is not admin' do
let(:current_user_admin) { false }
context 'when target user is admin' do
let(:target_user_admin) { true }
it 'fails to disable account' do
is_expected.to have_http_status :forbidden
expect(user.reload).not_to be_disabled
end
end
context 'when target user is not admin' do
let(:target_user_admin) { false }
it 'fails to disable account' do
is_expected.to have_http_status :forbidden
expect(user.reload).not_to be_disabled
end
end
end
end
describe 'POST #redownload' do
subject { post :redownload, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: admin) }
let(:account) { Fabricate(:account) }
context 'when user is admin' do
let(:admin) { true }
it 'succeeds in redownloadin' do
is_expected.to redirect_to admin_account_path(account.id)
end
end
context 'when user is not admin' do
let(:admin) { false }
it 'fails to redownload' do
is_expected.to have_http_status :forbidden
end
end
end
describe 'POST #remove_avatar' do
subject { post :remove_avatar, params: { id: account.id } }
let(:current_user) { Fabricate(:user, admin: admin) }
let(:account) { Fabricate(:account) }
context 'when user is admin' do
let(:admin) { true }
it 'succeeds in removing avatar' do
is_expected.to redirect_to admin_account_path(account.id)
end
end
context 'when user is not admin' do
let(:admin) { false }
it 'fails to remove avatar' do
is_expected.to have_http_status :forbidden
end
end
end
end

View file

@ -0,0 +1,50 @@
require 'rails_helper'
RSpec.describe IntentsController, type: :controller do
render_views
let(:user) { Fabricate(:user) }
before { sign_in user, scope: :user }
describe 'GET #show' do
subject { get :show, params: { uri: uri } }
context 'when schema is web+mastodon' do
context 'when host is follow' do
let(:uri) { 'web+mastodon://follow?uri=test' }
it { is_expected.to redirect_to authorize_follow_path(acct: 'test') }
end
context 'when host is share' do
let(:uri) { 'web+mastodon://share?text=test' }
it { is_expected.to redirect_to share_path(text: 'test') }
end
context 'when host is none of the above' do
let(:uri) { 'web+mastodon://test' }
it { is_expected.to have_http_status 404 }
end
end
context 'when schema is not web+mastodon' do
let(:uri) { 'api+mastodon://test.com' }
it { is_expected.to have_http_status 404 }
end
context 'when uri param is blank' do
let(:uri) { '' }
it { is_expected.to have_http_status 404 }
end
context 'when uri is invalid' do
let(:uri) { 'invalid uri://test.com' }
it { is_expected.to have_http_status 404 }
end
end
end

View file

@ -0,0 +1,25 @@
require 'rails_helper'
RSpec.describe AfterBlockDomainFromAccountService, type: :service do
let!(:wolf) { Fabricate(:account, username: 'wolf', domain: 'evil.org', inbox_url: 'https://evil.org/inbox', protocol: :activitypub) }
let!(:alice) { Fabricate(:account, username: 'alice') }
subject { AfterBlockDomainFromAccountService.new }
before do
stub_jsonld_contexts!
allow(ActivityPub::DeliveryWorker).to receive(:perform_async)
end
it 'purge followers from blocked domain' do
wolf.follow!(alice)
subject.call(alice, 'evil.org')
expect(wolf.following?(alice)).to be false
end
it 'sends Reject->Follow to followers from blocked domain' do
wolf.follow!(alice)
subject.call(alice, 'evil.org')
expect(ActivityPub::DeliveryWorker).to have_received(:perform_async).once
end
end

View file

@ -1,19 +0,0 @@
require 'rails_helper'
RSpec.describe BlockDomainFromAccountService, type: :service do
let!(:wolf) { Fabricate(:account, username: 'wolf', domain: 'evil.org') }
let!(:alice) { Fabricate(:account, username: 'alice') }
subject { BlockDomainFromAccountService.new }
it 'creates domain block' do
subject.call(alice, 'evil.org')
expect(alice.domain_blocking?('evil.org')).to be true
end
it 'purge followers from blocked domain' do
wolf.follow!(alice)
subject.call(alice, 'evil.org')
expect(wolf.following?(alice)).to be false
end
end

View file

@ -2308,8 +2308,8 @@ elliptic@^6.0.0:
minimalistic-crypto-utils "^1.0.0"
emoji-mart@Gargron/emoji-mart#build:
version "2.1.4"
resolved "https://codeload.github.com/Gargron/emoji-mart/tar.gz/a5e1afe5ebcf2841e611d20d261b029581cbe051"
version "2.6.2"
resolved "https://codeload.github.com/Gargron/emoji-mart/tar.gz/ff00dc470b5b2d9f145a6d6e977a54de5df2b4c9"
emoji-regex@^6.1.0:
version "6.5.1"