Merge branch 'main' into glitch-soc/merge-upstream

pull/53/head
Claire 2023-03-02 17:32:38 +01:00
commit 276c1d32d6
97 changed files with 1412 additions and 523 deletions

View File

@ -2056,13 +2056,6 @@ Style/HashAsLastArrayItem:
- 'app/services/notify_service.rb'
- 'db/migrate/20181024224956_migrate_account_conversations.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowSplatArgument.
Style/HashConversion:
Exclude:
- 'app/services/import_service.rb'
# Offense count: 12
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.

View File

@ -6,7 +6,7 @@ ruby '>= 2.7.0', '< 3.3.0'
gem 'pkg-config', '~> 1.5'
gem 'rexml', '~> 3.2'
gem 'puma', '~> 5.6'
gem 'puma', '~> 6.1'
gem 'rails', '~> 6.1.7'
gem 'sprockets', '~> 3.7.2'
gem 'thor', '~> 1.2'
@ -106,7 +106,7 @@ group :development, :test do
gem 'i18n-tasks', '~> 1.0', require: false
gem 'pry-byebug', '~> 3.10'
gem 'pry-rails', '~> 0.3'
gem 'rspec-rails', '~> 5.1'
gem 'rspec-rails', '~> 6.0'
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false

View File

@ -193,7 +193,7 @@ GEM
cocoon (1.2.15)
coderay (1.1.3)
color_diff (0.1)
concurrent-ruby (1.2.0)
concurrent-ruby (1.2.2)
connection_pool (2.3.0)
cose (1.3.0)
cbor (~> 0.5.9)
@ -508,7 +508,7 @@ GEM
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (5.0.1)
puma (5.6.5)
puma (6.1.0)
nio4r (~> 2.0)
pundit (2.3.0)
activesupport (>= 3.0.0)
@ -587,26 +587,26 @@ GEM
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-rails (5.1.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-sidekiq (3.1.0)
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.11.1)
rspec-support (3.12.0)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.45.1)
@ -856,7 +856,7 @@ DEPENDENCIES
pry-byebug (~> 3.10)
pry-rails (~> 0.3)
public_suffix (~> 5.0)
puma (~> 5.6)
puma (~> 6.1)
pundit (~> 2.3)
rack (~> 2.2.6)
rack-attack (~> 6.6)
@ -872,7 +872,7 @@ DEPENDENCIES
redis-namespace (~> 1.10)
rexml (~> 3.2)
rqrcode (~> 2.1)
rspec-rails (~> 5.1)
rspec-rails (~> 6.0)
rspec-sidekiq (~> 3.1)
rspec_junit_formatter (~> 0.6)
rubocop

View File

@ -1,11 +0,0 @@
# frozen_string_literal: true
module Admin::AnnouncementsHelper
def time_range(announcement)
if announcement.all_day?
safe_join([l(announcement.starts_at.to_date), ' - ', l(announcement.ends_at.to_date)])
else
safe_join([l(announcement.starts_at), ' - ', l(announcement.ends_at)])
end
end
end

View File

@ -41,9 +41,9 @@ module HomeHelper
def obscured_counter(count)
if count <= 0
0
'0'
elsif count == 1
1
'1'
else
'1+'
end
@ -57,14 +57,6 @@ module HomeHelper
end
end
def optional_link_to(condition, path, options = {}, &block)
if condition
link_to(path, options, &block)
else
content_tag(:div, &block)
end
end
def sign_up_message
if closed_registrations?
t('auth.registration_closed', instance: site_hostname)

View File

@ -6,6 +6,7 @@ export default class GIFV extends React.PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string,
lang: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
onClick: PropTypes.func,
@ -35,7 +36,7 @@ export default class GIFV extends React.PureComponent {
};
render () {
const { src, width, height, alt } = this.props;
const { src, width, height, alt, lang } = this.props;
const { loading } = this.state;
return (
@ -48,6 +49,7 @@ export default class GIFV extends React.PureComponent {
tabIndex='0'
aria-label={alt}
title={alt}
lang={lang}
onClick={this.handleClick}
/>
)}
@ -58,6 +60,7 @@ export default class GIFV extends React.PureComponent {
tabIndex='0'
aria-label={alt}
title={alt}
lang={lang}
muted
loop
autoPlay

View File

@ -10,6 +10,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
static propTypes = {
status: ImmutablePropTypes.map.isRequired,
lang: PropTypes.string,
height: PropTypes.number,
width: PropTypes.number,
};
@ -48,7 +49,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
};
render () {
const { status, width, height } = this.props;
const { status, lang, width, height } = this.props;
const mediaAttachments = status.get('media_attachments');
if (mediaAttachments.size === 0) {
@ -64,6 +65,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
<Component
src={audio.get('url')}
alt={audio.get('description')}
lang={lang || status.get('language')}
width={width}
height={height}
poster={audio.get('preview_url') || status.getIn(['account', 'avatar_static'])}
@ -87,6 +89,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
blurhash={video.get('blurhash')}
src={video.get('url')}
alt={video.get('description')}
lang={lang || status.get('language')}
width={width}
height={height}
inline
@ -102,6 +105,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
{Component => (
<Component
media={mediaAttachments}
lang={lang || status.get('language')}
sensitive={status.get('sensitive')}
defaultWidth={width}
height={height}

View File

@ -17,6 +17,7 @@ class Item extends React.PureComponent {
static propTypes = {
attachment: ImmutablePropTypes.map.isRequired,
lang: PropTypes.string,
standalone: PropTypes.bool,
index: PropTypes.number.isRequired,
size: PropTypes.number.isRequired,
@ -78,7 +79,7 @@ class Item extends React.PureComponent {
};
render () {
const { attachment, index, size, standalone, displayWidth, visible } = this.props;
const { attachment, lang, index, size, standalone, displayWidth, visible } = this.props;
let width = 50;
let height = 100;
@ -134,7 +135,7 @@ class Item extends React.PureComponent {
if (attachment.get('type') === 'unknown') {
return (
<div className={classNames('media-gallery__item', { standalone })} key={attachment.get('id')} style={{ left: left, top: top, right: right, bottom: bottom, width: `${width}%`, height: `${height}%` }}>
<a className='media-gallery__item-thumbnail' href={attachment.get('remote_url') || attachment.get('url')} style={{ cursor: 'pointer' }} title={attachment.get('description')} target='_blank' rel='noopener noreferrer'>
<a className='media-gallery__item-thumbnail' href={attachment.get('remote_url') || attachment.get('url')} style={{ cursor: 'pointer' }} title={attachment.get('description')} lang={lang} target='_blank' rel='noopener noreferrer'>
<Blurhash
hash={attachment.get('blurhash')}
className='media-gallery__preview'
@ -174,6 +175,7 @@ class Item extends React.PureComponent {
sizes={sizes}
alt={attachment.get('description')}
title={attachment.get('description')}
lang={lang}
style={{ objectPosition: `${x}% ${y}%` }}
onLoad={this.handleImageLoad}
/>
@ -188,6 +190,7 @@ class Item extends React.PureComponent {
className='media-gallery__item-gifv-thumbnail'
aria-label={attachment.get('description')}
title={attachment.get('description')}
lang={lang}
role='application'
src={attachment.get('url')}
onClick={this.handleClick}
@ -227,6 +230,7 @@ class MediaGallery extends React.PureComponent {
sensitive: PropTypes.bool,
standalone: PropTypes.bool,
media: ImmutablePropTypes.list.isRequired,
lang: PropTypes.string,
size: PropTypes.object,
height: PropTypes.number.isRequired,
onOpenMedia: PropTypes.func.isRequired,
@ -310,9 +314,8 @@ class MediaGallery extends React.PureComponent {
}
render () {
const { media, intl, sensitive, height, defaultWidth, standalone, autoplay } = this.props;
const { media, lang, intl, sensitive, height, defaultWidth, standalone, autoplay } = this.props;
const { visible } = this.state;
const width = this.state.width || defaultWidth;
let children, spoilerButton;
@ -333,9 +336,9 @@ class MediaGallery extends React.PureComponent {
const uncached = media.every(attachment => attachment.get('type') === 'unknown');
if (standalone && this.isFullSizeEligible()) {
children = <Item standalone autoplay={autoplay} onClick={this.handleClick} attachment={media.get(0)} displayWidth={width} visible={visible} />;
children = <Item standalone autoplay={autoplay} onClick={this.handleClick} attachment={media.get(0)} lang={lang} displayWidth={width} visible={visible} />;
} else {
children = media.take(4).map((attachment, i) => <Item key={attachment.get('id')} autoplay={autoplay} onClick={this.handleClick} attachment={attachment} index={i} size={size} displayWidth={width} visible={visible || uncached} />);
children = media.take(4).map((attachment, i) => <Item key={attachment.get('id')} autoplay={autoplay} onClick={this.handleClick} attachment={attachment} index={i} lang={lang} size={size} displayWidth={width} visible={visible || uncached} />);
}
if (uncached) {

View File

@ -40,6 +40,7 @@ class Poll extends ImmutablePureComponent {
static propTypes = {
poll: ImmutablePropTypes.map,
lang: PropTypes.string,
intl: PropTypes.object.isRequired,
disabled: PropTypes.bool,
refresh: PropTypes.func,
@ -126,7 +127,7 @@ class Poll extends ImmutablePureComponent {
};
renderOption (option, optionIndex, showResults) {
const { poll, disabled, intl } = this.props;
const { poll, lang, disabled, intl } = this.props;
const pollVotesCount = poll.get('voters_count') || poll.get('votes_count');
const percent = pollVotesCount === 0 ? 0 : (option.get('votes_count') / pollVotesCount) * 100;
const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') >= other.get('votes_count'));
@ -159,6 +160,7 @@ class Poll extends ImmutablePureComponent {
onKeyPress={this.handleOptionKeyPress}
aria-checked={active}
aria-label={option.get('title')}
lang={lang}
data-index={optionIndex}
/>
)}
@ -175,6 +177,7 @@ class Poll extends ImmutablePureComponent {
<span
className='poll__option__text translate'
lang={lang}
dangerouslySetInnerHTML={{ __html: titleEmojified }}
/>

View File

@ -417,6 +417,7 @@ class Status extends ImmutablePureComponent {
<Component
src={attachment.get('url')}
alt={attachment.get('description')}
lang={status.get('language')}
poster={attachment.get('preview_url') || status.getIn(['account', 'avatar_static'])}
backgroundColor={attachment.getIn(['meta', 'colors', 'background'])}
foregroundColor={attachment.getIn(['meta', 'colors', 'foreground'])}
@ -446,6 +447,7 @@ class Status extends ImmutablePureComponent {
blurhash={attachment.get('blurhash')}
src={attachment.get('url')}
alt={attachment.get('description')}
lang={status.get('language')}
width={this.props.cachedMediaWidth}
height={110}
inline
@ -465,6 +467,7 @@ class Status extends ImmutablePureComponent {
{Component => (
<Component
media={status.get('media_attachments')}
lang={status.get('language')}
sensitive={status.get('sensitive')}
height={110}
onOpenMedia={this.handleOpenMedia}

View File

@ -242,7 +242,7 @@ class StatusContent extends React.PureComponent {
);
const poll = !!status.get('poll') && (
<PollContainer pollId={status.get('poll')} />
<PollContainer pollId={status.get('poll')} lang={status.get('language')} />
);
if (status.get('spoiler_text').length > 0) {

View File

@ -76,6 +76,7 @@ export default class MediaItem extends ImmutablePureComponent {
<img
src={attachment.get('preview_url') || attachment.getIn(['account', 'avatar_static'])}
alt={attachment.get('description')}
lang={status.get('language')}
onLoad={this.handleImageLoad}
/>
);
@ -95,6 +96,7 @@ export default class MediaItem extends ImmutablePureComponent {
<img
src={attachment.get('preview_url')}
alt={attachment.get('description')}
lang={status.get('language')}
style={{ objectPosition: `${x}% ${y}%` }}
onLoad={this.handleImageLoad}
/>
@ -105,6 +107,7 @@ export default class MediaItem extends ImmutablePureComponent {
className='media-gallery__item-gifv-thumbnail'
aria-label={attachment.get('description')}
title={attachment.get('description')}
lang={status.get('language')}
role='application'
src={attachment.get('url')}
onMouseEnter={this.handleMouseEnter}

View File

@ -28,6 +28,7 @@ class Audio extends React.PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string,
lang: PropTypes.string,
poster: PropTypes.string,
duration: PropTypes.number,
width: PropTypes.number,
@ -458,7 +459,7 @@ class Audio extends React.PureComponent {
};
render () {
const { src, intl, alt, editable, autoPlay, sensitive, blurhash } = this.props;
const { src, intl, alt, lang, editable, autoPlay, sensitive, blurhash } = this.props;
const { paused, muted, volume, currentTime, duration, buffer, dragging, revealed } = this.state;
const progress = Math.min((currentTime / duration) * 100, 100);
@ -503,6 +504,7 @@ class Audio extends React.PureComponent {
onKeyDown={this.handleAudioKeyDown}
title={alt}
aria-label={alt}
lang={lang}
/>
<div className={classNames('spoiler-button', { 'spoiler-button--hidden': revealed || editable })}>

View File

@ -139,6 +139,7 @@ class DetailedStatus extends ImmutablePureComponent {
<Audio
src={attachment.get('url')}
alt={attachment.get('description')}
lang={status.get('language')}
duration={attachment.getIn(['meta', 'original', 'duration'], 0)}
poster={attachment.get('preview_url') || status.getIn(['account', 'avatar_static'])}
backgroundColor={attachment.getIn(['meta', 'colors', 'background'])}
@ -161,6 +162,7 @@ class DetailedStatus extends ImmutablePureComponent {
blurhash={attachment.get('blurhash')}
src={attachment.get('url')}
alt={attachment.get('description')}
lang={status.get('language')}
width={300}
height={150}
inline
@ -176,6 +178,7 @@ class DetailedStatus extends ImmutablePureComponent {
standalone
sensitive={status.get('sensitive')}
media={status.get('media_attachments')}
lang={status.get('language')}
height={300}
onOpenMedia={this.props.onOpenMedia}
visible={this.props.showMedia}

View File

@ -7,15 +7,17 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import Footer from 'mastodon/features/picture_in_picture/components/footer';
const mapStateToProps = (state, { statusId }) => ({
language: state.getIn(['statuses', statusId, 'language']),
accountStaticAvatar: state.getIn(['accounts', state.getIn(['statuses', statusId, 'account']), 'avatar_static']),
});
export default @connect(mapStateToProps)
export default @connect(mapStateToProps, null, null, { forwardRef: true })
class AudioModal extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.isRequired,
statusId: PropTypes.string.isRequired,
language: PropTypes.string,
accountStaticAvatar: PropTypes.string.isRequired,
options: PropTypes.shape({
autoPlay: PropTypes.bool,
@ -25,7 +27,7 @@ class AudioModal extends ImmutablePureComponent {
};
render () {
const { media, accountStaticAvatar, statusId, onClose } = this.props;
const { media, language, accountStaticAvatar, statusId, onClose } = this.props;
const options = this.props.options || {};
return (
@ -34,6 +36,7 @@ class AudioModal extends ImmutablePureComponent {
<Audio
src={media.get('url')}
alt={media.get('description')}
lang={language}
duration={media.getIn(['meta', 'original', 'duration'], 0)}
height={150}
poster={media.get('preview_url') || accountStaticAvatar}

View File

@ -12,6 +12,7 @@ import RelativeTimestamp from 'mastodon/components/relative_timestamp';
import MediaAttachments from 'mastodon/components/media_attachments';
const mapStateToProps = (state, { statusId }) => ({
language: state.getIn(['statuses', statusId, 'language']),
versions: state.getIn(['history', statusId, 'items']),
});
@ -30,11 +31,12 @@ class CompareHistoryModal extends React.PureComponent {
onClose: PropTypes.func.isRequired,
index: PropTypes.number.isRequired,
statusId: PropTypes.string.isRequired,
language: PropTypes.string.isRequired,
versions: ImmutablePropTypes.list.isRequired,
};
render () {
const { index, versions, onClose } = this.props;
const { index, versions, language, onClose } = this.props;
const currentVersion = versions.get(index);
const emojiMap = currentVersion.get('emojis').reduce((obj, emoji) => {
@ -65,12 +67,12 @@ class CompareHistoryModal extends React.PureComponent {
<div className='status__content'>
{currentVersion.get('spoiler_text').length > 0 && (
<React.Fragment>
<div className='translate' dangerouslySetInnerHTML={spoilerContent} />
<div className='translate' dangerouslySetInnerHTML={spoilerContent} lang={language} />
<hr />
</React.Fragment>
)}
<div className='status__content__text status__content__text--visible translate' dangerouslySetInnerHTML={content} />
<div className='status__content__text status__content__text--visible translate' dangerouslySetInnerHTML={content} lang={language} />
{!!currentVersion.get('poll') && (
<div className='poll'>
@ -82,6 +84,7 @@ class CompareHistoryModal extends React.PureComponent {
<span
className='poll__option__text translate'
dangerouslySetInnerHTML={{ __html: emojify(escapeTextContentForBrowser(option.get('title')), emojiMap) }}
lang={language}
/>
</li>
))}
@ -89,7 +92,7 @@ class CompareHistoryModal extends React.PureComponent {
</div>
)}
<MediaAttachments status={currentVersion} />
<MediaAttachments status={currentVersion} lang={language} />
</div>
</div>
</div>

View File

@ -8,6 +8,7 @@ export default class ImageLoader extends PureComponent {
static propTypes = {
alt: PropTypes.string,
lang: PropTypes.string,
src: PropTypes.string.isRequired,
previewSrc: PropTypes.string,
width: PropTypes.number,
@ -18,6 +19,7 @@ export default class ImageLoader extends PureComponent {
static defaultProps = {
alt: '',
lang: '',
width: null,
height: null,
};
@ -129,7 +131,7 @@ export default class ImageLoader extends PureComponent {
};
render () {
const { alt, src, width, height, onClick } = this.props;
const { alt, lang, src, width, height, onClick } = this.props;
const { loading } = this.state;
const className = classNames('image-loader', {
@ -154,6 +156,7 @@ export default class ImageLoader extends PureComponent {
) : (
<ZoomableImage
alt={alt}
lang={lang}
src={src}
onClick={onClick}
width={width}

View File

@ -3,6 +3,7 @@ import ReactSwipeableViews from 'react-swipeable-views';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Video from 'mastodon/features/video';
import { connect } from 'react-redux';
import classNames from 'classnames';
import { defineMessages, injectIntl } from 'react-intl';
import IconButton from 'mastodon/components/icon_button';
@ -20,7 +21,12 @@ const messages = defineMessages({
next: { id: 'lightbox.next', defaultMessage: 'Next' },
});
export default @injectIntl
const mapStateToProps = (state, { statusId }) => ({
language: state.getIn(['statuses', statusId, 'language']),
});
export default @connect(mapStateToProps, null, null, { forwardRef: true })
@injectIntl
class MediaModal extends ImmutablePureComponent {
static propTypes = {
@ -129,7 +135,7 @@ class MediaModal extends ImmutablePureComponent {
};
render () {
const { media, statusId, intl, onClose } = this.props;
const { media, language, statusId, intl, onClose } = this.props;
const { navigationHidden } = this.state;
const index = this.getIndex();
@ -149,6 +155,7 @@ class MediaModal extends ImmutablePureComponent {
width={width}
height={height}
alt={image.get('description')}
lang={language}
key={image.get('url')}
onClick={this.toggleNavigation}
zoomButtonHidden={this.state.zoomButtonHidden}
@ -171,6 +178,7 @@ class MediaModal extends ImmutablePureComponent {
onCloseVideo={onClose}
detailed
alt={image.get('description')}
lang={language}
key={image.get('url')}
/>
);
@ -182,6 +190,7 @@ class MediaModal extends ImmutablePureComponent {
height={height}
key={image.get('preview_url')}
alt={image.get('description')}
lang={language}
onClick={this.toggleNavigation}
/>
);

View File

@ -2,15 +2,22 @@ import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Video from 'mastodon/features/video';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Footer from 'mastodon/features/picture_in_picture/components/footer';
import { getAverageFromBlurhash } from 'mastodon/blurhash';
export default class VideoModal extends ImmutablePureComponent {
const mapStateToProps = (state, { statusId }) => ({
language: state.getIn(['statuses', statusId, 'language']),
});
export default @connect(mapStateToProps, null, null, { forwardRef: true })
class VideoModal extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.isRequired,
statusId: PropTypes.string,
language: PropTypes.string,
options: PropTypes.shape({
startTime: PropTypes.number,
autoPlay: PropTypes.bool,
@ -31,7 +38,7 @@ export default class VideoModal extends ImmutablePureComponent {
}
render () {
const { media, statusId, onClose } = this.props;
const { media, statusId, language, onClose } = this.props;
const options = this.props.options || {};
return (
@ -49,6 +56,7 @@ export default class VideoModal extends ImmutablePureComponent {
autoFocus
detailed
alt={media.get('description')}
lang={language}
/>
</div>

View File

@ -96,6 +96,7 @@ class ZoomableImage extends React.PureComponent {
static propTypes = {
alt: PropTypes.string,
lang: PropTypes.string,
src: PropTypes.string.isRequired,
width: PropTypes.number,
height: PropTypes.number,
@ -106,6 +107,7 @@ class ZoomableImage extends React.PureComponent {
static defaultProps = {
alt: '',
lang: '',
width: null,
height: null,
};
@ -403,7 +405,7 @@ class ZoomableImage extends React.PureComponent {
};
render () {
const { alt, src, width, height, intl } = this.props;
const { alt, lang, src, width, height, intl } = this.props;
const { scale, lockTranslate } = this.state;
const overflow = scale === MIN_SCALE ? 'hidden' : 'scroll';
const zoomButtonShouldHide = this.state.navigationHidden || this.props.zoomButtonHidden || this.state.zoomMatrix.rate <= MIN_SCALE ? 'media-modal__zoom-button--hidden' : '';
@ -431,6 +433,7 @@ class ZoomableImage extends React.PureComponent {
ref={this.setImageRef}
alt={alt}
title={alt}
lang={lang}
src={src}
width={width}
height={height}

View File

@ -102,6 +102,7 @@ class Video extends React.PureComponent {
frameRate: PropTypes.string,
src: PropTypes.string.isRequired,
alt: PropTypes.string,
lang: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
sensitive: PropTypes.bool,
@ -524,7 +525,7 @@ class Video extends React.PureComponent {
}
render () {
const { preview, src, inline, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive, editable, blurhash, autoFocus } = this.props;
const { preview, src, inline, onOpenVideo, onCloseVideo, intl, alt, lang, detailed, sensitive, editable, blurhash, autoFocus } = this.props;
const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;
const progress = Math.min((currentTime / duration) * 100, 100);
const playerStyle = {};
@ -585,6 +586,7 @@ class Video extends React.PureComponent {
tabIndex='0'
aria-label={alt}
title={alt}
lang={lang}
width={width}
height={height}
volume={volume}

View File

@ -138,7 +138,7 @@
"compose_form.poll.remove_option": "إزالة هذا الخيار",
"compose_form.poll.switch_to_multiple": "تغيِير الاستطلاع للسماح باِخيارات مُتعدِّدة",
"compose_form.poll.switch_to_single": "تغيِير الاستطلاع للسماح باِخيار واحد فقط",
"compose_form.publish": "انشر",
"compose_form.publish": "نشر",
"compose_form.publish_form": "انشر",
"compose_form.publish_loud": "{publish}!",
"compose_form.save_changes": "احفظ التعديلات",
@ -176,7 +176,7 @@
"conversation.delete": "احذف المحادثة",
"conversation.mark_as_read": "اعتبرها كمقروءة",
"conversation.open": "اعرض المحادثة",
"conversation.with": "بـ {names}",
"conversation.with": "مع {names}",
"copypaste.copied": "تم نسخه",
"copypaste.copy": "انسخ",
"directory.federated": "مِن الفديفرس المعروف",
@ -215,7 +215,7 @@
"empty_column.bookmarked_statuses": "ليس لديك أية منشورات في الفواصل المرجعية بعد. عندما ستقوم بإضافة البعض منها، ستظهر هنا.",
"empty_column.community": "الخط العام المحلي فارغ. أكتب شيئا ما للعامة كبداية!",
"empty_column.direct": "لم تتلق أية رسالة خاصة مباشِرة بعد. سوف يتم عرض الرسائل المباشرة هنا إن قمت بإرسال واحدة أو تلقيت البعض منها.",
"empty_column.domain_blocks": "ليس هناك نطاقات مخفية بعد.",
"empty_column.domain_blocks": "ليس هناك نطاقات تم حجبها بعد.",
"empty_column.explore_statuses": "ليس هناك ما هو متداوَل الآن. عد في وقت لاحق!",
"empty_column.favourited_statuses": "ليس لديك أية منشورات مفضلة بعد. عندما ستقوم بالإعجاب بواحدة، ستظهر هنا.",
"empty_column.favourites": "لم يقم أي أحد بالإعجاب بهذا المنشور بعد. عندما يقوم أحدهم بذلك سوف يظهر هنا.",
@ -245,7 +245,7 @@
"filter_modal.added.context_mismatch_explanation": "فئة عامل التصفية هذه لا تنطبق على السياق الذي وصلت فيه إلى هذه المشاركة. إذا كنت ترغب في تصفية المنشور في هذا السياق أيضا، فسيتعين عليك تعديل عامل التصفية.",
"filter_modal.added.context_mismatch_title": "عدم تطابق السياق!",
"filter_modal.added.expired_explanation": "انتهت صلاحية فئة عامل التصفية هذه، سوف تحتاج إلى تغيير تاريخ انتهاء الصلاحية لتطبيقها.",
"filter_modal.added.expired_title": "تصفية منتهية الصلاحية!",
"filter_modal.added.expired_title": "عامل تصفية انتهت صلاحيته!",
"filter_modal.added.review_and_configure": "لمراجعة وزيادة تكوين فئة عوامل التصفية هذه، انتقل إلى {settings_link}.",
"filter_modal.added.review_and_configure_title": "إعدادات التصفية",
"filter_modal.added.settings_link": "صفحة الإعدادات",

View File

@ -383,7 +383,7 @@
"navigation_bar.filters": "Pallabres desactivaes",
"navigation_bar.follow_requests": "Solicitúes de siguimientu",
"navigation_bar.followed_tags": "Followed hashtags",
"navigation_bar.follows_and_followers": "Follows and followers",
"navigation_bar.follows_and_followers": "Perfiles que sigues ya te siguen",
"navigation_bar.lists": "Llistes",
"navigation_bar.logout": "Zarrar la sesión",
"navigation_bar.mutes": "Perfiles colos avisos desactivaos",

View File

@ -16,7 +16,7 @@
"account.badges.bot": "Bot",
"account.badges.group": "Gruppe",
"account.block": "@{name} blockieren",
"account.block_domain": "Alles von {domain} verstecken",
"account.block_domain": "{domain} sperren",
"account.blocked": "Blockiert",
"account.browse_more_on_origin_server": "Mehr auf dem Originalprofil durchsuchen",
"account.cancel_follow_request": "Folgeanfrage zurückziehen",

View File

@ -32,9 +32,9 @@
"account.follow": "Seguir",
"account.followers": "Seguidores",
"account.followers.empty": "Todavía nadie sigue a este usuario.",
"account.followers_counter": "{count, plural, one {{counter} Seguidor} other {{counter} Seguidores}}",
"account.followers_counter": "{count, plural, one {{counter} seguidor} other {{counter} seguidores}}",
"account.following": "Siguiendo",
"account.following_counter": "{count, plural, other {{counter} Siguiendo}}",
"account.following_counter": "{count, plural, other {Siguiendo a {counter}}}",
"account.follows.empty": "Todavía este usuario no sigue a nadie.",
"account.follows_you": "Te sigue",
"account.go_to_profile": "Ir al perfil",
@ -57,7 +57,7 @@
"account.requested_follow": "{name} solicitó seguirte",
"account.share": "Compartir el perfil de @{name}",
"account.show_reblogs": "Mostrar adhesiones de @{name}",
"account.statuses_counter": "{count, plural, one {{counter} Mensaje} other {{counter} Mensajes}}",
"account.statuses_counter": "{count, plural, one {{counter} mensaje} other {{counter} mensajes}}",
"account.unblock": "Desbloquear a @{name}",
"account.unblock_domain": "Desbloquear dominio {domain}",
"account.unblock_short": "Desbloquear",

View File

@ -51,7 +51,7 @@
"account.muted": "Silenciado",
"account.open_original_page": "Abrir página original",
"account.posts": "Publicaciones",
"account.posts_with_replies": "Publicaciones y respuestas",
"account.posts_with_replies": "Pub. y respuestas",
"account.report": "Reportar a @{name}",
"account.requested": "Esperando aprobación. Clica para cancelar la solicitud de seguimiento",
"account.requested_follow": "{name} ha solicitado seguirte",

View File

@ -29,7 +29,7 @@
"account.featured_tags.last_status_at": "Viimeisin viesti {date}",
"account.featured_tags.last_status_never": "Ei viestejä",
"account.featured_tags.title": "Käyttäjän {name} esillä olevat aihetunnisteet",
"account.follow": "Seuratut",
"account.follow": "Seuraa",
"account.followers": "Seuraajat",
"account.followers.empty": "Kukaan ei seuraa tätä käyttäjää vielä.",
"account.followers_counter": "{count, plural, one {{counter} seuraaja} other {{counter} seuraajaa}}",
@ -582,7 +582,7 @@
"status.reblogs.empty": "Kukaan ei ole vielä tehostanut tätä viestiä. Kun joku tekee niin, näkyy kyseinen henkilö tässä.",
"status.redraft": "Poista ja palauta muokattavaksi",
"status.remove_bookmark": "Poista kirjanmerkki",
"status.replied_to": "Vastasit käyttäjälle {name}",
"status.replied_to": "Vastaus käyttäjälle {name}",
"status.reply": "Vastaa",
"status.replyAll": "Vastaa ketjuun",
"status.report": "Raportoi @{name}",

View File

@ -54,7 +54,7 @@
"account.posts_with_replies": "टूट्स एवं जवाब",
"account.report": "रिपोर्ट @{name}",
"account.requested": "मंजूरी का इंतजार। फॉलो रिक्वेस्ट को रद्द करने के लिए क्लिक करें",
"account.requested_follow": "{name} has requested to follow you",
"account.requested_follow": "{name} ने आपको फॉलो करने के लिए अनुरोध किया है",
"account.share": "@{name} की प्रोफाइल शेयर करे",
"account.show_reblogs": "@{name} के बूस्ट दिखाए",
"account.statuses_counter": "{count, plural, one {{counter} भोंपू} other {{counter} भोंपू}}",
@ -128,7 +128,7 @@
"compose.language.search": "भाषाएँ खोजें...",
"compose_form.direct_message_warning_learn_more": "और जानें",
"compose_form.encryption_warning": "मास्टोडॉन पर पोस्ट एन्ड-टू-एन्ड एन्क्रिप्टेड नहीं है। कोई भी व्यक्तिगत जानकारी मास्टोडॉन पर मत भेजें।",
"compose_form.hashtag_warning": "This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag.",
"compose_form.hashtag_warning": "ये पोस्ट किसी भी हैशटैग में लिस्ट नहीं किया जाएगा क्योंकि ये पब्लिक नहीं है। सिर्फ पब्लिक पोस्ट ही हैशटैग से खोजे जा सकते हैं।",
"compose_form.lock_disclaimer": "आपका खाता {locked} नहीं है। आपको केवल फॉलोवर्स को दिखाई दिए जाने वाले पोस्ट देखने के लिए कोई भी फॉलो कर सकता है।",
"compose_form.lock_disclaimer.lock": "लॉक्ड",
"compose_form.placeholder": "What is on your mind?",
@ -221,7 +221,7 @@
"empty_column.favourites": "अभी तक किसी ने भी इस टूट को पसंद (स्टार) नहीं किया है. जब भी कोई इसे पसंद करेगा, उनका नाम यहाँ दिखेगा।",
"empty_column.follow_recommendations": "ऐसा लगता है कि आपके लिए कोई सुझाव जेनरेट नहीं किया जा सका. आप उन लोगों को खोजने के लिए सर्च का उपयोग करने का प्रयास कर सकते हैं जिन्हें आप जानते हैं या ट्रेंडिंग हैशटैग का पता लगा सकते हैं।",
"empty_column.follow_requests": "अभी तक किसी ने भी आपका अनुसरण करने की विनती नहीं की है. जब भी कोई आपको विनती भेजेगा, वो यहाँ दिखेगी.",
"empty_column.followed_tags": "You have not followed any hashtags yet. When you do, they will show up here.",
"empty_column.followed_tags": "आपने किसी हैशटैग को फॉलो नहीं किया है। जैसे ही आप फॉलो करेंगे, आपके फॉलो किए गए हैशटैग यहां दिखेंगे।",
"empty_column.hashtag": "यह हैशटैग अभी तक खाली है।",
"empty_column.home": "आपकी मुख्य कालक्रम अभी खली है. अन्य उपयोगकर्ताओं से मिलने के लिए और अपनी गतिविधियां शुरू करने के लिए या तो {public} पर जाएं या खोज का उपयोग करें।",
"empty_column.home.suggestions": "कुछ सुझाव देखिए",
@ -240,8 +240,8 @@
"explore.suggested_follows": "आपके लिए",
"explore.title": "एक्स्प्लोर",
"explore.trending_links": "समाचार",
"explore.trending_statuses": "Posts",
"explore.trending_tags": "Hashtags",
"explore.trending_statuses": "पोस्ट्स",
"explore.trending_tags": "हैशटैग्स",
"filter_modal.added.context_mismatch_explanation": "यह फ़िल्टर श्रेणी उस संदर्भ पर लागू नहीं होती जिसमें आपने इस पोस्ट को एक्सेस किया है। यदि आप चाहते हैं कि इस संदर्भ में भी पोस्ट को फ़िल्टर किया जाए, तो आपको फ़िल्टर को एडिट करना होगा।",
"filter_modal.added.context_mismatch_title": "कंटेंट मिसमैच!",
"filter_modal.added.expired_explanation": "यह फ़िल्टर श्रेणी समाप्त हो गई है, इसे लागू करने के लिए आपको समाप्ति तिथि बदलनी होगी।",
@ -264,7 +264,7 @@
"follow_request.authorize": "अधिकार दें",
"follow_request.reject": "अस्वीकार करें",
"follow_requests.unlocked_explanation": "हालाँकि आपका खाता लॉक नहीं है, फिर भी {domain} डोमेन स्टाफ ने सोचा कि आप इन खातों के मैन्युअल अनुरोधों की समीक्षा करना चाहते हैं।",
"followed_tags": "Followed hashtags",
"followed_tags": "फॉलो किए गए हैशटैग्स",
"footer.about": "अबाउट",
"footer.directory": "प्रोफाइल्स डायरेक्टरी",
"footer.get_app": "अप्प प्राप्त करें",
@ -272,7 +272,7 @@
"footer.keyboard_shortcuts": "कीबोर्ड शॉर्टकट",
"footer.privacy_policy": "प्राइवेसी पालिसी",
"footer.source_code": "सोर्स कोड देखें",
"footer.status": "Status",
"footer.status": "स्टेटस",
"generic.saved": "सेव्ड",
"getting_started.heading": "पहले कदम रखें",
"hashtag.column_header.tag_mode.all": "और {additional}",

View File

@ -312,7 +312,7 @@
"keyboard_shortcuts.column": "Setja virkni í dálk",
"keyboard_shortcuts.compose": "Setja virkni á textainnsetningarreit",
"keyboard_shortcuts.description": "Lýsing",
"keyboard_shortcuts.direct": "að opna dálk með beinum skilaboðum",
"keyboard_shortcuts.direct": "Opna dálk með beinum skilaboðum",
"keyboard_shortcuts.down": "Fara neðar í listanum",
"keyboard_shortcuts.enter": "Opna færslu",
"keyboard_shortcuts.favourite": "Eftirlætisfærsla",

View File

@ -474,7 +474,7 @@
"relative_time.full.seconds": "{number, plural, one {# secondo} other {# secondi}} fa",
"relative_time.hours": "{number}h",
"relative_time.just_now": "ora",
"relative_time.minutes": "{number} minuti",
"relative_time.minutes": "{number}m",
"relative_time.seconds": "{number}s",
"relative_time.today": "oggi",
"reply_indicator.cancel": "Annulla",

View File

@ -10,7 +10,7 @@
"about.domain_blocks.suspended.title": "Suspended",
"about.not_available": "This information has not been made available on this server.",
"about.powered_by": "Decentralized social media powered by {mastodon}",
"about.rules": "Server rules",
"about.rules": "Ilugan n uqeddac",
"account.account_note_header": "Tazmilt",
"account.add_or_remove_from_list": "Rnu neɣ kkes seg tebdarin",
"account.badges.bot": "Aṛubut",
@ -83,7 +83,7 @@
"boost_modal.combo": "Tzemreḍ ad tetekkiḍ ɣef {combo} akken ad tessurfeḍ aya tikelt-nniḍen",
"bundle_column_error.copy_stacktrace": "Nɣel tuccḍa n uneqqis",
"bundle_column_error.error.body": "The requested page could not be rendered. It could be due to a bug in our code, or a browser compatibility issue.",
"bundle_column_error.error.title": "Oh, no!",
"bundle_column_error.error.title": "Uh, ala !",
"bundle_column_error.network.body": "There was an error when trying to load this page. This could be due to a temporary problem with your internet connection or this server.",
"bundle_column_error.network.title": "Tuccḍa deg uẓeṭṭa",
"bundle_column_error.retry": "Ɛreḍ tikelt-nniḍen",

View File

@ -145,7 +145,7 @@
"compose_form.sensitive.hide": "미디어를 민감함으로 설정하기",
"compose_form.sensitive.marked": "미디어가 열람주의로 설정되어 있습니다",
"compose_form.sensitive.unmarked": "미디어가 열람주의로 설정 되어 있지 않습니다",
"compose_form.spoiler.marked": "콘텐츠 경고 제거",
"compose_form.spoiler.marked": "열람주의 제거",
"compose_form.spoiler.unmarked": "열람 주의 문구 추가",
"compose_form.spoiler_placeholder": "경고 문구를 여기에 작성하세요",
"confirmation_modal.cancel": "취소",
@ -224,7 +224,7 @@
"empty_column.followed_tags": "아직 아무 해시태그도 팔로우하고 있지 않습니다. 해시태그를 팔로우하면, 여기에 표시됩니다.",
"empty_column.hashtag": "이 해시태그는 아직 사용되지 않았습니다.",
"empty_column.home": "당신의 홈 타임라인은 비어있습니다! 더 많은 사람들을 팔로우 하여 채워보세요. {suggestions}",
"empty_column.home.suggestions": "몇몇 제안 보기",
"empty_column.home.suggestions": "몇몇 제안 보기",
"empty_column.list": "리스트에 아직 아무것도 없습니다. 리스트의 누군가가 게시물을 올리면 여기에 나타납니다.",
"empty_column.lists": "아직 리스트가 없습니다. 리스트를 만들면 여기에 나타납니다.",
"empty_column.mutes": "아직 아무도 뮤트하지 않았습니다.",
@ -259,7 +259,7 @@
"filter_modal.select_filter.title": "이 게시물을 필터",
"filter_modal.title.status": "게시물 필터",
"follow_recommendations.done": "완료",
"follow_recommendations.heading": "게시물을 받아 볼 사람을 팔로우 하세요! 여기 몇몇 추천이 있습니다.",
"follow_recommendations.heading": "게시물을 받아 볼 사람을 팔로우하세요! 여기 몇몇 추천이 있습니다.",
"follow_recommendations.lead": "당신이 팔로우 하는 사람들의 게시물이 시간순으로 정렬되어 당신의 홈 피드에 표시될 것입니다. 실수를 두려워 하지 마세요, 언제든지 쉽게 팔로우 취소를 할 수 있습니다!",
"follow_request.authorize": "허가",
"follow_request.reject": "거부",
@ -400,7 +400,7 @@
"notification.follow": "{name} 님이 나를 팔로우했습니다",
"notification.follow_request": "{name} 님이 팔로우 요청을 보냈습니다",
"notification.mention": "{name}님의 멘션",
"notification.own_poll": "내 투표가 끝났습니다",
"notification.own_poll": "투표를 마쳤습니다.",
"notification.poll": "참여했던 투표가 끝났습니다.",
"notification.reblog": "{name} 님이 부스트했습니다",
"notification.status": "{name} 님이 방금 게시물을 올렸습니다",
@ -589,13 +589,13 @@
"status.sensitive_warning": "민감한 내용",
"status.share": "공유",
"status.show_filter_reason": "그냥 표시하기",
"status.show_less": "적게 보기",
"status.show_less": "기",
"status.show_less_all": "모두 접기",
"status.show_more": "더 보기",
"status.show_more": "펼치기",
"status.show_more_all": "모두 펼치기",
"status.show_original": "원본 보기",
"status.translate": "번역",
"status.translated_from_with": "{lang}에서 {provider}를 사용해 번역됨",
"status.translated_from_with": "{provider}에 의해 {lang}에서 번역됨",
"status.uncached_media_warning": "사용할 수 없음",
"status.unmute_conversation": "이 대화의 뮤트 해제하기",
"status.unpin": "고정 해제",

View File

@ -1,7 +1,7 @@
{
"about.blocks": "Moderatorių prižiūrimi serveriai",
"about.contact": "Kontaktai:",
"about.disclaimer": "Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.",
"about.disclaimer": "Mastodon, tai nemokama, atviro kodo programa, kuriuos prekybinis ženklas priklauso Mastodon GmbH.",
"about.domain_blocks.no_reason_available": "Priežastis nežinoma",
"about.domain_blocks.preamble": "Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.",
"about.domain_blocks.silenced.explanation": "You will generally not see profiles and content from this server, unless you explicitly look it up or opt into it by following.",

View File

@ -128,7 +128,7 @@
"compose.language.search": "Cari bahasa...",
"compose_form.direct_message_warning_learn_more": "Ketahui lebih lanjut",
"compose_form.encryption_warning": "Hantaran pada Mastodon tidak disulitkan hujung ke hujung. Jangan berkongsi sebarang maklumat sensitif melalui Mastodon.",
"compose_form.hashtag_warning": "This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag.",
"compose_form.hashtag_warning": "Hantaran ini tidak akan disenaraikan di bawah mana-mana tanda pagar kerana ia tidak tersenarai. Hanya hantaran awam sahaja boleh dicari menggunakan tanda pagar.",
"compose_form.lock_disclaimer": "Akaun anda tidak {locked}. Sesiapa pun boleh mengikuti anda untuk melihat hantaran pengikut-sahaja anda.",
"compose_form.lock_disclaimer.lock": "dikunci",
"compose_form.placeholder": "Apakah yang sedang anda fikirkan?",
@ -237,11 +237,11 @@
"errors.unexpected_crash.copy_stacktrace": "Salin surih tindanan ke papan keratan",
"errors.unexpected_crash.report_issue": "Laporkan masalah",
"explore.search_results": "Hasil carian",
"explore.suggested_follows": "For you",
"explore.suggested_follows": "Untuk anda",
"explore.title": "Terokai",
"explore.trending_links": "News",
"explore.trending_statuses": "Posts",
"explore.trending_tags": "Hashtags",
"explore.trending_links": "Baru",
"explore.trending_statuses": "Hantar",
"explore.trending_tags": "-Hashtags",
"filter_modal.added.context_mismatch_explanation": "Kumpulan penapis ini tidak terpakai pada konteks di mana anda mengakses hantaran ini. Jika anda ingin hantaran ini untuk ditapis dalam konteks ini juga, anda perlu menyunting penapis tersebut.",
"filter_modal.added.context_mismatch_title": "Konteks tidak sepadan!",
"filter_modal.added.expired_explanation": "Kumpulan filter ini telah tamat tempoh, anda perlu mengubah tarikh luput untuk melaksanakannya.",
@ -264,7 +264,7 @@
"follow_request.authorize": "Benarkan",
"follow_request.reject": "Tolak",
"follow_requests.unlocked_explanation": "Walaupun akaun anda tidak dikunci, kakitangan {domain} merasakan anda mungkin ingin menyemak permintaan ikutan daripada akaun ini secara manual.",
"followed_tags": "Followed hashtags",
"followed_tags": "Topik terpilih",
"footer.about": "Perihal",
"footer.directory": "Direktori profil",
"footer.get_app": "Dapatkan app",
@ -272,7 +272,7 @@
"footer.keyboard_shortcuts": "Pintasan papan kekunci",
"footer.privacy_policy": "Dasar privasi",
"footer.source_code": "Lihat kod sumber",
"footer.status": "Status",
"footer.status": "Status:",