From b0db4dad79dac4d9d339e09c62d5aaae9e56c861 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 9 Dec 2017 08:47:52 +0900 Subject: Revert fog-aws (ref #5604) (#5934) --- Gemfile | 2 +- Gemfile.lock | 19 ++++++++-------- config/initializers/paperclip.rb | 47 ++++++++++++++++++++++------------------ 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index e43b1a256..f6acb431a 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ gem 'pg', '~> 0.20' gem 'pghero', '~> 1.7' gem 'dotenv-rails', '~> 2.2' -gem 'fog-aws', '~> 1.4', require: false +gem 'aws-sdk', '~> 2.10', require: false gem 'fog-core', '~> 1.45' gem 'fog-local', '~> 0.4', require: false gem 'fog-openstack', '~> 0.1', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 5f050d031..febfb8561 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,6 +57,14 @@ GEM encryptor (~> 3.0.0) av (0.9.0) cocaine (~> 0.5.3) + aws-sdk (2.10.100) + aws-sdk-resources (= 2.10.100) + aws-sdk-core (2.10.100) + aws-sigv4 (~> 1.0) + jmespath (~> 1.0) + aws-sdk-resources (2.10.100) + aws-sdk-core (= 2.10.100) + aws-sigv4 (1.0.2) bcrypt (3.1.11) better_errors (2.4.0) coderay (>= 1.0.0) @@ -152,11 +160,6 @@ GEM i18n (~> 0.5) fast_blank (1.0.0) ffi (1.9.18) - fog-aws (1.4.1) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) fog-core (1.45.0) builder excon (~> 0.58) @@ -170,9 +173,6 @@ GEM fog-core (>= 1.40) fog-json (>= 1.0) ipaddress (>= 0.8) - fog-xml (0.1.3) - fog-core - nokogiri (>= 1.5.11, < 2.0.0) formatador (0.2.5) fuubar (2.2.0) rspec-core (~> 3.0) @@ -228,6 +228,7 @@ GEM idn-ruby (0.1.0) ipaddress (0.8.3) iso-639 (0.2.8) + jmespath (1.3.1) json (2.1.0) json-ld (2.1.7) multi_json (~> 1.12) @@ -544,6 +545,7 @@ DEPENDENCIES active_record_query_trace (~> 1.5) addressable (~> 2.5) annotate (~> 2.7) + aws-sdk (~> 2.10) better_errors (~> 2.4) binding_of_caller (~> 0.7) bootsnap @@ -566,7 +568,6 @@ DEPENDENCIES fabrication (~> 2.18) faker (~> 1.7) fast_blank (~> 1.0) - fog-aws (~> 1.4) fog-core (~> 1.45) fog-local (~> 0.4) fog-openstack (~> 0.1) diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 14bd034e6..bd26c533d 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -14,40 +14,45 @@ Paperclip::Attachment.default_options.merge!( ) if ENV['S3_ENABLED'] == 'true' - require 'fog/aws' + require 'aws-sdk' + Aws.eager_autoload!(services: %w(S3)) - s3_protocol = ENV.fetch('S3_PROTOCOL') { 'https' } - s3_hostname = ENV.fetch('S3_HOSTNAME') { "s3-#{ENV['S3_REGION']}.amazonaws.com" } - aws_signature_version = ENV['S3_SIGNATURE_VERSION'] == 's3' ? 2 : ENV['S3_SIGNATURE_VERSION'].to_i - aws_signature_version = 4 if aws_signature_version.zero? + s3_region = ENV.fetch('S3_REGION') { 'us-east-1' } + s3_protocol = ENV.fetch('S3_PROTOCOL') { 'https' } + s3_hostname = ENV.fetch('S3_HOSTNAME') { "s3-#{s3_region}}.amazonaws.com" } Paperclip::Attachment.default_options.merge!( - fog_credentials: { - provider: 'AWS', - aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'], - aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], - aws_signature_version: aws_signature_version, - region: ENV.fetch('S3_REGION') { 'us-east-1' }, - scheme: s3_protocol, - host: s3_hostname + storage: :s3, + s3_protocol: s3_protocol, + s3_host_name: s3_hostname, + s3_headers: { + 'Cache-Control' => 'max-age=315576000', + }, + s3_permissions: ENV.fetch('S3_PERMISSION') { 'public-read' }, + s3_region: s3_region, + s3_credentials: { + bucket: ENV['S3_BUCKET'], + access_key_id: ENV['AWS_ACCESS_KEY_ID'], + secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], }, - fog_directory: ENV['S3_BUCKET'], - fog_options: { - acl: ENV.fetch('S3_PERMISSION') { 'public-read' }, - cache_control: 'max-age=315576000', + s3_options: { + signature_version: ENV.fetch('S3_SIGNATURE_VERSION') { 'v4' }, } ) if ENV.has_key?('S3_ENDPOINT') - Paperclip::Attachment.default_options[:fog_credentials].merge!( + Paperclip::Attachment.default_options[:s3_options].merge!( endpoint: ENV['S3_ENDPOINT'], - path_style: true + force_path_style: true ) - Paperclip::Attachment.default_options[:fog_host] = "#{s3_protocol}://#{s3_hostname}/#{ENV['S3_BUCKET']}" + Paperclip::Attachment.default_options[:url] = ':s3_path_url' end if ENV.has_key?('S3_CLOUDFRONT_HOST') - Paperclip::Attachment.default_options[:fog_host] = "#{s3_protocol}://#{ENV['S3_CLOUDFRONT_HOST']}" + Paperclip::Attachment.default_options.merge!( + url: ':s3_alias_url', + s3_host_alias: ENV['S3_CLOUDFRONT_HOST'] + ) end elsif ENV['SWIFT_ENABLED'] == 'true' require 'fog/openstack' -- cgit From 70ce2a20956347b42f0b55cfcde42b6e83aee400 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 00:55:58 +0100 Subject: Polish video player CSS, add timer on fullscreen/modal/public pages (#5928) --- .../mastodon/features/ui/components/video_modal.js | 1 + app/javascript/mastodon/features/video/index.js | 65 ++++++++++++++------ app/javascript/styles/mastodon/components.scss | 69 +++++++++++++++++----- .../stream_entries/_detailed_status.html.haml | 2 +- 4 files changed, 105 insertions(+), 32 deletions(-) diff --git a/app/javascript/mastodon/features/ui/components/video_modal.js b/app/javascript/mastodon/features/ui/components/video_modal.js index 1437deeb0..6a883759f 100644 --- a/app/javascript/mastodon/features/ui/components/video_modal.js +++ b/app/javascript/mastodon/features/ui/components/video_modal.js @@ -23,6 +23,7 @@ export default class VideoModal extends ImmutablePureComponent { src={media.get('url')} startTime={time} onCloseVideo={onClose} + detailed description={media.get('description')} /> diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index 003bf23a8..0ee8bb6c8 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -17,6 +17,18 @@ const messages = defineMessages({ exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' }, }); +const formatTime = secondsNum => { + let hours = Math.floor(secondsNum / 3600); + let minutes = Math.floor((secondsNum - (hours * 3600)) / 60); + let seconds = secondsNum - (hours * 3600) - (minutes * 60); + + if (hours < 10) hours = '0' + hours; + if (minutes < 10) minutes = '0' + minutes; + if (seconds < 10) seconds = '0' + seconds; + + return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`; +}; + const findElementPosition = el => { let box; @@ -83,11 +95,13 @@ export default class Video extends React.PureComponent { startTime: PropTypes.number, onOpenVideo: PropTypes.func, onCloseVideo: PropTypes.func, + detailed: PropTypes.bool, intl: PropTypes.object.isRequired, }; state = { - progress: 0, + currentTime: 0, + duration: 0, paused: true, dragging: false, fullscreen: false, @@ -117,7 +131,10 @@ export default class Video extends React.PureComponent { } handleTimeUpdate = () => { - this.setState({ progress: 100 * (this.video.currentTime / this.video.duration) }); + this.setState({ + currentTime: Math.floor(this.video.currentTime), + duration: Math.floor(this.video.duration), + }); } handleMouseDown = e => { @@ -143,8 +160,10 @@ export default class Video extends React.PureComponent { handleMouseMove = throttle(e => { const { x } = getPointerPosition(this.seek, e); - this.video.currentTime = this.video.duration * x; - this.setState({ progress: x * 100 }); + const currentTime = Math.floor(this.video.duration * x); + + this.video.currentTime = currentTime; + this.setState({ currentTime }); }, 60); togglePlay = () => { @@ -226,11 +245,12 @@ export default class Video extends React.PureComponent { } render () { - const { preview, src, width, height, startTime, onOpenVideo, onCloseVideo, intl, alt } = this.props; - const { progress, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state; + const { preview, src, width, height, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed } = this.props; + const { currentTime, duration, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state; + const progress = (currentTime / duration) * 100; return ( -
+
-
- - - {!onCloseVideo && } -
- -
- {(!fullscreen && onOpenVideo) && } - {onCloseVideo && } - +
+
+ + + + {!onCloseVideo && } + + {(detailed || fullscreen) && + + {formatTime(currentTime)} + / + {formatTime(duration)} + + } +
+ +
+ {(!fullscreen && onOpenVideo) && } + {onCloseVideo && } + +
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 64a77adc7..dd61dc519 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -3998,6 +3998,7 @@ button.icon-button.active i.fa-retweet { position: relative; background: $base-shadow-color; max-width: 100%; + border-radius: 4px; video { height: 100%; @@ -4032,8 +4033,8 @@ button.icon-button.active i.fa-retweet { left: 0; right: 0; box-sizing: border-box; - background: linear-gradient(0deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 60%, transparent); - padding: 0 10px; + background: linear-gradient(0deg, rgba($base-shadow-color, 0.85) 0, rgba($base-shadow-color, 0.45) 60%, transparent); + padding: 0 15px; opacity: 0; transition: opacity .1s ease; @@ -4086,40 +4087,67 @@ button.icon-button.active i.fa-retweet { } } - &__buttons { + &__buttons-bar { + display: flex; + justify-content: space-between; padding-bottom: 10px; + } + + &__buttons { font-size: 16px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; &.left { - float: left; - button { - padding-right: 10px; + padding-left: 0; } } &.right { - float: right; - button { - padding-left: 10px; + padding-right: 0; } } button { background: transparent; - padding: 0; + padding: 2px 10px; + font-size: 16px; border: 0; - color: $white; + color: rgba($white, 0.75); &:active, &:hover, &:focus { - color: $ui-highlight-color; + color: $white; } } } + &__time-sep, + &__time-total, + &__time-current { + font-size: 14px; + font-weight: 500; + } + + &__time-current { + color: $white; + margin-left: 10px; + } + + &__time-sep { + display: inline-block; + margin: 0 6px; + } + + &__time-sep, + &__time-total { + color: $white; + } + &__seek { cursor: pointer; height: 24px; @@ -4129,6 +4157,7 @@ button.icon-button.active i.fa-retweet { content: ""; width: 100%; background: rgba($white, 0.35); + border-radius: 4px; display: block; position: absolute; height: 4px; @@ -4140,8 +4169,9 @@ button.icon-button.active i.fa-retweet { display: block; position: absolute; height: 4px; + border-radius: 4px; top: 10px; - background: $ui-highlight-color; + background: lighten($ui-highlight-color, 8%); } &__buffer { @@ -4158,7 +4188,8 @@ button.icon-button.active i.fa-retweet { top: 6px; margin-left: -6px; transition: opacity .1s ease; - background: $ui-highlight-color; + background: lighten($ui-highlight-color, 8%); + box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2); pointer-events: none; &.active { @@ -4172,6 +4203,16 @@ button.icon-button.active i.fa-retweet { } } } + + &.detailed, + &.fullscreen { + .video-player__buttons { + button { + padding-top: 10px; + padding-bottom: 10px; + } + } + } } .media-spoiler-video { diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index 3119ebf4b..94e081c84 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -22,7 +22,7 @@ - if !status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first - %div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 670, height: 380) }} + %div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 670, height: 380, detailed: true) }} - else %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, sensitive: status.sensitive?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }} - elsif status.preview_cards.first -- cgit From c36b9cc5a6cf3feacb925213f5530c90dd31fa7a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 00:56:16 +0100 Subject: Ensure link thumbnails are not stretched to super low quality (#5932) --- app/javascript/mastodon/features/status/components/card.js | 10 +++++----- app/javascript/styles/mastodon/components.scss | 7 ++++++- app/models/preview_card.rb | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js index d3e322c36..f7d980066 100644 --- a/app/javascript/mastodon/features/status/components/card.js +++ b/app/javascript/mastodon/features/status/components/card.js @@ -59,6 +59,8 @@ export default class Card extends React.PureComponent { renderLink () { const { card, maxDescription } = this.props; + const { width } = this.state; + const horizontal = card.get('width') > card.get('height') && (card.get('width') + 100 >= width); let image = ''; let provider = card.get('provider_name'); @@ -75,17 +77,15 @@ export default class Card extends React.PureComponent { provider = decodeIDNA(getHostname(card.get('url'))); } - const className = classnames('status-card', { - 'horizontal': card.get('width') > card.get('height'), - }); + const className = classnames('status-card', { horizontal }); return ( - + {image}
{card.get('title')} -

{(card.get('description') || '').substring(0, maxDescription)}

+ {!horizontal &&

{(card.get('description') || '').substring(0, maxDescription)}

} {provider}
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index dd61dc519..f76470da7 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2273,14 +2273,19 @@ button.icon-button.active i.fa-retweet { .status-card__image-image { border-radius: 4px 4px 0 0; } + + .status-card__title { + white-space: inherit; + } } .status-card__image-image { border-radius: 4px 0 0 4px; display: block; - height: auto; margin: 0; width: 100%; + height: 100%; + object-fit: cover; } .load-more { diff --git a/app/models/preview_card.rb b/app/models/preview_card.rb index 5baddba8a..716b82243 100644 --- a/app/models/preview_card.rb +++ b/app/models/preview_card.rb @@ -33,7 +33,7 @@ class PreviewCard < ApplicationRecord has_and_belongs_to_many :statuses - has_attached_file :image, styles: { original: '280x280>' }, convert_options: { all: '-quality 80 -strip' } + has_attached_file :image, styles: { original: '400x400>' }, convert_options: { all: '-quality 80 -strip' } include Attachmentable include Remotable -- cgit From 86b4d5439caf717fc549a6036ca50a661badbd55 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 01:24:47 +0100 Subject: Fix #5926 - Do not downgrade to OStatus once ActivityPub is known (#5929) --- app/services/resolve_remote_account_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/resolve_remote_account_service.rb b/app/services/resolve_remote_account_service.rb index 3293fe40f..d7d0be210 100644 --- a/app/services/resolve_remote_account_service.rb +++ b/app/services/resolve_remote_account_service.rb @@ -44,7 +44,7 @@ class ResolveRemoteAccountService < BaseService if lock.acquired? @account = Account.find_remote(@username, @domain) - if activitypub_ready? + if activitypub_ready? || @account&.activitypub? handle_activitypub else handle_ostatus -- cgit From f08e6e9ab54a72cc20b33b270789c245b5cfde39 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 9 Dec 2017 09:25:00 +0900 Subject: Audio.prototype.seek is undefined (#5935) --- app/javascript/mastodon/middleware/sounds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/middleware/sounds.js b/app/javascript/mastodon/middleware/sounds.js index 3d1e3eaba..9f1bc02b9 100644 --- a/app/javascript/mastodon/middleware/sounds.js +++ b/app/javascript/mastodon/middleware/sounds.js @@ -15,7 +15,7 @@ const play = audio => { if (typeof audio.fastSeek === 'function') { audio.fastSeek(0); } else { - audio.seek(0); + audio.currentTime = 0; } } -- cgit From 2f4c5f504fa5edc2a826afa9645371f529ae904d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 01:32:29 +0100 Subject: Limit users to 50 lists, remove pagination from lists API (#5933) --- app/controllers/api/v1/lists_controller.rb | 38 +----------------------------- app/models/list.rb | 6 +++++ app/validators/status_pin_validator.rb | 8 +++---- config/locales/en.yml | 5 +++- 4 files changed, 15 insertions(+), 42 deletions(-) diff --git a/app/controllers/api/v1/lists_controller.rb b/app/controllers/api/v1/lists_controller.rb index 9437373bd..180a91d81 100644 --- a/app/controllers/api/v1/lists_controller.rb +++ b/app/controllers/api/v1/lists_controller.rb @@ -1,18 +1,14 @@ # frozen_string_literal: true class Api::V1::ListsController < Api::BaseController - LISTS_LIMIT = 50 - before_action -> { doorkeeper_authorize! :read }, only: [:index, :show] before_action -> { doorkeeper_authorize! :write }, except: [:index, :show] before_action :require_user! before_action :set_list, except: [:index, :create] - after_action :insert_pagination_headers, only: :index - def index - @lists = List.where(account: current_account).paginate_by_max_id(limit_param(LISTS_LIMIT), params[:max_id], params[:since_id]) + @lists = List.where(account: current_account).all render json: @lists, each_serializer: REST::ListSerializer end @@ -44,36 +40,4 @@ class Api::V1::ListsController < Api::BaseController def list_params params.permit(:title) end - - def insert_pagination_headers - set_pagination_headers(next_path, prev_path) - end - - def next_path - if records_continue? - api_v1_lists_url pagination_params(max_id: pagination_max_id) - end - end - - def prev_path - unless @lists.empty? - api_v1_lists_url pagination_params(since_id: pagination_since_id) - end - end - - def pagination_max_id - @lists.last.id - end - - def pagination_since_id - @lists.first.id - end - - def records_continue? - @lists.size == limit_param(LISTS_LIMIT) - end - - def pagination_params(core_params) - params.permit(:limit).merge(core_params) - end end diff --git a/app/models/list.rb b/app/models/list.rb index 910864b26..f45e4973d 100644 --- a/app/models/list.rb +++ b/app/models/list.rb @@ -13,6 +13,8 @@ class List < ApplicationRecord include Paginable + PER_ACCOUNT_LIMIT = 50 + belongs_to :account has_many :list_accounts, inverse_of: :list, dependent: :destroy @@ -20,6 +22,10 @@ class List < ApplicationRecord validates :title, presence: true + validates_each :account_id, on: :create do |record, _attr, value| + record.errors.add(:base, I18n.t('lists.errors.limit')) if List.where(account_id: value).count >= PER_ACCOUNT_LIMIT + end + before_destroy :clean_feed_manager private diff --git a/app/validators/status_pin_validator.rb b/app/validators/status_pin_validator.rb index 9760e1138..64da04120 100644 --- a/app/validators/status_pin_validator.rb +++ b/app/validators/status_pin_validator.rb @@ -2,9 +2,9 @@ class StatusPinValidator < ActiveModel::Validator def validate(pin) - pin.errors.add(:status, I18n.t('statuses.pin_errors.reblog')) if pin.status.reblog? - pin.errors.add(:status, I18n.t('statuses.pin_errors.ownership')) if pin.account_id != pin.status.account_id - pin.errors.add(:status, I18n.t('statuses.pin_errors.private')) unless %w(public unlisted).include?(pin.status.visibility) - pin.errors.add(:status, I18n.t('statuses.pin_errors.limit')) if pin.account.status_pins.count > 4 + pin.errors.add(:base, I18n.t('statuses.pin_errors.reblog')) if pin.status.reblog? + pin.errors.add(:base, I18n.t('statuses.pin_errors.ownership')) if pin.account_id != pin.status.account_id + pin.errors.add(:base, I18n.t('statuses.pin_errors.private')) unless %w(public unlisted).include?(pin.status.visibility) + pin.errors.add(:base, I18n.t('statuses.pin_errors.limit')) if pin.account.status_pins.count > 4 end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 5b9d43b9f..14a88d6c8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -458,6 +458,9 @@ en: title: Invite people landing_strip_html: "%{name} is a user on %{link_to_root_path}. You can follow them or interact with them if you have an account anywhere in the fediverse." landing_strip_signup_html: If you don't, you can sign up here. + lists: + errors: + limit: You have reached the maximum amount of lists media_attachments: validations: images_and_video: Cannot attach a video to a status that already contains images @@ -591,7 +594,7 @@ en: open_in_web: Open in web over_character_limit: character limit of %{max} exceeded pin_errors: - limit: Too many toots pinned + limit: You have already pinned the maximum number of toots ownership: Someone else's toot cannot be pinned private: Non-public toot cannot be pinned reblog: A boost cannot be pinned -- cgit From ec3b449baa122cb881556422f1b3d586ad5a9a6c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 02:22:13 +0100 Subject: Fix #5630 - Prevent duplicate load of favourites (#5931) --- app/javascript/mastodon/actions/favourites.js | 6 +++++- .../mastodon/features/favourited_statuses/index.js | 10 +++++++--- app/javascript/mastodon/reducers/status_lists.js | 12 ++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/actions/favourites.js b/app/javascript/mastodon/actions/favourites.js index 09ce51fce..93094c526 100644 --- a/app/javascript/mastodon/actions/favourites.js +++ b/app/javascript/mastodon/actions/favourites.js @@ -10,6 +10,10 @@ export const FAVOURITED_STATUSES_EXPAND_FAIL = 'FAVOURITED_STATUSES_EXPAND_FA export function fetchFavouritedStatuses() { return (dispatch, getState) => { + if (getState().getIn(['status_lists', 'favourites', 'isLoading'])) { + return; + } + dispatch(fetchFavouritedStatusesRequest()); api(getState).get('/api/v1/favourites').then(response => { @@ -46,7 +50,7 @@ export function expandFavouritedStatuses() { return (dispatch, getState) => { const url = getState().getIn(['status_lists', 'favourites', 'next'], null); - if (url === null) { + if (url === null || getState().getIn(['status_lists', 'favourites', 'isLoading'])) { return; } diff --git a/app/javascript/mastodon/features/favourited_statuses/index.js b/app/javascript/mastodon/features/favourited_statuses/index.js index 1e1f5873c..67b107bc8 100644 --- a/app/javascript/mastodon/features/favourited_statuses/index.js +++ b/app/javascript/mastodon/features/favourited_statuses/index.js @@ -9,6 +9,7 @@ import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; import StatusList from '../../components/status_list'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { debounce } from 'lodash'; const messages = defineMessages({ heading: { id: 'column.favourites', defaultMessage: 'Favourites' }, @@ -16,6 +17,7 @@ const messages = defineMessages({ const mapStateToProps = state => ({ statusIds: state.getIn(['status_lists', 'favourites', 'items']), + isLoading: state.getIn(['status_lists', 'favourites', 'isLoading'], true), hasMore: !!state.getIn(['status_lists', 'favourites', 'next']), }); @@ -30,6 +32,7 @@ export default class Favourites extends ImmutablePureComponent { columnId: PropTypes.string, multiColumn: PropTypes.bool, hasMore: PropTypes.bool, + isLoading: PropTypes.bool, }; componentWillMount () { @@ -59,12 +62,12 @@ export default class Favourites extends ImmutablePureComponent { this.column = c; } - handleScrollToBottom = () => { + handleScrollToBottom = debounce(() => { this.props.dispatch(expandFavouritedStatuses()); - } + }, 300, { leading: true }) render () { - const { intl, statusIds, columnId, multiColumn, hasMore } = this.props; + const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props; const pinned = !!columnId; return ( @@ -85,6 +88,7 @@ export default class Favourites extends ImmutablePureComponent { statusIds={statusIds} scrollKey={`favourited_statuses-${columnId}`} hasMore={hasMore} + isLoading={isLoading} onScrollToBottom={this.handleScrollToBottom} /> diff --git a/app/javascript/mastodon/reducers/status_lists.js b/app/javascript/mastodon/reducers/status_lists.js index c4aeb338f..6c5f33557 100644 --- a/app/javascript/mastodon/reducers/status_lists.js +++ b/app/javascript/mastodon/reducers/status_lists.js @@ -1,6 +1,10 @@ import { + FAVOURITED_STATUSES_FETCH_REQUEST, FAVOURITED_STATUSES_FETCH_SUCCESS, + FAVOURITED_STATUSES_FETCH_FAIL, + FAVOURITED_STATUSES_EXPAND_REQUEST, FAVOURITED_STATUSES_EXPAND_SUCCESS, + FAVOURITED_STATUSES_EXPAND_FAIL, } from '../actions/favourites'; import { PINNED_STATUSES_FETCH_SUCCESS, @@ -30,6 +34,7 @@ const normalizeList = (state, listType, statuses, next) => { return state.update(listType, listMap => listMap.withMutations(map => { map.set('next', next); map.set('loaded', true); + map.set('isLoading', false); map.set('items', ImmutableList(statuses.map(item => item.id))); })); }; @@ -37,6 +42,7 @@ const normalizeList = (state, listType, statuses, next) => { const appendToList = (state, listType, statuses, next) => { return state.update(listType, listMap => listMap.withMutations(map => { map.set('next', next); + map.set('isLoading', false); map.set('items', map.get('items').concat(statuses.map(item => item.id))); })); }; @@ -55,6 +61,12 @@ const removeOneFromList = (state, listType, status) => { export default function statusLists(state = initialState, action) { switch(action.type) { + case FAVOURITED_STATUSES_FETCH_REQUEST: + case FAVOURITED_STATUSES_EXPAND_REQUEST: + return state.setIn(['favourites', 'isLoading'], true); + case FAVOURITED_STATUSES_FETCH_FAIL: + case FAVOURITED_STATUSES_EXPAND_FAIL: + return state.setIn(['favourites', 'isLoading'], false); case FAVOURITED_STATUSES_FETCH_SUCCESS: return normalizeList(state, 'favourites', action.statuses, action.next); case FAVOURITED_STATUSES_EXPAND_SUCCESS: -- cgit From 99242b92bcc1965b2a72c01216bce7c232322f15 Mon Sep 17 00:00:00 2001 From: abcang Date: Sat, 9 Dec 2017 10:31:37 +0900 Subject: Keep WebPush settings (#5879) --- .../api/web/push_subscriptions_controller.rb | 2 + .../mastodon/actions/push_notifications.js | 11 +++-- app/javascript/mastodon/web_push_subscription.js | 51 ++++++++++++++++++++-- .../api/web/push_subscriptions_controller_spec.rb | 17 ++++++++ 4 files changed, 74 insertions(+), 7 deletions(-) diff --git a/app/controllers/api/web/push_subscriptions_controller.rb b/app/controllers/api/web/push_subscriptions_controller.rb index d66237feb..52e250d02 100644 --- a/app/controllers/api/web/push_subscriptions_controller.rb +++ b/app/controllers/api/web/push_subscriptions_controller.rb @@ -28,6 +28,8 @@ class Api::Web::PushSubscriptionsController < Api::BaseController }, } + data.deep_merge!(params[:data]) if params[:data] + web_subscription = ::Web::PushSubscription.create!( endpoint: params[:subscription][:endpoint], key_p256dh: params[:subscription][:keys][:p256dh], diff --git a/app/javascript/mastodon/actions/push_notifications.js b/app/javascript/mastodon/actions/push_notifications.js index 55661d2b0..cfe419888 100644 --- a/app/javascript/mastodon/actions/push_notifications.js +++ b/app/javascript/mastodon/actions/push_notifications.js @@ -1,4 +1,5 @@ import axios from 'axios'; +import { setSettingsToLocalStorage } from '../web_push_subscription'; export const SET_BROWSER_SUPPORT = 'PUSH_NOTIFICATIONS_SET_BROWSER_SUPPORT'; export const SET_SUBSCRIPTION = 'PUSH_NOTIFICATIONS_SET_SUBSCRIPTION'; @@ -42,11 +43,15 @@ export function saveSettings() { const state = getState().get('push_notifications'); const subscription = state.get('subscription'); const alerts = state.get('alerts'); + const data = { alerts }; axios.put(`/api/web/push_subscriptions/${subscription.get('id')}`, { - data: { - alerts, - }, + data, + }).then(() => { + const me = getState().getIn(['meta', 'me']); + if (me) { + setSettingsToLocalStorage(me, data); + } }); }; } diff --git a/app/javascript/mastodon/web_push_subscription.js b/app/javascript/mastodon/web_push_subscription.js index 3dbed09ea..114d9c3b3 100644 --- a/app/javascript/mastodon/web_push_subscription.js +++ b/app/javascript/mastodon/web_push_subscription.js @@ -35,16 +35,35 @@ const subscribe = (registration) => const unsubscribe = ({ registration, subscription }) => subscription ? subscription.unsubscribe().then(() => registration) : registration; -const sendSubscriptionToBackend = (subscription) => - axios.post('/api/web/push_subscriptions', { - subscription, - }).then(response => response.data); +const sendSubscriptionToBackend = (subscription) => { + const params = { subscription }; + + const me = store.getState().getIn(['meta', 'me']); + if (me) { + const data = getSettingsFromLocalStorage(me); + if (data) { + params.data = data; + } + } + + return axios.post('/api/web/push_subscriptions', params).then(response => response.data); +}; // Last one checks for payload support: https://web-push-book.gauntface.com/chapter-06/01-non-standards-browsers/#no-payload const supportsPushNotifications = ('serviceWorker' in navigator && 'PushManager' in window && 'getKey' in PushSubscription.prototype); +const SUBSCRIPTION_DATA_STORAGE_KEY = 'mastodon_push_notification_data'; + export function register () { store.dispatch(setBrowserSupport(supportsPushNotifications)); + const me = store.getState().getIn(['meta', 'me']); + + if (me && !getSettingsFromLocalStorage(me)) { + const alerts = store.getState().getIn(['push_notifications', 'alerts']); + if (alerts) { + setSettingsToLocalStorage(me, { alerts: alerts }); + } + } if (supportsPushNotifications) { if (!getApplicationServerKey()) { @@ -79,6 +98,9 @@ export function register () { // it means that the backend subscription is valid (and was set during hydration) if (!(subscription instanceof PushSubscription)) { store.dispatch(setSubscription(subscription)); + if (me) { + setSettingsToLocalStorage(me, { alerts: subscription.alerts }); + } } }) .catch(error => { @@ -90,6 +112,9 @@ export function register () { // Clear alerts and hide UI settings store.dispatch(clearSubscription()); + if (me) { + removeSettingsFromLocalStorage(me); + } try { getRegistration() @@ -103,3 +128,21 @@ export function register () { console.warn('Your browser does not support Web Push Notifications.'); } } + +export function setSettingsToLocalStorage(id, data) { + try { + localStorage.setItem(`${SUBSCRIPTION_DATA_STORAGE_KEY}_${id}`, JSON.stringify(data)); + } catch (e) {} +} + +export function getSettingsFromLocalStorage(id) { + try { + return JSON.parse(localStorage.getItem(`${SUBSCRIPTION_DATA_STORAGE_KEY}_${id}`)); + } catch (e) {} + + return null; +} + +export function removeSettingsFromLocalStorage(id) { + localStorage.removeItem(`${SUBSCRIPTION_DATA_STORAGE_KEY}_${id}`); +} diff --git a/spec/controllers/api/web/push_subscriptions_controller_spec.rb b/spec/controllers/api/web/push_subscriptions_controller_spec.rb index 7e83b801d..bbf94c5c6 100644 --- a/spec/controllers/api/web/push_subscriptions_controller_spec.rb +++ b/spec/controllers/api/web/push_subscriptions_controller_spec.rb @@ -48,6 +48,23 @@ describe Api::Web::PushSubscriptionsController do expect(push_subscription['key_p256dh']).to eq(create_payload[:subscription][:keys][:p256dh]) expect(push_subscription['key_auth']).to eq(create_payload[:subscription][:keys][:auth]) end + + context 'with initial data' do + it 'saves alert settings' do + sign_in(user) + + stub_request(:post, create_payload[:subscription][:endpoint]).to_return(status: 200) + + post :create, format: :json, params: create_payload.merge(alerts_payload) + + push_subscription = Web::PushSubscription.find_by(endpoint: create_payload[:subscription][:endpoint]) + + expect(push_subscription.data['follow']).to eq(alerts_payload[:data][:follow]) + expect(push_subscription.data['favourite']).to eq(alerts_payload[:data][:favourite]) + expect(push_subscription.data['reblog']).to eq(alerts_payload[:data][:reblog]) + expect(push_subscription.data['mention']).to eq(alerts_payload[:data][:mention]) + end + end end describe 'PUT #update' do -- cgit From 2526ef10c29ea4c136ce66b251c105addcf1bf5d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 02:42:59 +0100 Subject: Bump version to 2.1.0rc3 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index ac04913e6..f59ec97cd 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -17,7 +17,7 @@ module Mastodon end def pre - 'rc2' + 'rc3' end def flags -- cgit From 17e26f8afe962cf85f5ee25defb59905ec684eb2 Mon Sep 17 00:00:00 2001 From: THE BOSS ♨ <30565780+theboss@users.noreply.github.com> Date: Sat, 9 Dec 2017 13:59:59 +0900 Subject: Fix typo in paperclip.rb (#5936) --- config/initializers/paperclip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index bd26c533d..8aa1d1b6e 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -19,7 +19,7 @@ if ENV['S3_ENABLED'] == 'true' s3_region = ENV.fetch('S3_REGION') { 'us-east-1' } s3_protocol = ENV.fetch('S3_PROTOCOL') { 'https' } - s3_hostname = ENV.fetch('S3_HOSTNAME') { "s3-#{s3_region}}.amazonaws.com" } + s3_hostname = ENV.fetch('S3_HOSTNAME') { "s3-#{s3_region}.amazonaws.com" } Paperclip::Attachment.default_options.merge!( storage: :s3, -- cgit From 3a52c90de12b39440264cce2ce218f9c4d7c6ebe Mon Sep 17 00:00:00 2001 From: Quenty31 <33203663+Quenty31@users.noreply.github.com> Date: Sat, 9 Dec 2017 14:17:34 +0100 Subject: l10n i18n OC update (#5939) * update and corrections * update (invites) * Update oc.yml * Update oc.yml --- app/javascript/mastodon/locales/oc.json | 44 +++++++++++++++--------------- config/locales/oc.yml | 48 ++++++++++++++++++++++++++++++--- 2 files changed, 67 insertions(+), 25 deletions(-) diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index ec7202ff6..e3d88ab50 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -10,9 +10,9 @@ "account.hide_reblogs": "Rescondre los partages de @{name}", "account.media": "Mèdias", "account.mention": "Mencionar @{name}", - "account.moved_to": "{name} a mudat los catons a : ", + "account.moved_to": "{name} a mudat los catons a :", "account.mute": "Rescondre @{name}", - "account.mute_notifications": "Mute notifications from @{name}", + "account.mute_notifications": "Rescondre las notificacions de @{name}", "account.posts": "Estatuts", "account.report": "Senhalar @{name}", "account.requested": "Invitacion mandada. Clicatz per anullar.", @@ -22,10 +22,10 @@ "account.unblock_domain": "Desblocar {domain}", "account.unfollow": "Quitar de sègre", "account.unmute": "Quitar de rescondre @{name}", - "account.unmute_notifications": "Unmute notifications from @{name}", + "account.unmute_notifications": "Mostrar las notificacions de @{name}", "account.view_full_profile": "Veire lo perfil complet", "boost_modal.combo": "Podètz botar {combo} per passar aquò lo còp que ven", - "bundle_column_error.body": "Quicòm a fach meuca pendent lo cargament d’aqueste compausant.", + "bundle_column_error.body": "Quicòm a fach mèuca pendent lo cargament d’aqueste compausant.", "bundle_column_error.retry": "Tornar ensajar", "bundle_column_error.title": "Error de ret", "bundle_modal_error.close": "Tampar", @@ -36,7 +36,7 @@ "column.favourites": "Favorits", "column.follow_requests": "Demandas d’abonament", "column.home": "Acuèlh", - "column.lists": "Lists", + "column.lists": "Listas", "column.mutes": "Personas rescondudas", "column.notifications": "Notificacions", "column.pins": "Tuts penjats", @@ -63,8 +63,8 @@ "confirmations.block.message": "Sètz segur de voler blocar {name} ?", "confirmations.delete.confirm": "Escafar", "confirmations.delete.message": "Sètz segur de voler escafar l’estatut ?", - "confirmations.delete_list.confirm": "Delete", - "confirmations.delete_list.message": "Are you sure you want to permanently delete this list?", + "confirmations.delete_list.confirm": "Suprimir", + "confirmations.delete_list.message": "Sètz segur de voler suprimir aquesta lista per totjorn ?", "confirmations.domain_block.confirm": "Amagar tot lo domeni", "confirmations.domain_block.message": "Sètz segur segur de voler blocar completament {domain} ? De còps cal pas que blocar o rescondre unas personas solament.", "confirmations.mute.confirm": "Rescondre", @@ -72,7 +72,7 @@ "confirmations.unfollow.confirm": "Quitar de sègre", "confirmations.unfollow.message": "Volètz vertadièrament quitar de sègre {name} ?", "embed.instructions": "Embarcar aqueste estatut per lo far veire sus un site Internet en copiar lo còdi çai-jos.", - "embed.preview": "Semblarà aquò : ", + "embed.preview": "Semblarà aquò :", "emoji_button.activity": "Activitats", "emoji_button.custom": "Personalizats", "emoji_button.flags": "Drapèus", @@ -84,7 +84,7 @@ "emoji_button.people": "Gents", "emoji_button.recent": "Sovent utilizats", "emoji_button.search": "Cercar…", - "emoji_button.search_results": "Resultat de recèrca", + "emoji_button.search_results": "Resultats de recèrca", "emoji_button.symbols": "Simbòls", "emoji_button.travel": "Viatges & lòcs", "empty_column.community": "Lo flux public local es void. Escrivètz quicòm per lo garnir !", @@ -116,7 +116,7 @@ "keyboard_shortcuts.enter": "per dobrir los estatuts", "keyboard_shortcuts.favourite": "per apondre als favorits", "keyboard_shortcuts.heading": "Acorchis clavièr", - "keyboard_shortcuts.hotkey": "Clau", + "keyboard_shortcuts.hotkey": "Acorchis", "keyboard_shortcuts.legend": "per mostrar aquesta legenda", "keyboard_shortcuts.mention": "per mencionar l’autor", "keyboard_shortcuts.reply": "per respondre", @@ -127,26 +127,26 @@ "lightbox.close": "Tampar", "lightbox.next": "Seguent", "lightbox.previous": "Precedent", - "lists.account.add": "Add to list", - "lists.account.remove": "Remove from list", - "lists.delete": "Delete list", - "lists.edit": "Edit list", - "lists.new.create": "Add list", - "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", - "lists.subheading": "Your lists", + "lists.account.add": "Ajustar a la lista", + "lists.account.remove": "Levar de la lista", + "lists.delete": "Suprimir la lista", + "lists.edit": "Modificar la lista", + "lists.new.create": "Ajustar una lista", + "lists.new.title_placeholder": "Títol de la nòva lista", + "lists.search": "Cercar demest los seguidors", + "lists.subheading": "Vòstras listas", "loading_indicator.label": "Cargament…", "media_gallery.toggle_visible": "Modificar la visibilitat", "missing_indicator.label": "Pas trobat", - "mute_modal.hide_notifications": "Hide notifications from this user?", + "mute_modal.hide_notifications": "Rescondre las notificacions d’aquesta persona ?", "navigation_bar.blocks": "Personas blocadas", "navigation_bar.community_timeline": "Flux public local", "navigation_bar.edit_profile": "Modificar lo perfil", "navigation_bar.favourites": "Favorits", - "navigation_bar.follow_requests": "Demandas d'abonament", + "navigation_bar.follow_requests": "Demandas d’abonament", "navigation_bar.info": "Mai informacions", "navigation_bar.keyboard_shortcuts": "Acorchis clavièr", - "navigation_bar.lists": "Lists", + "navigation_bar.lists": "Listas", "navigation_bar.logout": "Desconnexion", "navigation_bar.mutes": "Personas rescondudas", "navigation_bar.pins": "Tuts penjats", @@ -209,7 +209,7 @@ "search_popout.search_format": "Format recèrca avançada", "search_popout.tips.hashtag": "etiqueta", "search_popout.tips.status": "estatut", - "search_popout.tips.text": "Tèxt brut tòrna escais, noms d’utilizaire e etiquetas correspondents", + "search_popout.tips.text": "Lo tèxt brut tòrna escais, noms d’utilizaire e etiquetas correspondents", "search_popout.tips.user": "utilizaire", "search_results.total": "{count, number} {count, plural, one {resultat} other {resultats}}", "standalone.public_title": "Una ulhada dedins…", diff --git a/config/locales/oc.yml b/config/locales/oc.yml index a9bad2d34..a589c195e 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -49,6 +49,7 @@ oc: reserved_username: Aqueste nom d’utilizaire es reservat roles: admin: Admin + moderator: Mod unfollow: Quitar de sègre admin: account_moderation_notes: @@ -231,6 +232,11 @@ oc: search: Cercar title: Instàncias conegudas invites: + filter: + all: Totes + available: Disponibles + expired: Expirats + title: Filtre title: Covits reports: action_taken_by: Mesura menada per @@ -268,8 +274,11 @@ oc: desc_html: Afichat sus las pagina d’acuèlh quand las inscripcions son tampadas.
Podètz utilizar de balisas HTML title: Messatge de barradura de las inscripcions deletion: - desc_html: Autorizar al monde a suprimir lor compte + desc_html: Autorizar lo monde a suprimir lor compte title: Possibilitat de suprimir lo compte + min_invite_role: + disabled: Degun + title: Autorizat amb invitacions open: desc_html: Autorizar lo monde a se marcar title: Inscripcions @@ -306,7 +315,7 @@ oc: show: Mostrar mèdia title: Mèdia no_media: Cap mèdia - title: Estatuts del compteAccount statuses + title: Estatuts del compte with_media: Amb mèdia subscriptions: callback_url: URL de rapèl @@ -343,6 +352,8 @@ oc: invalid_reset_password_token: Lo geton de reïnicializacion es invalid o acabat. Tornatz demandar un geton se vos plai. login: Se connectar logout: Se desconnectar + migrate_account: Mudar endacòm mai + migrate_account_html: Se volètz mandar los visitors d’aqueste compte a un autre, podètz o configurar aquí. register: Se marcar resend_confirmation: Tornar mandar las instruccions de confirmacion reset_password: Reïnicializar lo senhal @@ -503,12 +514,42 @@ oc: muting: Lista de mond que volètz pas legir upload: Importar in_memoriam_html: En Memòria. + invites: + delete: Desactivar + expired: Expirat + expires_in: + '1800': 30 minutas + '21600': 6 oras + '3600': 1 ora + '43200': 12 oras + '86400': 1 jorn + expires_in_prompt: Jamai + generate: Generar + max_uses: + one: 1 persona + other: "%{count} personas" + max_uses_prompt: Cap limit + prompt: Generatz e partejatz los ligams per donar accès a aquesta instància + table: + expires_at: Expirats + uses: Usatges + title: Covidar de monde landing_strip_html: "%{name} utiliza %{link_to_root_path}. Podètz lo/la sègre o interagir amb el o ela s’avètz un compte ont que siasque sul fediverse." landing_strip_signup_html: S’es pas lo cas, podètz vos marcar aquí. + lists: + errors: + limit: Avètz atengut lo maximum de listas media_attachments: validations: images_and_video: Se pòt pas ajustar una vidèo a un estatut que ten ja d’imatges too_many: Se pòt pas ajustar mai de 4 fichièrs + migrations: + acct: nomutilizaire@domeni del nòu compte + currently_redirecting: 'Vòstre perfil es parametrat per mandar a :' + proceed: Enregistrar + updated_msg: Vòstre paramètre de migracion es ben estat mes a jorn ! + moderation: + title: Moderation notification_mailer: digest: body: 'Trobatz aquí un resumit de çò qu’avètz mancat dempuèi vòstra darrièra visita lo %{since}:' @@ -621,6 +662,7 @@ oc: export: Export donadas followers: Seguidors autorizats import: Importar + migrate: Migracion de compte notifications: Notificacions preferences: Preferéncias settings: Paramètres @@ -630,7 +672,7 @@ oc: open_in_web: Dobrir sul web over_character_limit: limit de %{max} caractèrs passat pin_errors: - limit: Tròp de tuts penjats + limit: Avètz ja lo maximum de tuts penjats ownership: Se pòt pas penjar lo tut de qualqu’un mai private: Se pòt pas penjar los tuts pas publics reblog: Se pòt pas penjar un tut partejat -- cgit From cdae7e4c8b24bfa6f5e7650887b142d7b1a56a7b Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 9 Dec 2017 22:18:45 +0900 Subject: Move push notifications settings (regression from #5879) (#5941) * Move push notifications settings * fix typo `setf` -> `set` --- .../mastodon/actions/push_notifications.js | 4 +- app/javascript/mastodon/settings.js | 46 ++++++++++++++++++++++ app/javascript/mastodon/web_push_subscription.js | 31 +++------------ 3 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 app/javascript/mastodon/settings.js diff --git a/app/javascript/mastodon/actions/push_notifications.js b/app/javascript/mastodon/actions/push_notifications.js index cfe419888..de06385f9 100644 --- a/app/javascript/mastodon/actions/push_notifications.js +++ b/app/javascript/mastodon/actions/push_notifications.js @@ -1,5 +1,5 @@ import axios from 'axios'; -import { setSettingsToLocalStorage } from '../web_push_subscription'; +import { pushNotificationsSetting } from '../settings'; export const SET_BROWSER_SUPPORT = 'PUSH_NOTIFICATIONS_SET_BROWSER_SUPPORT'; export const SET_SUBSCRIPTION = 'PUSH_NOTIFICATIONS_SET_SUBSCRIPTION'; @@ -50,7 +50,7 @@ export function saveSettings() { }).then(() => { const me = getState().getIn(['meta', 'me']); if (me) { - setSettingsToLocalStorage(me, data); + pushNotificationsSetting.set(me, data); } }); }; diff --git a/app/javascript/mastodon/settings.js b/app/javascript/mastodon/settings.js new file mode 100644 index 000000000..dbd969cb1 --- /dev/null +++ b/app/javascript/mastodon/settings.js @@ -0,0 +1,46 @@ +export default class Settings { + + constructor(keyBase = null) { + this.keyBase = keyBase; + } + + generateKey(id) { + return this.keyBase ? [this.keyBase, `id${id}`].join('.') : id; + } + + set(id, data) { + const key = this.generateKey(id); + try { + const encodedData = JSON.stringify(data); + localStorage.setItem(key, encodedData); + return data; + } catch (e) { + return null; + } + } + + get(id) { + const key = this.generateKey(id); + try { + const rawData = localStorage.getItem(key); + return JSON.parse(rawData); + } catch (e) { + return null; + } + } + + remove(id) { + const data = this.get(id); + if (data) { + const key = this.generateKey(id); + try { + localStorage.removeItem(key); + } catch (e) { + } + } + return data; + } + +} + +export const pushNotificationsSetting = new Settings('mastodon_push_notification_data'); diff --git a/app/javascript/mastodon/web_push_subscription.js b/app/javascript/mastodon/web_push_subscription.js index 114d9c3b3..17aca4060 100644 --- a/app/javascript/mastodon/web_push_subscription.js +++ b/app/javascript/mastodon/web_push_subscription.js @@ -1,6 +1,7 @@ import axios from 'axios'; import { store } from './containers/mastodon'; import { setBrowserSupport, setSubscription, clearSubscription } from './actions/push_notifications'; +import { pushNotificationsSetting } from './settings'; // Taken from https://www.npmjs.com/package/web-push const urlBase64ToUint8Array = (base64String) => { @@ -40,7 +41,7 @@ const sendSubscriptionToBackend = (subscription) => { const me = store.getState().getIn(['meta', 'me']); if (me) { - const data = getSettingsFromLocalStorage(me); + const data = pushNotificationsSetting.get(me); if (data) { params.data = data; } @@ -52,16 +53,14 @@ const sendSubscriptionToBackend = (subscription) => { // Last one checks for payload support: https://web-push-book.gauntface.com/chapter-06/01-non-standards-browsers/#no-payload const supportsPushNotifications = ('serviceWorker' in navigator && 'PushManager' in window && 'getKey' in PushSubscription.prototype); -const SUBSCRIPTION_DATA_STORAGE_KEY = 'mastodon_push_notification_data'; - export function register () { store.dispatch(setBrowserSupport(supportsPushNotifications)); const me = store.getState().getIn(['meta', 'me']); - if (me && !getSettingsFromLocalStorage(me)) { + if (me && !pushNotificationsSetting.get(me)) { const alerts = store.getState().getIn(['push_notifications', 'alerts']); if (alerts) { - setSettingsToLocalStorage(me, { alerts: alerts }); + pushNotificationsSetting.set(me, { alerts: alerts }); } } @@ -99,7 +98,7 @@ export function register () { if (!(subscription instanceof PushSubscription)) { store.dispatch(setSubscription(subscription)); if (me) { - setSettingsToLocalStorage(me, { alerts: subscription.alerts }); + pushNotificationsSetting.set(me, { alerts: subscription.alerts }); } } }) @@ -113,7 +112,7 @@ export function register () { // Clear alerts and hide UI settings store.dispatch(clearSubscription()); if (me) { - removeSettingsFromLocalStorage(me); + pushNotificationsSetting.remove(me); } try { @@ -128,21 +127,3 @@ export function register () { console.warn('Your browser does not support Web Push Notifications.'); } } - -export function setSettingsToLocalStorage(id, data) { - try { - localStorage.setItem(`${SUBSCRIPTION_DATA_STORAGE_KEY}_${id}`, JSON.stringify(data)); - } catch (e) {} -} - -export function getSettingsFromLocalStorage(id) { - try { - return JSON.parse(localStorage.getItem(`${SUBSCRIPTION_DATA_STORAGE_KEY}_${id}`)); - } catch (e) {} - - return null; -} - -export function removeSettingsFromLocalStorage(id) { - localStorage.removeItem(`${SUBSCRIPTION_DATA_STORAGE_KEY}_${id}`); -} -- cgit From 931e66e57263f7dcc4e5ee0688a0384f42f17c73 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 9 Dec 2017 22:19:07 +0900 Subject: Back to Web UI from tag page when signed in (#5943) --- app/views/tags/show.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index ea8b0faa3..e4c16555d 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -20,8 +20,11 @@ %p= t 'about.about_hashtag_html', hashtag: @tag.name .cta - = link_to t('auth.login'), new_user_session_path, class: 'button button-secondary' - = link_to t('about.learn_more'), root_url, class: 'button button-alternative' + - if user_signed_in? + = link_to t('settings.back'), root_path, class: 'button button-secondary' + - else + = link_to t('auth.login'), new_user_session_path, class: 'button button-secondary' + = link_to t('about.learn_more'), about_path, class: 'button button-alternative' .features-list .features-list__row -- cgit From 84cebad49d388a807bfc1f09cad825c6b9469883 Mon Sep 17 00:00:00 2001 From: SerCom_KC Date: Sat, 9 Dec 2017 21:19:45 +0800 Subject: Update Chinese (Simplified) translations (#5937) * i18n: (zh-CN) Improve translations for email notifications * i18n: (zh-CN) Improve translations * i18n: (zh-CN) Fix subject * i18n: (zh-CN) Update translations for #5933 --- config/locales/zh-CN.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index cd087c3e8..3ede5c4d5 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -325,13 +325,13 @@ zh-CN: title: 管理 admin_mailer: new_report: - body: "%{reporter} 举报了 %{target}" - subject: 来自 %{instance} 的新举报(#%{id}) + body: "%{reporter} 举报了用户 %{target}。" + subject: 来自 %{instance} 的用户举报(#%{id}) application_mailer: - salutation: "%{name}," - settings: 更改电子邮件首选项:%{link} - signature: 来自 %{instance} 的 Mastodon 通知 - view: 查看: + salutation: "%{name}:" + settings: 使用此链接更改你的电子邮件首选项:%{link} + signature: 这是一封来自 %{instance} 的 Mastodon 电子邮件通知。 + view: 点此链接查看详情: applications: created: 应用创建成功 destroyed: 应用删除成功 @@ -399,7 +399,7 @@ zh-CN: '500': content: 抱歉,我们这里出错了。 title: 这个页面不正确 - noscript_html: 请启用 JavaScript 以便使用 Mastodon 网页版应用。你也可以选择适用于你的平台的 Mastodon 应用。 + noscript_html: 使用 Mastodon 网页版应用需要启用 JavaScript。你也可以选择适用于你的平台的 Mastodon 应用。 exports: blocks: 屏蔽的用户 csv: CSV @@ -445,13 +445,16 @@ zh-CN: generate: 生成邀请链接 max_uses: "%{count} 次" max_uses_prompt: 无限制 - prompt: 生成可供分享的链接以便邀请他人在本实例注册 + prompt: 生成分享链接,邀请他人在本实例注册 table: expires_at: 失效时间 uses: 已使用次数 title: 邀请用户 landing_strip_html: "%{name} 是一位来自 %{link_to_root_path} 的用户。如果你想关注他们或者与他们互动,你需要在任意一个 Mastodon 实例或与其兼容的网站上拥有一个帐户。" landing_strip_signup_html: 还没有这种帐户?你可以在本站注册一个。 + lists: + errors: + limit: 你所建立的列表数量已经达到上限 media_attachments: validations: images_and_video: 无法在嘟文中同时插入视频和图片 @@ -478,8 +481,8 @@ zh-CN: body: "%{name} 关注了你!" subject: "%{name} 关注了你" follow_request: - body: "%{name} 请求关注你" - subject: 待审核的关注者:%{name} + body: "%{name} 向你发送了关注请求!" + subject: 来自 %{name} 的关注请求 mention: body: "%{name} 在嘟文中提到了你:" subject: "%{name} 提到了你" @@ -583,7 +586,7 @@ zh-CN: open_in_web: 在站内打开 over_character_limit: 超过了 %{max} 字的限制 pin_errors: - limit: 置顶的嘟文条数超出限制 + limit: 你所置顶的嘟文数量已经达到上限 ownership: 不能置顶他人的嘟文 private: 不能置顶非公开的嘟文 reblog: 不能置顶转嘟 @@ -674,7 +677,7 @@ zh-CN: formats: default: "%Y年%-m月%d日 %H:%M" two_factor_authentication: - code_hint: 输入你的认证器生成的代码以确认 + code_hint: 输入认证器生成的代码以确认操作 description_html: 启用双重认证后,你需要输入手机认证器生成的代码才能登录 disable: 停用 enable: 启用 @@ -688,7 +691,7 @@ zh-CN: recovery_codes_regenerated: 恢复代码重新生成成功 recovery_instructions_html: 如果你的手机无法使用,你可以使用下列任意一个恢复代码来重新获得对帐户的访问权。请妥善保管好你的恢复代码(例如,你可以将它们打印出来,然后和其他重要的文件放在一起)。 setup: 设置 - wrong_code: 输入的认证码无效!请检查你设备上显示的时间是否正确,如果正确,你可能需要联系管理员以检查服务器的时间是否正确。 + wrong_code: 输入的认证码无效!请核对一下你的设备显示的时间,如果正确,你可能需要联系一下实例的管理员,让他们校准服务器的时间。 users: invalid_email: 输入的电子邮件地址无效 invalid_otp_token: 输入的双重认证代码无效 -- cgit From a865b62efc0f7025f789f4413a03ccacd57db7bb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 14:20:02 +0100 Subject: Rate limit by user instead of IP when API user is authenticated (#5923) * Fix #668 - Rate limit by user instead of IP when API user is authenticated * Fix code style issue * Use request decorator provided by Doorkeeper --- app/controllers/concerns/rate_limit_headers.rb | 3 +- config/initializers/rack_attack.rb | 55 ++++++++++++++++------ .../concerns/rate_limit_headers_spec.rb | 2 +- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/app/controllers/concerns/rate_limit_headers.rb b/app/controllers/concerns/rate_limit_headers.rb index 36cb91075..ac9b58f5d 100644 --- a/app/controllers/concerns/rate_limit_headers.rb +++ b/app/controllers/concerns/rate_limit_headers.rb @@ -44,7 +44,8 @@ module RateLimitHeaders end def api_throttle_data - request.env['rack.attack.throttle_data']['api'] + request.env['rack.attack.throttle_data']['throttle_authenticated_api'] || + request.env['rack.attack.throttle_data']['throttle_unauthenticated_api'] end def request_time diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 53cb106ca..fddcbc52c 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -1,6 +1,41 @@ # frozen_string_literal: true class Rack::Attack + class Request + def authenticated_token + return @token if defined?(@token) + + @token = Doorkeeper::OAuth::Token.authenticate( + Doorkeeper::Grape::AuthorizationDecorator.new(self), + *Doorkeeper.configuration.access_token_methods + ) + end + + def authenticated_user_id + authenticated_token&.resource_owner_id + end + + def unauthenticated? + !authenticated_user_id + end + + def api_request? + path.start_with?('/api') + end + + def web_request? + !api_request? + end + end + + PROTECTED_PATHS = %w( + /auth/sign_in + /auth + /auth/password + ).freeze + + PROTECTED_PATHS_REGEX = Regexp.union(PROTECTED_PATHS.map { |path| /\A#{Regexp.escape(path)}/ }) + # Always allow requests from localhost # (blocklist & throttles are skipped) Rack::Attack.safelist('allow from localhost') do |req| @@ -8,24 +43,16 @@ class Rack::Attack '127.0.0.1' == req.ip || '::1' == req.ip end - # Rate limits for the API - throttle('api', limit: 300, period: 5.minutes) do |req| - req.ip if req.path =~ /\A\/api\/v/ - end - - # Rate limit logins - throttle('login', limit: 5, period: 5.minutes) do |req| - req.ip if req.path == '/auth/sign_in' && req.post? + throttle('throttle_authenticated_api', limit: 300, period: 5.minutes) do |req| + req.api_request? && req.authenticated_user_id end - # Rate limit sign-ups - throttle('register', limit: 5, period: 5.minutes) do |req| - req.ip if req.path == '/auth' && req.post? + throttle('throttle_unauthenticated_api', limit: 300, period: 5.minutes) do |req| + req.ip if req.api_request? && req.unauthenticated? end - # Rate limit forgotten passwords - throttle('reminder', limit: 5, period: 5.minutes) do |req| - req.ip if req.path == '/auth/password' && req.post? + throttle('protected_paths', limit: 5, period: 5.minutes) do |req| + req.ip if req.post? && req.path =~ PROTECTED_PATHS_REGEX end self.throttled_response = lambda do |env| diff --git a/spec/controllers/concerns/rate_limit_headers_spec.rb b/spec/controllers/concerns/rate_limit_headers_spec.rb index 719978dc2..00a9a2080 100644 --- a/spec/controllers/concerns/rate_limit_headers_spec.rb +++ b/spec/controllers/concerns/rate_limit_headers_spec.rb @@ -34,7 +34,7 @@ describe ApplicationController do let(:start_time) { DateTime.new(2017, 1, 1, 12, 0, 0).utc } before do - request.env['rack.attack.throttle_data'] = { 'api' => { limit: 100, count: 20, period: 10 } } + request.env['rack.attack.throttle_data'] = { 'throttle_authenticated_api' => { limit: 100, count: 20, period: 10 } } travel_to start_time do get 'show' end -- cgit From 4bce376fdc7f5c5c6e2a2e33974e3712425d5874 Mon Sep 17 00:00:00 2001 From: Naoki Kosaka Date: Sat, 9 Dec 2017 23:12:10 +0900 Subject: Missing require 'authorization_decorator'. (#5947) --- config/initializers/rack_attack.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index fddcbc52c..41db76929 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'doorkeeper/grape/authorization_decorator' + class Rack::Attack class Request def authenticated_token -- cgit From a72d03f43c1ffade898677851205ce20f422b8b0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 9 Dec 2017 15:35:22 +0100 Subject: Weblate translations (#5946) * Translated using Weblate (German) Currently translated at 84.2% (439 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (English) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/en/ * Translated using Weblate (German) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/de/ * Translated using Weblate (English) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/en/ * Translated using Weblate (German) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/de/ * Translated using Weblate (French) Currently translated at 84.6% (441 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (German) Currently translated at 86.9% (453 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (Korean) Currently translated at 86.3% (450 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/ko/ * Translated using Weblate (French) Currently translated at 84.8% (442 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (French) Currently translated at 84.8% (442 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (French) Currently translated at 84.8% (442 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Portuguese) Currently translated at 36.2% (189 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt/ * Translated using Weblate (Hebrew) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/he/ * Translated using Weblate (Hebrew) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/he/ * Translated using Weblate (Hebrew) Currently translated at 53.1% (277 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/he/ * Translated using Weblate (Hebrew) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/he/ * Translated using Weblate (Hebrew) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/he/ * Translated using Weblate (Hebrew) Currently translated at 100.0% (43 of 43 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/he/ * Translated using Weblate (Hebrew) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/he/ * Translated using Weblate (Spanish) Currently translated at 75.6% (394 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/es/ * Translated using Weblate (French) Currently translated at 86.3% (450 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Portuguese) Currently translated at 98.2% (55 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/pt/ * Translated using Weblate (Portuguese) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/pt/ * Translated using Weblate (Dutch) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/nl/ * Translated using Weblate (Dutch) Currently translated at 84.6% (441 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/nl/ * Translated using Weblate (German) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/de/ * Translated using Weblate (Catalan) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/ca/ * Translated using Weblate (Dutch) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/nl/ * Translated using Weblate (Catalan) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/ca/ * Translated using Weblate (German) Currently translated at 88.2% (460 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (Dutch) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/nl/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 90.2% (470 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (French) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/fr/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 90.2% (470 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (French) Currently translated at 87.3% (455 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Hebrew) Currently translated at 61.8% (322 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/he/ * Translated using Weblate (French) Currently translated at 87.3% (455 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (French) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/fr/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 92.3% (481 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (Catalan) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/ca/ * Translated using Weblate (French) Currently translated at 87.3% (455 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (French) Currently translated at 87.5% (456 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (French) Currently translated at 87.7% (457 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Catalan) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/ca/ * Translated using Weblate (Portuguese) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt/ * Translated using Weblate (Catalan) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/ca/ * Translated using Weblate (Portuguese) Currently translated at 42.4% (221 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt/ * Translated using Weblate (Portuguese) Currently translated at 97.3% (73 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/pt/ * Translated using Weblate (Catalan) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/ca/ * Translated using Weblate (Dutch) Currently translated at 100.0% (2 of 2 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/nl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (43 of 43 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/nl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/nl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/nl/ * Translated using Weblate (Portuguese) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/pt/ * Translated using Weblate (German) Currently translated at 90.5% (472 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (German) Currently translated at 90.7% (473 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (German) Currently translated at 90.9% (474 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (German) Currently translated at 91.1% (475 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (Dutch) Currently translated at 90.4% (471 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/nl/ * Translated using Weblate (German) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/de/ * Translated using Weblate (German) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/de/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 92.3% (481 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (German) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/de/ * Translated using Weblate (German) Currently translated at 100.0% (2 of 2 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/de/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/pt_BR/ * Translated using Weblate (Dutch) Currently translated at 90.5% (472 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/nl/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Arabic) Currently translated at 44.1% (19 of 43 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/ar/ * Translated using Weblate (Norwegian (old code)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/no/ * Translated using Weblate (Arabic) Currently translated at 85.7% (48 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/ar/ * Translated using Weblate (Arabic) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/ar/ * Translated using Weblate (Arabic) Currently translated at 92.0% (69 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/ar/ * Translated using Weblate (Portuguese) Currently translated at 47.7% (249 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt/ * Translated using Weblate (Arabic) Currently translated at 29.9% (156 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/ar/ * Translated using Weblate (Spanish) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/es/ * Translated using Weblate (Spanish) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/es/ * Translated using Weblate (Spanish) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/es/ * Translated using Weblate (Spanish) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/es/ * Translated using Weblate (Polish) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pl/ * Translated using Weblate (French) Currently translated at 99.6% (519 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Spanish) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/es/ * Translated using Weblate (French) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/fr/ * Translated using Weblate (Spanish) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/es/ * Translated using Weblate (Spanish) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/es/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 99.2% (517 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Added translation using Weblate (Galician) * Translated using Weblate (Japanese) Currently translated at 99.6% (519 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/ja/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/pt_BR/ * Translated using Weblate (Japanese) Currently translated at 92.8% (52 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/ja/ * Translated using Weblate (Japanese) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/ja/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 99.4% (518 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (Japanese) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/ja/ * Translated using Weblate (Galician) Currently translated at 43.6% (107 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/gl/ * Translated using Weblate (Japanese) Currently translated at 100.0% (43 of 43 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/ja/ * Translated using Weblate (Arabic) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/ar/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 99.4% (518 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/pt_BR/ * Translated using Weblate (Arabic) Currently translated at 96.4% (54 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/ar/ * Translated using Weblate (Arabic) Currently translated at 31.2% (163 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/ar/ * Translated using Weblate (Dutch) Currently translated at 91.5% (477 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/nl/ * Translated using Weblate (French) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Dutch) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/nl/ * Translated using Weblate (Arabic) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/ar/ * Translated using Weblate (Arabic) Currently translated at 98.2% (55 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/ar/ * Translated using Weblate (Dutch) Currently translated at 100.0% (521 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/nl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (521 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/nl/ * Translated using Weblate (French) Currently translated at 99.8% (520 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/fr/ * Translated using Weblate (Norwegian (old code)) Currently translated at 50.6% (264 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/no/ * Translated using Weblate (Dutch) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/nl/ * Translated using Weblate (Galician) Currently translated at 64.0% (157 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/gl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (2 of 2 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/nl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (43 of 43 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/nl/ * Translated using Weblate (Dutch) Currently translated at 100.0% (75 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/nl/ * Translated using Weblate (Norwegian (old code)) Currently translated at 100.0% (43 of 43 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/no/ * Translated using Weblate (Norwegian (old code)) Currently translated at 97.3% (73 of 75 strings) Translation: Mastodon/Doorkeeper Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/doorkeeper/no/ * Translated using Weblate (Dutch) Currently translated at 100.0% (56 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/nl/ * Translated using Weblate (Norwegian (old code)) Currently translated at 96.4% (54 of 56 strings) Translation: Mastodon/Preferences Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/simple_form/no/ * Translated using Weblate (Galician) Currently translated at 100.0% (245 of 245 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/gl/ * Translated using Weblate (German) Currently translated at 95.2% (496 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * Translated using Weblate (German) Currently translated at 95.2% (496 of 521 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/de/ * i18n-tasks normalize && yarn manage:translations * Fix things --- app/javascript/mastodon/locales/ar.json | 2 +- app/javascript/mastodon/locales/bg.json | 2 +- app/javascript/mastodon/locales/ca.json | 2 +- app/javascript/mastodon/locales/de.json | 2 +- app/javascript/mastodon/locales/en.json | 2 +- app/javascript/mastodon/locales/eo.json | 2 +- app/javascript/mastodon/locales/es.json | 2 +- app/javascript/mastodon/locales/fa.json | 2 +- app/javascript/mastodon/locales/fi.json | 2 +- app/javascript/mastodon/locales/fr.json | 2 +- app/javascript/mastodon/locales/gl.json | 259 ++++++++++++++++++++++ app/javascript/mastodon/locales/he.json | 2 +- app/javascript/mastodon/locales/hr.json | 2 +- app/javascript/mastodon/locales/hu.json | 2 +- app/javascript/mastodon/locales/id.json | 2 +- app/javascript/mastodon/locales/io.json | 2 +- app/javascript/mastodon/locales/it.json | 2 +- app/javascript/mastodon/locales/ja.json | 2 +- app/javascript/mastodon/locales/ko.json | 2 +- app/javascript/mastodon/locales/nl.json | 23 +- app/javascript/mastodon/locales/no.json | 2 +- app/javascript/mastodon/locales/pt-BR.json | 32 +-- app/javascript/mastodon/locales/pt.json | 2 +- app/javascript/mastodon/locales/ru.json | 2 +- app/javascript/mastodon/locales/sv.json | 2 +- app/javascript/mastodon/locales/th.json | 2 +- app/javascript/mastodon/locales/tr.json | 2 +- app/javascript/mastodon/locales/uk.json | 2 +- app/javascript/mastodon/locales/whitelist_gl.json | 2 + app/javascript/mastodon/locales/zh-HK.json | 2 +- app/javascript/mastodon/locales/zh-TW.json | 2 +- config/locales/ar.yml | 18 +- config/locales/de.yml | 31 ++- config/locales/devise.ja.yml | 10 +- config/locales/devise.no.yml | 6 +- config/locales/doorkeeper.ar.yml | 10 +- config/locales/doorkeeper.ja.yml | 16 +- config/locales/doorkeeper.nl.yml | 4 +- config/locales/doorkeeper.no.yml | 8 +- config/locales/fr.yml | 2 +- config/locales/ja.yml | 20 +- config/locales/nl.yml | 117 +++++++--- config/locales/no.yml | 36 +-- config/locales/pt-BR.yml | 77 +++++-- config/locales/simple_form.ar.yml | 9 +- config/locales/simple_form.ja.yml | 10 +- config/locales/simple_form.nl.yml | 24 +- 47 files changed, 604 insertions(+), 164 deletions(-) create mode 100644 app/javascript/mastodon/locales/gl.json create mode 100644 app/javascript/mastodon/locales/whitelist_gl.json diff --git a/app/javascript/mastodon/locales/ar.json b/app/javascript/mastodon/locales/ar.json index a984b38d2..ec66a0027 100644 --- a/app/javascript/mastodon/locales/ar.json +++ b/app/javascript/mastodon/locales/ar.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "تحميل ...", "media_gallery.toggle_visible": "عرض / إخفاء", diff --git a/app/javascript/mastodon/locales/bg.json b/app/javascript/mastodon/locales/bg.json index d20120b11..1c04b3bfa 100644 --- a/app/javascript/mastodon/locales/bg.json +++ b/app/javascript/mastodon/locales/bg.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Зареждане...", "media_gallery.toggle_visible": "Toggle visibility", diff --git a/app/javascript/mastodon/locales/ca.json b/app/javascript/mastodon/locales/ca.json index bfa931fc0..f705937fd 100644 --- a/app/javascript/mastodon/locales/ca.json +++ b/app/javascript/mastodon/locales/ca.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Carregant...", "media_gallery.toggle_visible": "Alternar visibilitat", diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json index b6d9e27a7..6354f18b6 100644 --- a/app/javascript/mastodon/locales/de.json +++ b/app/javascript/mastodon/locales/de.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Wird geladen …", "media_gallery.toggle_visible": "Sichtbarkeit umschalten", diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 538124904..3633025b8 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Loading...", "media_gallery.toggle_visible": "Toggle visibility", diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json index 619c7320a..9e66c379f 100644 --- a/app/javascript/mastodon/locales/eo.json +++ b/app/javascript/mastodon/locales/eo.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Ŝarganta…", "media_gallery.toggle_visible": "Baskuli videblecon", diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json index 411615744..6122a79ab 100644 --- a/app/javascript/mastodon/locales/es.json +++ b/app/javascript/mastodon/locales/es.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Cargando…", "media_gallery.toggle_visible": "Cambiar visibilidad", diff --git a/app/javascript/mastodon/locales/fa.json b/app/javascript/mastodon/locales/fa.json index aa5c21feb..75057a7dd 100644 --- a/app/javascript/mastodon/locales/fa.json +++ b/app/javascript/mastodon/locales/fa.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "بارگیری...", "media_gallery.toggle_visible": "تغییر پیدایی", diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json index db9319e2e..4ddc1cca7 100644 --- a/app/javascript/mastodon/locales/fi.json +++ b/app/javascript/mastodon/locales/fi.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Ladataan...", "media_gallery.toggle_visible": "Toggle visibility", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 9b9469bc2..3db19c470 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Chargement…", "media_gallery.toggle_visible": "Modifier la visibilité", diff --git a/app/javascript/mastodon/locales/gl.json b/app/javascript/mastodon/locales/gl.json new file mode 100644 index 000000000..bb0b1a9fd --- /dev/null +++ b/app/javascript/mastodon/locales/gl.json @@ -0,0 +1,259 @@ +{ + "account.block": "Bloquear @{name}", + "account.block_domain": "Ocultar calquer contido de {domain}", + "account.disclaimer_full": "A información inferior podería mostrar un perfil incompleto da usuaria.", + "account.edit_profile": "Editar perfil", + "account.follow": "Seguir", + "account.followers": "Seguidoras", + "account.follows": "Seguindo", + "account.follows_you": "Séguena", + "account.hide_reblogs": "Ocultar repeticións de @{name}", + "account.media": "Medios", + "account.mention": "Mencionar @{name}", + "account.moved_to": "{name} marchou a:", + "account.mute": "Acalar @{name}", + "account.mute_notifications": "Acalar as notificacións de @{name}", + "account.posts": "Publicacións", + "account.report": "Informar sobre @{name}", + "account.requested": "Agardando aceptación. Pulse para cancelar a solicitude de seguimento", + "account.share": "Compartir o perfil de @{name}", + "account.show_reblogs": "Mostrar repeticións de @{name}", + "account.unblock": "Desbloquear @{name}", + "account.unblock_domain": "Non ocultar {domain}", + "account.unfollow": "Non seguir", + "account.unmute": "Non acalar @{name}", + "account.unmute_notifications": "Desbloquear as notificacións de @{name}", + "account.view_full_profile": "Ver o perfil completo", + "boost_modal.combo": "Pulse {combo} para saltar esto a próxima vez", + "bundle_column_error.body": "Houbo un fallo mentras se cargaba este compoñente.", + "bundle_column_error.retry": "Inténteo de novo", + "bundle_column_error.title": "Fallo na rede", + "bundle_modal_error.close": "Pechar", + "bundle_modal_error.message": "Algo fallou mentras se cargaba este compoñente.", + "bundle_modal_error.retry": "Inténteo de novo", + "column.blocks": "Usuarias bloqueadas", + "column.community": "Liña temporal local", + "column.favourites": "Favoritas", + "column.follow_requests": "Peticións de seguimento", + "column.home": "Inicio", + "column.lists": "Lists", + "column.mutes": "Usuarias acaladas", + "column.notifications": "Notificacións", + "column.pins": "Mensaxes fixadas", + "column.public": "Liña temporal federada", + "column_back_button.label": "Atrás", + "column_header.hide_settings": "Agochar axustes", + "column_header.moveLeft_settings": "Mover a columna hacia a esquerda", + "column_header.moveRight_settings": "Mover a columna hacia a dereita", + "column_header.pin": "Fixar", + "column_header.show_settings": "Mostras axustes", + "column_header.unpin": "Soltar", + "column_subheading.navigation": "Navegación", + "column_subheading.settings": "Axustes", + "compose_form.lock_disclaimer": "A súa conta non está {locked}. Calquera pode seguila para ver as súas mensaxes só-para-seguidoras.", + "compose_form.lock_disclaimer.lock": "bloqueado", + "compose_form.placeholder": "A qué andas?", + "compose_form.publish": "Toot", + "compose_form.publish_loud": "{publish}!", + "compose_form.sensitive": "Marcar medios como sensibles", + "compose_form.spoiler": "Agochar texto detrás de un aviso", + "compose_form.spoiler_placeholder": "Escriba o aviso aquí", + "confirmation_modal.cancel": "Cancelar", + "confirmations.block.confirm": "Bloquear", + "confirmations.block.message": "Está segura de querer bloquear a {name}?", + "confirmations.delete.confirm": "Borrar", + "confirmations.delete.message": "Está segura de que quere eliminar este estado?", + "confirmations.delete_list.confirm": "Delete", + "confirmations.delete_list.message": "Are you sure you want to permanently delete this list?", + "confirmations.domain_block.confirm": "Agochar un dominio completo", + "confirmations.domain_block.message": "Realmente está segura de que quere bloquear por completo o dominio {domain}? Normalmente é suficiente, e preferible, bloquear de xeito selectivo varios elementos.", + "confirmations.mute.confirm": "Acalar", + "confirmations.mute.message": "Está segura de que quere acalar a {name}?", + "confirmations.unfollow.confirm": "Deixar de seguir", + "confirmations.unfollow.message": "Quere deixar de seguir a {name}?", + "embed.instructions": "Copie o código inferior para incrustar no seu sitio web este estado.", + "embed.preview": "Así será mostrado:", + "emoji_button.activity": "Actividade", + "emoji_button.custom": "Personalizado", + "emoji_button.flags": "Marcas", + "emoji_button.food": "Comida e Bebida", + "emoji_button.label": "Insertar emoji", + "emoji_button.nature": "Natureza", + "emoji_button.not_found": "Sen emojos!! (╯°□°)╯︵ ┻━┻", + "emoji_button.objects": "Obxetos", + "emoji_button.people": "Xente", + "emoji_button.recent": "Utilizadas con frecuencia", + "emoji_button.search": "Buscar...", + "emoji_button.search_results": "Resultados da busca", + "emoji_button.symbols": "Símbolos", + "emoji_button.travel": "Viaxes e Lugares", + "empty_column.community": "A liña temporal local está baldeira. Escriba algo de xeito público para que rule!", + "empty_column.hashtag": "Aínda non hai nada con esta etiqueta.", + "empty_column.home": "A súa liña temporal de inicio está baldeira! Visite {public} ou utilice a busca para atopar outras usuarias.", + "empty_column.home.public_timeline": "a liña temporal pública", + "empty_column.list": "Aínda non hai nada en esta lista.", + "empty_column.notifications": "Aínda non ten notificacións. Interactúe con outras para iniciar unha conversa.", + "empty_column.public": "Nada por aquí! Escriba algo de xeito público, ou siga manualmente usuarias de outras instancias para ir enchéndoa", + "follow_request.authorize": "Autorizar", + "follow_request.reject": "Rexeitar", + "getting_started.appsshort": "Aplicacións", + "getting_started.faq": "PMF", + "getting_started.heading": "Comezando", + "getting_started.open_source_notice": "Mastodon é software de código aberto. Pode contribuír ou informar de fallos en GitHub en {github}.", + "getting_started.userguide": "Guía de usuaria", + "home.column_settings.advanced": "Avanzado", + "home.column_settings.basic": "Básico", + "home.column_settings.filter_regex": "Filtrar expresións regulares", + "home.column_settings.show_reblogs": "Mostrar repeticións", + "home.column_settings.show_replies": "Mostrar respostas", + "home.settings": "Axustes da columna", + "keyboard_shortcuts.back": "voltar atrás", + "keyboard_shortcuts.boost": "repetir", + "keyboard_shortcuts.column": "destacar un estado en unha das columnas", + "keyboard_shortcuts.compose": "Foco no área de escritura", + "keyboard_shortcuts.description": "Descrición", + "keyboard_shortcuts.down": "ir hacia abaixo na lista", + "keyboard_shortcuts.enter": "abrir estado", + "keyboard_shortcuts.favourite": "marcar como favorito", + "keyboard_shortcuts.heading": "Atallos do teclado", + "keyboard_shortcuts.hotkey": "Tecla de acceso directo", + "keyboard_shortcuts.legend": "para mostrar esta lenda", + "keyboard_shortcuts.mention": "para mencionar o autor", + "keyboard_shortcuts.reply": "para responder", + "keyboard_shortcuts.search": "para centrar a busca", + "keyboard_shortcuts.toot": "escribir un toot novo", + "keyboard_shortcuts.unfocus": "quitar o foco do área de escritura/busca", + "keyboard_shortcuts.up": "ir hacia arriba na lista", + "lightbox.close": "Fechar", + "lightbox.next": "Seguinte", + "lightbox.previous": "Anterior", + "lists.account.add": "Add to list", + "lists.account.remove": "Remove from list", + "lists.delete": "Delete list", + "lists.edit": "Edit list", + "lists.new.create": "Add list", + "lists.new.title_placeholder": "New list title", + "lists.search": "Search among people you follow", + "lists.subheading": "Your lists", + "loading_indicator.label": "Cargando...", + "media_gallery.toggle_visible": "Dar visibilidade", + "missing_indicator.label": "Non atopado", + "mute_modal.hide_notifications": "Esconder notificacións deste usuario?", + "navigation_bar.blocks": "Usuarios bloqueados", + "navigation_bar.community_timeline": "Liña temporal local", + "navigation_bar.edit_profile": "Editar perfil", + "navigation_bar.favourites": "Favoritas", + "navigation_bar.follow_requests": "Peticións de seguimento", + "navigation_bar.info": "Sobre esta instancia", + "navigation_bar.keyboard_shortcuts": "Atallos do teclado", + "navigation_bar.lists": "Lists", + "navigation_bar.logout": "Sair", + "navigation_bar.mutes": "Usuarias acaladas", + "navigation_bar.pins": "Mensaxes fixadas", + "navigation_bar.preferences": "Preferencias", + "navigation_bar.public_timeline": "Liña temporal federada", + "notification.favourite": "{name} marcou como favorito o seu estado", + "notification.follow": "{name} está a seguila", + "notification.mention": "{name} mencionoute", + "notification.reblog": "{name} promocionou o seu estado", + "notifications.clear": "Limpar notificacións", + "notifications.clear_confirmation": "Estás seguro de que queres limpar permanentemente todas as túas notificacións?", + "notifications.column_settings.alert": "Notificacións de escritorio", + "notifications.column_settings.favourite": "Favoritas:", + "notifications.column_settings.follow": "Novos seguidores:", + "notifications.column_settings.mention": "Mencións:", + "notifications.column_settings.push": "Enviar notificacións", + "notifications.column_settings.push_meta": "Este aparello", + "notifications.column_settings.reblog": "Promocións:", + "notifications.column_settings.show": "Mostrar en columna", + "notifications.column_settings.sound": "Reproducir son", + "onboarding.done": "Feito", + "onboarding.next": "Seguinte", + "onboarding.page_five.public_timelines": "A liña de tempo local mostra as publicacións públicas de todos en {domain}. A liña de tempo federada mostra as publicacións públicas de todos os que as persoas en {domain} seguen. Estas son as Liñas de tempo públicas, unha boa forma de descubrir novas persoas.", + "onboarding.page_four.home": "A liña de tempo local mostra as publicacións das persoas que segues.", + "onboarding.page_four.notifications": "A columna de notificacións mostra cando alguén interactúa contigo.", + "onboarding.page_one.federation": "Mastodon é unha rede de servidores independentes que se unen para facer unha rede social máis grande. Chamamos instancias a estes servidores.", + "onboarding.page_one.handle": "Estás en {domain}, polo que o teu nome de usuario completo é {handle}", + "onboarding.page_one.welcome": "Benvido a Mastodon!", + "onboarding.page_six.admin": "O administrador da túa instancia é {admin}.", + "onboarding.page_six.almost_done": "Case feito...", + "onboarding.page_six.appetoot": "Que tootes ben!", + "onboarding.page_six.apps_available": "Hai {apps} dispoñíbeis para iOS, Android e outras plataformas.", + "onboarding.page_six.github": "Mastodon é un software gratuito e de código aberto. Pode informar de erros, solicitar novas funcionalidades ou contribuír ao código en {github}.", + "onboarding.page_six.guidelines": "directrices da comunidade", + "onboarding.page_six.read_guidelines": "Por favor, le as {guidelines} do {domain}!", + "onboarding.page_six.various_app": "aplicacións móbiles", + "onboarding.page_three.profile": "Edita o teu perfil para cambiar o teu avatar, bio e nome. Alí, tamén atoparás outras preferencias.", + "onboarding.page_three.search": "Utilice a barra de busca para atopar xente e descubrir etiquetas, como {illustration} e {introductions}. Para atopar unha usuaria que non está en esta instancia utilice o seu enderezo completo.", + "onboarding.page_two.compose": "Escriba mensaxes desde a columna de composición. Pode subir imaxes, mudar as opcións de intimidade e engadir avisos sobre o contido coas iconas inferiores.", + "onboarding.skip": "Saltar", + "privacy.change": "Axustar a intimidade do estado", + "privacy.direct.long": "Enviar exclusivamente as usuarias mencionadas", + "privacy.direct.short": "Directa", + "privacy.private.long": "Enviar só as seguidoras", + "privacy.private.short": "Só-seguidoras", + "privacy.public.long": "Publicar na liña temporal pública", + "privacy.public.short": "Pública", + "privacy.unlisted.long": "Non publicar en liñas temporais públicas", + "privacy.unlisted.short": "Non listada", + "relative_time.days": "{number}d", + "relative_time.hours": "{number}h", + "relative_time.just_now": "agora", + "relative_time.minutes": "{number}m", + "relative_time.seconds": "{number}s", + "reply_indicator.cancel": "Cancelar", + "report.placeholder": "Comentarios adicionais", + "report.submit": "Enviar", + "report.target": "Informar {target}", + "search.placeholder": "Buscar", + "search_popout.search_format": "Formato de busca avanzada", + "search_popout.tips.hashtag": "etiqueta", + "search_popout.tips.status": "estado", + "search_popout.tips.text": "Texto simple devolve coincidencias con nomes públicos, nomes de usuaria e etiquetas", + "search_popout.tips.user": "usuaria", + "search_results.total": "{count, number} {count,plural,one {result} outros {results}}", + "standalone.public_title": "Ollada dentro...", + "status.cannot_reblog": "Esta mensaxe non pode ser promocionada", + "status.delete": "Eliminar", + "status.embed": "Incrustar", + "status.favourite": "Favorita", + "status.load_more": "Cargar máis", + "status.media_hidden": "Medios ocultos", + "status.mention": "Mencionar @{name}", + "status.more": "Máis", + "status.mute_conversation": "Acalar conversa", + "status.open": "Expandir este estado", + "status.pin": "Fixar no perfil", + "status.reblog": "Promocionar", + "status.reblogged_by": "{name} promocionado", + "status.reply": "Resposta", + "status.replyAll": "Resposta a conversa", + "status.report": "Informar @{name}", + "status.sensitive_toggle": "Pulse para ver", + "status.sensitive_warning": "Contido sensible", + "status.share": "Compartir", + "status.show_less": "Mostrar menos", + "status.show_more": "Mostrar máis", + "status.unmute_conversation": "Non acalar a conversa", + "status.unpin": "Despegar do perfil", + "tabs_bar.compose": "Compoñer", + "tabs_bar.federated_timeline": "Federado", + "tabs_bar.home": "Inicio", + "tabs_bar.local_timeline": "Local", + "tabs_bar.notifications": "Notificacións", + "ui.beforeunload": "O borrador perderase se sae de Mastodon.", + "upload_area.title": "Arrastre e solte para subir", + "upload_button.label": "Engadir medios", + "upload_form.description": "Describa para deficientes visuais", + "upload_form.undo": "Desfacer", + "upload_progress.label": "Subindo...", + "video.close": "Pechar video", + "video.exit_fullscreen": "Saír da pantalla completa", + "video.expand": "Expandir vídeo", + "video.fullscreen": "Pantalla completa", + "video.hide": "Agochar vídeo", + "video.mute": "Acalar son", + "video.pause": "Pausar", + "video.play": "Reproducir", + "video.unmute": "Permitir son" +} diff --git a/app/javascript/mastodon/locales/he.json b/app/javascript/mastodon/locales/he.json index ec1e30dd5..5444c8e34 100644 --- a/app/javascript/mastodon/locales/he.json +++ b/app/javascript/mastodon/locales/he.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "טוען...", "media_gallery.toggle_visible": "נראה\\בלתי נראה", diff --git a/app/javascript/mastodon/locales/hr.json b/app/javascript/mastodon/locales/hr.json index c21482670..f70c66223 100644 --- a/app/javascript/mastodon/locales/hr.json +++ b/app/javascript/mastodon/locales/hr.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Učitavam...", "media_gallery.toggle_visible": "Preklopi vidljivost", diff --git a/app/javascript/mastodon/locales/hu.json b/app/javascript/mastodon/locales/hu.json index 71dd810b6..7cb816fe9 100644 --- a/app/javascript/mastodon/locales/hu.json +++ b/app/javascript/mastodon/locales/hu.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Betöltés...", "media_gallery.toggle_visible": "Toggle visibility", diff --git a/app/javascript/mastodon/locales/id.json b/app/javascript/mastodon/locales/id.json index 744423e78..429b77182 100644 --- a/app/javascript/mastodon/locales/id.json +++ b/app/javascript/mastodon/locales/id.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Tunggu sebentar...", "media_gallery.toggle_visible": "Tampil/Sembunyikan", diff --git a/app/javascript/mastodon/locales/io.json b/app/javascript/mastodon/locales/io.json index b1523e626..3e5c8edb9 100644 --- a/app/javascript/mastodon/locales/io.json +++ b/app/javascript/mastodon/locales/io.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Kargante...", "media_gallery.toggle_visible": "Chanjar videbleso", diff --git a/app/javascript/mastodon/locales/it.json b/app/javascript/mastodon/locales/it.json index 9a2d320fd..e2ad1632a 100644 --- a/app/javascript/mastodon/locales/it.json +++ b/app/javascript/mastodon/locales/it.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Carico...", "media_gallery.toggle_visible": "Imposta visibilità", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index e015c41c2..652257aa1 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -24,7 +24,7 @@ "account.unmute": "ミュート解除", "account.unmute_notifications": "@{name}さんからの通知を受け取らない", "account.view_full_profile": "全ての情報を見る", - "boost_modal.combo": "次からは{combo}を押せば、これをスキップできます。", + "boost_modal.combo": "次からは{combo}を押せば、これをスキップできます", "bundle_column_error.body": "コンポーネントの読み込み中に問題が発生しました。", "bundle_column_error.retry": "再試行", "bundle_column_error.title": "ネットワークエラー", diff --git a/app/javascript/mastodon/locales/ko.json b/app/javascript/mastodon/locales/ko.json index 3f47baa76..472a52a99 100644 --- a/app/javascript/mastodon/locales/ko.json +++ b/app/javascript/mastodon/locales/ko.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "불러오는 중...", "media_gallery.toggle_visible": "표시 전환", diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index 26e86308d..87261d7cd 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -7,6 +7,7 @@ "account.followers": "Volgers", "account.follows": "Volgt", "account.follows_you": "Volgt jou", + "account.hide_reblogs": "Verberg boosts van @{name}", "account.media": "Media", "account.mention": "Vermeld @{name}", @@ -107,22 +108,22 @@ "home.column_settings.show_reblogs": "Boosts tonen", "home.column_settings.show_replies": "Reacties tonen", "home.settings": "Kolom-instellingen", - "keyboard_shortcuts.back": "om terug te navigeren", + "keyboard_shortcuts.back": "om terug te gaan", "keyboard_shortcuts.boost": "om te boosten", - "keyboard_shortcuts.column": "om te focussen op een status in één van de kolommen", - "keyboard_shortcuts.compose": "om te focussen op het toot tekstvak", - "keyboard_shortcuts.description": "Description", + "keyboard_shortcuts.column": "om op een toot te focussen in één van de kolommen", + "keyboard_shortcuts.compose": "om het tekstvak voor toots te focussen", + "keyboard_shortcuts.description": "Omschrijving", "keyboard_shortcuts.down": "om naar beneden door de lijst te bewegen", "keyboard_shortcuts.enter": "to open status", - "keyboard_shortcuts.favourite": "om het te markeren als favoriet", - "keyboard_shortcuts.heading": "Keyboard Shortcuts", + "keyboard_shortcuts.favourite": "om als favoriet te markeren", + "keyboard_shortcuts.heading": "Sneltoetsen", "keyboard_shortcuts.hotkey": "Sneltoets", "keyboard_shortcuts.legend": "om deze legenda weer te geven", "keyboard_shortcuts.mention": "om de auteur te vermelden", - "keyboard_shortcuts.reply": "om te antwoorden", - "keyboard_shortcuts.search": "om te focussen op zoeken", + "keyboard_shortcuts.reply": "om te reageren", + "keyboard_shortcuts.search": "om het zoekvak te focussen", "keyboard_shortcuts.toot": "om een nieuwe toot te starten", - "keyboard_shortcuts.unfocus": "om te ontfocussen van het toot tekstvak/zoeken", + "keyboard_shortcuts.unfocus": "om het tekst- en zoekvak te ontfocussen", "keyboard_shortcuts.up": "om omhoog te bewegen in de lijst", "lightbox.close": "Sluiten", "lightbox.next": "Volgende", @@ -133,7 +134,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Laden…", "media_gallery.toggle_visible": "Media wel/niet tonen", @@ -204,7 +205,7 @@ "reply_indicator.cancel": "Annuleren", "report.placeholder": "Extra opmerkingen", "report.submit": "Verzenden", - "report.target": "Rapporteren van", + "report.target": "Rapporteer {target}", "search.placeholder": "Zoeken", "search_popout.search_format": "Geavanceerd zoeken", "search_popout.tips.hashtag": "hashtag", diff --git a/app/javascript/mastodon/locales/no.json b/app/javascript/mastodon/locales/no.json index 233b6c946..bf2b6259a 100644 --- a/app/javascript/mastodon/locales/no.json +++ b/app/javascript/mastodon/locales/no.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Laster...", "media_gallery.toggle_visible": "Veksle synlighet", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index 1df27d536..6bac65865 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -109,21 +109,21 @@ "home.settings": "Configurações de colunas", "keyboard_shortcuts.back": "para navegar de volta", "keyboard_shortcuts.boost": "para compartilhar", - "keyboard_shortcuts.column": "to focus a status in one of the columns", + "keyboard_shortcuts.column": "Focar um status em uma das colunas", "keyboard_shortcuts.compose": "to focus the compose textarea", "keyboard_shortcuts.description": "Description", - "keyboard_shortcuts.down": "to move down in the list", + "keyboard_shortcuts.down": "para mover para baixo na lista", "keyboard_shortcuts.enter": "to open status", - "keyboard_shortcuts.favourite": "to favourite", + "keyboard_shortcuts.favourite": "para adicionar aos favoritos", "keyboard_shortcuts.heading": "Keyboard Shortcuts", - "keyboard_shortcuts.hotkey": "Hotkey", - "keyboard_shortcuts.legend": "to display this legend", - "keyboard_shortcuts.mention": "to mention author", - "keyboard_shortcuts.reply": "to reply", - "keyboard_shortcuts.search": "to focus search", - "keyboard_shortcuts.toot": "to start a brand new toot", - "keyboard_shortcuts.unfocus": "to un-focus compose textarea/search", - "keyboard_shortcuts.up": "to move up in the list", + "keyboard_shortcuts.hotkey": "Atalho", + "keyboard_shortcuts.legend": "para mostrar essa legenda", + "keyboard_shortcuts.mention": "para mencionar o autor", + "keyboard_shortcuts.reply": "para responder", + "keyboard_shortcuts.search": "para focar a pesquisa", + "keyboard_shortcuts.toot": "para compor um novo toot", + "keyboard_shortcuts.unfocus": "para remover o foco da área de composição/pesquisa", + "keyboard_shortcuts.up": "para mover para cima na lista", "lightbox.close": "Fechar", "lightbox.next": "Próximo", "lightbox.previous": "Anterior", @@ -133,19 +133,19 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Carregando...", "media_gallery.toggle_visible": "Esconder/Mostrar", "missing_indicator.label": "Não encontrado", - "mute_modal.hide_notifications": "Hide notifications from this user?", + "mute_modal.hide_notifications": "Esconder notificações deste usuário?", "navigation_bar.blocks": "Usuários bloqueados", "navigation_bar.community_timeline": "Local", "navigation_bar.edit_profile": "Editar perfil", "navigation_bar.favourites": "Favoritos", "navigation_bar.follow_requests": "Seguidores pendentes", "navigation_bar.info": "Mais informações", - "navigation_bar.keyboard_shortcuts": "Keyboard shortcuts", + "navigation_bar.keyboard_shortcuts": "Atalhos de teclado", "navigation_bar.lists": "Lists", "navigation_bar.logout": "Sair", "navigation_bar.mutes": "Usuários silenciados", @@ -220,7 +220,7 @@ "status.load_more": "Carregar mais", "status.media_hidden": "Mídia escondida", "status.mention": "Mencionar @{name}", - "status.more": "More", + "status.more": "Mais", "status.mute_conversation": "Silenciar conversa", "status.open": "Expandir", "status.pin": "Fixar no perfil", @@ -241,7 +241,7 @@ "tabs_bar.home": "Página inicial", "tabs_bar.local_timeline": "Local", "tabs_bar.notifications": "Notificações", - "ui.beforeunload": "Your draft will be lost if you leave Mastodon.", + "ui.beforeunload": "Seu rascunho será perdido se você sair do Mastodon.", "upload_area.title": "Arraste e solte para enviar", "upload_button.label": "Adicionar mídia", "upload_form.description": "Descreva a imagem para deficientes visuais", diff --git a/app/javascript/mastodon/locales/pt.json b/app/javascript/mastodon/locales/pt.json index 3d3e19571..728fb3a10 100644 --- a/app/javascript/mastodon/locales/pt.json +++ b/app/javascript/mastodon/locales/pt.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "A carregar...", "media_gallery.toggle_visible": "Esconder/Mostrar", diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json index 0aef2d9df..e9925b675 100644 --- a/app/javascript/mastodon/locales/ru.json +++ b/app/javascript/mastodon/locales/ru.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Загрузка...", "media_gallery.toggle_visible": "Показать/скрыть", diff --git a/app/javascript/mastodon/locales/sv.json b/app/javascript/mastodon/locales/sv.json index 53090452f..9d9646509 100644 --- a/app/javascript/mastodon/locales/sv.json +++ b/app/javascript/mastodon/locales/sv.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Laddar...", "media_gallery.toggle_visible": "Växla synlighet", diff --git a/app/javascript/mastodon/locales/th.json b/app/javascript/mastodon/locales/th.json index 2f064a193..cc18a6096 100644 --- a/app/javascript/mastodon/locales/th.json +++ b/app/javascript/mastodon/locales/th.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Loading...", "media_gallery.toggle_visible": "Toggle visibility", diff --git a/app/javascript/mastodon/locales/tr.json b/app/javascript/mastodon/locales/tr.json index be8103d1c..c51f3e417 100644 --- a/app/javascript/mastodon/locales/tr.json +++ b/app/javascript/mastodon/locales/tr.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Yükleniyor...", "media_gallery.toggle_visible": "Görünürlüğü değiştir", diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json index 273661462..86c0ce76d 100644 --- a/app/javascript/mastodon/locales/uk.json +++ b/app/javascript/mastodon/locales/uk.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "Завантаження...", "media_gallery.toggle_visible": "Показати/приховати", diff --git a/app/javascript/mastodon/locales/whitelist_gl.json b/app/javascript/mastodon/locales/whitelist_gl.json new file mode 100644 index 000000000..0d4f101c7 --- /dev/null +++ b/app/javascript/mastodon/locales/whitelist_gl.json @@ -0,0 +1,2 @@ +[ +] diff --git a/app/javascript/mastodon/locales/zh-HK.json b/app/javascript/mastodon/locales/zh-HK.json index dbb9584c6..15a68c915 100644 --- a/app/javascript/mastodon/locales/zh-HK.json +++ b/app/javascript/mastodon/locales/zh-HK.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "載入中...", "media_gallery.toggle_visible": "打開或關上", diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json index 0b05a83cd..1bdc883a8 100644 --- a/app/javascript/mastodon/locales/zh-TW.json +++ b/app/javascript/mastodon/locales/zh-TW.json @@ -133,7 +133,7 @@ "lists.edit": "Edit list", "lists.new.create": "Add list", "lists.new.title_placeholder": "New list title", - "lists.search": "Search among follows", + "lists.search": "Search among people you follow", "lists.subheading": "Your lists", "loading_indicator.label": "讀取中...", "media_gallery.toggle_visible": "切換可見性", diff --git a/config/locales/ar.yml b/config/locales/ar.yml index a96b353c1..cc9594179 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -57,6 +57,19 @@ ar: order: title: الترتيب profile_url: رابط الملف الشخصي + custom_emojis: + delete: حذف + email_domain_blocks: + delete: حذف + reports: + delete: حذف + settings: + registrations: + deletion: + desc_html: السماح لأي مستخدم إغلاق حسابه + statuses: + batch: + delete: حذف application_mailer: settings: 'تغيير تفضيلات البريد الإلكتروني : %{link}' signature: إشعارات ماستدون من %{instance} @@ -65,6 +78,7 @@ ar: invalid_url: إن الرابط المقدم غير صالح auth: change_password: الهوية + delete_account: حذف حساب didnt_get_confirmation: لم تتلق تعليمات التأكيد ؟ forgot_password: نسيت كلمة المرور ؟ login: تسجيل الدخول @@ -91,6 +105,8 @@ ar: x_minutes: "%{count}د" x_months: "%{count} شه" x_seconds: "%{count}ث" + deletes: + proceed: حذف حساب exports: blocks: قمت بحظر csv: CSV @@ -197,7 +213,7 @@ ar: recovery_codes: النسخ الإحتياطي لرموز الإسترجاع recovery_codes_regenerated: تم إعادة توليد رموز الإسترجاع الإحتياطية بنجاح setup: تنشيط - wrong_code: الرمز الذي أدخلته غير صالح. تحقق من صحة الوقت على الخادم و الجهاز. + wrong_code: الرمز الذي أدخلته غير صالح ! تحقق من صحة الوقت على الخادم و الجهاز ؟ users: invalid_email: عنوان البريد الإلكتروني غير صالح invalid_otp_token: الرمز الثنائي غير صالح diff --git a/config/locales/de.yml b/config/locales/de.yml index 470395767..39867e373 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -49,7 +49,7 @@ de: reserved_username: Dieser Profilname ist belegt roles: admin: Admin - moderator: Mod + moderator: Moderator unfollow: Entfolgen admin: account_moderation_notes: @@ -174,6 +174,7 @@ de: shortcode: Shortcode shortcode_hint: Mindestens 2 Zeichen, nur Buchstaben, Ziffern und Unterstriche title: Eigene Emojis + updated_msg: Emoji erfolgreich aktualisiert! upload: Hochladen domain_blocks: add_new: Neu hinzufügen @@ -223,6 +224,13 @@ de: reset: Zurücksetzen search: Suchen title: Bekannte Instanzen + invites: + filter: + all: Alle + available: Verfügbar + expired: Ausgelaufen + title: Filter + title: Einladungen reports: action_taken_by: Maßnahme ergriffen durch are_you_sure: Bist du dir sicher? @@ -261,6 +269,8 @@ de: deletion: desc_html: Allen erlauben, ihr Konto eigenmächtig zu löschen title: Kontolöschung erlauben + min_invite_role: + disabled: Niemand open: desc_html: Allen erlauben, ein Konto zu erstellen title: Registrierung öffnen @@ -412,12 +422,31 @@ de: following: Folgeliste muting: Stummschaltungsliste upload: Hochladen + invites: + delete: Deaktivieren + expires_in: + '1800': 30 Minuten + '21600': 6 Stunden + '3600': 1 Stunde + '43200': 12 Stunden + '86400': 1 Tag + expires_in_prompt: Nie + generate: Generieren + max_uses: + one: 1 mal verwendet + other: "%{count} mal verwendet" + max_uses_prompt: Kein Limit landing_strip_html: "%{name} hat ein Profil auf %{link_to_root_path}. Du kannst folgen oder interagieren, sofern du ein Konto irgendwo im Fediversum hast." landing_strip_signup_html: Wenn nicht, kannst du dich hier anmelden. media_attachments: validations: images_and_video: Es kann kein Video an einen Beitrag, der bereits Bilder enthält, angehängt werden too_many: Es können nicht mehr als 4 Bilder angehängt werden + migrations: + acct: benutzername@domain des neuen Accounts + proceed: Speichern + moderation: + title: Moderation notification_mailer: digest: body: 'Hier ist eine kurze Zusammenfasung dessen, was du auf %{instance} seit deinem letzten Besuch am %{since} verpasst hast:' diff --git a/config/locales/devise.ja.yml b/config/locales/devise.ja.yml index aa333920e..2cd20732f 100644 --- a/config/locales/devise.ja.yml +++ b/config/locales/devise.ja.yml @@ -51,11 +51,11 @@ ja: unlocked: アカウントロックは正常に解除されました。続行するにはログインしてください。 errors: messages: - already_confirmed: は確認されました。ログインを試してください。 - confirmation_period_expired: "%{period}以内に確認が必要です。再度試してください。" - expired: は期限切れです。再度試してください。 - not_found: 見つかりません。 - not_locked: ロックされていません。 + already_confirmed: は確認されました。ログインを試してください + confirmation_period_expired: "%{period}以内に確認が必要です。再度試してください" + expired: は期限切れです。再度試してください + not_found: 見つかりません + not_locked: ロックされていません not_saved: one: エラーが発生したため、%{resource}の保存に失敗しました。 other: "%{count}個のエラーが発生したため、保存に失敗しました。 %{resource}" diff --git a/config/locales/devise.no.yml b/config/locales/devise.no.yml index 1bb14d265..5d3e71495 100644 --- a/config/locales/devise.no.yml +++ b/config/locales/devise.no.yml @@ -34,7 +34,7 @@ updated: Passordet ditt er endret. Du er nå logget inn. updated_not_active: Passordet ditt er endret. registrations: - destroyed: Adjø! Kontoen din er slettet. På gjensyn! + destroyed: Adjø! Kontoen din er slettet. På gjensyn. signed_up: Velkommen! Registreringen var vellykket. signed_up_but_inactive: Registreringen var vellykket. Vi kunne dessverre ikke logge deg inn fordi kontoen din ennå ikke har blitt aktivert. signed_up_but_locked: Registreringen var vellykket. Vi kunne dessverre ikke logge deg inn fordi kontoen din har blitt låst. @@ -51,8 +51,8 @@ unlocked: Kontoen din ble åpnet uten problemer. Logg på for å fortsette. errors: messages: - already_confirmed: har allerede blitt bekreftet, prøv å logge på istedet. - confirmation_period_expired: må bekreftes innen %{period}. Spør om en ny e-mail for bekreftelse istedet. + already_confirmed: har allerede blitt bekreftet, prøv å logge på istedet + confirmation_period_expired: må bekreftes innen %{period}. Spør om en ny e-post for bekreftelse istedet expired: har utløpt, spør om en ny en istedet not_found: ikke funnet not_locked: var ikke låst diff --git a/config/locales/doorkeeper.ar.yml b/config/locales/doorkeeper.ar.yml index 1925d5a65..107677837 100644 --- a/config/locales/doorkeeper.ar.yml +++ b/config/locales/doorkeeper.ar.yml @@ -5,6 +5,8 @@ ar: doorkeeper/application: name: التسمية redirect_uri: Redirect URI + scopes: المجالات + website: تطبيق الويب errors: models: doorkeeper/application: @@ -33,9 +35,13 @@ ar: redirect_uri: إستخدم خطا واحدا لكل رابط scopes: Separate scopes with spaces. Leave blank to use the default scopes. index: + application: تطبيق callback_url: رابط رد النداء + delete: حذف name: التسمية new: تطبيق جديد + scopes: المجالات + show: عرض title: تطبيقاتك new: title: تطبيق جديد @@ -43,7 +49,7 @@ ar: actions: Actions application_id: معرف التطبيق callback_urls: روابط رد النداء - scopes: Scopes + scopes: المجالات secret: السر title: 'تطبيق : %{name}' authorizations: @@ -67,7 +73,7 @@ ar: application: التطبيق created_at: صُرّح له في date_format: "%d-%m-%Y %H:%M:%S" - scopes: Scopes + scopes: المجالات title: تطبيقاتك المرخص لها errors: messages: diff --git a/config/locales/doorkeeper.ja.yml b/config/locales/doorkeeper.ja.yml index 1f145eaa3..96956c60f 100644 --- a/config/locales/doorkeeper.ja.yml +++ b/config/locales/doorkeeper.ja.yml @@ -29,10 +29,10 @@ ja: edit: title: アプリの編集 form: - error: フォームにエラーが無いか確認してください。 + error: フォームにエラーが無いか確認してください help: native_redirect_uri: ローカルテストに %{native_redirect_uri} を使用 - redirect_uri: 一行に一つのURLを入力してください。 + redirect_uri: 一行に一つのURLを入力してください scopes: アクセス権は半角スペースで区切ることができます。 空白のままにするとデフォルトを使用します。 index: application: アプリ @@ -57,11 +57,11 @@ ja: authorize: 承認 deny: 拒否 error: - title: エラーが発生しました。 + title: エラーが発生しました new: able_to: このアプリは以下のことができます - prompt: アプリ %{client_name} があなたのアカウントへのアクセスを要求しています。 - title: 認証が必要です。 + prompt: アプリ %{client_name} があなたのアカウントへのアクセスを要求しています + title: 認証が必要です show: title: 認証コードをコピーしてアプリに貼り付けて下さい。 authorized_applications: @@ -83,12 +83,12 @@ ja: invalid_grant: 指定された認証許可は無効であるか、期限切れ、取り消されている、リダイレクトURIの不一致、または別のクライアントに発行されています。 invalid_redirect_uri: 無効なリダイレクトURIが含まれています。 invalid_request: リクエストに必要なパラメータが欠けているか、サポートされていないパラメータが含まれている、または不正なフォーマットです。 - invalid_resource_owner: 指定されたリソース所有者のクレデンシャルが無効であるか、リソース所有者が見つかりません。 + invalid_resource_owner: 指定されたリソース所有者のクレデンシャルが無効であるか、リソース所有者が見つかりません invalid_scope: 要求されたアクセス権は無効であるか、不明、または不正なフォーマットです。 invalid_token: expired: アクセストークンの有効期限が切れています - revoked: アクセストークンは取り消されています。 - unknown: アクセストークンが無効です。 + revoked: アクセストークンは取り消されています + unknown: アクセストークンが無効です resource_owner_authenticator_not_configured: Doorkeeper.configure.resource_owner_authenticator が設定されていないため、リソース所有者の検索に失敗しました。 server_error: 認証サーバーに予期せぬ例外が発生したため、リクエストを実行できなくなりました。 temporarily_unavailable: 現在、認証サーバーに一時的な過負荷が掛かっているか、またはメンテナンス中のため、リクエストを処理できません。 diff --git a/config/locales/doorkeeper.nl.yml b/config/locales/doorkeeper.nl.yml index 3dd0a7d26..5c9c9047f 100644 --- a/config/locales/doorkeeper.nl.yml +++ b/config/locales/doorkeeper.nl.yml @@ -60,10 +60,10 @@ nl: title: Er is een fout opgetreden new: able_to: Deze toepassing zal in staat zijn om - prompt: "%{client_name} autoriseren om je account te gebruiken" + prompt: "%{client_name} autoriseren om jouw account te gebruiken" title: Autorisatie vereist show: - title: Kopieer deze autorisatiecode en plak het in de applicatie. + title: Kopieer deze autorisatiecode en plak het in de toepassing. authorized_applications: buttons: revoke: Intrekken diff --git a/config/locales/doorkeeper.no.yml b/config/locales/doorkeeper.no.yml index ba061e0ca..5b4dc9d6c 100644 --- a/config/locales/doorkeeper.no.yml +++ b/config/locales/doorkeeper.no.yml @@ -5,6 +5,7 @@ doorkeeper/application: name: Navn redirect_uri: Omdirigerings-URI + website: Applikasjonsnettside errors: models: doorkeeper/application: @@ -33,9 +34,12 @@ redirect_uri: Bruk én linje per URI scopes: Adskill omfang med mellomrom. La det være blankt for å bruke standard omfang. index: + application: Applikasjon callback_url: Callback-URL + delete: Fjern name: Navn new: Ny applikasjon + show: Vis title: Dine applikasjoner new: title: Nye applikasjoner @@ -57,7 +61,7 @@ prompt: Applikasjon %{client_name} spør om tilgang til din konto title: Autorisasjon påkrevd show: - title: Copy this authorization code and paste it to the application. + title: Kopier denne koden og lim den inn i programmet. authorized_applications: buttons: revoke: Opphev @@ -77,7 +81,7 @@ invalid_grant: Autoriseringen er ugyldig, utløpt, opphevet, stemmer ikke overens med omdirigerings-URIen eller var utstedt til en annen klient. invalid_redirect_uri: Den inkluderte omdirigerings-URLen er ikke gyldig. invalid_request: Forespørslen mangler en eller flere parametere, inkluderte en parameter som ikke støttes eller har feil struktur. - invalid_resource_owner: Ressurseierens detaljer er ikke gyldige, eller så kan ikke eieren finnes. + invalid_resource_owner: Ressurseierens detaljer er ikke gyldige, eller så er det ikke mulig å finne eieren invalid_scope: Det etterspurte omfanget er ugyldig, ukjent eller har feil struktur. invalid_token: expired: Tilgangsbeviset har utløpt diff --git a/config/locales/fr.yml b/config/locales/fr.yml index cd97f5967..278cb053d 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -454,7 +454,7 @@ fr: table: expires_at: Expire uses: Utilise - title: Personnes invitées + title: Inviter des gens landing_strip_html: %{name} utilise %{link_to_root_path}. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse". landing_strip_signup_html: Si ce n’est pas le cas, vous pouvez en créer un ici. media_attachments: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 38f5da5a9..193be00f7 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -24,7 +24,7 @@ ja: within_reach_body: デベロッパーフレンドリーな API により実現された、iOS や Android、その他様々なプラットフォームのためのアプリでどこでも友人とやりとりできます。 within_reach_title: いつでも身近に find_another_instance: 他のインスタンスを探す - generic_description: "%{domain} は、Mastodon インスタンスの一つです。" + generic_description: "%{domain} は、Mastodon インスタンスの一つです" hosted_on: Mastodon hosted on %{domain} learn_more: もっと詳しく other_instances: 他のインスタンス @@ -40,13 +40,13 @@ ja: following: フォロー中 media: メディア moved_html: "%{name} さんは引っ越しました %{new_profile_link}:" - nothing_here: 何もありません + nothing_here: 何もありません! people_followed_by: "%{name} さんがフォロー中のアカウント" people_who_follow: "%{name} さんをフォロー中のアカウント" posts: トゥート posts_with_replies: トゥートと返信 remote_follow: リモートフォロー - reserved_username: このユーザー名は予約されています。 + reserved_username: このユーザー名は予約されています roles: admin: Admin moderator: Mod @@ -56,9 +56,9 @@ ja: account: モデレータ create: 書き込む created_at: 日付 - created_msg: モデレーションメモを書き込みました + created_msg: モデレーションメモを書き込みました! delete: 削除 - destroyed_msg: モデレーションメモを削除しました + destroyed_msg: モデレーションメモを削除しました! accounts: are_you_sure: 本当に実行しますか? by_domain: ドメイン @@ -163,25 +163,25 @@ ja: copied_msg: 絵文字のコピーをローカルに作成しました copy: コピー copy_failed_msg: 絵文字のコピーをローカルに作成できませんでした - created_msg: 絵文字の追加に成功しました + created_msg: 絵文字の追加に成功しました! delete: 削除 - destroyed_msg: 絵文字の削除に成功しました + destroyed_msg: 絵文字の削除に成功しました! disable: 無効化 disabled_msg: 絵文字を無効化しました emoji: 絵文字 enable: 有効化 enabled_msg: 絵文字を有効化しました - image_hint: 50KBまでのPNG画像を利用できます。 + image_hint: 50KBまでのPNG画像を利用できます listed: 収載 new: title: 新規カスタム絵文字の追加 overwrite: 上書き shortcode: ショートコード - shortcode_hint: 2文字以上の半角英数字とアンダーバーのみ利用できます。 + shortcode_hint: 2文字以上の半角英数字とアンダーバーのみ利用できます title: カスタム絵文字 unlisted: 未収載 update_failed_msg: 絵文字を更新できませんでした - updated_msg: 絵文字の更新に成功しました + updated_msg: 絵文字の更新に成功しました! upload: アップロード domain_blocks: add_new: 新規追加 diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 2410c1112..c72b092a3 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -85,9 +85,9 @@ nl: local: Lokaal remote: Extern title: Locatie - login_status: Aanmeld status - media_attachments: Media-bijlagen - memorialize: Verander in memoriam + login_status: Aanmeldstatus + media_attachments: Mediabijlagen + memorialize: Verander naar in memoriam moderation: all: Alles silenced: Genegeerd @@ -115,8 +115,8 @@ nl: role: Permissies roles: admin: Beheerder - moderator: Moderateur - user: Persoon + moderator: Moderator + user: Gebruiker salmon_url: Salmon-URL search: Zoeken shared_inbox_url: Gedeelde inbox-URL @@ -135,22 +135,30 @@ nl: web: Webapp action_logs: actions: - confirm_user: "%{name} bevestigd e-mailadres van persoon %{target}" - create_custom_emoji: "%{name} heeft de nieuwe emoji %{target} geupload" - create_domain_block: "%{name} heeft domein %{target} geblokkeerd" - create_email_domain_block: "%{name} heeft e-maildomein %{target} geblacklist" - demote_user: "%{name} heeft persoon %{target} gedegradeerd" - destroy_domain_block: "%{name} heeft domein %{target} vrijgegeven" - destroy_email_domain_block: "%{name} heeft e-maildomein %{target} gewhitelist" - destroy_status: "%{name} heeft status van %{target} verwijderd" - disable_2fa_user: "%{name} heeft tweefactor voorwaarden van persoon %{target} uitgeschakeld" - disable_custom_emoji: "%{name} heeft emoji %{target} uitgeschakeld" - disable_user: "%{name} heeft de login van persoon %{target} uitgeschakeld" - enable_custom_emoji: "%{name} heeft emoji %{target} ingeschakeld" - enable_user: "%{name} heeft de login voor persoon %{target} ingeschakeld" - memorialize_account: "%{name} heeft %{target}'s account gewijzigd in een memoriam pagina" - promote_user: "%{name} heeft persoon %{target} gepromoveerd" - reset_password_user: "%{name} heeft het wachtwoord van gebruiker %{target} opnieuw ingesteld" + confirm_user: E-mailadres van gebruiker %{target} is door %{name} bevestigd + create_custom_emoji: Nieuwe emoji %{target} is door %{name} geüpload + create_domain_block: Domein %{target} is door %{name} geblokkeerd + create_email_domain_block: E-maildomein %{target} is door %{name} op de zwarte lijst geplaatst + demote_user: Gebruiker %{target} is door %{name} gedegradeerd + destroy_domain_block: Domein %{target} is door %{name} gedeblokkeerd + destroy_email_domain_block: E-maildomein %{target} is door %{name} op de whitelist geplaatst + destroy_status: Toot van %{target} is door %{name} verwijderd + disable_2fa_user: Vereisten tweestapsverificatie van %{target} zijn door %{name} uitgeschakeld + disable_custom_emoji: Emoji %{target} is door %{name} uitgeschakeld + disable_user: Inloggen voor %{target} is door %{name} uitgeschakeld + enable_custom_emoji: Emoji %{target} is door %{name} ingeschakeld + enable_user: Inloggen voor %{target} is door %{name} ingeschakeld + memorialize_account: Account %{target} is door %{name} in een in-memoriampagina veranderd + promote_user: Gebruiker %{target} is door %{name} gepromoveerd + reset_password_user: Wachtwoord van gebruiker %{target} is door %{name} opnieuw ingesteld + resolve_report: Gerapporteerde toots van %{target} zijn door %{name} verworpen + silence_account: Account %{target} is door %{name} genegeerd + suspend_account: Account %{target} is door %{name} opgeschort + unsilence_account: Negeren van account %{target} is door %{name} opgeheven + unsuspend_account: Opschorten van account %{target} is door %{name} opgeheven + update_custom_emoji: Emoji %{target} is door %{name} bijgewerkt + update_status: De toots van %{target} zijn door %{name} bijgewerkt + title: Auditlog custom_emojis: copied_msg: Lokale kopie van emoji maken geslaagd copy: Kopiëren @@ -164,11 +172,16 @@ nl: enable: Inschakelen enabled_msg: Inschakelen van deze emoji geslaagd image_hint: PNG van max. 50KB + listed: Weergegeven new: title: Lokale emoji toevoegen + overwrite: Overschrijven shortcode: Shortcode shortcode_hint: Tenminste 2 tekens (alleen alfanumeriek en underscores) title: Lokale emoji’s + unlisted: Niet weergegeven + update_failed_msg: Deze emoji kon niet worden bijgewerkt + updated_msg: Bijwerken van emoji is geslaagd! upload: Uploaden domain_blocks: add_new: Nieuwe toevoegen @@ -185,7 +198,7 @@ nl: suspend: Opschorten title: Nieuwe domeinblokkade reject_media: Mediabestanden verwerpen - reject_media_hint: Verwijderd lokaal opgeslagen mediabestanden en weigert deze in de toekomst te downloaden. Irrelevant voor opgeschorte domeinen. + reject_media_hint: Verwijderd lokaal opgeslagen mediabestanden en weigert deze in de toekomst te downloaden. Irrelevant voor opgeschorte domeinen severities: noop: Geen silence: Negeren @@ -197,7 +210,7 @@ nl: other: "%{count} accounts in de database aangepast" retroactive: silence: Alle genegeerde accounts van dit domein niet meer negeren - suspend: Alle opgeschorste accounts van dit domein niet meer opschorten + suspend: Alle opgeschorte accounts van dit domein niet meer opschorten title: Domeinblokkade voor %{domain} ongedaan maken undo: Ongedaan maken title: Domeinblokkades @@ -218,6 +231,13 @@ nl: reset: Opnieuw search: Zoeken title: Bekende servers + invites: + filter: + all: Alles + available: Beschikbaar + expired: Verlopen + title: Filter + title: Uitnodigingen reports: action_taken_by: Actie uitgevoerd door are_you_sure: Weet je het zeker? @@ -256,21 +276,27 @@ nl: deletion: desc_html: Toestaan dat iedereen hun eigen account kan verwijderen title: Verwijderen account toestaan + min_invite_role: + disabled: Niemand + title: Uitnodigingen toestaan door open: desc_html: Toestaan dat iedereen een account kan registereren title: Open registratie + show_staff_badge: + desc_html: Medewerkersbadge op profielpagina tonen + title: Medewerkersbadge tonen site_description: - desc_html: Dit wordt als een alinea op de voorpagina getoond en gebruikt als meta-tag in de paginabron.
Je kan HTML gebruiken, zoals <a> en <em>. + desc_html: Dit wordt als een alinea op de voorpagina getoond en gebruikt als meta-tag in de paginabron.
Je kan HTML gebruiken, zoals <a> en <em>. title: Omschrijving Mastodon-server site_description_extended: desc_html: Wordt op de uitgebreide informatiepagina weergegeven
Je kan ook hier HTML gebruiken title: Uitgebreide omschrijving Mastodon-server site_terms: - desc_html: Je kan hier jouw eigen privacybeleid, gebruikersvoorwaarden en ander juridisch jargon kwijt. Je kan HTML gebruiken. + desc_html: Je kan hier jouw eigen privacybeleid, gebruikersvoorwaarden en ander juridisch jargon kwijt. Je kan HTML gebruiken title: Aangepaste gebruikersvoorwaarden site_title: Naam Mastodon-server thumbnail: - desc_html: Gebruikt als voorvertoning voor OpenGraph en de API. 1200x630px aanbevolen. + desc_html: Gebruikt als voorvertoning voor OpenGraph en de API. 1200x630px aanbevolen title: Thumbnail Mastodon-server timeline_preview: desc_html: Toon de openbare tijdlijn op de startpagina @@ -326,6 +352,8 @@ nl: invalid_reset_password_token: De code om jouw wachtwoord opnieuw in te stellen is verlopen. Vraag een nieuwe aan. login: Aanmelden logout: Afmelden + migrate_account: Naar een andere account verhuizen + migrate_account_html: Wanneer je dit account naar een ander account wilt doorverwijzen, kun je dit hier instellen. register: Registreren resend_confirmation: Verstuur de bevestigingsinstructies nogmaals reset_password: Wachtwoord opnieuw instellen @@ -369,7 +397,7 @@ nl: '422': content: Veiligheidsverificatie mislukt. Blokkeer je toevallig cookies? title: Veiligheidsverificatie mislukt - '429': Te veel verbindingsaanvragen. + '429': Te veel verbindingsaanvragen '500': content: Het spijt ons, er is aan onze kant iets fout gegaan. title: Er is iets mis @@ -407,12 +435,40 @@ nl: following: Volglijst muting: Negeerlijst upload: Uploaden + in_memoriam_html: In memoriam. + invites: + delete: Deactiveren + expired: Verlopen + expires_in: + '1800': 30 minuten + '21600': 6 uur + '3600': 1 uur + '43200': 12 uur + '86400': 1 dag + expires_in_prompt: Nooit + generate: Genereren + max_uses: + one: 1 keer + other: "%{count} keer" + max_uses_prompt: Onbeperkt + prompt: Genereer en deel speciale links om mensen toegang tot deze Mastodon-server te geven + table: + expires_at: Verloopt op + uses: Aantal keer te gebruiken + title: Mensen uitnodigen landing_strip_html: "%{name} is een gebruiker op %{link_to_root_path}. Je kunt deze volgen en ermee communiceren als je op Mastodon (of ergens anders in de fediverse) een account hebt." landing_strip_signup_html: Als je dat niet hebt, kun je je hier registreren. media_attachments: validations: images_and_video: Een video kan niet aan een toot met afbeeldingen worden gekoppeld too_many: Er kunnen niet meer dan 4 afbeeldingen toegevoegd worden + migrations: + acct: gebruikersnaam@domein van het nieuwe account + currently_redirecting: 'Jouw profiel wordt nu doorverwezen naar:' + proceed: Opslaan + updated_msg: Jouw accountmigratie-instelling is succesvol bijgewerkt! + moderation: + title: Moderatie notification_mailer: digest: body: 'Hier is een korte samenvatting van wat je hebt gemist op %{instance} sinds jouw laatste bezoek op %{since}:' @@ -448,7 +504,7 @@ nl: quadrillion: Q thousand: K trillion: T - unit: '' + unit: " " pagination: next: Volgende prev: Vorige @@ -525,6 +581,7 @@ nl: export: Exporteren followers: Geautoriseerde volgers import: Importeren + migrate: Accountmigratie notifications: Meldingen preferences: Voorkeuren settings: Instellingen @@ -621,6 +678,8 @@ nl:

Originally adapted from the Discourse privacy policy.

title: "%{instance} Terms of Service and Privacy Policy" + themes: + default: Mastodon time: formats: default: "%d %B %Y om %H:%M" @@ -637,7 +696,7 @@ nl: manual_instructions: Hieronder vind je de geheime code in platte tekst. Voor het geval je de QR-code niet kunt scannen en het handmatig moet invoeren. recovery_codes: Herstelcodes back-uppen recovery_codes_regenerated: Opnieuw genereren herstelcodes geslaagd - recovery_instructions_html: Wanneer je ooit de toegang verliest tot jouw telefoon, kan je met behulp van een van de herstelcodes hieronder opnieuw toegang krijgen tot jouw account. Zorg ervoor dat je de herstelcodes op een veilige plek bewaard. (Je kunt ze bijvoorbeeld printen en ze samen met andere belangrijke documenten bewaren.) + recovery_instructions_html: Wanneer je ooit de toegang verliest tot jouw telefoon, kan je met behulp van een van de herstelcodes hieronder opnieuw toegang krijgen tot jouw account. Zorg ervoor dat je de herstelcodes op een veilige plek bewaard. Je kunt ze bijvoorbeeld printen en ze samen met andere belangrijke documenten bewaren. setup: Instellen wrong_code: De ingevoerde code is ongeldig! Klopt de systeemtijd van de server en die van jouw apparaat? users: diff --git a/config/locales/no.yml b/config/locales/no.yml index 207f86afc..57f8547fc 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1,13 +1,23 @@ --- 'no': about: + about_hashtag_html: Dette er offentlige toots merket med #%{hashtag}. Du kan interagere med dem om du har en konto et sted i fediverset. about_mastodon_html: Mastodon er et sosialt nettverk laget med fri programvare. Et desentralisert alternativ til kommersielle plattformer. Slik kan det unngå risikoene ved å ha et enkelt selskap som monopoliserer din kommunikasjon. Velg en tjener du stoler på — uansett hvilken du velger så kan du kommunisere med alle andre. Alle kan kjøre sin egen Mastodon og delta sømløst i det sosiale nettverket. about_this: Om denne instansen closed_registrations: Registreringer er for øyeblikket lukket på denne instansen. contact: Kontakt + contact_missing: Ikke innstilt + contact_unavailable: Ikke tilgjengelig description_headline: Hva er %{domain}? domain_count_after: andre instanser domain_count_before: Koblet til + extended_description_html: | +

En god plassering for regler

+

En utvidet beskrivelse er ikke satt opp ennå.

+ features: + humane_approach_title: En mer menneskelig tilnærming + not_a_product_body: Mastodon er ikke et kommerst nettverk. Ingen reklame, ingen datainnsamling, ingen innhegnede hager. Det finnes ingen sentral myndighet. + not_a_product_title: Du er en person, ikke et produkt other_instances: Andre instanser source_code: Kildekode status_count_after: statuser @@ -29,7 +39,7 @@ are_you_sure: Er du sikker? confirm: Bekreft confirmed: Bekreftet - disable_two_factor_authentication: Disable 2FA + disable_two_factor_authentication: Skru av 2FA display_name: Visningsnavn domain: Domene edit: Redigér @@ -81,12 +91,12 @@ create: Lag blokkering hint: Domeneblokkeringen vil ikke hindre opprettelse av kontooppføringer i databasen, men vil retroaktivt og automatisk benytte spesifikke moderasjonsmetoder på de kontoene. severity: - desc_html: "Målbind vil gjøre kontoens poster usynlige for alle som ikke følger den. Utvis fjerner alt innhold, media og profildata fra kontoen." + desc_html: "Målbind gjør kontoens poster usynlige for alle som ikke følger den. Utvis fjerner alt innhold, media og profildata fra kontoen. Bruk Ingen hvis du bare vil fjerne mediafiler." silence: Målbind suspend: Utvis title: Ny domeneblokkering reject_media: Avvis mediefiler - reject_media_hint: Fjerner lokalt lagrede mediefiler og nekter å laste dem ned i fremtiden. Irrelevant for utvisninger. + reject_media_hint: Fjerner lokalt lagrede mediefiler og nekter å laste dem ned i fremtiden. Irrelevant for utvisninger severities: silence: Målbind suspend: Utvis @@ -136,7 +146,7 @@ open: title: Åpen registrering site_description: - desc_html: Vises som et avsnitt på forsiden og brukes som en meta-tagg.
Du kan bruke HTML-tagger, spesielt <a> og <em>. + desc_html: Vises som et avsnitt på forsiden og brukes som en meta-tagg. Du kan bruke HTML-tagger, spesielt <a> og <em>. title: Nettstedsbeskrivelse site_description_extended: desc_html: Vises på side for utvidet informasjon.
Du kan bruke HTML-tagger @@ -168,7 +178,7 @@ reset_password: Nullstill passord set_new_password: Sett nytt passord authorize_follow: - error: Uheldigvis så skjedde det en feil da vi prøvde å få tak i en bruker fra en annen instans. + error: Uheldigvis skjedde det en feil da vi prøvde å få tak i en bruker fra en annen instans follow: Følg title: Følg %{acct} datetime: @@ -191,8 +201,8 @@ '410': Siden du leter etter finnes ikke lenger. '422': content: Sikkerhetsverifisering feilet. Blokkerer du informasjonskapsler? - title: Sikkerhetsverifisering feilet. - '429': Throttled + title: Sikkerhetsverifisering feilet + '429': Overfyllt exports: blocks: Du blokkerer csv: CSV @@ -208,7 +218,7 @@ success: one: I ferd med å mykblokkere følgere fra ett domene... other: I ferd med å mykblokkere følgere fra %{count} domener... - true_privacy_html: Vennligst forstå at virkelig privatliv kun kan oppnås med ende-til-ende-kryptering. + true_privacy_html: Merk deg at virkelig privatliv kun kan oppnås med ende-til-ende-kryptering. unlocked_warning_html: Alle kan følge deg for å umiddelbart se dine private statuser. %{lock_link} for å kunne se over og avvise følgere. unlocked_warning_title: Din konto er ikke låst generic: @@ -220,7 +230,7 @@ other: Noe er ikke helt riktig ennå. Det er ennå %{count} feil å rette på imports: preface: Du kan importere data om brukere du følger eller blokkerer til kontoen din på denne instansen med eksportfiler fra andre instanser. - success: Din data ble mottatt og vil bli behandlet så fort som mulig. + success: Dine data ble mottatt og vil bli behandlet så fort som mulig types: blocking: Blokkeringsliste following: Følgeliste @@ -243,8 +253,8 @@ one: "1 ny hendelse siden ditt siste besøk \U0001F418" other: "%{count} nye hendelser siden ditt siste besøk \U0001F418" favourite: - body: Din status ble likt av %{name} - subject: "%{name} likte din status." + body: 'Statusen din ble likt av %{name}:' + subject: "%{name} likte statusen din" follow: body: "%{name} følger deg!" subject: "%{name} følger deg" @@ -382,11 +392,11 @@ enable: Skru på enabled_success: Aktivering av tofaktorautentisering vellykket generate_recovery_codes: Generér gjenopprettingskoder - instructions_html: "Scan denne QR-koden i Google Authenticator eller en lignende app på telefonen din. Fra nå av vil denne applikasjonen generere koder for deg som skal brukes under innlogging" + instructions_html: "Scan denne QR-koden med Google Authenticator eller en lignende app på telefonen din. Fra nå av vil denne applikasjonen generere koder for deg som skal brukes under innlogging." lost_recovery_codes: Gjenopprettingskoder lar deg gjenoppnå tilgang til din konto hvis du mister din telefon. Hvis du har mistet gjenopprettingskodene, kan du regenerere dem her. Dine gamle gjenopprettingskoder vil bli ugyldige. manual_instructions: 'Hvis du ikke får scannet QR-koden må du skrive inn følgende kode manuelt:' recovery_codes_regenerated: Generering av gjenopprettingskoder vellykket - recovery_instructions_html: Hvis du skulle miste tilgang til telefonen din, kan du bruke en av gjenopprettingskodene nedenfor til å gjenopprette tilgang til din konto. Oppbevar gjenopprettingskodene sikkert, for eksempel ved å skrive dem ut og lagre dem sammen med andre viktige dokumenter. + recovery_instructions_html: Hvis du skulle miste tilgang til telefonen din, kan du bruke en av gjenopprettingskodene nedenfor til å gjenopprette tilgang til din konto. Oppbevar gjenopprettingskodene sikkert, for eksempel ved å skrive dem ut og gjemme dem på et lurt sted bare du vet om. setup: Sett opp wrong_code: Den angitte koden var ugyldig! Stemmer instansens tid overalt med enhetens tid? users: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 760bb69a2..5b3567616 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -67,7 +67,7 @@ pt-BR: demote: Rebaixar disable: Desativar disable_two_factor_authentication: Desativar 2FA - disabled: Desativado + disabled: Desativada display_name: Nome de exibição domain: Domínio edit: Editar @@ -121,14 +121,14 @@ pt-BR: search: Pesquisar shared_inbox_url: URL da Inbox Compartilhada show: - created_reports: Relatórios criados por esta conta + created_reports: Denúncias criadas por esta conta report: relatórios - targeted_reports: Relatórios feitos sobre esta conta + targeted_reports: Denúncias feitas sobre esta conta silence: Silêncio statuses: Postagens subscribe: Inscrever-se title: Contas - undo_silenced: Retirar silêncio + undo_silenced: Desativar silêncio undo_suspension: Retirar suspensão unsubscribe: Desinscrever-se username: Nome de usuário @@ -151,9 +151,14 @@ pt-BR: memorialize_account: "%{name} transformou a conta de %{target} em um memorial" promote_user: "%{name} promoveu o usuário %{target}" reset_password_user: "%{name} redefiniu a senha do usuário %{target}" - resolve_report: "%{name} dispensou o relatório %{target}" + resolve_report: "%{name} dispensou a denúncia %{target}" silence_account: "%{name} silenciou a conta de %{target}" suspend_account: "%{name} suspendeu a conta de %{target}" + unsilence_account: "%{name} desativou o silêncio de %{target}" + unsuspend_account: "%{name} desativou a suspensão de %{target}" + update_custom_emoji: "%{name} atualizou o emoji %{target}" + update_status: "%{name} atualizou o estado de %{target}" + title: Auditar relatório custom_emojis: copied_msg: Cópia local do emoji criada com sucesso copy: Copiar @@ -204,7 +209,7 @@ pt-BR: one: Uma conta no banco de dados foi afetada other: "%{count} contas no banco de dados foram afetadas" retroactive: - silence: Retirar silêncio de todas as contas existentes neste domínio + silence: Desativar silêncio de todas as contas existentes desse domínio suspend: Retirar suspensão de todas as contas neste domínio title: Retirar bloqueio de domínio de %{domain} undo: Retirar @@ -217,7 +222,7 @@ pt-BR: destroyed_msg: Bloqueio de domínio de e-mail excluído com sucesso domain: Domínio new: - create: Criar bloqueio + create: Adicionar domínio title: Novo bloqueio de domínio de e-mail title: Bloqueio de Domínio de E-mail instances: @@ -226,6 +231,13 @@ pt-BR: reset: Resetar search: Buscar title: Instâncias conhecidas + invites: + filter: + all: Todos + available: Disponíveis + expired: Expirados + title: Filtro + title: Convites reports: action_taken_by: Ação realizada por are_you_sure: Você tem certeza? @@ -238,10 +250,10 @@ pt-BR: nsfw: 'false': Mostrar mídias anexadas 'true': Esconder mídias anexadas - report: 'Reportar #%{id}' + report: 'Denúncia #%{id}' report_contents: Conteúdos - reported_account: Conta reportada - reported_by: Reportada por + reported_account: Conta denunciada + reported_by: Denunciada por resolved: Resolvido silence_account: Silenciar conta status: Status @@ -264,6 +276,9 @@ pt-BR: deletion: desc_html: Permitir que qualquer um delete a sua conta title: Exclusão aberta de contas + min_invite_role: + disabled: Ninguém + title: Permitir convites de open: desc_html: Permitir que qualquer um crie uma conta title: Cadastro aberto @@ -279,7 +294,7 @@ pt-BR: site_title: Nome da instância thumbnail: desc_html: Usada para prévias via OpenGraph e API. Recomenda-se 1200x630px - title: Thumbnail da instância + title: Miniatura da instância timeline_preview: desc_html: Exibir a timeline pública na página inicial title: Prévia da timeline @@ -309,7 +324,7 @@ pt-BR: title: Administração admin_mailer: new_report: - body: "%{reporter} reportou %{target}" + body: "%{reporter} denunciou %{target}" subject: Nova denúncia sobre %{instance} (#%{id}) application_mailer: salutation: "%{name}," @@ -334,9 +349,11 @@ pt-BR: invalid_reset_password_token: Token de modificação de senha é inválido ou expirou. Por favor, requisite um novo. login: Entrar logout: Sair + migrate_account: Mudar para uma conta diferente + migrate_account_html: Se você quer redirecionar essa conta para uma outra você pode configura isso aqui. register: Cadastrar-se resend_confirmation: Reenviar instruções de confirmação - reset_password: Modificar senha + reset_password: Redefinir senha set_new_password: Definir uma nova senha authorize_follow: error: Infelizmente, ocorreu um erro ao buscar a conta remota @@ -376,7 +393,7 @@ pt-BR: '410': A página pela qual você está procurando não existe mais. '422': content: A verificação de segurança falhou. Você desativou o uso de cookies? - title: Falha na verificação de segurança + title: Verificação de segurança falhou '429': Muitas requisições '500': content: Desculpe, algo deu errado. @@ -416,12 +433,39 @@ pt-BR: muting: Lista de silêncio upload: Enviar in_memoriam_html: Em memória. + invites: + delete: Desativar + expired: Expirados + expires_in: + '1800': 30 minutos + '21600': 6 horas + '3600': 1 hora + '43200': 12 horas + '86400': 1 dia + expires_in_prompt: Nunca + generate: Gerar + max_uses: + one: 1 uso + other: "%{count} usos" + max_uses_prompt: Sem limite + prompt: Gerar e compartilha links com outras pessoas para permitir acesso a essa instância + table: + expires_at: Expira em + uses: Usos + title: Convidar pessoas landing_strip_html: "%{name} é um usuário no %{link_to_root_path}. Você pode segui-lo ou interagir com ele se você tiver uma conta em qualquer lugar no fediverso." landing_strip_signup_html: Se não, você pode se cadastrar aqui. media_attachments: validations: images_and_video: Não é possível anexar um vídeo a uma postagem que já contém imagens too_many: Não é possível anexar mais de 4 imagens + migrations: + acct: username@domain da nova conta + currently_redirecting: 'Seu perfil está configurado para redirecionar para:' + proceed: Salvar + updated_msg: As configurações de migração da sua conta foram atualizadas com sucesso! + moderation: + title: Moderação notification_mailer: digest: body: 'Aqui está um resumo do que você perdeu no %{instance} desde o seu último acesso em %{since}:' @@ -498,7 +542,7 @@ pt-BR: generic: Navegador desconhecido ie: Internet Explorer micro_messenger: MicroMessenger - nokia: Nokia S40 Ovi Browser + nokia: Navegador Nokia S40 Ovi opera: Opera phantom_js: PhantomJS qq: QQ Browser @@ -534,6 +578,7 @@ pt-BR: export: Exportar dados followers: Seguidores autorizados import: Importar + migrate: Migração de conta notifications: Notificações preferences: Preferências settings: Configurações @@ -630,6 +675,8 @@ pt-BR:

Originalmente adaptado da política de privacidade do Discourse.

title: "%{instance} Termos de Serviço e Política de Privacidade" + themes: + default: Mastodon time: formats: default: "%b %d, %Y, %H:%M" diff --git a/config/locales/simple_form.ar.yml b/config/locales/simple_form.ar.yml index 932b166d7..e4c6694e9 100644 --- a/config/locales/simple_form.ar.yml +++ b/config/locales/simple_form.ar.yml @@ -4,10 +4,14 @@ ar: hints: defaults: avatar: PNG, GIF أو JPG. على الأكثر 2 ميغابيت . سوف يتم تصغيرها إلى 120x120px - display_name: %{count} أحرف متبقية + digest: يُرسَل بعد مضيّ مدة طويلة من خمول نشاطك يحوي على تلخيص للتبويقات التي ذُكر حسابك فيها أثناء غيابك + display_name: + one: 1 حرف متبقي header: PNG, GIF or JPG. على الأكثر 2 ميغابيت . سوف يتم تصغيرها إلى 700x335px locked: يتطلب منك الموافقة يدويا على كل طلب للإشتراك بحسابك و منشوراتك تعرض لمتابعيك فقط دون غيرهم note: %{count} أحرف متبقية + setting_noindex: تمس ملفك العمومي الخاص بك وصفحات الحالة + setting_theme: تغير المظهر الذي يبدو عليه ماستدون عندما تقوم بتسجيل دخولك على أي جهاز. imports: data: ملف CSV تم تصديره من خادوم مثيل آخر لماستدون sessions: @@ -24,6 +28,7 @@ ar: header: رأس الصفحة locale: اللغة locked: إجعل حسابك خاصًا + max_uses: العدد الأقصى للإستخدام new_password: كلمة مرور جديدة note: السيرة الذاتية otp_attempt: الرمز الثنائي @@ -31,6 +36,8 @@ ar: setting_auto_play_gif: تشغيل صور جيف المتحركة تلقائي setting_boost_modal: إظهار مربع حوار التأكيد قبل القيام بالترقية setting_default_privacy: خصوصية المنشور + setting_default_sensitive: دائما تحديد الوسائط كحساسة + setting_noindex: منع محركات البحث من فهرسة ملفي الشخصي severity: الشدة type: نوع الإستيراد username: اسم المستخدم diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index bdeefa7e5..2e5f96957 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -3,20 +3,20 @@ ja: simple_form: hints: defaults: - avatar: 2MBまでのPNGやGIF、JPGが利用可能です。120x120pxまで縮小されます。 - digest: 長期間ログインしなかった際、その期間に受け取った返信の要約を受け取ることができます。 + avatar: 2MBまでのPNGやGIF、JPGが利用可能です。120x120pxまで縮小されます + digest: 長期間ログインしなかった際、その期間に受け取った返信の要約を受け取ることができます display_name: あと%{count}文字入力できます。 - header: 2MBまでのPNGやGIF、JPGが利用可能です。 700x335pxまで縮小されます。 + header: 2MBまでのPNGやGIF、JPGが利用可能です。 700x335pxまで縮小されます locked: フォロワーを手動で承認する必要があります note: あと%{count}文字入力できます。 setting_noindex: 公開プロフィールおよび各投稿ページに影響します setting_theme: ログインしている全てのデバイスで適用されるデザインです。 imports: - data: 他の Mastodon インスタンスからエクスポートしたCSVファイルを選択して下さい。 + data: 他の Mastodon インスタンスからエクスポートしたCSVファイルを選択して下さい sessions: otp: 携帯電話に表示された2段階認証コードを入力するか、生成したリカバリーコードを使用してください。 user: - filtered_languages: 選択した言語があなたの公開タイムラインから取り除かれます。 + filtered_languages: 選択した言語があなたの公開タイムラインから取り除かれます labels: defaults: avatar: アイコン diff --git a/config/locales/simple_form.nl.yml b/config/locales/simple_form.nl.yml index f2847e7ca..17b9647a4 100644 --- a/config/locales/simple_form.nl.yml +++ b/config/locales/simple_form.nl.yml @@ -14,7 +14,7 @@ nl: one: 1 teken over other: %{count} tekens over setting_noindex: Heeft invloed op jouw openbare profiel en toots - setting_theme: Heeft invloed op hoe Mastodon eruitziet op elk apparaat waarmee je inlogt. + setting_theme: Heeft invloed op hoe de webapp van Mastodon eruitziet (op elk apparaat waarmee je inlogt). imports: data: CSV-bestand dat op een andere Mastodon-server werd geëxporteerd sessions: @@ -48,22 +48,22 @@ nl: setting_noindex: Jouw toots niet door zoekmachines laten indexeren setting_reduce_motion: Langzamere animaties setting_system_font_ui: Standaardlettertype van jouw systeem gebruiken - setting_theme: Site thema + setting_theme: Thema website setting_unfollow_modal: Vraag voor het ontvolgen van iemand een bevestiging - severity: Strengheid + severity: Zwaarte type: Importtype username: gebruikersnaam interactions: - must_be_follower: Blokkeer meldingen van mensen die jou niet volgen - must_be_following: Blokkeer meldingen van mensen die jij niet volgt - must_be_following_dm: Blokkeer directe berichten van mensen die jij niet volgt + must_be_follower: Meldingen van mensen die jou niet volgen blokkeren + must_be_following: Meldingen van mensen die jij niet volgt blokkeren + must_be_following_dm: Directe berichten van mensen die jij niet volgt blokkeren notification_emails: - digest: Verstuur periodiek e-mails met een samenvatting - favourite: Verstuur een e-mail wanneer iemand jouw toot als favoriet markeert - follow: Verstuur een e-mail wanneer iemand jou volgt - follow_request: Verstuur een e-mail wanneer iemand jou wilt volgen - mention: Verstuur een e-mail wanneer iemand jou vermeld - reblog: Verstuur een e-mail wanneer iemand jouw toot heeft geboost + digest: Periodiek e-mails met een samenvatting versturen + favourite: Een e-mail versturen wanneer iemand jouw toot als favoriet markeert + follow: Een e-mail versturen wanneer iemand jou volgt + follow_request: Een e-mail versturen wanneer iemand jou wilt volgen + mention: Een e-mail versturen wanneer iemand jou vermeld + reblog: Een e-mail versturen wanneer iemand jouw toot heeft geboost 'no': Nee required: mark: "*" -- cgit From e7d55df38d8c18819e79646bb7d1365c5eab54f3 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sun, 10 Dec 2017 00:53:40 +0900 Subject: Ignore HEAD method if does not support (#5949) --- app/services/fetch_link_card_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index cec96d927..7f4518ea7 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -38,7 +38,7 @@ class FetchLinkCardService < BaseService @card ||= PreviewCard.new(url: @url) res = Request.new(:head, @url).perform - return if res.code != 200 || res.mime_type != 'text/html' + return if res.code != 405 && (res.code != 200 || res.mime_type != 'text/html') attempt_oembed || attempt_opengraph end -- cgit From abe95b614b6355e61dd2955e09115ac473417c84 Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 10:26:22 -0600 Subject: add initial components based off of tootsuite pr #1507 --- app/controllers/settings/preferences_controller.rb | 1 + .../flavours/glitch/components/status.js | 5 +- .../flavours/glitch/containers/status_container.js | 16 +++-- .../features/status/components/action_bar.js | 4 +- .../flavours/glitch/features/status/index.js | 16 +++-- .../features/ui/components/favourite_modal.js | 84 ++++++++++++++++++++++ .../glitch/features/ui/components/modal_root.js | 4 +- .../flavours/glitch/styles/components/index.scss | 11 ++- .../flavours/glitch/util/initial_state.js | 1 + app/models/user.rb | 2 +- app/views/settings/preferences/show.html.haml | 1 + config/locales/simple_form.en.yml | 1 + config/settings.yml | 1 + 13 files changed, 130 insertions(+), 17 deletions(-) create mode 100644 app/javascript/flavours/glitch/features/ui/components/favourite_modal.js diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 277f0f657..9177d37da 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -33,6 +33,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_default_sensitive, :setting_unfollow_modal, :setting_boost_modal, + :setting_favourite_modal, :setting_delete_modal, :setting_auto_play_gif, :setting_reduce_motion, diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index b0d9e3757..6cfd05735 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -58,6 +58,7 @@ export default class Status extends ImmutablePureComponent { 'settings', 'prepend', 'boostModal', + 'favouriteModal', 'muted', 'collapse', 'notification', @@ -204,8 +205,8 @@ export default class Status extends ImmutablePureComponent { this.props.onReply(this.props.status, this.context.router.history); } - handleHotkeyFavourite = () => { - this.props.onFavourite(this.props.status); + handleHotkeyFavourite = e => { + this.props.onFavourite(this.props.status, e); } handleHotkeyBoost = e => { diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js index b753de7b3..8bf33c70f 100644 --- a/app/javascript/flavours/glitch/containers/status_container.js +++ b/app/javascript/flavours/glitch/containers/status_container.js @@ -20,7 +20,7 @@ import { initMuteModal } from 'flavours/glitch/actions/mutes'; import { initReport } from 'flavours/glitch/actions/reports'; import { openModal } from 'flavours/glitch/actions/modal'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { boostModal, deleteModal } from 'flavours/glitch/util/initial_state'; +import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/util/initial_state'; const messages = defineMessages({ deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' }, @@ -78,14 +78,22 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } }, - onFavourite (status) { + onModalFavourite (status) { + dispatch(favourite(status)); + }, + + onFavourite (status, e) { if (status.get('favourited')) { dispatch(unfavourite(status)); } else { - dispatch(favourite(status)); + if (e.shiftKey || !favouriteModal) { + this.onModalFavourite(status); + } else { + dispatch(openModal('FAVOURITE', { status, onFavourite: this.onModalFavourite })); + } } }, - + onPin (status) { if (status.get('pinned')) { dispatch(unpin(status)); diff --git a/app/javascript/flavours/glitch/features/status/components/action_bar.js b/app/javascript/flavours/glitch/features/status/components/action_bar.js index 4d660ee3c..3190fd0be 100644 --- a/app/javascript/flavours/glitch/features/status/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/status/components/action_bar.js @@ -48,8 +48,8 @@ export default class ActionBar extends React.PureComponent { this.props.onReblog(this.props.status, e); } - handleFavouriteClick = () => { - this.props.onFavourite(this.props.status); + handleFavouriteClick = (e) => { + this.props.onFavourite(this.props.status, e); } handleDeleteClick = () => { diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 93b0fe9d9..8b81caa9a 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -30,7 +30,7 @@ import { openModal } from 'flavours/glitch/actions/modal'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { HotKeys } from 'react-hotkeys'; -import { boostModal, deleteModal } from 'flavours/glitch/util/initial_state'; +import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/util/initial_state'; import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/util/fullscreen'; const messages = defineMessages({ @@ -95,11 +95,19 @@ export default class Status extends ImmutablePureComponent { } }; - handleFavouriteClick = (status) => { + handleModalFavourite = (status) => { + this.props.dispatch(favourite(status)); + } + + handleFavouriteClick = (status, e) => { if (status.get('favourited')) { this.props.dispatch(unfavourite(status)); } else { - this.props.dispatch(favourite(status)); + if (e.shiftKey || !favoriteModal) { + this.handleModalFavourite(status); + } else { + this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite })); + } } } @@ -118,7 +126,7 @@ export default class Status extends ImmutablePureComponent { handleModalReblog = (status) => { this.props.dispatch(reblog(status)); } - + handleReblogClick = (status, e) => { if (status.get('reblogged')) { this.props.dispatch(unreblog(status)); diff --git a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js new file mode 100644 index 000000000..a2322d0b8 --- /dev/null +++ b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js @@ -0,0 +1,84 @@ +import React from 'react'; +import ImmutablePropTypes from 'react-immutable-proptypes'; +import PropTypes from 'prop-types'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import Button from 'flavours/glitch/components/button'; +import StatusContent from 'flavours/glitch/components/status_content'; +import Avatar from 'flavours/glitch/components/avatar'; +import RelativeTimestamp from 'flavours/glitch/components/relative_timestamp'; +import DisplayName from 'flavours/glitch/components/display_name'; +import ImmutablePureComponent from 'react-immutable-pure-component'; + +const messages = defineMessages({ + reblog: { id: 'status.favourite', defaultMessage: 'Favourite' }, +}); + +@injectIntl +export default class BoostModal extends ImmutablePureComponent { + + static contextTypes = { + router: PropTypes.object, + }; + + static propTypes = { + status: ImmutablePropTypes.map.isRequired, + onReblog: PropTypes.func.isRequired, + onClose: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired, + }; + + componentDidMount() { + this.button.focus(); + } + + handleFavourite = () => { + this.props.onFavourite(this.props.status); + this.props.onClose(); + } + + handleAccountClick = (e) => { + if (e.button === 0) { + e.preventDefault(); + this.props.onClose(); + this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`); + } + } + + setRef = (c) => { + this.button = c; + } + + render () { + const { status, intl } = this.props; + + return ( +
+
+
+
+
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ +
+
Shift + }} />
+
+
+ ); + } + +} diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_root.js b/app/javascript/flavours/glitch/features/ui/components/modal_root.js index 61b239283..66acae68e 100644 --- a/app/javascript/flavours/glitch/features/ui/components/modal_root.js +++ b/app/javascript/flavours/glitch/features/ui/components/modal_root.js @@ -7,6 +7,7 @@ import ActionsModal from './actions_modal'; import MediaModal from './media_modal'; import VideoModal from './video_modal'; import BoostModal from './boost_modal'; +import FavouriteModal from './favourite_modal'; import DoodleModal from './doodle_modal'; import ConfirmationModal from './confirmation_modal'; import { @@ -22,6 +23,7 @@ const MODAL_COMPONENTS = { 'ONBOARDING': OnboardingModal, 'VIDEO': () => Promise.resolve({ default: VideoModal }), 'BOOST': () => Promise.resolve({ default: BoostModal }), + 'FAVOURITE': () => Promise.resolve({ default: FavouriteModal }), 'DOODLE': () => Promise.resolve({ default: DoodleModal }), 'CONFIRM': () => Promise.resolve({ default: ConfirmationModal }), 'MUTE': MuteModal, @@ -90,7 +92,7 @@ export default class ModalRoot extends React.PureComponent { } renderLoading = modalId => () => { - return ['MEDIA', 'VIDEO', 'BOOST', 'DOODLE', 'CONFIRM', 'ACTIONS'].indexOf(modalId) === -1 ? : null; + return ['MEDIA', 'VIDEO', 'BOOST', 'FAVOURITE', 'DOODLE', 'CONFIRM', 'ACTIONS'].indexOf(modalId) === -1 ? : null; } renderError = (props) => { diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index 7aeab0a6a..eb8d8245f 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -3901,6 +3901,7 @@ button.icon-button.active i.fa-retweet { } .boost-modal, +.favourite-modal, .confirmation-modal, .report-modal, .actions-modal, @@ -3932,7 +3933,8 @@ button.icon-button.active i.fa-retweet { } } -.boost-modal__container { +.boost-modal__container, +.favourite-modal__container{ overflow-x: scroll; padding: 10px; @@ -3943,6 +3945,7 @@ button.icon-button.active i.fa-retweet { } .boost-modal__action-bar, +.favourite-modal__action-bar, .confirmation-modal__action-bar, .mute-modal__action-bar, .report-modal__action-bar { @@ -3964,11 +3967,13 @@ button.icon-button.active i.fa-retweet { } } -.boost-modal__status-header { +.boost-modal__status-header, +.favourite-modal__status-header { font-size: 15px; } -.boost-modal__status-time { +.boost-modal__status-time, +.favourite-modal__status-time { float: right; font-size: 14px; } diff --git a/app/javascript/flavours/glitch/util/initial_state.js b/app/javascript/flavours/glitch/util/initial_state.js index ef5d8b0ef..607d6b9b0 100644 --- a/app/javascript/flavours/glitch/util/initial_state.js +++ b/app/javascript/flavours/glitch/util/initial_state.js @@ -15,6 +15,7 @@ export const reduceMotion = getMeta('reduce_motion'); export const autoPlayGif = getMeta('auto_play_gif'); export const unfollowModal = getMeta('unfollow_modal'); export const boostModal = getMeta('boost_modal'); +export const favouriteModal = getMeta('favourite_modal'); export const deleteModal = getMeta('delete_modal'); export const me = getMeta('me'); diff --git a/app/models/user.rb b/app/models/user.rb index 29bdcbd67..47bf22e17 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -75,7 +75,7 @@ class User < ApplicationRecord has_many :session_activations, dependent: :destroy - delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal, + delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal, :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, to: :settings, prefix: :setting, allow_nil: false diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index 9564c0399..9e72e5734 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -32,6 +32,7 @@ = f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label = f.input :setting_boost_modal, as: :boolean, wrapper: :with_label + = f.input :setting_favourite_modal, as: :boolean, wrapper: :with_label = f.input :setting_delete_modal, as: :boolean, wrapper: :with_label .fields-group diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 756f6b119..599df9e28 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -43,6 +43,7 @@ en: password: Password setting_auto_play_gif: Auto-play animated GIFs setting_boost_modal: Show confirmation dialog before boosting + setting_favourite_modal: Show confirmation dialog before favouriting setting_default_privacy: Post privacy setting_default_sensitive: Always mark media as sensitive setting_delete_modal: Show confirmation dialog before deleting a toot diff --git a/config/settings.yml b/config/settings.yml index 5aad45da2..dbc5f6a26 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -22,6 +22,7 @@ defaults: &defaults default_sensitive: false unfollow_modal: false boost_modal: false + favourite_modal: false delete_modal: true auto_play_gif: false reduce_motion: false -- cgit From a489e5d5cd33f52e4af38e6977a284b367f2f95e Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 11:21:41 -0600 Subject: added a few more things --- .../glitch/features/ui/components/actions_modal.js | 18 +++++++++++++++++- app/javascript/mastodon/locales/defaultMessages.json | 15 ++++++++++++++- app/javascript/mastodon/locales/en.json | 2 ++ app/lib/user_settings_decorator.rb | 5 +++++ app/serializers/initial_state_serializer.rb | 1 + 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js index 0873c282f..1eb0e026e 100644 --- a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js @@ -55,9 +55,25 @@ export default class ActionsModal extends ImmutablePureComponent { + + - + ); return ( diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index bb82cf5f5..65e20c17a 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -1293,6 +1293,19 @@ ], "path": "app/javascript/mastodon/features/ui/components/boost_modal.json" }, + { + "descriptors": [ + { + "defaultMessage": "Favourite", + "id": "status.favourite" + }, + { + "defaultMessage": "You can press {combo} to skip this next time", + "id": "favourite_modal.combo" + } + ], + "path": "app/javascript/mastodon/features/ui/components/favourite_modal.json" + }, { "descriptors": [ { @@ -1601,4 +1614,4 @@ ], "path": "app/javascript/mastodon/features/video/index.json" } -] \ No newline at end of file +] diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 538124904..5efd29b81 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -25,6 +25,7 @@ "account.unmute_notifications": "Unmute notifications from @{name}", "account.view_full_profile": "View full profile", "boost_modal.combo": "You can press {combo} to skip this next time", + "favourite_modal.combo": "You can press {combo} to skip this next time", "bundle_column_error.body": "Something went wrong while loading this component.", "bundle_column_error.retry": "Try again", "bundle_column_error.title": "Network error", @@ -109,6 +110,7 @@ "home.settings": "Column settings", "keyboard_shortcuts.back": "to navigate back", "keyboard_shortcuts.boost": "to boost", + "keyboard_shortcuts.favourite": "to favourite", "keyboard_shortcuts.column": "to focus a status in one of the columns", "keyboard_shortcuts.compose": "to focus the compose textarea", "keyboard_shortcuts.description": "Description", diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 8af384a2d..d69181b5d 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -21,6 +21,7 @@ class UserSettingsDecorator user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') + user.settings['favourite_modal'] = boost_modal_preference if change?('setting_boost_modal') user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') @@ -53,6 +54,10 @@ class UserSettingsDecorator def boost_modal_preference boolean_cast_setting 'setting_boost_modal' end + + def favourite_modal_preference + boolean_cast_setting 'setting_favourite_modal' + end def delete_modal_preference boolean_cast_setting 'setting_delete_modal' diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 9dfa019f5..904daa804 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -28,6 +28,7 @@ class InitialStateSerializer < ActiveModel::Serializer store[:me] = object.current_account.id.to_s store[:unfollow_modal] = object.current_account.user.setting_unfollow_modal store[:boost_modal] = object.current_account.user.setting_boost_modal + store[:favourite_modal] = object.current_account.user.setting_favourite_modal store[:delete_modal] = object.current_account.user.setting_delete_modal store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif store[:reduce_motion] = object.current_account.user.setting_reduce_motion -- cgit From 22cdbca82c06cced9568f0bd9361593a2c0eba81 Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 12:06:00 -0600 Subject: fixes, functioning now --- app/javascript/flavours/glitch/components/status.js | 2 +- app/javascript/flavours/glitch/components/status_action_bar.js | 4 ++-- app/javascript/flavours/glitch/features/status/index.js | 2 +- .../flavours/glitch/features/ui/components/favourite_modal.js | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 6cfd05735..b8a0fd180 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -205,7 +205,7 @@ export default class Status extends ImmutablePureComponent { this.props.onReply(this.props.status, this.context.router.history); } - handleHotkeyFavourite = e => { + handleHotkeyFavourite = (e) => { this.props.onFavourite(this.props.status, e); } diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index 5a06782be..cb663e773 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -71,8 +71,8 @@ export default class StatusActionBar extends ImmutablePureComponent { }); } - handleFavouriteClick = () => { - this.props.onFavourite(this.props.status); + handleFavouriteClick = (e) => { + this.props.onFavourite(this.props.status, e); } handleReblogClick = (e) => { diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 8b81caa9a..4a019ce20 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -103,7 +103,7 @@ export default class Status extends ImmutablePureComponent { if (status.get('favourited')) { this.props.dispatch(unfavourite(status)); } else { - if (e.shiftKey || !favoriteModal) { + if (e.shiftKey || !favouriteModal) { this.handleModalFavourite(status); } else { this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite })); diff --git a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js index a2322d0b8..70722411d 100644 --- a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js @@ -10,11 +10,11 @@ import DisplayName from 'flavours/glitch/components/display_name'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ - reblog: { id: 'status.favourite', defaultMessage: 'Favourite' }, + favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, }); @injectIntl -export default class BoostModal extends ImmutablePureComponent { +export default class FavouriteModal extends ImmutablePureComponent { static contextTypes = { router: PropTypes.object, @@ -22,7 +22,7 @@ export default class BoostModal extends ImmutablePureComponent { static propTypes = { status: ImmutablePropTypes.map.isRequired, - onReblog: PropTypes.func.isRequired, + onFavourite: PropTypes.func.isRequired, onClose: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, }; @@ -75,7 +75,7 @@ export default class BoostModal extends ImmutablePureComponent {
Shift + }} />
-
); -- cgit From 7284e36fbdd4d6084aa85e8b1eeb56247c3cab3d Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 12:17:20 -0600 Subject: fixed fav setting change --- app/lib/user_settings_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index d69181b5d..5f0176f27 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -21,7 +21,7 @@ class UserSettingsDecorator user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') - user.settings['favourite_modal'] = boost_modal_preference if change?('setting_boost_modal') + user.settings['favourite_modal'] = favourite_modal_preference if change?('setting_favourite_modal') user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') -- cgit From c5a688d70e4bea57ac87c71577fd6c7b9e5fa163 Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 12:41:24 -0600 Subject: remove trailing spaces --- app/javascript/flavours/glitch/containers/status_container.js | 2 +- app/javascript/flavours/glitch/features/status/index.js | 2 +- .../flavours/glitch/features/ui/components/actions_modal.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js index 8bf33c70f..c0b9b5800 100644 --- a/app/javascript/flavours/glitch/containers/status_container.js +++ b/app/javascript/flavours/glitch/containers/status_container.js @@ -93,7 +93,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } } }, - + onPin (status) { if (status.get('pinned')) { dispatch(unpin(status)); diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 4a019ce20..40ae380ab 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -126,7 +126,7 @@ export default class Status extends ImmutablePureComponent { handleModalReblog = (status) => { this.props.dispatch(reblog(status)); } - + handleReblogClick = (status, e) => { if (status.get('reblogged')) { this.props.dispatch(unreblog(status)); diff --git a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js index 1eb0e026e..87a149807 100644 --- a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js @@ -55,7 +55,7 @@ export default class ActionsModal extends ImmutablePureComponent { - + + ); return ( -- cgit From fbd2a0127cb537e91508032a87bc82675f88d271 Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 13:00:07 -0600 Subject: ran i18n-tasks normalize for simple_form.en.yml --- config/locales/simple_form.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 599df9e28..1722eea7b 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -43,10 +43,10 @@ en: password: Password setting_auto_play_gif: Auto-play animated GIFs setting_boost_modal: Show confirmation dialog before boosting - setting_favourite_modal: Show confirmation dialog before favouriting setting_default_privacy: Post privacy setting_default_sensitive: Always mark media as sensitive setting_delete_modal: Show confirmation dialog before deleting a toot + setting_favourite_modal: Show confirmation dialog before favouriting setting_flavour: Flavour setting_noindex: Opt-out of search engine indexing setting_reduce_motion: Reduce motion in animations -- cgit From 8606e5338476cb7de21cb611d015e966f1cf48cc Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 15:15:11 -0600 Subject: moved locales to glitch, created add settings entry --- .../flavours/glitch/features/local_settings/page/index.js | 9 +++++++++ app/javascript/flavours/glitch/features/ui/index.js | 2 ++ app/javascript/flavours/glitch/reducers/local_settings.js | 1 + app/javascript/glitch/locales/en.json | 2 ++ app/javascript/mastodon/locales/en.json | 2 -- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/local_settings/page/index.js b/app/javascript/flavours/glitch/features/local_settings/page/index.js index 62bf410c6..b9b00b050 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/index.js @@ -59,6 +59,15 @@ export default class LocalSettingsPage extends React.PureComponent { > + + + +

({ layout: state.getIn(['local_settings', 'layout']), isWide: state.getIn(['local_settings', 'stretch']), navbarUnder: state.getIn(['local_settings', 'navbar_under']), + favouriteModal: state.getIn(['local_settings', 'favourite_modal']), }); const keyMap = { @@ -103,6 +104,7 @@ export default class UI extends React.Component { isWide: PropTypes.bool, systemFontUi: PropTypes.bool, navbarUnder: PropTypes.bool, + favouriteModal: PropTypes.bool, isComposing: PropTypes.bool, hasComposingText: PropTypes.bool, location: PropTypes.object, diff --git a/app/javascript/flavours/glitch/reducers/local_settings.js b/app/javascript/flavours/glitch/reducers/local_settings.js index 69d98741b..e4cdc49ee 100644 --- a/app/javascript/flavours/glitch/reducers/local_settings.js +++ b/app/javascript/flavours/glitch/reducers/local_settings.js @@ -9,6 +9,7 @@ const initialState = ImmutableMap({ layout : 'auto', stretch : true, navbar_under : false, + favourite_modal : false, side_arm : 'none', collapsed : ImmutableMap({ enabled : true, diff --git a/app/javascript/glitch/locales/en.json b/app/javascript/glitch/locales/en.json index 0276cb837..94011ffbe 100644 --- a/app/javascript/glitch/locales/en.json +++ b/app/javascript/glitch/locales/en.json @@ -32,6 +32,8 @@ "status.collapse": "Collapse", "status.uncollapse": "Uncollapse", + "favourite_modal.combo": "You can press {combo} to skip this next time", + "home.column_settings.show_direct": "Show DMs", "notification.markForDeletion": "Mark for deletion", diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 5efd29b81..538124904 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -25,7 +25,6 @@ "account.unmute_notifications": "Unmute notifications from @{name}", "account.view_full_profile": "View full profile", "boost_modal.combo": "You can press {combo} to skip this next time", - "favourite_modal.combo": "You can press {combo} to skip this next time", "bundle_column_error.body": "Something went wrong while loading this component.", "bundle_column_error.retry": "Try again", "bundle_column_error.title": "Network error", @@ -110,7 +109,6 @@ "home.settings": "Column settings", "keyboard_shortcuts.back": "to navigate back", "keyboard_shortcuts.boost": "to boost", - "keyboard_shortcuts.favourite": "to favourite", "keyboard_shortcuts.column": "to focus a status in one of the columns", "keyboard_shortcuts.compose": "to focus the compose textarea", "keyboard_shortcuts.description": "Description", -- cgit From 0f8140d26a031f299742e1a4269fa72c7fe991e6 Mon Sep 17 00:00:00 2001 From: ButterflyOfFire Date: Sat, 9 Dec 2017 23:37:18 +0100 Subject: Create activerecord.ar.yml (#5951) --- config/locales/activerecord.ar.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config/locales/activerecord.ar.yml diff --git a/config/locales/activerecord.ar.yml b/config/locales/activerecord.ar.yml new file mode 100644 index 000000000..d5d44aaa6 --- /dev/null +++ b/config/locales/activerecord.ar.yml @@ -0,0 +1,13 @@ +--- +ar: + activerecord: + errors: + models: + account: + attributes: + username: + invalid: فقط حروف و أرقام و تسطير سفلي + status: + attributes: + reblog: + taken: المنشور موجود -- cgit From fcc0795a4013db355c629da071d909ceda1f37b1 Mon Sep 17 00:00:00 2001 From: abcang Date: Sun, 10 Dec 2017 07:37:31 +0900 Subject: Remove unused function (#5950) --- app/controllers/api/base_controller.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 7cfe8fe71..5983c0fbe 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -72,19 +72,4 @@ class Api::BaseController < ApplicationController def render_empty render json: {}, status: 200 end - - def set_maps(statuses) # rubocop:disable Style/AccessorMethodName - if current_account.nil? - @reblogs_map = {} - @favourites_map = {} - @mutes_map = {} - return - end - - status_ids = statuses.compact.flat_map { |s| [s.id, s.reblog_of_id] }.uniq - conversation_ids = statuses.compact.map(&:conversation_id).compact.uniq - @reblogs_map = Status.reblogs_map(status_ids, current_account) - @favourites_map = Status.favourites_map(status_ids, current_account) - @mutes_map = Status.mutes_map(conversation_ids, current_account) - end end -- cgit From a4710f9af817a2bbec44d3dd987d29fc0418eb40 Mon Sep 17 00:00:00 2001 From: Olivier Humbert Date: Sun, 10 Dec 2017 01:47:59 +0100 Subject: French translation update (#5954) * Update French translation * fix --- app/javascript/mastodon/locales/fr.json | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 3db19c470..a7a8876d0 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -63,8 +63,8 @@ "confirmations.block.message": "Confirmez-vous le blocage de {name} ?", "confirmations.delete.confirm": "Supprimer", "confirmations.delete.message": "Confirmez-vous la suppression de ce pouet ?", - "confirmations.delete_list.confirm": "Delete", - "confirmations.delete_list.message": "Are you sure you want to permanently delete this list?", + "confirmations.delete_list.confirm": "Supprimer", + "confirmations.delete_list.message": "Êtes-vous sûr de vouloir supprimer définitivement cette liste ?", "confirmations.domain_block.confirm": "Masquer le domaine entier", "confirmations.domain_block.message": "Êtes-vous vraiment, vraiment sûr⋅e de vouloir bloquer {domain} en entier ? Dans la plupart des cas, quelques blocages ou masquages ciblés sont suffisants et préférables.", "confirmations.mute.confirm": "Masquer", @@ -114,27 +114,27 @@ "keyboard_shortcuts.description": "Description", "keyboard_shortcuts.down": "descendre dans la liste", "keyboard_shortcuts.enter": "to open status", - "keyboard_shortcuts.favourite": "to favourite", - "keyboard_shortcuts.heading": "Keyboard Shortcuts", - "keyboard_shortcuts.hotkey": "Hotkey", - "keyboard_shortcuts.legend": "to display this legend", - "keyboard_shortcuts.mention": "to mention author", - "keyboard_shortcuts.reply": "to reply", + "keyboard_shortcuts.favourite": "vers les favoris", + "keyboard_shortcuts.heading": "Raccourcis clavier", + "keyboard_shortcuts.hotkey": "Raccourci", + "keyboard_shortcuts.legend": "pour afficher cette légende", + "keyboard_shortcuts.mention": "pour mentionner l'auteur", + "keyboard_shortcuts.reply": "pour répondre", "keyboard_shortcuts.search": "to focus search", - "keyboard_shortcuts.toot": "to start a brand new toot", + "keyboard_shortcuts.toot": "pour démarrer un tout nouveau pouet", "keyboard_shortcuts.unfocus": "to un-focus compose textarea/search", "keyboard_shortcuts.up": "to move up in the list", "lightbox.close": "Fermer", "lightbox.next": "Suivant", "lightbox.previous": "Précédent", - "lists.account.add": "Add to list", - "lists.account.remove": "Remove from list", - "lists.delete": "Delete list", - "lists.edit": "Edit list", - "lists.new.create": "Add list", - "lists.new.title_placeholder": "New list title", - "lists.search": "Search among people you follow", - "lists.subheading": "Your lists", + "lists.account.add": "Ajouter à la liste", + "lists.account.remove": "Supprimer de la liste", + "lists.delete": "Effacer la liste", + "lists.edit": "Éditer la liste", + "lists.new.create": "Ajouter une liste", + "lists.new.title_placeholder": "Titre de la nouvelle liste", + "lists.search": "Rechercher parmi les gens que vous suivez", + "lists.subheading": "Vos listes", "loading_indicator.label": "Chargement…", "media_gallery.toggle_visible": "Modifier la visibilité", "missing_indicator.label": "Non trouvé", @@ -145,8 +145,8 @@ "navigation_bar.favourites": "Favoris", "navigation_bar.follow_requests": "Demandes de suivi", "navigation_bar.info": "Plus d’informations", - "navigation_bar.keyboard_shortcuts": "Keyboard shortcuts", - "navigation_bar.lists": "Lists", + "navigation_bar.keyboard_shortcuts": "Raccourcis clavier", + "navigation_bar.lists": "Listes", "navigation_bar.logout": "Déconnexion", "navigation_bar.mutes": "Comptes masqués", "navigation_bar.pins": "Pouets épinglés", @@ -241,7 +241,7 @@ "tabs_bar.home": "Accueil", "tabs_bar.local_timeline": "Fil public local", "tabs_bar.notifications": "Notifications", - "ui.beforeunload": "Your draft will be lost if you leave Mastodon.", + "ui.beforeunload": "Votre brouillon sera perdu si vous quittez Mastodon.", "upload_area.title": "Glissez et déposez pour envoyer", "upload_button.label": "Joindre un média", "upload_form.description": "Décrire pour les malvoyants", -- cgit From 6e3f176b8e9f3fd2528b602ab49d68827acb675f Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sun, 10 Dec 2017 12:19:07 +0900 Subject: Add Galician language support (#5955) --- app/helpers/settings_helper.rb | 1 + app/javascript/mastodon/locales/nl.json | 1 - config/application.rb | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index abce85812..1d4cb8a57 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -10,6 +10,7 @@ module SettingsHelper eo: 'Esperanto', es: 'Español', fa: 'فارسی', + gl: 'Galego', fi: 'Suomi', fr: 'Français', he: 'עברית', diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index 87261d7cd..c290ed767 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -7,7 +7,6 @@ "account.followers": "Volgers", "account.follows": "Volgt", "account.follows_you": "Volgt jou", - "account.hide_reblogs": "Verberg boosts van @{name}", "account.media": "Media", "account.mention": "Vermeld @{name}", diff --git a/config/application.rb b/config/application.rb index 0879d3c6a..1a53ab6e9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -39,6 +39,7 @@ module Mastodon :fa, :fi, :fr, + :gl, :he, :hr, :hu, -- cgit From 0e567977923f2e7827192da0990d529859033f1a Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Sun, 10 Dec 2017 17:33:22 +0900 Subject: add and fix --- app/javascript/glitch/locales/ja.json | 15 +++++++++------ app/javascript/mastodon/locales/en.json | 3 +++ app/javascript/mastodon/locales/ja.json | 3 +++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/javascript/glitch/locales/ja.json b/app/javascript/glitch/locales/ja.json index 70091268f..a84b4cbe9 100644 --- a/app/javascript/glitch/locales/ja.json +++ b/app/javascript/glitch/locales/ja.json @@ -1,11 +1,11 @@ { "getting_started.open_source_notice": "Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。", "layout.auto": "自動", - "layout.current_is": "あなたの現在のレイアウト:", - "layout.desktop": "デスクトップ", - "layout.mobile": "モバイル", + "layout.current_is": "あなたの現在のレイアウト:", + "layout.desktop": "Desktop", + "layout.mobile": "Mobile", "navigation_bar.app_settings": "アプリ設定", - "getting_started.onboarding": "解説", + "getting_started.onboarding": "解説を表示", "onboarding.page_one.federation": "{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。", "onboarding.page_one.welcome": "{domain}へようこそ!", "onboarding.page_six.github": "{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。", @@ -27,8 +27,11 @@ "settings.media_letterbox": "メディアをレターボックス式で表示", "settings.media_fullwidth": "全幅メディアプリビュー", "settings.preferences": "ユーザー設定", - "settings.wide_view": "ワイドビュー(デスクトップレイアウトのみ)", - "settings.navbar_under": "ナビを画面下部に移動させる(モバイルレイアウトのみ)", + "settings.wide_view": "ワイドビュー(Desktopレイアウトのみ)", + "settings.navbar_under": "ナビを画面下部に移動させる(Mobileレイアウトのみ)", + "settings.compose_box_opts": "コンポーズボックス設定", + "settings.side_arm": "セカンダリートゥートボタン", + "settings.layout": "レイアウト", "status.collapse": "折りたたむ", "status.uncollapse": "折りたたみを解除", diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 538124904..f5154634c 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -33,6 +33,7 @@ "bundle_modal_error.retry": "Try again", "column.blocks": "Blocked users", "column.community": "Local timeline", + "column.direct": "Direct messages", "column.favourites": "Favourites", "column.follow_requests": "Follow requests", "column.home": "Home", @@ -88,6 +89,7 @@ "emoji_button.symbols": "Symbols", "emoji_button.travel": "Travel & Places", "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", + "empty_column.direct": "You don't have any direct messages yet. When you send or receive one, it will show up here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "Your home timeline is empty! Visit {public} or use search to get started and meet other users.", "empty_column.home.public_timeline": "the public timeline", @@ -141,6 +143,7 @@ "mute_modal.hide_notifications": "Hide notifications from this user?", "navigation_bar.blocks": "Blocked users", "navigation_bar.community_timeline": "Local timeline", + "navigation_bar.direct": "Direct messages", "navigation_bar.edit_profile": "Edit profile", "navigation_bar.favourites": "Favourites", "navigation_bar.follow_requests": "Follow requests", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index e015c41c2..125618bf2 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -33,6 +33,7 @@ "bundle_modal_error.retry": "再試行", "column.blocks": "ブロックしたユーザー", "column.community": "ローカルタイムライン", + "column.direct": "ダイレクトメッセージ", "column.favourites": "お気に入り", "column.follow_requests": "フォローリクエスト", "column.home": "ホーム", @@ -88,6 +89,7 @@ "emoji_button.symbols": "記号", "emoji_button.travel": "旅行と場所", "empty_column.community": "ローカルタイムラインはまだ使われていません。何か書いてみましょう!", + "empty_column.direct": "あなたはまだダイレクトメッセージを受け取っていません。あなたが送ったり受け取ったりすると、ここに表示されます。", "empty_column.hashtag": "このハッシュタグはまだ使われていません。", "empty_column.home": "まだ誰もフォローしていません。{public}を見に行くか、検索を使って他のユーザーを見つけましょう。", "empty_column.home.public_timeline": "連合タイムライン", @@ -141,6 +143,7 @@ "mute_modal.hide_notifications": "このユーザーからの通知を隠しますか?", "navigation_bar.blocks": "ブロックしたユーザー", "navigation_bar.community_timeline": "ローカルタイムライン", + "navigation_bar.direct": "ダイレクトメッセージ", "navigation_bar.edit_profile": "プロフィールを編集", "navigation_bar.favourites": "お気に入り", "navigation_bar.follow_requests": "フォローリクエスト", -- cgit From 7d4ebeecbd783769cce040a00e7fb384185a9f3c Mon Sep 17 00:00:00 2001 From: Quenty31 <33203663+Quenty31@users.noreply.github.com> Date: Sun, 10 Dec 2017 16:07:24 +0100 Subject: l10n i18n OC: corrections (#5962) * filling missing strings * Small changes Better way of saying + removed 2 finals dots * Corrections * Corrections Now with final point or without, just like the EN file * Update oc.json --- app/javascript/mastodon/locales/oc.json | 18 +++++++++--------- config/locales/doorkeeper.oc.yml | 6 +++--- config/locales/oc.yml | 8 ++++---- config/locales/simple_form.oc.yml | 6 +++++- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index e3d88ab50..f8b4751d6 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -15,7 +15,7 @@ "account.mute_notifications": "Rescondre las notificacions de @{name}", "account.posts": "Estatuts", "account.report": "Senhalar @{name}", - "account.requested": "Invitacion mandada. Clicatz per anullar.", + "account.requested": "Invitacion mandada. Clicatz per anullar", "account.share": "Partejar lo perfil a @{name}", "account.show_reblogs": "Mostrar los partages de @{name}", "account.unblock": "Desblocar @{name}", @@ -88,12 +88,12 @@ "emoji_button.symbols": "Simbòls", "emoji_button.travel": "Viatges & lòcs", "empty_column.community": "Lo flux public local es void. Escrivètz quicòm per lo garnir !", - "empty_column.hashtag": "I a pas encara de contengut ligat a aqueste hashtag", + "empty_column.hashtag": "I a pas encara de contengut ligat a aquesta etiqueta.", "empty_column.home": "Vòstre flux d’acuèlh es void. Visitatz {public} o utilizatz la recèrca per vos connectar a d’autras personas.", "empty_column.home.public_timeline": "lo flux public", "empty_column.list": "I a pas res dins la lista pel moment.", "empty_column.notifications": "Avètz pas encara de notificacions. Respondètz a qualqu’un per començar una conversacion.", - "empty_column.public": "I a pas res aquí ! Escrivètz quicòm de public, o seguètz de personas d’autras instàncias per garnir lo flux public.", + "empty_column.public": "I a pas res aquí ! Escrivètz quicòm de public, o seguètz de personas d’autras instàncias per garnir lo flux public", "follow_request.authorize": "Autorizar", "follow_request.reject": "Regetar", "getting_started.appsshort": "Apps", @@ -133,7 +133,7 @@ "lists.edit": "Modificar la lista", "lists.new.create": "Ajustar una lista", "lists.new.title_placeholder": "Títol de la nòva lista", - "lists.search": "Cercar demest los seguidors", + "lists.search": "Cercar demest lo monde que seguètz", "lists.subheading": "Vòstras listas", "loading_indicator.label": "Cargament…", "media_gallery.toggle_visible": "Modificar la visibilitat", @@ -152,10 +152,10 @@ "navigation_bar.pins": "Tuts penjats", "navigation_bar.preferences": "Preferéncias", "navigation_bar.public_timeline": "Flux public global", - "notification.favourite": "{name} a ajustat a sos favorits :", + "notification.favourite": "{name} a ajustat a sos favorits", "notification.follow": "{name} vos sèc", - "notification.mention": "{name} vos a mencionat :", - "notification.reblog": "{name} a partejat vòstre estatut :", + "notification.mention": "{name} vos a mencionat", + "notification.reblog": "{name} a partejat vòstre estatut", "notifications.clear": "Escafar", "notifications.clear_confirmation": "Volètz vertadièrament escafar totas vòstras las notificacions ?", "notifications.column_settings.alert": "Notificacions localas", @@ -171,7 +171,7 @@ "onboarding.next": "Seguent", "onboarding.page_five.public_timelines": "Lo flux local mòstra los estatuts publics del monde de vòstra instància, aquí {domain}. Lo flux federat mòstra los estatuts publics de la gent que los de {domain} sègon. Son los fluxes publics, un bon biais de trobar de mond.", "onboarding.page_four.home": "Lo flux d’acuèlh mòstra los estatuts del mond que seguètz.", - "onboarding.page_four.notifications": "La colomna de notificacions vos fa veire quand qualqu’un interagís amb vos", + "onboarding.page_four.notifications": "La colomna de notificacions vos fa veire quand qualqu’un interagís amb vos.", "onboarding.page_one.federation": "Mastodon es un malhum de servidors independents que comunican per construire un malhum mai larg. Òm los apèla instàncias.", "onboarding.page_one.handle": "Sètz sus {domain}, doncas vòstre identificant complet es {handle}", "onboarding.page_one.welcome": "Benvengut a Mastodon !", @@ -225,7 +225,7 @@ "status.open": "Desplegar aqueste estatut", "status.pin": "Penjar al perfil", "status.reblog": "Partejar", - "status.reblogged_by": "{name} a partejat :", + "status.reblogged_by": "{name} a partejat", "status.reply": "Respondre", "status.replyAll": "Respondre a la conversacion", "status.report": "Senhalar @{name}", diff --git a/config/locales/doorkeeper.oc.yml b/config/locales/doorkeeper.oc.yml index 1ec1b69e8..d83d07438 100644 --- a/config/locales/doorkeeper.oc.yml +++ b/config/locales/doorkeeper.oc.yml @@ -60,7 +60,7 @@ oc: title: I a agut un error new: able_to: Aquesta aplicacion poirà - prompt: L’aplicacion %{client_name} demanda l’accès al vòstre compte. + prompt: L’aplicacion %{client_name} demanda l’accès al vòstre compte title: Cal l’autorizacion show: title: Copiatz lo còdi d’autorizacion e pegatz-lo dins l’aplicacion. @@ -83,8 +83,8 @@ oc: invalid_grant: L’acòrdi d’autorizacion donadat es pas valid, expirat, revocat, una redireccion URI utilizat en la demanda d’autorizacion no correspond, o a estat desliurat a un altre client. invalid_redirect_uri: L’URL de redireccion es pas valida. invalid_request: La demanda a un paramètre que li manca, a una valor qu’es pas suportada, o quicòm mal format. - invalid_resource_owner: La qualificacion del proprietari de la ressorça donada es pas valid, o lo proprietari de la ressorça se pòt pas trobar. - invalid_scope: L’encastre demandat es pas valid, o mal format. + invalid_resource_owner: La qualificacion del proprietari de la ressorça donada es pas valida, o lo proprietari de la ressorça es pas trobable + invalid_scope: L’encastre demandat es pas valid, o d’un marrit format. invalid_token: expired: Lo geton d’accès a expirat revoked: Lo geton d’accès a estat revocat diff --git a/config/locales/oc.yml b/config/locales/oc.yml index a589c195e..878df32b5 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -286,7 +286,7 @@ oc: desc_html: Mostrar lo badge Personal sus la pagina de perfil title: Mostrar lo badge personal site_description: - desc_html: Afichada jos la forma de paragraf sus la pagina d’acuèlh e utilizada coma balisa meta.
Podètz utilizar de balisas HTML, coma <a> e <em>. + desc_html: Afichada jos la forma de paragraf sus la pagina d’acuèlh e utilizada coma balisa meta. Podètz utilizar de balisas HTML, en particular <a> e <em>. title: Descripcion del site site_description_extended: desc_html: Afichada sus la pagina d’informacion complementària del site
Podètz utilizar de balisas HTML @@ -296,7 +296,7 @@ oc: title: Politica de confidencialitat del site site_title: Títol del site thumbnail: - desc_html: Servís pels apercebuts via OpenGraph e las API. Talha de 1200x630px recomandada. + desc_html: Servís pels apercebuts via OpenGraph e las API. Talha de 1200x630px recomandada title: Miniatura de l’instància timeline_preview: desc_html: Mostrar lo flux public sus la pagina d’acuèlh @@ -555,7 +555,7 @@ oc: body: 'Trobatz aquí un resumit de çò qu’avètz mancat dempuèi vòstra darrièra visita lo %{since}:' mention: "%{name} vos a mencionat dins :" new_followers_summary: - one: Avètz un nòu seguidor ! Ouà   + one: Avètz un nòu seguidor ! Ouà ! other: Avètz %{count} nòus seguidors ! Qué crane ! subject: one: "Una nòva notificacion dempuèi vòstra darrièra visita \U0001F418" @@ -781,4 +781,4 @@ oc: users: invalid_email: L’adreça de corrièl es invalida invalid_otp_token: Còdi d’autentificacion en dos temps invalid - signed_in_as: Session a + signed_in_as: 'Session a :' diff --git a/config/locales/simple_form.oc.yml b/config/locales/simple_form.oc.yml index f178d1857..06c23ace2 100644 --- a/config/locales/simple_form.oc.yml +++ b/config/locales/simple_form.oc.yml @@ -4,6 +4,7 @@ oc: hints: defaults: avatar: PNG, GIF o JPG. Maximum 2 Mo. Serà retalhat en 120x120px + digest: Enviat aprèp un long moment d’inactivitat amb un resumit de las mencions qu’avètz recebudas pendent vòstra abséncia display_name: one: Demòra encara 1 caractèr other: Demòran encara %{count} caractèrs @@ -29,10 +30,12 @@ oc: data: Data display_name: Escais email: Corrièl + expires_in: Expira aprèp filtered_languages: Lengas filtradas header: Bandièra locale: Lenga locked: Far venir lo compte privat + max_uses: Limit d’utilizacion new_password: Nòu senhal note: Bio otp_attempt: Còdi Two-factor @@ -44,7 +47,7 @@ oc: setting_delete_modal: Afichar una fenèstra de confirmacion abans de suprimir un estatut setting_noindex: Èsser pas indexat pels motors de recèrca setting_reduce_motion: Reduire la velocitat de las animacions - setting_system_font_ui: Utilizar la policia Font del sisèma + setting_system_font_ui: Utilizar la polissa del sisèma setting_theme: Tèma del site setting_unfollow_modal: Afichar una confirmacion abans de quitar de sègre qualqu’un severity: Severitat @@ -53,6 +56,7 @@ oc: interactions: must_be_follower: Blocar las notificacions del mond que vos sègon pas must_be_following: Blocar las notificacions del mond que seguètz pas + must_be_following_dm: Blocar los messatges del monde que seguètz pas notification_emails: digest: Enviar un corrièl recapitulatiu favourite: Enviar un corrièl quand qualqu’un plaça vòstre estatut en favorit -- cgit From 7a8711ccacafd675d27c5fbd07ce77a5c0dd3259 Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 10 Dec 2017 09:10:47 -0600 Subject: removed app settings additions --- app/javascript/flavours/glitch/features/ui/index.js | 2 -- app/javascript/flavours/glitch/reducers/local_settings.js | 1 - 2 files changed, 3 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 1e8de033c..4a1982916 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -57,7 +57,6 @@ const mapStateToProps = state => ({ layout: state.getIn(['local_settings', 'layout']), isWide: state.getIn(['local_settings', 'stretch']), navbarUnder: state.getIn(['local_settings', 'navbar_under']), - favouriteModal: state.getIn(['local_settings', 'favourite_modal']), }); const keyMap = { @@ -104,7 +103,6 @@ export default class UI extends React.Component { isWide: PropTypes.bool, systemFontUi: PropTypes.bool, navbarUnder: PropTypes.bool, - favouriteModal: PropTypes.bool, isComposing: PropTypes.bool, hasComposingText: PropTypes.bool, location: PropTypes.object, diff --git a/app/javascript/flavours/glitch/reducers/local_settings.js b/app/javascript/flavours/glitch/reducers/local_settings.js index e4cdc49ee..69d98741b 100644 --- a/app/javascript/flavours/glitch/reducers/local_settings.js +++ b/app/javascript/flavours/glitch/reducers/local_settings.js @@ -9,7 +9,6 @@ const initialState = ImmutableMap({ layout : 'auto', stretch : true, navbar_under : false, - favourite_modal : false, side_arm : 'none', collapsed : ImmutableMap({ enabled : true, -- cgit From 2950de86c6cc8712a01d6b579cc0a8ebed6b1a26 Mon Sep 17 00:00:00 2001 From: goofy-bz Date: Sun, 10 Dec 2017 16:24:29 +0100 Subject: Update devise.fr.yml (#5963) ludicrously tiny but necessary typofix (wrong accent) --- config/locales/devise.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml index cb4d5d5f6..a9817044d 100644 --- a/config/locales/devise.fr.yml +++ b/config/locales/devise.fr.yml @@ -19,7 +19,7 @@ fr: confirmation_instructions: subject: Merci de confirmer votre inscription sur %{instance} password_change: - subject: Votre mot de passe a été modifié avec succés. + subject: Votre mot de passe a été modifié avec succès. reset_password_instructions: subject: Instructions pour changer votre mot de passe unlock_instructions: -- cgit From 066458a6593cbb708db9b46dbda787ba440273b1 Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 10 Dec 2017 09:25:44 -0600 Subject: removed one last app settings addition --- .../flavours/glitch/features/local_settings/page/index.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/javascript/flavours/glitch/features/local_settings/page/index.js b/app/javascript/flavours/glitch/features/local_settings/page/index.js index b9b00b050..62bf410c6 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/index.js @@ -59,15 +59,6 @@ export default class LocalSettingsPage extends React.PureComponent { >
- - - -

Date: Mon, 11 Dec 2017 00:33:52 +0900 Subject: Save media outside transaction (#5959) --- app/lib/activitypub/activity/create.rb | 22 +++++++++++++++++++--- app/lib/ostatus/activity/creation.rb | 21 +++++++++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 31e0abe39..3a985c19b 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -20,11 +20,13 @@ class ActivityPub::Activity::Create < ActivityPub::Activity private def process_status + media_attachments = process_attachments + ApplicationRecord.transaction do @status = Status.create!(status_params) process_tags(@status) - process_attachments(@status) + attach_media(@status, media_attachments) end resolve_thread(@status) @@ -105,22 +107,36 @@ class ActivityPub::Activity::Create < ActivityPub::Activity emoji.save end - def process_attachments(status) + def process_attachments return if @object['attachment'].nil? + media_attachments = [] + as_array(@object['attachment']).each do |attachment| next if unsupported_media_type?(attachment['mediaType']) || attachment['url'].blank? href = Addressable::URI.parse(attachment['url']).normalize.to_s - media_attachment = MediaAttachment.create(status: status, account: status.account, remote_url: href, description: attachment['name'].presence) + media_attachment = MediaAttachment.create(account: @account, remote_url: href, description: attachment['name'].presence) + media_attachments << media_attachment next if skip_download? media_attachment.file_remote_url = href media_attachment.save end + + media_attachments rescue Addressable::URI::InvalidURIError => e Rails.logger.debug e + + media_attachments + end + + def attach_media(status, media_attachments) + return if media_attachments.blank? + + media = MediaAttachment.where(status_id: nil, id: media_attachments.take(4).map(&:id)) + media.update(status_id: status.id) end def resolve_thread(status) diff --git a/app/lib/ostatus/activity/creation.rb b/app/lib/ostatus/activity/creation.rb index 3418e2420..f210e134a 100644 --- a/app/lib/ostatus/activity/creation.rb +++ b/app/lib/ostatus/activity/creation.rb @@ -26,6 +26,8 @@ class OStatus::Activity::Creation < OStatus::Activity::Base cached_reblog = reblog status = nil + media_attachments = save_media + ApplicationRecord.transaction do status = Status.create!( uri: id, @@ -44,7 +46,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base save_mentions(status) save_hashtags(status) - save_media(status) + attach_media(status, media_attachments) save_emojis(status) end @@ -126,18 +128,20 @@ class OStatus::Activity::Creation < OStatus::Activity::Base ProcessHashtagsService.new.call(parent, tags) end - def save_media(parent) - do_not_download = DomainBlock.find_by(domain: parent.account.domain)&.reject_media? + def save_media + do_not_download = DomainBlock.find_by(domain: @account.domain)&.reject_media? + media_attachments = [] @xml.xpath('./xmlns:link[@rel="enclosure"]', xmlns: OStatus::TagManager::XMLNS).each do |link| next unless link['href'] - media = MediaAttachment.where(status: parent, remote_url: link['href']).first_or_initialize(account: parent.account, status: parent, remote_url: link['href']) + media = MediaAttachment.where(status: nil, remote_url: link['href']).first_or_initialize(account: @account, status: nil, remote_url: link['href']) parsed_url = Addressable::URI.parse(link['href']).normalize next if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.empty? media.save + media_attachments << media next if do_not_download @@ -148,6 +152,15 @@ class OStatus::Activity::Creation < OStatus::Activity::Base next end end + + media_attachments + end + + def attach_media(parent, media_attachments) + return if media_attachments.blank? + + media = MediaAttachment.where(status_id: nil, id: media_attachments.take(4).map(&:id)) + media.update(status_id: parent.id) end def save_emojis(parent) -- cgit From 98aa96b8d6800f049e6b185b15a6c215042b8f08 Mon Sep 17 00:00:00 2001 From: Lynx Kotoura Date: Mon, 11 Dec 2017 01:56:05 +0900 Subject: Refix extraspace for emojis (#5964) Fix misalignment between emoji sizes --- app/javascript/styles/mastodon/components.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index f76470da7..def149e24 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -803,7 +803,7 @@ .emojione { width: 24px; height: 24px; - margin: -3px 0 0; + margin: -1px 0 0; } } -- cgit From 6a82939adb823c9a65829c23dc7109a96480befe Mon Sep 17 00:00:00 2001 From: Andrea Scarpino Date: Sun, 10 Dec 2017 19:35:46 +0100 Subject: Fix account and tag searches with leading/trailing spaces (#5965) * Strip leading & trailing spaces from account query * Strip leading & trailing spaces from tag search --- app/models/tag.rb | 2 +- app/services/account_search_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/tag.rb b/app/models/tag.rb index 0fa08e157..dc2c8d129 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -23,7 +23,7 @@ class Tag < ApplicationRecord class << self def search_for(term, limit = 5) - pattern = sanitize_sql_like(term) + '%' + pattern = sanitize_sql_like(term.strip) + '%' Tag.where('lower(name) like lower(?)', pattern).order(:name).limit(limit) end end diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index a289ceac4..3be110665 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -4,7 +4,7 @@ class AccountSearchService < BaseService attr_reader :query, :limit, :options, :account def call(query, limit, account = nil, options = {}) - @query = query + @query = query.strip @limit = limit @options = options @account = account -- cgit From d08d0f9f3335b2edbacf1febd4584eed9a7d1a11 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 7 Dec 2017 14:42:21 -0800 Subject: Ruby intl8n for themes --- app/javascript/flavours/glitch/names.yml | 6 ++++++ app/javascript/flavours/vanilla/names.yml | 6 ++++++ app/javascript/skins/vanilla/win95.scss | 1 - app/javascript/skins/vanilla/win95/common.scss | 1 + app/javascript/skins/vanilla/win95/names.yml | 4 ++++ app/views/settings/preferences/show.html.haml | 4 ++-- config/initializers/locale.rb | 6 ++++++ 7 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 app/javascript/flavours/glitch/names.yml create mode 100644 app/javascript/flavours/vanilla/names.yml delete mode 100644 app/javascript/skins/vanilla/win95.scss create mode 100644 app/javascript/skins/vanilla/win95/common.scss create mode 100644 app/javascript/skins/vanilla/win95/names.yml create mode 100644 config/initializers/locale.rb diff --git a/app/javascript/flavours/glitch/names.yml b/app/javascript/flavours/glitch/names.yml new file mode 100644 index 000000000..b3d579cb2 --- /dev/null +++ b/app/javascript/flavours/glitch/names.yml @@ -0,0 +1,6 @@ +en: + flavours: + glitch: Glitch Edition + skins: + glitch: + default: Default diff --git a/app/javascript/flavours/vanilla/names.yml b/app/javascript/flavours/vanilla/names.yml new file mode 100644 index 000000000..8816fcb3a --- /dev/null +++ b/app/javascript/flavours/vanilla/names.yml @@ -0,0 +1,6 @@ +en: + flavours: + vanilla: Vanilla Mastodon + skins: + vanilla: + default: Default diff --git a/app/javascript/skins/vanilla/win95.scss b/app/javascript/skins/vanilla/win95.scss deleted file mode 100644 index 298f6ee9d..000000000 --- a/app/javascript/skins/vanilla/win95.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'styles/win95'; diff --git a/app/javascript/skins/vanilla/win95/common.scss b/app/javascript/skins/vanilla/win95/common.scss new file mode 100644 index 000000000..298f6ee9d --- /dev/null +++ b/app/javascript/skins/vanilla/win95/common.scss @@ -0,0 +1 @@ +@import 'styles/win95'; diff --git a/app/javascript/skins/vanilla/win95/names.yml b/app/javascript/skins/vanilla/win95/names.yml new file mode 100644 index 000000000..2083084a2 --- /dev/null +++ b/app/javascript/skins/vanilla/win95/names.yml @@ -0,0 +1,4 @@ +en: + skins: + vanilla: + win95: Masto95 diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index 9564c0399..e2e48a699 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -27,8 +27,8 @@ .fields-group - if Themes.instance.flavours.size > 1 - = f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("themes.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false - = f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("themes.#{current_flavour}.skins.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false + = f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("flavours.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false + = f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("skins.#{current_flavour}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false = f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label = f.input :setting_boost_modal, as: :boolean, wrapper: :with_label diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb new file mode 100644 index 000000000..04ed31646 --- /dev/null +++ b/config/initializers/locale.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'flavours', '*', 'names.{rb,yml}').to_s] +I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'flavours', '*', 'names', '*.{rb,yml}').to_s] +I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'skins', '*', '*', 'names.{rb,yml}').to_s] +I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'skins', '*', '*', 'names', '*.{rb,yml}').to_s] -- cgit From 83944300815cda2cd67c93ec7ca7f3d981b561fa Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 7 Dec 2017 14:57:49 -0800 Subject: Removed unused theme localization key --- config/locales/en.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 0ca320e1a..c8acc237a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -687,8 +687,6 @@ en:

Originally adapted from the Discourse privacy policy.

title: "%{instance} Terms of Service and Privacy Policy" - themes: - default: Mastodon time: formats: default: "%b %d, %Y, %H:%M" -- cgit From b28cd6769c77190160e4ffefde78b324c7aad269 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 7 Dec 2017 19:07:47 -0800 Subject: Javascript intl8n flavour support --- app/controllers/application_controller.rb | 2 + app/javascript/flavours/glitch/locales/ar.js | 7 + app/javascript/flavours/glitch/locales/bg.js | 7 + app/javascript/flavours/glitch/locales/ca.js | 7 + app/javascript/flavours/glitch/locales/de.js | 7 + app/javascript/flavours/glitch/locales/en.js | 50 +++++ app/javascript/flavours/glitch/locales/eo.js | 7 + app/javascript/flavours/glitch/locales/es.js | 7 + app/javascript/flavours/glitch/locales/fa.js | 7 + app/javascript/flavours/glitch/locales/fi.js | 7 + app/javascript/flavours/glitch/locales/fr.js | 7 + app/javascript/flavours/glitch/locales/he.js | 7 + app/javascript/flavours/glitch/locales/hr.js | 7 + app/javascript/flavours/glitch/locales/hu.js | 7 + app/javascript/flavours/glitch/locales/id.js | 7 + app/javascript/flavours/glitch/locales/io.js | 7 + app/javascript/flavours/glitch/locales/it.js | 7 + app/javascript/flavours/glitch/locales/ja.js | 7 + app/javascript/flavours/glitch/locales/ko.js | 7 + app/javascript/flavours/glitch/locales/nl.js | 7 + app/javascript/flavours/glitch/locales/no.js | 7 + app/javascript/flavours/glitch/locales/oc.js | 7 + app/javascript/flavours/glitch/locales/pl.js | 48 +++++ app/javascript/flavours/glitch/locales/pt-BR.js | 7 + app/javascript/flavours/glitch/locales/pt.js | 7 + app/javascript/flavours/glitch/locales/ru.js | 7 + app/javascript/flavours/glitch/locales/sv.js | 7 + app/javascript/flavours/glitch/locales/th.js | 7 + app/javascript/flavours/glitch/locales/tr.js | 7 + app/javascript/flavours/glitch/locales/uk.js | 7 + app/javascript/flavours/glitch/locales/zh-CN.js | 7 + app/javascript/flavours/glitch/locales/zh-HK.js | 7 + app/javascript/flavours/glitch/locales/zh-TW.js | 7 + app/javascript/flavours/glitch/theme.yml | 6 + app/javascript/flavours/vanilla/theme.yml | 10 +- app/javascript/glitch/locales/en.json | 46 ----- app/javascript/glitch/locales/pl.json | 44 ---- app/javascript/locales/locale-data/README.md | 221 +++++++++++++++++++++ app/javascript/locales/locale-data/oc.js | 108 ++++++++++ .../mastodon/locales/locale-data/README.md | 221 --------------------- app/javascript/mastodon/locales/locale-data/oc.js | 108 ---------- app/lib/themes.rb | 8 + app/views/layouts/application.html.haml | 5 +- config/webpack/configuration.js | 5 +- config/webpack/generateLocalePacks.js | 108 +++++----- config/webpack/shared.js | 8 +- 46 files changed, 722 insertions(+), 486 deletions(-) create mode 100644 app/javascript/flavours/glitch/locales/ar.js create mode 100644 app/javascript/flavours/glitch/locales/bg.js create mode 100644 app/javascript/flavours/glitch/locales/ca.js create mode 100644 app/javascript/flavours/glitch/locales/de.js create mode 100644 app/javascript/flavours/glitch/locales/en.js create mode 100644 app/javascript/flavours/glitch/locales/eo.js create mode 100644 app/javascript/flavours/glitch/locales/es.js create mode 100644 app/javascript/flavours/glitch/locales/fa.js create mode 100644 app/javascript/flavours/glitch/locales/fi.js create mode 100644 app/javascript/flavours/glitch/locales/fr.js create mode 100644 app/javascript/flavours/glitch/locales/he.js create mode 100644 app/javascript/flavours/glitch/locales/hr.js create mode 100644 app/javascript/flavours/glitch/locales/hu.js create mode 100644 app/javascript/flavours/glitch/locales/id.js create mode 100644 app/javascript/flavours/glitch/locales/io.js create mode 100644 app/javascript/flavours/glitch/locales/it.js create mode 100644 app/javascript/flavours/glitch/locales/ja.js create mode 100644 app/javascript/flavours/glitch/locales/ko.js create mode 100644 app/javascript/flavours/glitch/locales/nl.js create mode 100644 app/javascript/flavours/glitch/locales/no.js create mode 100644 app/javascript/flavours/glitch/locales/oc.js create mode 100644 app/javascript/flavours/glitch/locales/pl.js create mode 100644 app/javascript/flavours/glitch/locales/pt-BR.js create mode 100644 app/javascript/flavours/glitch/locales/pt.js create mode 100644 app/javascript/flavours/glitch/locales/ru.js create mode 100644 app/javascript/flavours/glitch/locales/sv.js create mode 100644 app/javascript/flavours/glitch/locales/th.js create mode 100644 app/javascript/flavours/glitch/locales/tr.js create mode 100644 app/javascript/flavours/glitch/locales/uk.js create mode 100644 app/javascript/flavours/glitch/locales/zh-CN.js create mode 100644 app/javascript/flavours/glitch/locales/zh-HK.js create mode 100644 app/javascript/flavours/glitch/locales/zh-TW.js delete mode 100644 app/javascript/glitch/locales/en.json delete mode 100644 app/javascript/glitch/locales/pl.json create mode 100644 app/javascript/locales/locale-data/README.md create mode 100644 app/javascript/locales/locale-data/oc.js delete mode 100644 app/javascript/mastodon/locales/locale-data/README.md delete mode 100644 app/javascript/mastodon/locales/locale-data/oc.js diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c6d148c8c..3b2070f39 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -62,6 +62,7 @@ class ApplicationController < ActionController::Base pack: pack_name, preload: nil, skin: nil, + supported_locales: data['locales'], } if data['pack'][pack_name].is_a?(Hash) pack_data[:common] = nil if data['pack'][pack_name]['use_common'] == false @@ -93,6 +94,7 @@ class ApplicationController < ActionController::Base pack: nil, preload: nil, skin: nil, + supported_locales: data['locales'], } end diff --git a/app/javascript/flavours/glitch/locales/ar.js b/app/javascript/flavours/glitch/locales/ar.js new file mode 100644 index 000000000..1081147d5 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/ar.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/ar.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/bg.js b/app/javascript/flavours/glitch/locales/bg.js new file mode 100644 index 000000000..979039376 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/bg.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/bg.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/ca.js b/app/javascript/flavours/glitch/locales/ca.js new file mode 100644 index 000000000..baf76bd6f --- /dev/null +++ b/app/javascript/flavours/glitch/locales/ca.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/ca.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/de.js b/app/javascript/flavours/glitch/locales/de.js new file mode 100644 index 000000000..ce6453623 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/de.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/de.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/en.js b/app/javascript/flavours/glitch/locales/en.js new file mode 100644 index 000000000..96182196e --- /dev/null +++ b/app/javascript/flavours/glitch/locales/en.js @@ -0,0 +1,50 @@ +import inherited from 'mastodon/locales/en.json'; + +const messages = { + "getting_started.open_source_notice": "Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.", + "layout.auto": "Auto", + "layout.current_is": "Your current layout is:", + "layout.desktop": "Desktop", + "layout.mobile": "Mobile", + "navigation_bar.app_settings": "App settings", + "getting_started.onboarding": "Show me around", + "onboarding.page_one.federation": "{domain} is an 'instance' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.", + "onboarding.page_one.welcome": "Welcome to {domain}!", + "onboarding.page_six.github": "{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.", + "settings.auto_collapse": "Automatic collapsing", + "settings.auto_collapse_all": "Everything", + "settings.auto_collapse_lengthy": "Lengthy toots", + "settings.auto_collapse_media": "Toots with media", + "settings.auto_collapse_notifications": "Notifications", + "settings.auto_collapse_reblogs": "Boosts", + "settings.auto_collapse_replies": "Replies", + "settings.close": "Close", + "settings.collapsed_statuses": "Collapsed toots", + "settings.enable_collapsed": "Enable collapsed toots", + "settings.general": "General", + "settings.image_backgrounds": "Image backgrounds", + "settings.image_backgrounds_media": "Preview collapsed toot media", + "settings.image_backgrounds_users": "Give collapsed toots an image background", + "settings.media": "Media", + "settings.media_letterbox": "Letterbox media", + "settings.media_fullwidth": "Full-width media previews", + "settings.preferences": "User preferences", + "settings.wide_view": "Wide view (Desktop mode only)", + "settings.navbar_under": "Navbar at the bottom (Mobile only)", + "status.collapse": "Collapse", + "status.uncollapse": "Uncollapse", + + "home.column_settings.show_direct": "Show DMs", + + "notification.markForDeletion": "Mark for deletion", + "notifications.clear": "Clear all my notifications", + "notifications.marked_clear_confirmation": "Are you sure you want to permanently clear all selected notifications?", + "notifications.marked_clear": "Clear selected notifications", + + "notification_purge.btn_all": "Select\nall", + "notification_purge.btn_none": "Select\nnone", + "notification_purge.btn_invert": "Invert\nselection", + "notification_purge.btn_apply": "Clear\nselected", +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/eo.js b/app/javascript/flavours/glitch/locales/eo.js new file mode 100644 index 000000000..04192f506 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/eo.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/eo.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/es.js b/app/javascript/flavours/glitch/locales/es.js new file mode 100644 index 000000000..456df3c47 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/es.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/es.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/fa.js b/app/javascript/flavours/glitch/locales/fa.js new file mode 100644 index 000000000..d82461a1a --- /dev/null +++ b/app/javascript/flavours/glitch/locales/fa.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/fa.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/fi.js b/app/javascript/flavours/glitch/locales/fi.js new file mode 100644 index 000000000..11c3cd082 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/fi.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/fi.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/fr.js b/app/javascript/flavours/glitch/locales/fr.js new file mode 100644 index 000000000..8562f5594 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/fr.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/fr.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/he.js b/app/javascript/flavours/glitch/locales/he.js new file mode 100644 index 000000000..99516ee0c --- /dev/null +++ b/app/javascript/flavours/glitch/locales/he.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/he.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/hr.js b/app/javascript/flavours/glitch/locales/hr.js new file mode 100644 index 000000000..dbf9b4b9f --- /dev/null +++ b/app/javascript/flavours/glitch/locales/hr.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/hr.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/hu.js b/app/javascript/flavours/glitch/locales/hu.js new file mode 100644 index 000000000..1f0849af3 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/hu.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/hu.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/id.js b/app/javascript/flavours/glitch/locales/id.js new file mode 100644 index 000000000..07e5f7e56 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/id.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/id.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/io.js b/app/javascript/flavours/glitch/locales/io.js new file mode 100644 index 000000000..74ea6fae6 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/io.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/io.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/it.js b/app/javascript/flavours/glitch/locales/it.js new file mode 100644 index 000000000..90f543093 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/it.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/it.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/ja.js b/app/javascript/flavours/glitch/locales/ja.js new file mode 100644 index 000000000..cc7143443 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/ja.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/ja.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/ko.js b/app/javascript/flavours/glitch/locales/ko.js new file mode 100644 index 000000000..3b55f89b9 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/ko.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/ko.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/nl.js b/app/javascript/flavours/glitch/locales/nl.js new file mode 100644 index 000000000..17c371c58 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/nl.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/nl.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/no.js b/app/javascript/flavours/glitch/locales/no.js new file mode 100644 index 000000000..794b1da25 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/no.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/no.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/oc.js b/app/javascript/flavours/glitch/locales/oc.js new file mode 100644 index 000000000..8f161fd8c --- /dev/null +++ b/app/javascript/flavours/glitch/locales/oc.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/oc.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/pl.js b/app/javascript/flavours/glitch/locales/pl.js new file mode 100644 index 000000000..ab96dec60 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/pl.js @@ -0,0 +1,48 @@ +import inherited from 'mastodon/locales/pl.json'; + +const messages = { + "getting_started.open_source_notice": "Glitchsoc jest wolnym i otwartoźródłowym forkiem oprogramowania {Mastodon}. Możesz współtworzyć projekt lub zgłaszać błędy na GitHubie pod adresem {github}.", + "layout.auto": "Automatyczny", + "layout.current_is": "Twój obecny układ to:", + "layout.desktop": "Desktopowy", + "layout.mobile": "Mobilny", + "navigation_bar.app_settings": "Ustawienia aplikacji", + "getting_started.onboarding": "Rozejrzyj się", + "onboarding.page_one.federation": "{domain} jest 'instancją' Mastodona. Mastodon to sieć działających niezależnie serwerów tworzących jedną sieć społecznościową. Te serwery nazywane są instancjami.", + "onboarding.page_one.welcome": "Witamy na {domain}!", + "onboarding.page_six.github": "{domain} jest oparty na Glitchsoc. Glitchsoc jest {forkiem} {Mastodon}a kompatybilnym z każdym klientem i aplikacją Mastodona. Glitchsoc jest całkowicie wolnym i otwartoźródłowym oprogramowaniem. Możesz zgłaszać błędy i sugestie funkcji oraz współtworzyć projekt na {github}.", + "settings.auto_collapse": "Automatyczne zwijanie", + "settings.auto_collapse_all": "Wszystko", + "settings.auto_collapse_lengthy": "Długie wpisy", + "settings.auto_collapse_media": "Wpisy z zawartością multimedialną", + "settings.auto_collapse_notifications": "Powiadomienia", + "settings.auto_collapse_reblogs": "Podbicia", + "settings.auto_collapse_replies": "Odpowiedzi", + "settings.close": "Zamknij", + "settings.collapsed_statuses": "Zwijanie wpisów", + "settings.enable_collapsed": "Włącz zwijanie wpisów", + "settings.general": "Ogólne", + "settings.image_backgrounds": "Obrazy w tle", + "settings.image_backgrounds_media": "Wyświetlaj zawartość multimedialną zwiniętych wpisów", + "settings.image_backgrounds_users": "Nadaj tło zwiniętym wpisom", + "settings.media": "Zawartość multimedialna", + "settings.media_letterbox": "Letterbox media", + "settings.media_fullwidth": "Podgląd zawartości multimedialnej o pełnej szerokości", + "settings.preferences": "Preferencje użyytkownika", + "settings.wide_view": "Szeroki widok (tylko w trybie desktopowym)", + "settings.navbar_under": "Pasek nawigacji na dole (tylko w trybie mobilnym)", + "status.collapse": "Zwiń", + "status.uncollapse": "Rozwiń", + + "notification.markForDeletion": "Oznacz do usunięcia", + "notifications.clear": "Wyczyść wszystkie powiadomienia", + "notifications.marked_clear_confirmation": "Czy na pewno chcesz bezpowrtonie usunąć wszystkie powiadomienia?", + "notifications.marked_clear": "Usuń zaznaczone powiadomienia", + + "notification_purge.btn_all": "Zaznacz\nwszystkie", + "notification_purge.btn_none": "Odznacz\nwszystkie", + "notification_purge.btn_invert": "Odwróć\nzaznaczenie", + "notification_purge.btn_apply": "Usuń\nzaznaczone" +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/pt-BR.js b/app/javascript/flavours/glitch/locales/pt-BR.js new file mode 100644 index 000000000..6fed635f8 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/pt-BR.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/pt-BR.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/pt.js b/app/javascript/flavours/glitch/locales/pt.js new file mode 100644 index 000000000..0156f55ff --- /dev/null +++ b/app/javascript/flavours/glitch/locales/pt.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/pt.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/ru.js b/app/javascript/flavours/glitch/locales/ru.js new file mode 100644 index 000000000..0e9f1de71 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/ru.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/ru.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/sv.js b/app/javascript/flavours/glitch/locales/sv.js new file mode 100644 index 000000000..b62c353fe --- /dev/null +++ b/app/javascript/flavours/glitch/locales/sv.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/sv.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/th.js b/app/javascript/flavours/glitch/locales/th.js new file mode 100644 index 000000000..e939f8631 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/th.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/th.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/tr.js b/app/javascript/flavours/glitch/locales/tr.js new file mode 100644 index 000000000..c2b740617 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/tr.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/tr.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/uk.js b/app/javascript/flavours/glitch/locales/uk.js new file mode 100644 index 000000000..ab6d9a7dc --- /dev/null +++ b/app/javascript/flavours/glitch/locales/uk.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/uk.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/zh-CN.js b/app/javascript/flavours/glitch/locales/zh-CN.js new file mode 100644 index 000000000..944588e02 --- /dev/null +++ b/app/javascript/flavours/glitch/locales/zh-CN.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/zh-CN.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/zh-HK.js b/app/javascript/flavours/glitch/locales/zh-HK.js new file mode 100644 index 000000000..b71c81f2b --- /dev/null +++ b/app/javascript/flavours/glitch/locales/zh-HK.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/zh-HK.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/zh-TW.js b/app/javascript/flavours/glitch/locales/zh-TW.js new file mode 100644 index 000000000..de2b7769c --- /dev/null +++ b/app/javascript/flavours/glitch/locales/zh-TW.js @@ -0,0 +1,7 @@ +import inherited from 'mastodon/locales/zh-TW.json'; + +const messages = { + // No translations available. +}; + +export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/theme.yml b/app/javascript/flavours/glitch/theme.yml index fe09fa105..9437e2c04 100644 --- a/app/javascript/flavours/glitch/theme.yml +++ b/app/javascript/flavours/glitch/theme.yml @@ -20,6 +20,12 @@ pack: settings: share: packs/share.js +# (OPTIONAL) The directory which contains localization files for +# the flavour, relative to this directory. The contents of this +# directory must be `.js` or `.json` files whose names correspond to +# language tags and whose default exports are a messages object. +locales: locales + # (OPTIONAL) The directory which contains the pack files. # Defaults to the theme directory (`app/javascript/themes/[theme]`), # which should be sufficient for like 99% of use-cases lol. diff --git a/app/javascript/flavours/vanilla/theme.yml b/app/javascript/flavours/vanilla/theme.yml index 67fd9723e..491ea173b 100644 --- a/app/javascript/flavours/vanilla/theme.yml +++ b/app/javascript/flavours/vanilla/theme.yml @@ -20,13 +20,17 @@ pack: settings: share: share.js +# (OPTIONAL) The directory which contains localization files for +# the flavour, relative to this directory. +locales: ../../mastodon/locales + # (OPTIONAL) The directory which contains the pack files. -# Defaults to the theme directory (`app/javascript/themes/[theme]`), -# but in the case of the vanilla Mastodon theme the pack files are +# Defaults to this directory (`app/javascript/flavour/[flavour]`), +# but in the case of the vanilla Mastodon flavour the pack files are # somewhere else. pack_directory: app/javascript/packs -# (OPTIONAL) By default the theme will fallback to the default theme +# (OPTIONAL) By default the theme will fallback to the default flavour # if a particular pack is not provided. You can specify different # fallbacks here, or disable fallback behaviours altogether by # specifying a `null` value. diff --git a/app/javascript/glitch/locales/en.json b/app/javascript/glitch/locales/en.json deleted file mode 100644 index 0276cb837..000000000 --- a/app/javascript/glitch/locales/en.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "getting_started.open_source_notice": "Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.", - "layout.auto": "Auto", - "layout.current_is": "Your current layout is:", - "layout.desktop": "Desktop", - "layout.mobile": "Mobile", - "navigation_bar.app_settings": "App settings", - "getting_started.onboarding": "Show me around", - "onboarding.page_one.federation": "{domain} is an 'instance' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.", - "onboarding.page_one.welcome": "Welcome to {domain}!", - "onboarding.page_six.github": "{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.", - "settings.auto_collapse": "Automatic collapsing", - "settings.auto_collapse_all": "Everything", - "settings.auto_collapse_lengthy": "Lengthy toots", - "settings.auto_collapse_media": "Toots with media", - "settings.auto_collapse_notifications": "Notifications", - "settings.auto_collapse_reblogs": "Boosts", - "settings.auto_collapse_replies": "Replies", - "settings.close": "Close", - "settings.collapsed_statuses": "Collapsed toots", - "settings.enable_collapsed": "Enable collapsed toots", - "settings.general": "General", - "settings.image_backgrounds": "Image backgrounds", - "settings.image_backgrounds_media": "Preview collapsed toot media", - "settings.image_backgrounds_users": "Give collapsed toots an image background", - "settings.media": "Media", - "settings.media_letterbox": "Letterbox media", - "settings.media_fullwidth": "Full-width media previews", - "settings.preferences": "User preferences", - "settings.wide_view": "Wide view (Desktop mode only)", - "settings.navbar_under": "Navbar at the bottom (Mobile only)", - "status.collapse": "Collapse", - "status.uncollapse": "Uncollapse", - - "home.column_settings.show_direct": "Show DMs", - - "notification.markForDeletion": "Mark for deletion", - "notifications.clear": "Clear all my notifications", - "notifications.marked_clear_confirmation": "Are you sure you want to permanently clear all selected notifications?", - "notifications.marked_clear": "Clear selected notifications", - - "notification_purge.btn_all": "Select\nall", - "notification_purge.btn_none": "Select\nnone", - "notification_purge.btn_invert": "Invert\nselection", - "notification_purge.btn_apply": "Clear\nselected" -} diff --git a/app/javascript/glitch/locales/pl.json b/app/javascript/glitch/locales/pl.json deleted file mode 100644 index 1481b6a2a..000000000 --- a/app/javascript/glitch/locales/pl.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "getting_started.open_source_notice": "Glitchsoc jest wolnym i otwartoźródłowym forkiem oprogramowania {Mastodon}. Możesz współtworzyć projekt lub zgłaszać błędy na GitHubie pod adresem {github}.", - "layout.auto": "Automatyczny", - "layout.current_is": "Twój obecny układ to:", - "layout.desktop": "Desktopowy", - "layout.mobile": "Mobilny", - "navigation_bar.app_settings": "Ustawienia aplikacji", - "getting_started.onboarding": "Rozejrzyj się", - "onboarding.page_one.federation": "{domain} jest 'instancją' Mastodona. Mastodon to sieć działających niezależnie serwerów tworzących jedną sieć społecznościową. Te serwery nazywane są instancjami.", - "onboarding.page_one.welcome": "Witamy na {domain}!", - "onboarding.page_six.github": "{domain} jest oparty na Glitchsoc. Glitchsoc jest {forkiem} {Mastodon}a kompatybilnym z każdym klientem i aplikacją Mastodona. Glitchsoc jest całkowicie wolnym i otwartoźródłowym oprogramowaniem. Możesz zgłaszać błędy i sugestie funkcji oraz współtworzyć projekt na {github}.", - "settings.auto_collapse": "Automatyczne zwijanie", - "settings.auto_collapse_all": "Wszystko", - "settings.auto_collapse_lengthy": "Długie wpisy", - "settings.auto_collapse_media": "Wpisy z zawartością multimedialną", - "settings.auto_collapse_notifications": "Powiadomienia", - "settings.auto_collapse_reblogs": "Podbicia", - "settings.auto_collapse_replies": "Odpowiedzi", - "settings.close": "Zamknij", - "settings.collapsed_statuses": "Zwijanie wpisów", - "settings.enable_collapsed": "Włącz zwijanie wpisów", - "settings.general": "Ogólne", - "settings.image_backgrounds": "Obrazy w tle", - "settings.image_backgrounds_media": "Wyświetlaj zawartość multimedialną zwiniętych wpisów", - "settings.image_backgrounds_users": "Nadaj tło zwiniętym wpisom", - "settings.media": "Zawartość multimedialna", - "settings.media_letterbox": "Letterbox media", - "settings.media_fullwidth": "Podgląd zawartości multimedialnej o pełnej szerokości", - "settings.preferences": "Preferencje użyytkownika", - "settings.wide_view": "Szeroki widok (tylko w trybie desktopowym)", - "settings.navbar_under": "Pasek nawigacji na dole (tylko w trybie mobilnym)", - "status.collapse": "Zwiń", - "status.uncollapse": "Rozwiń", - - "notification.markForDeletion": "Oznacz do usunięcia", - "notifications.clear": "Wyczyść wszystkie powiadomienia", - "notifications.marked_clear_confirmation": "Czy na pewno chcesz bezpowrtonie usunąć wszystkie powiadomienia?", - "notifications.marked_clear": "Usuń zaznaczone powiadomienia", - - "notification_purge.btn_all": "Zaznacz\nwszystkie", - "notification_purge.btn_none": "Odznacz\nwszystkie", - "notification_purge.btn_invert": "Odwróć\nzaznaczenie", - "notification_purge.btn_apply": "Usuń\nzaznaczone" -} diff --git a/app/javascript/locales/locale-data/README.md b/app/javascript/locales/locale-data/README.md new file mode 100644 index 000000000..83368fae7 --- /dev/null +++ b/app/javascript/locales/locale-data/README.md @@ -0,0 +1,221 @@ +# Custom Locale Data + +This folder is used to store custom locale data. These custom locale data are +not yet provided by [Unicode Common Locale Data Repository](http://cldr.unicode.org/development/new-cldr-developers) +and hence not provided in [react-intl/locale-data/*](https://github.com/yahoo/react-intl). + +The locale data should support [Locale Data APIs](https://github.com/yahoo/react-intl/wiki/API#locale-data-apis) +of the react-intl library. + +It is recommended to start your custom locale data from this sample English +locale data ([*](#plural-rules)): + +```javascript +/*eslint eqeqeq: "off"*/ +/*eslint no-nested-ternary: "off"*/ + +export default [ + { + locale: "en", + pluralRuleFunction: function(e, a) { + var n = String(e).split("."), + l = !n[1], + o = Number(n[0]) == e, + t = o && n[0].slice(-1), + r = o && n[0].slice(-2); + return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other" + }, + fields: { + year: { + displayName: "year", + relative: { + 0: "this year", + 1: "next year", + "-1": "last year" + }, + relativeTime: { + future: { + one: "in {0} year", + other: "in {0} years" + }, + past: { + one: "{0} year ago", + other: "{0} years ago" + } + } + }, + month: { + displayName: "month", + relative: { + 0: "this month", + 1: "next month", + "-1": "last month" + }, + relativeTime: { + future: { + one: "in {0} month", + other: "in {0} months" + }, + past: { + one: "{0} month ago", + other: "{0} months ago" + } + } + }, + day: { + displayName: "day", + relative: { + 0: "today", + 1: "tomorrow", + "-1": "yesterday" + }, + relativeTime: { + future: { + one: "in {0} day", + other: "in {0} days" + }, + past: { + one: "{0} day ago", + other: "{0} days ago" + } + } + }, + hour: { + displayName: "hour", + relativeTime: { + future: { + one: "in {0} hour", + other: "in {0} hours" + }, + past: { + one: "{0} hour ago", + other: "{0} hours ago" + } + } + }, + minute: { + displayName: "minute", + relativeTime: { + future: { + one: "in {0} minute", + other: "in {0} minutes" + }, + past: { + one: "{0} minute ago", + other: "{0} minutes ago" + } + } + }, + second: { + displayName: "second", + relative: { + 0: "now" + }, + relativeTime: { + future: { + one: "in {0} second", + other: "in {0} seconds" + }, + past: { + one: "{0} second ago", + other: "{0} seconds ago" + } + } + } + } + } +] + +``` + +## Notes + +### Plural Rules + +The function `pluralRuleFunction()` should return the key to proper string of +a plural form(s). The purpose of the function is to provide key of translate +strings of correct plural form according. The different forms are described in +[CLDR's Plural Rules][cldr-plural-rules], + +[cldr-plural-rules]: http://cldr.unicode.org/index/cldr-spec/plural-rules + +#### Quick Overview on CLDR Rules + +Let's take English as an example. + +When you describe a number, you can be either describe it as: +* Cardinals: 1st, 2nd, 3rd ... 11th, 12th ... 21st, 22nd, 23nd .... +* Ordinals: 1, 2, 3 ... + +In any of these cases, the nouns will reflect the number with singular or plural +form. For example: +* in 0 days +* in 1 day +* in 2 days + +The `pluralRuleFunction` receives 2 parameters: +* `e`: a string representation of the number. Such as, "`1`", "`2`", "`2.1`". +* `a`: `true` if this is "cardinal" type of description. `false` for ordinal and other case. + +#### How you should write `pluralRuleFunction` + +The first rule to write pluralRuleFunction is never translate the output string +into your language. [Plural Rules][cldr-plural-rules] specified you should use +these as the return values: + + * "`zero`" + * "`one`" (singular) + * "`two`" (dual) + * "`few`" (paucal) + * "`many`" (also used for fractions if they have a separate class) + * "`other`" (required—general plural form—also used if the language only has a single form) + +Again, we'll use English as the example here. + +Let's read the `return` statement in the pluralRuleFunction above: +```javascript + return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other" +``` + +This nested ternary is hard to read. It basically means: +```javascript +// e: the number variable to examine +// a: "true" if cardinals +// l: "true" if the variable e has nothin after decimal mark (e.g. "1.0" would be false) +// o: "true" if the variable e is an integer +// t: the "ones" of the number. e.g. "3" for number "9123" +// r: the "ones" and "tens" of the number. e.g. "23" for number "9123" +if (a == true) { + if (t == 1 && r != 11) { + return "one"; // i.e. 1st, 21st, 101st, 121st ... + } else if (t == 2 && r != 12) { + return "two"; // i.e. 2nd, 22nd, 102nd, 122nd ... + } else if (t == 3 && r != 13) { + return "few"; // i.e. 3rd, 23rd, 103rd, 123rd ... + } else { + return "other"; // i.e. 4th, 11th, 12th, 24th ... + } +} else { + if (e == 1 && l) { + return "one"; // i.e. 1 day + } else { + return "other"; // i.e. 0 days, 2 days, 3 days + } +} +``` + +If your language, like French, do not have complicated cardinal rules, you may +use the French's version of it: +```javascript +function (e, a) { + return a ? 1 == e ? "one" : "other" : e >= 0 && e < 2 ? "one" : "other"; +} +``` + +If your language, like Chinese, do not have any pluralization rule at all you +may use the Chinese's version of it: +```javascript +function (e, a) { + return "other"; +} +``` diff --git a/app/javascript/locales/locale-data/oc.js b/app/javascript/locales/locale-data/oc.js new file mode 100644 index 000000000..c4b56350b --- /dev/null +++ b/app/javascript/locales/locale-data/oc.js @@ -0,0 +1,108 @@ +/*eslint eqeqeq: "off"*/ +/*eslint no-nested-ternary: "off"*/ +/*eslint quotes: "off"*/ + +export default [{ + locale: "oc", + pluralRuleFunction: function (e, a) { + return a ? 1 == e ? "one" : "other" : e >= 0 && e < 2 ? "one" : "other"; + }, + fields: { + year: { + displayName: "an", + relative: { + 0: "ongan", + 1: "l'an que ven", + "-1": "l'an passat", + }, + relativeTime: { + future: { + one: "dins {0} an", + other: "dins {0} ans", + }, + past: { + one: "fa {0} an", + other: "fa {0} ans", + }, + }, + }, + month: { + displayName: "mes", + relative: { + 0: "aqueste mes", + 1: "lo mes que ven", + "-1": "lo mes passat", + }, + relativeTime: { + future: { + one: "dins {0} mes", + other: "dins {0} meses", + }, + past: { + one: "fa {0} mes", + other: "fa {0} meses", + }, + }, + }, + day: { + displayName: "jorn", + relative: { + 0: "uèi", + 1: "deman", + "-1": "ièr", + }, + relativeTime: { + future: { + one: "dins {0} jorn", + other: "dins {0} jorns", + }, + past: { + one: "fa {0} jorn", + other: "fa {0} jorns", + }, + }, + }, + hour: { + displayName: "ora", + relativeTime: { + future: { + one: "dins {0} ora", + other: "dins {0} oras", + }, + past: { + one: "fa {0} ora", + other: "fa {0} oras", + }, + }, + }, + minute: { + displayName: "minuta", + relativeTime: { + future: { + one: "dins {0} minuta", + other: "dins {0} minutas", + }, + past: { + one: "fa {0} minuta", + other: "fa {0} minutas", + }, + }, + }, + second: { + displayName: "segonda", + relative: { + 0: "ara", + }, + relativeTime: { + future: { + one: "dins {0} segonda", + other: "dins {0} segondas", + }, + past: { + one: "fa {0} segonda", + other: "fa {0} segondas", + }, + }, + }, + }, +}]; diff --git a/app/javascript/mastodon/locales/locale-data/README.md b/app/javascript/mastodon/locales/locale-data/README.md deleted file mode 100644 index 83368fae7..000000000 --- a/app/javascript/mastodon/locales/locale-data/README.md +++ /dev/null @@ -1,221 +0,0 @@ -# Custom Locale Data - -This folder is used to store custom locale data. These custom locale data are -not yet provided by [Unicode Common Locale Data Repository](http://cldr.unicode.org/development/new-cldr-developers) -and hence not provided in [react-intl/locale-data/*](https://github.com/yahoo/react-intl). - -The locale data should support [Locale Data APIs](https://github.com/yahoo/react-intl/wiki/API#locale-data-apis) -of the react-intl library. - -It is recommended to start your custom locale data from this sample English -locale data ([*](#plural-rules)): - -```javascript -/*eslint eqeqeq: "off"*/ -/*eslint no-nested-ternary: "off"*/ - -export default [ - { - locale: "en", - pluralRuleFunction: function(e, a) { - var n = String(e).split("."), - l = !n[1], - o = Number(n[0]) == e, - t = o && n[0].slice(-1), - r = o && n[0].slice(-2); - return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other" - }, - fields: { - year: { - displayName: "year", - relative: { - 0: "this year", - 1: "next year", - "-1": "last year" - }, - relativeTime: { - future: { - one: "in {0} year", - other: "in {0} years" - }, - past: { - one: "{0} year ago", - other: "{0} years ago" - } - } - }, - month: { - displayName: "month", - relative: { - 0: "this month", - 1: "next month", - "-1": "last month" - }, - relativeTime: { - future: { - one: "in {0} month", - other: "in {0} months" - }, - past: { - one: "{0} month ago", - other: "{0} months ago" - } - } - }, - day: { - displayName: "day", - relative: { - 0: "today", - 1: "tomorrow", - "-1": "yesterday" - }, - relativeTime: { - future: { - one: "in {0} day", - other: "in {0} days" - }, - past: { - one: "{0} day ago", - other: "{0} days ago" - } - } - }, - hour: { - displayName: "hour", - relativeTime: { - future: { - one: "in {0} hour", - other: "in {0} hours" - }, - past: { - one: "{0} hour ago", - other: "{0} hours ago" - } - } - }, - minute: { - displayName: "minute", - relativeTime: { - future: { - one: "in {0} minute", - other: "in {0} minutes" - }, - past: { - one: "{0} minute ago", - other: "{0} minutes ago" - } - } - }, - second: { - displayName: "second", - relative: { - 0: "now" - }, - relativeTime: { - future: { - one: "in {0} second", - other: "in {0} seconds" - }, - past: { - one: "{0} second ago", - other: "{0} seconds ago" - } - } - } - } - } -] - -``` - -## Notes - -### Plural Rules - -The function `pluralRuleFunction()` should return the key to proper string of -a plural form(s). The purpose of the function is to provide key of translate -strings of correct plural form according. The different forms are described in -[CLDR's Plural Rules][cldr-plural-rules], - -[cldr-plural-rules]: http://cldr.unicode.org/index/cldr-spec/plural-rules - -#### Quick Overview on CLDR Rules - -Let's take English as an example. - -When you describe a number, you can be either describe it as: -* Cardinals: 1st, 2nd, 3rd ... 11th, 12th ... 21st, 22nd, 23nd .... -* Ordinals: 1, 2, 3 ... - -In any of these cases, the nouns will reflect the number with singular or plural -form. For example: -* in 0 days -* in 1 day -* in 2 days - -The `pluralRuleFunction` receives 2 parameters: -* `e`: a string representation of the number. Such as, "`1`", "`2`", "`2.1`". -* `a`: `true` if this is "cardinal" type of description. `false` for ordinal and other case. - -#### How you should write `pluralRuleFunction` - -The first rule to write pluralRuleFunction is never translate the output string -into your language. [Plural Rules][cldr-plural-rules] specified you should use -these as the return values: - - * "`zero`" - * "`one`" (singular) - * "`two`" (dual) - * "`few`" (paucal) - * "`many`" (also used for fractions if they have a separate class) - * "`other`" (required—general plural form—also used if the language only has a single form) - -Again, we'll use English as the example here. - -Let's read the `return` statement in the pluralRuleFunction above: -```javascript - return a ? 1 == t && 11 != r ? "one" : 2 == t && 12 != r ? "two" : 3 == t && 13 != r ? "few" : "other" : 1 == e && l ? "one" : "other" -``` - -This nested ternary is hard to read. It basically means: -```javascript -// e: the number variable to examine -// a: "true" if cardinals -// l: "true" if the variable e has nothin after decimal mark (e.g. "1.0" would be false) -// o: "true" if the variable e is an integer -// t: the "ones" of the number. e.g. "3" for number "9123" -// r: the "ones" and "tens" of the number. e.g. "23" for number "9123" -if (a == true) { - if (t == 1 && r != 11) { - return "one"; // i.e. 1st, 21st, 101st, 121st ... - } else if (t == 2 && r != 12) { - return "two"; // i.e. 2nd, 22nd, 102nd, 122nd ... - } else if (t == 3 && r != 13) { - return "few"; // i.e. 3rd, 23rd, 103rd, 123rd ... - } else { - return "other"; // i.e. 4th, 11th, 12th, 24th ... - } -} else { - if (e == 1 && l) { - return "one"; // i.e. 1 day - } else { - return "other"; // i.e. 0 days, 2 days, 3 days - } -} -``` - -If your language, like French, do not have complicated cardinal rules, you may -use the French's version of it: -```javascript -function (e, a) { - return a ? 1 == e ? "one" : "other" : e >= 0 && e < 2 ? "one" : "other"; -} -``` - -If your language, like Chinese, do not have any pluralization rule at all you -may use the Chinese's version of it: -```javascript -function (e, a) { - return "other"; -} -``` diff --git a/app/javascript/mastodon/locales/locale-data/oc.js b/app/javascript/mastodon/locales/locale-data/oc.js deleted file mode 100644 index c4b56350b..000000000 --- a/app/javascript/mastodon/locales/locale-data/oc.js +++ /dev/null @@ -1,108 +0,0 @@ -/*eslint eqeqeq: "off"*/ -/*eslint no-nested-ternary: "off"*/ -/*eslint quotes: "off"*/ - -export default [{ - locale: "oc", - pluralRuleFunction: function (e, a) { - return a ? 1 == e ? "one" : "other" : e >= 0 && e < 2 ? "one" : "other"; - }, - fields: { - year: { - displayName: "an", - relative: { - 0: "ongan", - 1: "l'an que ven", - "-1": "l'an passat", - }, - relativeTime: { - future: { - one: "dins {0} an", - other: "dins {0} ans", - }, - past: { - one: "fa {0} an", - other: "fa {0} ans", - }, - }, - }, - month: { - displayName: "mes", - relative: { - 0: "aqueste mes", - 1: "lo mes que ven", - "-1": "lo mes passat", - }, - relativeTime: { - future: { - one: "dins {0} mes", - other: "dins {0} meses", - }, - past: { - one: "fa {0} mes", - other: "fa {0} meses", - }, - }, - }, - day: { - displayName: "jorn", - relative: { - 0: "uèi", - 1: "deman", - "-1": "ièr", - }, - relativeTime: { - future: { - one: "dins {0} jorn", - other: "dins {0} jorns", - }, - past: { - one: "fa {0} jorn", - other: "fa {0} jorns", - }, - }, - }, - hour: { - displayName: "ora", - relativeTime: { - future: { - one: "dins {0} ora", - other: "dins {0} oras", - }, - past: { - one: "fa {0} ora", - other: "fa {0} oras", - }, - }, - }, - minute: { - displayName: "minuta", - relativeTime: { - future: { - one: "dins {0} minuta", - other: "dins {0} minutas", - }, - past: { - one: "fa {0} minuta", - other: "fa {0} minutas", - }, - }, - }, - second: { - displayName: "segonda", - relative: { - 0: "ara", - }, - relativeTime: { - future: { - one: "dins {0} segonda", - other: "dins {0} segondas", - }, - past: { - one: "fa {0} segonda", - other: "fa {0} segondas", - }, - }, - }, - }, -}]; diff --git a/app/lib/themes.rb b/app/lib/themes.rb index 863326e2d..49e9ebbc3 100644 --- a/app/lib/themes.rb +++ b/app/lib/themes.rb @@ -15,6 +15,14 @@ class Themes Dir.glob(Rails.root.join('app', 'javascript', 'flavours', '*', 'theme.yml')) do |path| data = YAML.load_file(path) name = File.basename(File.dirname(path)) + if data['locales'] + locales = [] + Dir.glob(File.join(File.dirname(path), data['locales'], '*.{js,json}')) do |locale| + localeName = File.basename(locale, File.extname(locale)) + locales.push(localeName) unless localeName.match(/defaultMessages|whitelist|index/) + end + data['locales'] = locales + end if data['pack'] data['name'] = name data['skin'] = { 'default' => [] } diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 99ae7d90d..4d32c5035 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -19,7 +19,10 @@ = title = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous' - = javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous' + - if @theme[:supported_locales].include? I18n.locale.to_s + = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous' + - elsif @theme[:supported_locales].include? 'en' + = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous' = csrf_meta_tags = yield :header_tags diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js index 9cdd6f934..852185eb9 100644 --- a/config/webpack/configuration.js +++ b/config/webpack/configuration.js @@ -30,6 +30,9 @@ for (let i = 0; i < flavourFiles.length; i++) { if (!data.pack_directory) { data.pack_directory = dirname(flavourFile); } + if (data.locales) { + data.locales = join(dirname(flavourFile), data.locales); + } if (data.pack && typeof data.pack === 'object') { flavours[data.name] = data; } @@ -45,7 +48,7 @@ for (let i = 0; i < skinFiles.length; i++) { const data = flavours[name].skin; if (lstatSync(skinFile).isDirectory()) { data[skin] = {}; - const skinPacks = glob.sync(resolve(skinFile, '*.{css,scss}')); + const skinPacks = glob.sync(join(skinFile, '*.{css,scss}')); for (let j = 0; j < skinPacks.length; j++) { const pack = skinPacks[i]; data[skin][basename(pack, extname(pack))] = pack; diff --git a/config/webpack/generateLocalePacks.js b/config/webpack/generateLocalePacks.js index a943589f7..09fba4a18 100644 --- a/config/webpack/generateLocalePacks.js +++ b/config/webpack/generateLocalePacks.js @@ -1,70 +1,66 @@ +// A message from upstream: +// ======================== // To avoid adding a lot of boilerplate, locale packs are // automatically generated here. These are written into the tmp/ // directory and then used to generate locale_en.js, locale_fr.js, etc. -const fs = require('fs'); -const path = require('path'); +// Glitch note: +// ============ +// This code has been entirely rewritten to support glitch flavours. +// However, the underlying process is exactly the same. + +const { existsSync, readdirSync, writeFileSync } = require('fs'); +const { join, resolve } = require('path'); const rimraf = require('rimraf'); const mkdirp = require('mkdirp'); +const { flavours } = require('./configuration.js'); -const localesJsonPath = path.join(__dirname, '../../app/javascript/mastodon/locales'); -const locales = fs.readdirSync(localesJsonPath).filter(filename => { - return /\.json$/.test(filename) && - !/defaultMessages/.test(filename) && - !/whitelist/.test(filename); -}).map(filename => filename.replace(/\.json$/, '')); - -const outPath = path.join(__dirname, '../../tmp/packs'); - -rimraf.sync(outPath); -mkdirp.sync(outPath); - -const outPaths = []; - -locales.forEach(locale => { - const localePath = path.join(outPath, `locale_${locale}.js`); - const baseLocale = locale.split('-')[0]; // e.g. 'zh-TW' -> 'zh' - const localeDataPath = [ - // first try react-intl - `../../node_modules/react-intl/locale-data/${baseLocale}.js`, - // then check locales/locale-data - `../../app/javascript/mastodon/locales/locale-data/${baseLocale}.js`, - // fall back to English (this is what react-intl does anyway) - '../../node_modules/react-intl/locale-data/en.js', - ].filter(filename => fs.existsSync(path.join(outPath, filename))) - .map(filename => filename.replace(/..\/..\/node_modules\//, ''))[0]; - - let glitchInject = ` -const mergedMessages = messages; -`; - - const glitchPath = `../../app/javascript/glitch/locales/${locale}.json`; - if (fs.existsSync(path.join(outPath, glitchPath))) { - glitchInject = ` -import glitchMessages from ${JSON.stringify(glitchPath)}; - -let mergedMessages = messages; -Object.keys(glitchMessages).forEach(function (key) { - mergedMessages[key] = glitchMessages[key]; -}); - -`; +module.exports = Object.keys(flavours).reduce(function (map, entry) { + const flavour = flavours[entry]; + if (!flavour.locales) { + return map; } + const locales = readdirSync(flavour.locales).filter( + filename => /\.js(?:on)?$/.test(filename) && !/defaultMessages|whitelist|index/.test(filename) + ); + const outPath = resolve('tmp', 'locales', entry); + + rimraf.sync(outPath); + mkdirp.sync(outPath); - const localeContent = `// -// locale_${locale}.js + locales.forEach(function (locale) { + const localeName = locale.replace(/\.js(?:on)?$/, ''); + const localePath = join(outPath, `${localeName}.js`); + const baseLocale = localeName.split('-')[0]; // e.g. 'zh-TW' -> 'zh' + const localeDataPath = [ + // first try react-intl + `node_modules/react-intl/locale-data/${baseLocale}.js`, + // then check locales/locale-data + `app/javascript/locales/locale-data/${baseLocale}.js`, + // fall back to English (this is what react-intl does anyway) + 'node_modules/react-intl/locale-data/en.js', + ].filter( + filename => existsSync(filename) + ).map( + filename => filename.replace(/(?:node_modules|app\/javascript)\//, '') + )[0]; + const localeContent = `// +// locales/${entry}/${localeName}.js // automatically generated by generateLocalePacks.js // -import messages from '../../app/javascript/mastodon/locales/${locale}.json'; -import localeData from ${JSON.stringify(localeDataPath)}; -import { setLocale } from 'locales'; -${glitchInject} -setLocale({messages: mergedMessages, localeData: localeData}); -`; - fs.writeFileSync(localePath, localeContent, 'utf8'); - outPaths.push(localePath); -}); -module.exports = outPaths; +import messages from '../../../${flavour.locales}/${locale.replace(/\.js$/, '')}'; +import localeData from '${localeDataPath}'; +import { setLocale } from 'locales'; +setLocale({ + localeData, + messages, +}); +`; + writeFileSync(localePath, localeContent, 'utf8'); + map[`locales/${entry}/${localeName}`] = localePath; + }); + return map; +}, {}); diff --git a/config/webpack/shared.js b/config/webpack/shared.js index e4b057ffb..62d96c3a2 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -7,7 +7,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); const extname = require('path-complete-extname'); const { env, settings, core, flavours, output, loadersDir } = require('./configuration.js'); -const localePackPaths = require('./generateLocalePacks'); +const localePacks = require('./generateLocalePacks'); function reducePacks (data, into = {}) { if (!data.pack) { @@ -48,11 +48,7 @@ function reducePacks (data, into = {}) { module.exports = { entry: Object.assign( { locales: resolve('app', 'javascript', 'locales') }, - localePackPaths.reduce((map, entry) => { - const localMap = map; - localMap[basename(entry, extname(entry, extname(entry)))] = resolve(entry); - return localMap; - }, {}), + localePacks, reducePacks(core), Object.keys(flavours).reduce((map, entry) => reducePacks(flavours[entry], map), {}) ), -- cgit From 1c728df92e46bda2d6823052d2cd7a019246b329 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 7 Dec 2017 19:41:57 -0800 Subject: Only localize js when there's a theme --- app/views/layouts/application.html.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 4d32c5035..20603678b 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -19,10 +19,11 @@ = title = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous' - - if @theme[:supported_locales].include? I18n.locale.to_s - = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous' - - elsif @theme[:supported_locales].include? 'en' - = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous' + - if @theme + - if @theme[:supported_locales].include? I18n.locale.to_s + = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous' + - elsif @theme[:supported_locales].include? 'en' + = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous' = csrf_meta_tags = yield :header_tags -- cgit From 6b7085a33e509e0619a67fa8b6721eb89b785773 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 7 Dec 2017 19:59:31 -0800 Subject: Linting fixes --- app/javascript/flavours/glitch/locales/en.js | 82 ++++++++++++++-------------- app/javascript/flavours/glitch/locales/pl.js | 80 +++++++++++++-------------- config/webpack/shared.js | 3 +- 3 files changed, 82 insertions(+), 83 deletions(-) diff --git a/app/javascript/flavours/glitch/locales/en.js b/app/javascript/flavours/glitch/locales/en.js index 96182196e..1d2e0ecf4 100644 --- a/app/javascript/flavours/glitch/locales/en.js +++ b/app/javascript/flavours/glitch/locales/en.js @@ -1,50 +1,50 @@ import inherited from 'mastodon/locales/en.json'; const messages = { - "getting_started.open_source_notice": "Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.", - "layout.auto": "Auto", - "layout.current_is": "Your current layout is:", - "layout.desktop": "Desktop", - "layout.mobile": "Mobile", - "navigation_bar.app_settings": "App settings", - "getting_started.onboarding": "Show me around", - "onboarding.page_one.federation": "{domain} is an 'instance' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.", - "onboarding.page_one.welcome": "Welcome to {domain}!", - "onboarding.page_six.github": "{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.", - "settings.auto_collapse": "Automatic collapsing", - "settings.auto_collapse_all": "Everything", - "settings.auto_collapse_lengthy": "Lengthy toots", - "settings.auto_collapse_media": "Toots with media", - "settings.auto_collapse_notifications": "Notifications", - "settings.auto_collapse_reblogs": "Boosts", - "settings.auto_collapse_replies": "Replies", - "settings.close": "Close", - "settings.collapsed_statuses": "Collapsed toots", - "settings.enable_collapsed": "Enable collapsed toots", - "settings.general": "General", - "settings.image_backgrounds": "Image backgrounds", - "settings.image_backgrounds_media": "Preview collapsed toot media", - "settings.image_backgrounds_users": "Give collapsed toots an image background", - "settings.media": "Media", - "settings.media_letterbox": "Letterbox media", - "settings.media_fullwidth": "Full-width media previews", - "settings.preferences": "User preferences", - "settings.wide_view": "Wide view (Desktop mode only)", - "settings.navbar_under": "Navbar at the bottom (Mobile only)", - "status.collapse": "Collapse", - "status.uncollapse": "Uncollapse", + 'getting_started.open_source_notice': 'Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.', + 'layout.auto': 'Auto', + 'layout.current_is': 'Your current layout is:', + 'layout.desktop': 'Desktop', + 'layout.mobile': 'Mobile', + 'navigation_bar.app_settings': 'App settings', + 'getting_started.onboarding': 'Show me around', + 'onboarding.page_one.federation': '{domain} is an \'instance\' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.', + 'onboarding.page_one.welcome': 'Welcome to {domain}!', + 'onboarding.page_six.github': '{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.', + 'settings.auto_collapse': 'Automatic collapsing', + 'settings.auto_collapse_all': 'Everything', + 'settings.auto_collapse_lengthy': 'Lengthy toots', + 'settings.auto_collapse_media': 'Toots with media', + 'settings.auto_collapse_notifications': 'Notifications', + 'settings.auto_collapse_reblogs': 'Boosts', + 'settings.auto_collapse_replies': 'Replies', + 'settings.close': 'Close', + 'settings.collapsed_statuses': 'Collapsed toots', + 'settings.enable_collapsed': 'Enable collapsed toots', + 'settings.general': 'General', + 'settings.image_backgrounds': 'Image backgrounds', + 'settings.image_backgrounds_media': 'Preview collapsed toot media', + 'settings.image_backgrounds_users': 'Give collapsed toots an image background', + 'settings.media': 'Media', + 'settings.media_letterbox': 'Letterbox media', + 'settings.media_fullwidth': 'Full-width media previews', + 'settings.preferences': 'User preferences', + 'settings.wide_view': 'Wide view (Desktop mode only)', + 'settings.navbar_under': 'Navbar at the bottom (Mobile only)', + 'status.collapse': 'Collapse', + 'status.uncollapse': 'Uncollapse', - "home.column_settings.show_direct": "Show DMs", + 'home.column_settings.show_direct': 'Show DMs', - "notification.markForDeletion": "Mark for deletion", - "notifications.clear": "Clear all my notifications", - "notifications.marked_clear_confirmation": "Are you sure you want to permanently clear all selected notifications?", - "notifications.marked_clear": "Clear selected notifications", + 'notification.markForDeletion': 'Mark for deletion', + 'notifications.clear': 'Clear all my notifications', + 'notifications.marked_clear_confirmation': 'Are you sure you want to permanently clear all selected notifications?', + 'notifications.marked_clear': 'Clear selected notifications', - "notification_purge.btn_all": "Select\nall", - "notification_purge.btn_none": "Select\nnone", - "notification_purge.btn_invert": "Invert\nselection", - "notification_purge.btn_apply": "Clear\nselected", + 'notification_purge.btn_all': 'Select\nall', + 'notification_purge.btn_none': 'Select\nnone', + 'notification_purge.btn_invert': 'Invert\nselection', + 'notification_purge.btn_apply': 'Clear\nselected', }; export default Object.assign({}, inherited, messages); diff --git a/app/javascript/flavours/glitch/locales/pl.js b/app/javascript/flavours/glitch/locales/pl.js index ab96dec60..818436710 100644 --- a/app/javascript/flavours/glitch/locales/pl.js +++ b/app/javascript/flavours/glitch/locales/pl.js @@ -1,48 +1,48 @@ import inherited from 'mastodon/locales/pl.json'; const messages = { - "getting_started.open_source_notice": "Glitchsoc jest wolnym i otwartoźródłowym forkiem oprogramowania {Mastodon}. Możesz współtworzyć projekt lub zgłaszać błędy na GitHubie pod adresem {github}.", - "layout.auto": "Automatyczny", - "layout.current_is": "Twój obecny układ to:", - "layout.desktop": "Desktopowy", - "layout.mobile": "Mobilny", - "navigation_bar.app_settings": "Ustawienia aplikacji", - "getting_started.onboarding": "Rozejrzyj się", - "onboarding.page_one.federation": "{domain} jest 'instancją' Mastodona. Mastodon to sieć działających niezależnie serwerów tworzących jedną sieć społecznościową. Te serwery nazywane są instancjami.", - "onboarding.page_one.welcome": "Witamy na {domain}!", - "onboarding.page_six.github": "{domain} jest oparty na Glitchsoc. Glitchsoc jest {forkiem} {Mastodon}a kompatybilnym z każdym klientem i aplikacją Mastodona. Glitchsoc jest całkowicie wolnym i otwartoźródłowym oprogramowaniem. Możesz zgłaszać błędy i sugestie funkcji oraz współtworzyć projekt na {github}.", - "settings.auto_collapse": "Automatyczne zwijanie", - "settings.auto_collapse_all": "Wszystko", - "settings.auto_collapse_lengthy": "Długie wpisy", - "settings.auto_collapse_media": "Wpisy z zawartością multimedialną", - "settings.auto_collapse_notifications": "Powiadomienia", - "settings.auto_collapse_reblogs": "Podbicia", - "settings.auto_collapse_replies": "Odpowiedzi", - "settings.close": "Zamknij", - "settings.collapsed_statuses": "Zwijanie wpisów", - "settings.enable_collapsed": "Włącz zwijanie wpisów", - "settings.general": "Ogólne", - "settings.image_backgrounds": "Obrazy w tle", - "settings.image_backgrounds_media": "Wyświetlaj zawartość multimedialną zwiniętych wpisów", - "settings.image_backgrounds_users": "Nadaj tło zwiniętym wpisom", - "settings.media": "Zawartość multimedialna", - "settings.media_letterbox": "Letterbox media", - "settings.media_fullwidth": "Podgląd zawartości multimedialnej o pełnej szerokości", - "settings.preferences": "Preferencje użyytkownika", - "settings.wide_view": "Szeroki widok (tylko w trybie desktopowym)", - "settings.navbar_under": "Pasek nawigacji na dole (tylko w trybie mobilnym)", - "status.collapse": "Zwiń", - "status.uncollapse": "Rozwiń", + 'getting_started.open_source_notice': 'Glitchsoc jest wolnym i otwartoźródłowym forkiem oprogramowania {Mastodon}. Możesz współtworzyć projekt lub zgłaszać błędy na GitHubie pod adresem {github}.', + 'layout.auto': 'Automatyczny', + 'layout.current_is': 'Twój obecny układ to:', + 'layout.desktop': 'Desktopowy', + 'layout.mobile': 'Mobilny', + 'navigation_bar.app_settings': 'Ustawienia aplikacji', + 'getting_started.onboarding': 'Rozejrzyj się', + 'onboarding.page_one.federation': '{domain} jest \'instancją\' Mastodona. Mastodon to sieć działających niezależnie serwerów tworzących jedną sieć społecznościową. Te serwery nazywane są instancjami.', + 'onboarding.page_one.welcome': 'Witamy na {domain}!', + 'onboarding.page_six.github': '{domain} jest oparty na Glitchsoc. Glitchsoc jest {forkiem} {Mastodon}a kompatybilnym z każdym klientem i aplikacją Mastodona. Glitchsoc jest całkowicie wolnym i otwartoźródłowym oprogramowaniem. Możesz zgłaszać błędy i sugestie funkcji oraz współtworzyć projekt na {github}.', + 'settings.auto_collapse': 'Automatyczne zwijanie', + 'settings.auto_collapse_all': 'Wszystko', + 'settings.auto_collapse_lengthy': 'Długie wpisy', + 'settings.auto_collapse_media': 'Wpisy z zawartością multimedialną', + 'settings.auto_collapse_notifications': 'Powiadomienia', + 'settings.auto_collapse_reblogs': 'Podbicia', + 'settings.auto_collapse_replies': 'Odpowiedzi', + 'settings.close': 'Zamknij', + 'settings.collapsed_statuses': 'Zwijanie wpisów', + 'settings.enable_collapsed': 'Włącz zwijanie wpisów', + 'settings.general': 'Ogólne', + 'settings.image_backgrounds': 'Obrazy w tle', + 'settings.image_backgrounds_media': 'Wyświetlaj zawartość multimedialną zwiniętych wpisów', + 'settings.image_backgrounds_users': 'Nadaj tło zwiniętym wpisom', + 'settings.media': 'Zawartość multimedialna', + 'settings.media_letterbox': 'Letterbox media', + 'settings.media_fullwidth': 'Podgląd zawartości multimedialnej o pełnej szerokości', + 'settings.preferences': 'Preferencje użyytkownika', + 'settings.wide_view': 'Szeroki widok (tylko w trybie desktopowym)', + 'settings.navbar_under': 'Pasek nawigacji na dole (tylko w trybie mobilnym)', + 'status.collapse': 'Zwiń', + 'status.uncollapse': 'Rozwiń', - "notification.markForDeletion": "Oznacz do usunięcia", - "notifications.clear": "Wyczyść wszystkie powiadomienia", - "notifications.marked_clear_confirmation": "Czy na pewno chcesz bezpowrtonie usunąć wszystkie powiadomienia?", - "notifications.marked_clear": "Usuń zaznaczone powiadomienia", + 'notification.markForDeletion': 'Oznacz do usunięcia', + 'notifications.clear': 'Wyczyść wszystkie powiadomienia', + 'notifications.marked_clear_confirmation': 'Czy na pewno chcesz bezpowrtonie usunąć wszystkie powiadomienia?', + 'notifications.marked_clear': 'Usuń zaznaczone powiadomienia', - "notification_purge.btn_all": "Zaznacz\nwszystkie", - "notification_purge.btn_none": "Odznacz\nwszystkie", - "notification_purge.btn_invert": "Odwróć\nzaznaczenie", - "notification_purge.btn_apply": "Usuń\nzaznaczone" + 'notification_purge.btn_all': 'Zaznacz\nwszystkie', + 'notification_purge.btn_none': 'Odznacz\nwszystkie', + 'notification_purge.btn_invert': 'Odwróć\nzaznaczenie', + 'notification_purge.btn_apply': 'Usuń\nzaznaczone', }; export default Object.assign({}, inherited, messages); diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 62d96c3a2..35b9bbd1c 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -1,11 +1,10 @@ // Note: You must restart bin/webpack-dev-server for changes to take effect const webpack = require('webpack'); -const { basename, join, resolve } = require('path'); +const { join, resolve } = require('path'); const { sync } = require('glob'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); -const extname = require('path-complete-extname'); const { env, settings, core, flavours, output, loadersDir } = require('./configuration.js'); const localePacks = require('./generateLocalePacks'); -- cgit From cd107e92cb179b875b119ab869e106e22afb2e77 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sun, 10 Dec 2017 11:09:59 -0800 Subject: Move ja localization to new locaiton --- app/javascript/flavours/glitch/locales/ja.js | 43 ++++++++++++++++++++++++++- app/javascript/glitch/locales/ja.json | 44 ---------------------------- 2 files changed, 42 insertions(+), 45 deletions(-) delete mode 100644 app/javascript/glitch/locales/ja.json diff --git a/app/javascript/flavours/glitch/locales/ja.js b/app/javascript/flavours/glitch/locales/ja.js index cc7143443..2b55da1da 100644 --- a/app/javascript/flavours/glitch/locales/ja.js +++ b/app/javascript/flavours/glitch/locales/ja.js @@ -1,7 +1,48 @@ import inherited from 'mastodon/locales/ja.json'; const messages = { - // No translations available. + 'getting_started.open_source_notice': 'Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。', + 'layout.auto': '自動', + 'layout.current_is': 'あなたの現在のレイアウト:', + 'layout.desktop': 'デスクトップ', + 'layout.mobile': 'モバイル', + 'navigation_bar.app_settings': 'アプリ設定', + 'getting_started.onboarding': '解説', + 'onboarding.page_one.federation': '{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。', + 'onboarding.page_one.welcome': '{domain}へようこそ!', + 'onboarding.page_six.github': '{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。', + 'settings.auto_collapse': '自動折りたたみ', + 'settings.auto_collapse_all': 'すべて', + 'settings.auto_collapse_lengthy': '長いトゥート', + 'settings.auto_collapse_media': 'メディア付きトゥート', + 'settings.auto_collapse_notifications': '通知', + 'settings.auto_collapse_reblogs': 'ブースト', + 'settings.auto_collapse_replies': '返信', + 'settings.close': '閉じる', + 'settings.collapsed_statuses': 'トゥート', + 'settings.enable_collapsed': 'トゥート折りたたみを有効にする', + 'settings.general': '一般', + 'settings.image_backgrounds': '画像背景', + 'settings.image_backgrounds_media': '折りたまれたメディア付きテゥートをプレビュー', + 'settings.image_backgrounds_users': '折りたまれたトゥートの背景を変更する', + 'settings.media': 'メディア', + 'settings.media_letterbox': 'メディアをレターボックス式で表示', + 'settings.media_fullwidth': '全幅メディアプリビュー', + 'settings.preferences': 'ユーザー設定', + 'settings.wide_view': 'ワイドビュー(デスクトップレイアウトのみ)', + 'settings.navbar_under': 'ナビを画面下部に移動させる(モバイルレイアウトのみ)', + 'status.collapse': '折りたたむ', + 'status.uncollapse': '折りたたみを解除', + + 'notification.markForDeletion': '選択', + 'notifications.clear': '通知を全てクリアする', + 'notifications.marked_clear_confirmation': '削除した全ての通知を完全に削除してもよろしいですか?', + 'notifications.marked_clear': '選択した通知を削除する', + + 'notification_purge.btn_all': 'すべて\n選択', + 'notification_purge.btn_none': '選択\n解除', + 'notification_purge.btn_invert': '選択を\n反転', + 'notification_purge.btn_apply': '選択したものを\n削除', }; export default Object.assign({}, inherited, messages); diff --git a/app/javascript/glitch/locales/ja.json b/app/javascript/glitch/locales/ja.json deleted file mode 100644 index 70091268f..000000000 --- a/app/javascript/glitch/locales/ja.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "getting_started.open_source_notice": "Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。", - "layout.auto": "自動", - "layout.current_is": "あなたの現在のレイアウト:", - "layout.desktop": "デスクトップ", - "layout.mobile": "モバイル", - "navigation_bar.app_settings": "アプリ設定", - "getting_started.onboarding": "解説", - "onboarding.page_one.federation": "{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。", - "onboarding.page_one.welcome": "{domain}へようこそ!", - "onboarding.page_six.github": "{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。", - "settings.auto_collapse": "自動折りたたみ", - "settings.auto_collapse_all": "すべて", - "settings.auto_collapse_lengthy": "長いトゥート", - "settings.auto_collapse_media": "メディア付きトゥート", - "settings.auto_collapse_notifications": "通知", - "settings.auto_collapse_reblogs": "ブースト", - "settings.auto_collapse_replies": "返信", - "settings.close": "閉じる", - "settings.collapsed_statuses": "トゥート", - "settings.enable_collapsed": "トゥート折りたたみを有効にする", - "settings.general": "一般", - "settings.image_backgrounds": "画像背景", - "settings.image_backgrounds_media": "折りたまれたメディア付きテゥートをプレビュー", - "settings.image_backgrounds_users": "折りたまれたトゥートの背景を変更する", - "settings.media": "メディア", - "settings.media_letterbox": "メディアをレターボックス式で表示", - "settings.media_fullwidth": "全幅メディアプリビュー", - "settings.preferences": "ユーザー設定", - "settings.wide_view": "ワイドビュー(デスクトップレイアウトのみ)", - "settings.navbar_under": "ナビを画面下部に移動させる(モバイルレイアウトのみ)", - "status.collapse": "折りたたむ", - "status.uncollapse": "折りたたみを解除", - - "notification.markForDeletion": "選択", - "notifications.clear": "通知を全てクリアする", - "notifications.marked_clear_confirmation": "削除した全ての通知を完全に削除してもよろしいですか?", - "notifications.marked_clear": "選択した通知を削除する", - - "notification_purge.btn_all": "すべて\n選択", - "notification_purge.btn_none": "選択\n解除", - "notification_purge.btn_invert": "選択を\n反転", - "notification_purge.btn_apply": "選択したものを\n削除" -} -- cgit From 64b839b76907e87c57d71762a81a9a8660f1df83 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sun, 10 Dec 2017 11:38:30 -0800 Subject: Removed MORE theme localizns --- config/locales/ca.yml | 2 -- config/locales/es.yml | 2 -- config/locales/fr.yml | 2 -- config/locales/pl.yml | 2 -- 4 files changed, 8 deletions(-) diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 357e39e31..05c08c01a 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -678,8 +678,6 @@ ca:

Originalment adaptat a la política de privadesa del Discurs.

title: "%{instance} Condicions del servei i política de privadesa" - themes: - default: Mastodont time: formats: default: "%b %d, %Y, %H:%M" diff --git a/config/locales/es.yml b/config/locales/es.yml index 18b93b08e..d9084787d 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -678,8 +678,6 @@ es:

Adaptado originalmente del discurso de las políticas de privacidad.

title: Términos del Servicio y Políticas de Privacidad de %{instance} - themes: - default: Mastodon time: formats: default: "%d de %b del %Y, %H:%M" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index cd97f5967..45243d07e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -677,8 +677,6 @@ fr:

Originellement adapté à partir de la politique de confidentialité de Discourse.

title: "%{instance} Conditions d’utilisations et politique de confidentialité" - themes: - default: Mastodon time: formats: default: "%d %b %Y, %H:%M" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index baa26f1dc..582a2cd03 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -693,8 +693,6 @@ pl:

Tekst bazuje na polityce prywatności Discourse.

title: Zasady korzystania i polityka prywatności %{instance} - themes: - default: Mastodon time: formats: default: "%b %d, %Y, %H:%M" -- cgit From eec5d350fdb94fa44c6938ca059166ff3e3e67b3 Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 10 Dec 2017 15:14:56 -0600 Subject: removed unneeded actions_modal div --- .../glitch/features/ui/components/actions_modal.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js index 87a149807..0873c282f 100644 --- a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js @@ -56,22 +56,6 @@ export default class ActionsModal extends ImmutablePureComponent { - - ); -- cgit From 0466aa8d08796a227b01b1f698911856a198c2ee Mon Sep 17 00:00:00 2001 From: cwm Date: Sun, 10 Dec 2017 15:39:23 -0600 Subject: use single quotes in locale entry --- app/javascript/flavours/glitch/locales/en.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/locales/en.js b/app/javascript/flavours/glitch/locales/en.js index 07d77e0e1..0681d27d8 100644 --- a/app/javascript/flavours/glitch/locales/en.js +++ b/app/javascript/flavours/glitch/locales/en.js @@ -34,7 +34,7 @@ const messages = { 'status.collapse': 'Collapse', 'status.uncollapse': 'Uncollapse', - "favourite_modal.combo": "You can press {combo} to skip this next time", + 'favourite_modal.combo': 'You can press {combo} to skip this next time', 'home.column_settings.show_direct': 'Show DMs', -- cgit From 279231c5ddd1d176fdc98ebd403cf10efdf01c50 Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Mon, 11 Dec 2017 09:46:17 +0900 Subject: " => ' --- app/javascript/flavours/glitch/locales/ja.js | 86 ++++++++++++++-------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/app/javascript/flavours/glitch/locales/ja.js b/app/javascript/flavours/glitch/locales/ja.js index 98b6a696f..0acc93f50 100644 --- a/app/javascript/flavours/glitch/locales/ja.js +++ b/app/javascript/flavours/glitch/locales/ja.js @@ -1,51 +1,51 @@ import inherited from 'mastodon/locales/ja.json'; const messages = { - "getting_started.open_source_notice": "Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。", - "layout.auto": "自動", - "layout.current_is": "あなたの現在のレイアウト:", - "layout.desktop": "Desktop", - "layout.mobile": "Mobile", - "navigation_bar.app_settings": "アプリ設定", - "getting_started.onboarding": "解説を表示", - "onboarding.page_one.federation": "{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。", - "onboarding.page_one.welcome": "{domain}へようこそ!", - "onboarding.page_six.github": "{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。", - "settings.auto_collapse": "自動折りたたみ", - "settings.auto_collapse_all": "すべて", - "settings.auto_collapse_lengthy": "長いトゥート", - "settings.auto_collapse_media": "メディア付きトゥート", - "settings.auto_collapse_notifications": "通知", - "settings.auto_collapse_reblogs": "ブースト", - "settings.auto_collapse_replies": "返信", - "settings.close": "閉じる", - "settings.collapsed_statuses": "トゥート", - "settings.enable_collapsed": "トゥート折りたたみを有効にする", - "settings.general": "一般", - "settings.image_backgrounds": "画像背景", - "settings.image_backgrounds_media": "折りたまれたメディア付きテゥートをプレビュー", - "settings.image_backgrounds_users": "折りたまれたトゥートの背景を変更する", - "settings.media": "メディア", - "settings.media_letterbox": "メディアをレターボックス式で表示", - "settings.media_fullwidth": "全幅メディアプリビュー", - "settings.preferences": "ユーザー設定", - "settings.wide_view": "ワイドビュー(Desktopレイアウトのみ)", - "settings.navbar_under": "ナビを画面下部に移動させる(Mobileレイアウトのみ)", - "settings.compose_box_opts": "コンポーズボックス設定", - "settings.side_arm": "セカンダリートゥートボタン", - "settings.layout": "レイアウト", - "status.collapse": "折りたたむ", - "status.uncollapse": "折りたたみを解除", + 'getting_started.open_source_notice': 'Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。', + 'layout.auto': '自動', + 'layout.current_is': 'あなたの現在のレイアウト:', + 'layout.desktop': 'Desktop', + 'layout.mobile': 'Mobile', + 'navigation_bar.app_settings': 'アプリ設定', + 'getting_started.onboarding': '解説を表示', + 'onboarding.page_one.federation': '{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。', + 'onboarding.page_one.welcome': '{domain}へようこそ!', + 'onboarding.page_six.github': '{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。', + 'settings.auto_collapse': '自動折りたたみ', + 'settings.auto_collapse_all': 'すべて', + 'settings.auto_collapse_lengthy': '長いトゥート', + 'settings.auto_collapse_media': 'メディア付きトゥート', + 'settings.auto_collapse_notifications': '通知', + 'settings.auto_collapse_reblogs': 'ブースト', + 'settings.auto_collapse_replies': '返信', + 'settings.close': '閉じる', + 'settings.collapsed_statuses': 'トゥート', + 'settings.enable_collapsed': 'トゥート折りたたみを有効にする', + 'settings.general': '一般', + 'settings.image_backgrounds': '画像背景', + 'settings.image_backgrounds_media': '折りたまれたメディア付きテゥートをプレビュー', + 'settings.image_backgrounds_users': '折りたまれたトゥートの背景を変更する', + 'settings.media': 'メディア', + 'settings.media_letterbox': 'メディアをレターボックス式で表示', + 'settings.media_fullwidth': '全幅メディアプリビュー', + 'settings.preferences': 'ユーザー設定', + 'settings.wide_view': 'ワイドビュー(Desktopレイアウトのみ)', + 'settings.navbar_under': 'ナビを画面下部に移動させる(Mobileレイアウトのみ)', + 'settings.compose_box_opts': 'コンポーズボックス設定', + 'settings.side_arm': 'セカンダリートゥートボタン', + 'settings.layout': 'レイアウト', + 'status.collapse': '折りたたむ', + 'status.uncollapse': '折りたたみを解除', - "notification.markForDeletion": "選択", - "notifications.clear": "通知を全てクリアする", - "notifications.marked_clear_confirmation": "削除した全ての通知を完全に削除してもよろしいですか?", - "notifications.marked_clear": "選択した通知を削除する", + 'notification.markForDeletion': '選択', + 'notifications.clear': '通知を全てクリアする', + 'notifications.marked_clear_confirmation': '削除した全ての通知を完全に削除してもよろしいですか?', + 'notifications.marked_clear': '選択した通知を削除する', - "notification_purge.btn_all": "すべて\n選択", - "notification_purge.btn_none": "選択\n解除", - "notification_purge.btn_invert": "選択を\n反転", - "notification_purge.btn_apply": "選択したものを\n削除" + 'notification_purge.btn_all': 'すべて\n選択', + 'notification_purge.btn_none': '選択\n解除', + 'notification_purge.btn_invert': '選択を\n反転', + 'notification_purge.btn_apply': '選択したものを\n削除' }; export default Object.assign({}, inherited, messages); -- cgit From d420e2f0472315caf71f98eb59c68dfff2d1c2a7 Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Mon, 11 Dec 2017 09:50:52 +0900 Subject: add comma --- app/javascript/flavours/glitch/locales/ja.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/locales/ja.js b/app/javascript/flavours/glitch/locales/ja.js index 0acc93f50..39dc3b81d 100644 --- a/app/javascript/flavours/glitch/locales/ja.js +++ b/app/javascript/flavours/glitch/locales/ja.js @@ -45,7 +45,7 @@ const messages = { 'notification_purge.btn_all': 'すべて\n選択', 'notification_purge.btn_none': '選択\n解除', 'notification_purge.btn_invert': '選択を\n反転', - 'notification_purge.btn_apply': '選択したものを\n削除' + 'notification_purge.btn_apply': '選択したものを\n削除', }; export default Object.assign({}, inherited, messages); -- cgit From 84d5bfb35edfa2126e15e94d519c32d1b27e27eb Mon Sep 17 00:00:00 2001 From: Sylvhem Date: Mon, 11 Dec 2017 02:30:43 +0100 Subject: Change the disclaimer under the sign up form (#5817) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change the disclaimer below the sign up form Change the disclaimer below the sign up form on the home page. The current text is linking to the /about/more page under "our terms of service" and to the /terms page under "privacy policy". This change intend to make the message more coherent. Change l’avertissement en-dessous du formulaire d’inscription sur la page d’accueil. Le texte actuel redirige vers /about/more sous un lien intitulé "nos conditions d’utilisation" et vers /terms via "notre politique de confidentialité". Ce changement vise à rendre le message plus cohérent. * Second take on the disclaimer A new version of the disclaimer, based on feedback. Une nouvelle version de l’avertissement, basé sur les premiers retours. --- config/locales/en.yml | 2 +- config/locales/fr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 14a88d6c8..d42fb6427 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -343,7 +343,7 @@ en: warning: Be very careful with this data. Never share it with anyone! your_token: Your access token auth: - agreement_html: By signing up you agree to our terms of service and privacy policy. + agreement_html: By signing up you agree to follow the rules of the instance and our terms of service. change_password: Security delete_account: Delete account delete_account_html: If you wish to delete your account, you can proceed here. You will be asked for confirmation. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 278cb053d..a26b67546 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -342,7 +342,7 @@ fr: warning: Soyez prudent⋅e avec ces données. Ne les partagez pas ! your_token: Votre jeton d’accès auth: - agreement_html: En vous inscrivant, vous souscrivez à nos conditions d’utilisation ainsi qu’à notre politique de confidentialité. + agreement_html: En vous inscrivant, vous souscrivez aux règles de l’instance et à nos conditions d’utilisation. change_password: Sécurité delete_account: Supprimer le compte delete_account_html: Si vous désirez supprimer votre compte, vous pouvez cliquer ici. Il vous sera demandé de confirmer cette action. -- cgit From dabf66e676c693e7e26a6035e0c6296e6804e776 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sun, 10 Dec 2017 17:56:17 -0800 Subject: Moved flavour UI into own prefs tab --- app/controllers/settings/flavours_controller.rb | 35 ++++++++++++++++++++++ app/controllers/settings/preferences_controller.rb | 2 -- app/javascript/core/settings.js | 4 --- app/javascript/flavours/glitch/names.yml | 4 ++- app/javascript/flavours/vanilla/names.yml | 4 ++- app/views/settings/flavours/show.html.haml | 16 ++++++++++ app/views/settings/preferences/show.html.haml | 4 --- config/locales/en.yml | 2 ++ config/locales/simple_form.en.yml | 2 -- config/navigation.rb | 6 ++++ config/routes.rb | 4 ++- 11 files changed, 68 insertions(+), 15 deletions(-) create mode 100644 app/controllers/settings/flavours_controller.rb create mode 100644 app/views/settings/flavours/show.html.haml diff --git a/app/controllers/settings/flavours_controller.rb b/app/controllers/settings/flavours_controller.rb new file mode 100644 index 000000000..865d5a479 --- /dev/null +++ b/app/controllers/settings/flavours_controller.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +class Settings::FlavoursController < Settings::BaseController + + def index + redirect_to action: 'show', flavour: current_flavour + end + + def show + unless Themes.instance.flavours.include?(params[:flavour]) or params[:flavour] == current_flavour + redirect_to action: 'show', flavour: current_flavour + end + + @listing = Themes.instance.flavours + @selected = params[:flavour] + end + + def update + user_settings.update(user_settings_params(params[:flavour]).to_h) + redirect_to action: 'show', flavour: params[:flavour] + end + + private + + def user_settings + UserSettingsDecorator.new(current_user) + end + + def user_settings_params(flavour) + params.require(:user).merge({ setting_flavour: flavour }).permit( + :setting_flavour, + :setting_skin + ) + end +end diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 9177d37da..7cd1abe0c 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -39,8 +39,6 @@ class Settings::PreferencesController < Settings::BaseController :setting_reduce_motion, :setting_system_font_ui, :setting_noindex, - :setting_flavour, - :setting_skin, notification_emails: %i(follow follow_request reblog favourite mention digest), interactions: %i(must_be_follower must_be_following) ) diff --git a/app/javascript/core/settings.js b/app/javascript/core/settings.js index ada5fba2b..c9edcf197 100644 --- a/app/javascript/core/settings.js +++ b/app/javascript/core/settings.js @@ -37,7 +37,3 @@ delegate(document, '#account_header', 'change', ({ target }) => { header.style.backgroundImage = `url(${url})`; }); - -delegate(document, '#user_setting_flavour, #user_setting_skin', 'change', ({ target }) => { - target.form.submit(); -}); diff --git a/app/javascript/flavours/glitch/names.yml b/app/javascript/flavours/glitch/names.yml index b3d579cb2..ef82abed2 100644 --- a/app/javascript/flavours/glitch/names.yml +++ b/app/javascript/flavours/glitch/names.yml @@ -1,6 +1,8 @@ en: flavours: - glitch: Glitch Edition + glitch: + description: The default flavour for GlitchSoc instances. + name: Glitch Edition skins: glitch: default: Default diff --git a/app/javascript/flavours/vanilla/names.yml b/app/javascript/flavours/vanilla/names.yml index 8816fcb3a..94326f6ee 100644 --- a/app/javascript/flavours/vanilla/names.yml +++ b/app/javascript/flavours/vanilla/names.yml @@ -1,6 +1,8 @@ en: flavours: - vanilla: Vanilla Mastodon + vanilla: + description: The theme used by vanilla Mastodon instances. This theme might not support all of the features of GlitchSoc. + name: Vanilla Mastodon skins: vanilla: default: Default diff --git a/app/views/settings/flavours/show.html.haml b/app/views/settings/flavours/show.html.haml new file mode 100644 index 000000000..488fd2d15 --- /dev/null +++ b/app/views/settings/flavours/show.html.haml @@ -0,0 +1,16 @@ +- content_for :page_title do + = t "flavours.#{@selected}.name", default: @selected + += simple_form_for current_user, url: settings_flavour_path(@selected), html: { method: :put } do |f| + = render 'shared/error_messages', object: current_user + + .flavour-description + = t "flavours.#{@selected}.description", default: '' + + %hr/ + + .fields-group + = f.input :setting_skin, collection: Themes.instance.skins_for(@selected), label_method: lambda { |skin| I18n.t("skins.#{@selected}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false + + .actions + = f.button :button, t('generic.use_this'), type: :submit diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index 45a3b2eb0..d1459d93c 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -26,10 +26,6 @@ %h4= t 'preferences.web' .fields-group - - if Themes.instance.flavours.size > 1 - = f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("flavours.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false - = f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("skins.#{current_flavour}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false - = f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label = f.input :setting_boost_modal, as: :boolean, wrapper: :with_label = f.input :setting_favourite_modal, as: :boolean, wrapper: :with_label diff --git a/config/locales/en.yml b/config/locales/en.yml index c8acc237a..804f9b199 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -424,6 +424,7 @@ en: changes_saved_msg: Changes successfully saved! powered_by: powered by %{link} save_changes: Save changes + use_this: Use this validation_errors: one: Something isn't quite right yet! Please review the error below other: Something isn't quite right yet! Please review %{count} errors below @@ -587,6 +588,7 @@ en: development: Development edit_profile: Edit profile export: Data export + flavours: Flavours followers: Authorized followers import: Import keyword_mutes: Muted keywords diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 1722eea7b..aa6940e91 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -13,7 +13,6 @@ en: note: one: 1 character left other: %{count} characters left - setting_flavour: Affects how Mastodon looks when you're logged in from any device setting_noindex: Affects your public profile and status pages setting_skin: Reskins the selected Mastodon flavour imports: @@ -47,7 +46,6 @@ en: setting_default_sensitive: Always mark media as sensitive setting_delete_modal: Show confirmation dialog before deleting a toot setting_favourite_modal: Show confirmation dialog before favouriting - setting_flavour: Flavour setting_noindex: Opt-out of search engine indexing setting_reduce_motion: Reduce motion in animations setting_skin: Skin diff --git a/config/navigation.rb b/config/navigation.rb index 3f4c00dfa..b08b1769d 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -17,6 +17,12 @@ SimpleNavigation::Configuration.run do |navigation| settings.item :follower_domains, safe_join([fa_icon('users fw'), t('settings.followers')]), settings_follower_domains_url end + primary.item :flavours, safe_join([fa_icon('paint-brush fw'), t('settings.flavours')]), settings_flavours_url do |flavours| + Themes.instance.flavours.each do |flavour| + flavours.item flavour.to_sym, safe_join([fa_icon('star fw'), t("flavours.#{flavour}.name", default: flavour)]), settings_flavour_url(flavour) + end + end + primary.item :invites, safe_join([fa_icon('user-plus fw'), t('invites.title')]), invites_path, if: proc { Setting.min_invite_role == 'user' } primary.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_url do |development| diff --git a/config/routes.rb b/config/routes.rb index a41e76c2c..75b9c2d58 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -102,6 +102,8 @@ Rails.application.routes.draw do end end + resources :flavours, only: [:index, :show, :update], param: :flavour + resource :delete, only: [:show, :destroy] resource :migration, only: [:show, :update] @@ -240,7 +242,7 @@ Rails.application.routes.draw do resources :media, only: [:create, :update] resources :blocks, only: [:index] resources :mutes, only: [:index] do - collection do + collection do get 'details' end end -- cgit From bdca1614d574a4b34633a19776446d2d8cf2d2e6 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sun, 10 Dec 2017 20:15:09 -0800 Subject: Screenshot support for themes --- .../flavours/glitch/images/glitch-preview.jpg | Bin 0 -> 197277 bytes app/javascript/flavours/glitch/packs/common.js | 3 +++ app/javascript/flavours/glitch/theme.yml | 6 ++++++ app/javascript/flavours/vanilla/theme.yml | 6 ++++++ app/javascript/images/screenshot.jpg | Bin 0 -> 239221 bytes app/lib/themes.rb | 18 ++++++++++++++---- app/views/settings/flavours/show.html.haml | 3 +++ 7 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 app/javascript/flavours/glitch/images/glitch-preview.jpg create mode 100644 app/javascript/images/screenshot.jpg diff --git a/app/javascript/flavours/glitch/images/glitch-preview.jpg b/app/javascript/flavours/glitch/images/glitch-preview.jpg new file mode 100644 index 000000000..fc5c42043 Binary files /dev/null and b/app/javascript/flavours/glitch/images/glitch-preview.jpg differ diff --git a/app/javascript/flavours/glitch/packs/common.js b/app/javascript/flavours/glitch/packs/common.js index 07445d2b3..8dd4372bc 100644 --- a/app/javascript/flavours/glitch/packs/common.js +++ b/app/javascript/flavours/glitch/packs/common.js @@ -1 +1,4 @@ import 'flavours/glitch/styles/index.scss'; + +// This ensures that webpack compiles our images. +require.context('../images', true); diff --git a/app/javascript/flavours/glitch/theme.yml b/app/javascript/flavours/glitch/theme.yml index 9437e2c04..435fa2329 100644 --- a/app/javascript/flavours/glitch/theme.yml +++ b/app/javascript/flavours/glitch/theme.yml @@ -26,6 +26,12 @@ pack: # language tags and whose default exports are a messages object. locales: locales +# (OPTIONAL) A file to use as the preview screenshot for the flavour, +# or an array thereof. These filenames must be unique across all +# images (regardless of path), so it's a good idea to namespace them +# to your theme. It's up to you to let webpack know to compile them. +screenshot: glitch-preview.jpg + # (OPTIONAL) The directory which contains the pack files. # Defaults to the theme directory (`app/javascript/themes/[theme]`), # which should be sufficient for like 99% of use-cases lol. diff --git a/app/javascript/flavours/vanilla/theme.yml b/app/javascript/flavours/vanilla/theme.yml index 491ea173b..0b27c31bb 100644 --- a/app/javascript/flavours/vanilla/theme.yml +++ b/app/javascript/flavours/vanilla/theme.yml @@ -24,6 +24,12 @@ pack: # the flavour, relative to this directory. locales: ../../mastodon/locales +# (OPTIONAL) A file to use as the preview screenshot for the flavour, +# or an array thereof. These filenames must be unique across all +# images (regardless of path), so it's a good idea to namespace them +# to your theme. It's up to you to let webpack know to compile them. +screenshot: screenshot.jpg + # (OPTIONAL) The directory which contains the pack files. # Defaults to this directory (`app/javascript/flavour/[flavour]`), # but in the case of the vanilla Mastodon flavour the pack files are diff --git a/app/javascript/images/screenshot.jpg b/app/javascript/images/screenshot.jpg new file mode 100644 index 000000000..45b270fbb Binary files /dev/null and b/app/javascript/images/screenshot.jpg differ diff --git a/app/lib/themes.rb b/app/lib/themes.rb index 49e9ebbc3..55824a5c4 100644 --- a/app/lib/themes.rb +++ b/app/lib/themes.rb @@ -14,17 +14,27 @@ class Themes result = Hash.new Dir.glob(Rails.root.join('app', 'javascript', 'flavours', '*', 'theme.yml')) do |path| data = YAML.load_file(path) - name = File.basename(File.dirname(path)) + dir = File.dirname(path) + name = File.basename(dir) + locales = [] + screenshots = [] if data['locales'] - locales = [] - Dir.glob(File.join(File.dirname(path), data['locales'], '*.{js,json}')) do |locale| + Dir.glob(File.join(dir, data['locales'], '*.{js,json}')) do |locale| localeName = File.basename(locale, File.extname(locale)) locales.push(localeName) unless localeName.match(/defaultMessages|whitelist|index/) end - data['locales'] = locales + end + if data['screenshot'] + if data['screenshot'].is_a? Array + screenshots = data['screenshot'] + else + screenshots.push(data['screenshot']) + end end if data['pack'] data['name'] = name + data['locales'] = locales + data['screenshot'] = screenshots data['skin'] = { 'default' => [] } result[name] = data end diff --git a/app/views/settings/flavours/show.html.haml b/app/views/settings/flavours/show.html.haml index 488fd2d15..8214f1b3d 100644 --- a/app/views/settings/flavours/show.html.haml +++ b/app/views/settings/flavours/show.html.haml @@ -4,6 +4,9 @@ = simple_form_for current_user, url: settings_flavour_path(@selected), html: { method: :put } do |f| = render 'shared/error_messages', object: current_user + - Themes.instance.flavour(@selected)['screenshot'].each do |screen| + %img.flavour-screen{ width: 700, src: asset_pack_path(screen) } + .flavour-description = t "flavours.#{@selected}.description", default: '' -- cgit From ed7231947c618b7c7c471699a05da85c59afa824 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sun, 10 Dec 2017 20:24:11 -0800 Subject: Added styling --- app/javascript/flavours/glitch/styles/admin.scss | 16 ++++++++++++++++ app/views/settings/flavours/show.html.haml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/styles/admin.scss b/app/javascript/flavours/glitch/styles/admin.scss index 87bc710af..7c5032217 100644 --- a/app/javascript/flavours/glitch/styles/admin.scss +++ b/app/javascript/flavours/glitch/styles/admin.scss @@ -246,6 +246,22 @@ } } +.flavour-screen { + display: block; + margin: 10px auto; + max-width: 100%; +} + +.flavour-description { + display: block; + font-size: 16px; + margin: 10px 0; + + & > p { + margin: 10px 0; + } +} + .report-accounts { display: flex; flex-wrap: wrap; diff --git a/app/views/settings/flavours/show.html.haml b/app/views/settings/flavours/show.html.haml index 8214f1b3d..43c037737 100644 --- a/app/views/settings/flavours/show.html.haml +++ b/app/views/settings/flavours/show.html.haml @@ -5,7 +5,7 @@ = render 'shared/error_messages', object: current_user - Themes.instance.flavour(@selected)['screenshot'].each do |screen| - %img.flavour-screen{ width: 700, src: asset_pack_path(screen) } + %img.flavour-screen{ src: asset_pack_path(screen) } .flavour-description = t "flavours.#{@selected}.description", default: '' -- cgit From 9d5ecdbf414b2224f7f7216cbdd966a162968b39 Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Mon, 11 Dec 2017 13:52:17 +0900 Subject: remove picture --- app/javascript/flavours/glitch/styles/components/index.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index 0c36373b7..8f98863d8 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -2286,7 +2286,6 @@ .getting-started { box-sizing: border-box; padding-bottom: 235px; - background: url('~images/mastodon-getting-started.png') no-repeat 0 100%; flex: 1 0 auto; p { -- cgit From 204688e803f76acdfbee833c4d1c0c0a9cc07560 Mon Sep 17 00:00:00 2001 From: David Yip Date: Mon, 11 Dec 2017 00:17:30 -0600 Subject: Add missing set_pack def/filter in OAuth::AuthorizedApplicationsController. --- app/controllers/oauth/authorized_applications_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/oauth/authorized_applications_controller.rb b/app/controllers/oauth/authorized_applications_controller.rb index 395fbc51b..f95d672ec 100644 --- a/app/controllers/oauth/authorized_applications_controller.rb +++ b/app/controllers/oauth/authorized_applications_controller.rb @@ -5,6 +5,7 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicatio before_action :store_current_location before_action :authenticate_resource_owner! + before_action :set_pack include Localized @@ -13,4 +14,8 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicatio def store_current_location store_location_for(:user, request.url) end + + def set_pack + use_pack 'settings' + end end -- cgit From e56323a4dd3048fa6f46590052bcba75d82b3317 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Mon, 11 Dec 2017 22:22:08 +0900 Subject: Remove preview_card fabricator (#5975) preview_card fabricator has a removed attribute, status, and is no longer functional. --- spec/fabricators/preview_card_fabricator.rb | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 spec/fabricators/preview_card_fabricator.rb diff --git a/spec/fabricators/preview_card_fabricator.rb b/spec/fabricators/preview_card_fabricator.rb deleted file mode 100644 index 15b33815c..000000000 --- a/spec/fabricators/preview_card_fabricator.rb +++ /dev/null @@ -1,4 +0,0 @@ -Fabricator(:preview_card) do - status - url 'http://example.com' -end -- cgit From feed07227ba9feb8def161dc127033016c749ac5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 11 Dec 2017 15:32:29 +0100 Subject: Apply a 25x rate limit by IP even to authenticated requests (#5948) --- app/controllers/concerns/rate_limit_headers.rb | 4 ++-- config/initializers/rack_attack.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/concerns/rate_limit_headers.rb b/app/controllers/concerns/rate_limit_headers.rb index ac9b58f5d..b79c558d8 100644 --- a/app/controllers/concerns/rate_limit_headers.rb +++ b/app/controllers/concerns/rate_limit_headers.rb @@ -44,8 +44,8 @@ module RateLimitHeaders end def api_throttle_data - request.env['rack.attack.throttle_data']['throttle_authenticated_api'] || - request.env['rack.attack.throttle_data']['throttle_unauthenticated_api'] + most_limited_type, = request.env['rack.attack.throttle_data'].min_by { |_, v| v[:limit] } + request.env['rack.attack.throttle_data'][most_limited_type] end def request_time diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 41db76929..b38fb302b 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -49,8 +49,8 @@ class Rack::Attack req.api_request? && req.authenticated_user_id end - throttle('throttle_unauthenticated_api', limit: 300, period: 5.minutes) do |req| - req.ip if req.api_request? && req.unauthenticated? + throttle('throttle_unauthenticated_api', limit: 7_500, period: 5.minutes) do |req| + req.ip if req.api_request? end throttle('protected_paths', limit: 5, period: 5.minutes) do |req| -- cgit From d8206d1931800c262319564396f9cd97dea32b30 Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Tue, 12 Dec 2017 00:28:33 +0900 Subject: add ja --- config/locales/ja.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 3097fb22b..a8c3c9057 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -424,6 +424,7 @@ ja: changes_saved_msg: 正常に変更されました powered_by: powered by %{link} save_changes: 変更を保存 + use_this: これを使う validation_errors: one: エラーが発生しました。以下のエラーを確認してください。 other: エラーが発生しました。以下の%{count}個のエラーを確認してください。 @@ -587,6 +588,7 @@ ja: development: 開発 edit_profile: プロフィールを編集 export: データのエクスポート + flavours: フレーバー followers: 信頼済みのインスタンス import: データのインポート migrate: アカウントの引っ越し -- cgit From 8aa527434c1f022199b4de576bbb2e31a123782f Mon Sep 17 00:00:00 2001 From: kibigo! Date: Mon, 11 Dec 2017 10:45:21 -0800 Subject: Fixed index in webpack config --- config/webpack/configuration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js index 852185eb9..a38d9d11d 100644 --- a/config/webpack/configuration.js +++ b/config/webpack/configuration.js @@ -50,7 +50,7 @@ for (let i = 0; i < skinFiles.length; i++) { data[skin] = {}; const skinPacks = glob.sync(join(skinFile, '*.{css,scss}')); for (let j = 0; j < skinPacks.length; j++) { - const pack = skinPacks[i]; + const pack = skinPacks[j]; data[skin][basename(pack, extname(pack))] = pack; } } else if ((skin = skin.match(/^(.*)\.s?css$/i))) { -- cgit From c588fcf4bce63fa74a4232952a1d5dfe76a9b160 Mon Sep 17 00:00:00 2001 From: Quenty31 <33203663+Quenty31@users.noreply.github.com> Date: Mon, 11 Dec 2017 20:53:29 +0100 Subject: Tiny little change (#5981) --- config/locales/oc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 878df32b5..0167e9271 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -237,7 +237,7 @@ oc: available: Disponibles expired: Expirats title: Filtre - title: Covits + title: Convits reports: action_taken_by: Mesura menada per are_you_sure: Es segur ? @@ -533,7 +533,7 @@ oc: table: expires_at: Expirats uses: Usatges - title: Covidar de monde + title: Convidar de monde landing_strip_html: "%{name} utiliza %{link_to_root_path}. Podètz lo/la sègre o interagir amb el o ela s’avètz un compte ont que siasque sul fediverse." landing_strip_signup_html: S’es pas lo cas, podètz vos marcar aquí. lists: -- cgit From 44992df257e537afe0b91682934d5eeed5575439 Mon Sep 17 00:00:00 2001 From: cwm Date: Mon, 11 Dec 2017 17:54:40 -0600 Subject: load pack --- app/controllers/oauth/authorizations_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb index e9cdf9fa8..987f20c41 100644 --- a/app/controllers/oauth/authorizations_controller.rb +++ b/app/controllers/oauth/authorizations_controller.rb @@ -5,6 +5,7 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController before_action :store_current_location before_action :authenticate_resource_owner! + before_action :set_pack include Localized @@ -13,4 +14,8 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController def store_current_location store_location_for(:user, request.url) end + + def set_pack + use_pack 'settings' + end end -- cgit From 0a52e376484500279edded7121e3b23953d37b1b Mon Sep 17 00:00:00 2001 From: cwm Date: Mon, 11 Dec 2017 18:14:41 -0600 Subject: change pack to 'auth' --- app/controllers/oauth/authorizations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb index 987f20c41..eb977510b 100644 --- a/app/controllers/oauth/authorizations_controller.rb +++ b/app/controllers/oauth/authorizations_controller.rb @@ -16,6 +16,6 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController end def set_pack - use_pack 'settings' + use_pack 'auth' end end -- cgit From 481fac7c8401a47af52043cd4db05b6dd984d8a9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 12 Dec 2017 02:14:33 +0100 Subject: Exclude moved accounts from search results (#5984) --- app/models/account.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/account.rb b/app/models/account.rb index e8a8c6560..686e74044 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -285,6 +285,7 @@ class Account < ApplicationRecord FROM accounts WHERE #{query} @@ #{textsearch} AND accounts.suspended = false + AND accounts.moved_to_account_id IS NULL ORDER BY rank DESC LIMIT ? SQL @@ -310,6 +311,7 @@ class Account < ApplicationRecord WHERE accounts.id IN (SELECT * FROM first_degree) AND #{query} @@ #{textsearch} AND accounts.suspended = false + AND accounts.moved_to_account_id IS NULL GROUP BY accounts.id ORDER BY rank DESC LIMIT ? @@ -325,6 +327,7 @@ class Account < ApplicationRecord LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?) OR (accounts.id = f.target_account_id AND f.account_id = ?) WHERE #{query} @@ #{textsearch} AND accounts.suspended = false + AND accounts.moved_to_account_id IS NULL GROUP BY accounts.id ORDER BY rank DESC LIMIT ? -- cgit From 1356ed72cd4f595e93a5fa23fd8d7459fc8f81b3 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 12 Dec 2017 03:55:39 +0100 Subject: Fix #5953 - Add GET /api/v1/accounts/:id/lists (#5983) --- .../api/v1/accounts/lists_controller.rb | 20 +++++++++++++++++++ config/routes.rb | 1 + .../api/v1/accounts/lists_controller_spec.rb | 23 ++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 app/controllers/api/v1/accounts/lists_controller.rb create mode 100644 spec/controllers/api/v1/accounts/lists_controller_spec.rb diff --git a/app/controllers/api/v1/accounts/lists_controller.rb b/app/controllers/api/v1/accounts/lists_controller.rb new file mode 100644 index 000000000..a7ba89ce2 --- /dev/null +++ b/app/controllers/api/v1/accounts/lists_controller.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class Api::V1::Accounts::ListsController < Api::BaseController + before_action -> { doorkeeper_authorize! :read } + before_action :require_user! + before_action :set_account + + respond_to :json + + def index + @lists = @account.lists.where(account: current_account) + render json: @lists, each_serializer: REST::ListSerializer + end + + private + + def set_account + @account = Account.find(params[:account_id]) + end +end diff --git a/config/routes.rb b/config/routes.rb index 6313a355d..467849c03 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -269,6 +269,7 @@ Rails.application.routes.draw do resources :statuses, only: :index, controller: 'accounts/statuses' resources :followers, only: :index, controller: 'accounts/follower_accounts' resources :following, only: :index, controller: 'accounts/following_accounts' + resources :lists, only: :index, controller: 'accounts/lists' member do post :follow diff --git a/spec/controllers/api/v1/accounts/lists_controller_spec.rb b/spec/controllers/api/v1/accounts/lists_controller_spec.rb new file mode 100644 index 000000000..0a372f65b --- /dev/null +++ b/spec/controllers/api/v1/accounts/lists_controller_spec.rb @@ -0,0 +1,23 @@ +require 'rails_helper' + +describe Api::V1::Accounts::ListsController do + render_views + + let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } + let(:account) { Fabricate(:account) } + let(:list) { Fabricate(:list, account: user.account) } + + before do + allow(controller).to receive(:doorkeeper_token) { token } + user.account.follow!(account) + list.accounts << account + end + + describe 'GET #index' do + it 'returns http success' do + get :index, params: { account_id: account.id } + expect(response).to have_http_status(:success) + end + end +end -- cgit From 30d2ea03b05ed3efb4ad8f21cab343108d3699ac Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 12 Dec 2017 03:56:30 +0100 Subject: Improve public status page title (#5985) --- app/views/stream_entries/show.html.haml | 3 +++ config/locales/en.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml index 895a61247..b52334a28 100644 --- a/app/views/stream_entries/show.html.haml +++ b/app/views/stream_entries/show.html.haml @@ -1,3 +1,6 @@ +- content_for :page_title do + = t('statuses.title', name: display_name(@account), quote: truncate(@stream_entry.activity.text, length: 50, omission: '…')) + - content_for :header_tags do - if @account.user&.setting_noindex %meta{ name: 'robots', content: 'noindex' }/ diff --git a/config/locales/en.yml b/config/locales/en.yml index d42fb6427..ce6d7ee41 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -599,6 +599,7 @@ en: private: Non-public toot cannot be pinned reblog: A boost cannot be pinned show_more: Show more + title: '%{name}: "%{quote}"' visibilities: private: Followers-only private_long: Only show to followers -- cgit From 14c4a33cd9bfc1212cb362897272e5ea7d1529e5 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 12 Dec 2017 12:11:17 +0900 Subject: Change account_id non-nullable in lists (#5979) --- app/models/list.rb | 2 +- .../20171201000000_change_account_id_nonnullable_in_lists.rb | 7 +++++++ db/schema.rb | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb diff --git a/app/models/list.rb b/app/models/list.rb index f45e4973d..be85c3b87 100644 --- a/app/models/list.rb +++ b/app/models/list.rb @@ -4,7 +4,7 @@ # Table name: lists # # id :integer not null, primary key -# account_id :integer +# account_id :integer not null # title :string default(""), not null # created_at :datetime not null # updated_at :datetime not null diff --git a/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb b/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb new file mode 100644 index 000000000..120f74402 --- /dev/null +++ b/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb @@ -0,0 +1,7 @@ +require Rails.root.join('lib', 'mastodon', 'migration_helpers') + +class ChangeAccountIdNonnullableInLists < ActiveRecord::Migration[5.1] + def change + change_column_null :lists, :account_id, false + end +end diff --git a/db/schema.rb b/db/schema.rb index cf0deb826..7887f26a2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171130000000) do +ActiveRecord::Schema.define(version: 20171201000000) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -209,7 +209,7 @@ ActiveRecord::Schema.define(version: 20171130000000) do end create_table "lists", force: :cascade do |t| - t.bigint "account_id" + t.bigint "account_id", null: false t.string "title", default: "", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false -- cgit From c95af71da59513b34548b2bc8334be2035b46fe1 Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Tue, 12 Dec 2017 12:29:09 +0900 Subject: optimize paperclip --- Gemfile | 1 + Gemfile.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index e43b1a256..9edfb1267 100644 --- a/Gemfile +++ b/Gemfile @@ -20,6 +20,7 @@ gem 'fog-local', '~> 0.4', require: false gem 'fog-openstack', '~> 0.1', require: false gem 'paperclip', '~> 5.1' gem 'paperclip-av-transcoder', '~> 0.6' +gem 'posix-spawn' gem 'active_model_serializers', '~> 0.10' gem 'addressable', '~> 2.5' diff --git a/Gemfile.lock b/Gemfile.lock index 5f050d031..f839c19ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -324,6 +324,7 @@ GEM pghero (1.7.0) activerecord pkg-config (1.2.8) + posix-spawn (0.3.13) powerpack (0.1.1) pry (0.11.3) coderay (~> 1.1.0) @@ -601,6 +602,7 @@ DEPENDENCIES pg (~> 0.20) pghero (~> 1.7) pkg-config (~> 1.2) + posix-spawn pry-rails (~> 0.3) puma (~> 3.10) pundit (~> 1.1) -- cgit From c0c4526283c524a3b3430df53c1fb83ffd5067eb Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Tue, 12 Dec 2017 13:05:48 +0900 Subject: add ja for fav conf --- config/locales/simple_form.ja.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index bdeefa7e5..ab7540621 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -41,6 +41,7 @@ ja: setting_default_privacy: 投稿の公開範囲 setting_default_sensitive: メディアを常に閲覧注意としてマークする setting_delete_modal: トゥートを削除する前に確認ダイアログを表示する + setting_favourite_modal: お気に入りをする前に確認ダイアログを表示する setting_noindex: 検索エンジンによるインデックスを拒否する setting_reduce_motion: アニメーションの動きを減らす setting_system_font_ui: システムのデフォルトフォントを使う -- cgit From b93ad3d0e8553be73fd7e6a39e2e436dc8d348fc Mon Sep 17 00:00:00 2001 From: ncls7615 Date: Tue, 12 Dec 2017 13:13:54 +0900 Subject: add ja --- app/javascript/flavours/glitch/locales/ja.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/flavours/glitch/locales/ja.js b/app/javascript/flavours/glitch/locales/ja.js index 39dc3b81d..480bbd25b 100644 --- a/app/javascript/flavours/glitch/locales/ja.js +++ b/app/javascript/flavours/glitch/locales/ja.js @@ -37,6 +37,10 @@ const messages = { 'status.collapse': '折りたたむ', 'status.uncollapse': '折りたたみを解除', + 'favourite_modal.combo': '次からは {combo} を押せば、これをスキップできます。', + + 'home.column_settings.show_direct': 'DMを表示', + 'notification.markForDeletion': '選択', 'notifications.clear': '通知を全てクリアする', 'notifications.marked_clear_confirmation': '削除した全ての通知を完全に削除してもよろしいですか?', -- cgit From be332472355dc5c55fb0beef6c818856527c7118 Mon Sep 17 00:00:00 2001 From: David Yip Date: Tue, 12 Dec 2017 03:28:15 -0600 Subject: Remove themes.default from nl and pt-BR locales. This translation has been supplanted by the flavours-related translations. --- config/locales/nl.yml | 2 -- config/locales/pt-BR.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/config/locales/nl.yml b/config/locales/nl.yml index c72b092a3..91c788ae6 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -678,8 +678,6 @@ nl:

Originally adapted from the Discourse privacy policy.

title: "%{instance} Terms of Service and Privacy Policy" - themes: - default: Mastodon time: formats: default: "%d %B %Y om %H:%M" diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 5b3567616..597de9e4a 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -675,8 +675,6 @@ pt-BR:

Originalmente adaptado da política de privacidade do Discourse.

title: "%{instance} Termos de Serviço e Política de Privacidade" - themes: - default: Mastodon time: formats: default: "%b %d, %Y, %H:%M" -- cgit From 1486fd64cc73d1efb713ad3801cb8ae7acc0de1f Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Tue, 12 Dec 2017 23:10:12 +0900 Subject: Move files for GitHub to .github directory (#5989) --- .github/CODEOWNERS | 32 ++++++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE.md | 6 ++++++ CODEOWNERS | 32 -------------------------------- ISSUE_TEMPLATE.md | 6 ------ 4 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 CODEOWNERS delete mode 100644 ISSUE_TEMPLATE.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..32919bd50 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,32 @@ +# CODEOWNERS for tootsuite/mastodon + +# Translators +# To add translator, copy these lines, replace `fr` with appropriate language code and replace `@żelipapą` with user's GitHub nickname preceded by `@` sign or e-mail address. +# /app/javascript/mastodon/locales/fr.json @żelipapą +# /app/views/user_mailer/*.fr.html.erb @żelipapą +# /app/views/user_mailer/*.fr.text.erb @żelipapą +# /config/locales/*.fr.yml @żelipapą +# /config/locales/fr.yml @żelipapą + +# Polish +/app/javascript/mastodon/locales/pl.json @m4sk1n +/app/views/user_mailer/*.pl.html.erb @m4sk1n +/app/views/user_mailer/*.pl.text.erb @m4sk1n +/config/locales/*.pl.yml @m4sk1n +/config/locales/pl.yml @m4sk1n + +# French +/app/javascript/mastodon/locales/fr.json @aldarone +/app/javascript/mastodon/locales/whitelist_fr.json @aldarone +/app/views/user_mailer/*.fr.html.erb @aldarone +/app/views/user_mailer/*.fr.text.erb @aldarone +/config/locales/*.fr.yml @aldarone +/config/locales/fr.yml @aldarone + +# Dutch +/app/javascript/mastodon/locales/nl.json @jeroenpraat +/app/javascript/mastodon/locales/whitelist_nl.json @jeroenpraat +/app/views/user_mailer/*.nl.html.erb @jeroenpraat +/app/views/user_mailer/*.nl.text.erb @jeroenpraat +/config/locales/*.nl.yml @jeroenpraat +/config/locales/nl.yml @jeroenpraat diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..c78bcb492 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,6 @@ +[Issue text goes here]. + +* * * * + +- [ ] I searched or browsed the repo’s other issues to ensure this is not a duplicate. +- [ ] This bug happens on a [tagged release](https://github.com/tootsuite/mastodon/releases) and not on `master` (If you're a user, don't worry about this). diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 32919bd50..000000000 --- a/CODEOWNERS +++ /dev/null @@ -1,32 +0,0 @@ -# CODEOWNERS for tootsuite/mastodon - -# Translators -# To add translator, copy these lines, replace `fr` with appropriate language code and replace `@żelipapą` with user's GitHub nickname preceded by `@` sign or e-mail address. -# /app/javascript/mastodon/locales/fr.json @żelipapą -# /app/views/user_mailer/*.fr.html.erb @żelipapą -# /app/views/user_mailer/*.fr.text.erb @żelipapą -# /config/locales/*.fr.yml @żelipapą -# /config/locales/fr.yml @żelipapą - -# Polish -/app/javascript/mastodon/locales/pl.json @m4sk1n -/app/views/user_mailer/*.pl.html.erb @m4sk1n -/app/views/user_mailer/*.pl.text.erb @m4sk1n -/config/locales/*.pl.yml @m4sk1n -/config/locales/pl.yml @m4sk1n - -# French -/app/javascript/mastodon/locales/fr.json @aldarone -/app/javascript/mastodon/locales/whitelist_fr.json @aldarone -/app/views/user_mailer/*.fr.html.erb @aldarone -/app/views/user_mailer/*.fr.text.erb @aldarone -/config/locales/*.fr.yml @aldarone -/config/locales/fr.yml @aldarone - -# Dutch -/app/javascript/mastodon/locales/nl.json @jeroenpraat -/app/javascript/mastodon/locales/whitelist_nl.json @jeroenpraat -/app/views/user_mailer/*.nl.html.erb @jeroenpraat -/app/views/user_mailer/*.nl.text.erb @jeroenpraat -/config/locales/*.nl.yml @jeroenpraat -/config/locales/nl.yml @jeroenpraat diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index c78bcb492..000000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,6 +0,0 @@ -[Issue text goes here]. - -* * * * - -- [ ] I searched or browsed the repo’s other issues to ensure this is not a duplicate. -- [ ] This bug happens on a [tagged release](https://github.com/tootsuite/mastodon/releases) and not on `master` (If you're a user, don't worry about this). -- cgit From fe180f18ff38a01007842ccff293a84a63336aae Mon Sep 17 00:00:00 2001 From: "Renato \"Lond\" Cerqueira" Date: Tue, 12 Dec 2017 15:11:13 +0100 Subject: Change conditional to avoid nil into string error in sidekiq (#5987) * Change conditional to avoid nil into string error in sidekiq When obtaining information about users with mastodon in a different subdomain, sidekiq was giving out a 'no implicit conversion of nil into String' * Use presence instead of blank? with ternary. Following suggestion on PR --- app/services/fetch_remote_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/fetch_remote_status_service.rb b/app/services/fetch_remote_status_service.rb index 9c009335b..9c3008035 100644 --- a/app/services/fetch_remote_status_service.rb +++ b/app/services/fetch_remote_status_service.rb @@ -40,6 +40,6 @@ class FetchRemoteStatusService < BaseService end def confirmed_domain?(domain, account) - account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url || account.uri).normalized_host).zero? + account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url.presence || account.uri).normalized_host).zero? end end -- cgit From 19257d91bf1e613b48a7ac9de7ce6933405c9657 Mon Sep 17 00:00:00 2001 From: "Renato \"Lond\" Cerqueira" Date: Tue, 12 Dec 2017 15:12:09 +0100 Subject: Return false if object does not respond to url (#5988) Avoid error when the service returns a mostly valid oembed, but has no url in it, causing a MethodError: undefined method `url' for # --- app/services/fetch_link_card_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 7f4518ea7..9f0c73858 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -87,6 +87,7 @@ class FetchLinkCardService < BaseService when 'link' @card.image = URI.parse(response.thumbnail_url) if response.respond_to?(:thumbnail_url) when 'photo' + return false unless response.respond_to?(:url) @card.embed_url = response.url @card.width = response.width.presence || 0 @card.height = response.height.presence || 0 -- cgit From cfea28216ffaec9c28ba2f57de868ada482c1779 Mon Sep 17 00:00:00 2001 From: nullkal Date: Tue, 12 Dec 2017 23:13:24 +0900 Subject: make it possible to stream public timelines without authorization (#5977) * make it possible to stream public timelines without authorization * Fix * Make eslint allow `value == null` * Remove redundant line * Improve style and revert .eslintrc.yml * Fix streamWsEnd * Show IP address instead of (anonymous user) * Add missing semicolon --- streaming/index.js | 97 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 27 deletions(-) diff --git a/streaming/index.js b/streaming/index.js index c79a58671..31c597cf0 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -97,6 +97,8 @@ const startWorker = (workerId) => { }; const app = express(); + app.set('trusted proxy', process.env.TRUSTED_PROXY_IP || 'loopback,uniquelocal'); + const pgPool = new pg.Pool(Object.assign(pgConfigs[env], dbUrlToConfig(process.env.DATABASE_URL))); const server = http.createServer(app); const redisNamespace = process.env.REDIS_NAMESPACE || null; @@ -177,6 +179,12 @@ const startWorker = (workerId) => { next(); }; + const setRemoteAddress = (req, res, next) => { + req.remoteAddress = req.connection.remoteAddress; + + next(); + }; + const accountFromToken = (token, req, next) => { pgPool.connect((err, client, done) => { if (err) { @@ -208,17 +216,22 @@ const startWorker = (workerId) => { }); }; - const accountFromRequest = (req, next) => { + const accountFromRequest = (req, next, required = true) => { const authorization = req.headers.authorization; const location = url.parse(req.url, true); const accessToken = location.query.access_token; if (!authorization && !accessToken) { - const err = new Error('Missing access token'); - err.statusCode = 401; + if (required) { + const err = new Error('Missing access token'); + err.statusCode = 401; - next(err); - return; + next(err); + return; + } else { + next(); + return; + } } const token = authorization ? authorization.replace(/^Bearer /, '') : accessToken; @@ -226,7 +239,17 @@ const startWorker = (workerId) => { accountFromToken(token, req, next); }; + const PUBLIC_STREAMS = [ + 'public', + 'public:local', + 'hashtag', + 'hashtag:local', + ]; + const wsVerifyClient = (info, cb) => { + const location = url.parse(info.req.url, true); + const authRequired = !PUBLIC_STREAMS.some(stream => stream === location.query.stream); + accountFromRequest(info.req, err => { if (!err) { cb(true, undefined, undefined); @@ -234,16 +257,24 @@ const startWorker = (workerId) => { log.error(info.req.requestId, err.toString()); cb(false, 401, 'Unauthorized'); } - }); + }, authRequired); }; + const PUBLIC_ENDPOINTS = [ + '/api/v1/streaming/public', + '/api/v1/streaming/public/local', + '/api/v1/streaming/hashtag', + '/api/v1/streaming/hashtag/local', + ]; + const authenticationMiddleware = (req, res, next) => { if (req.method === 'OPTIONS') { next(); return; } - accountFromRequest(req, next); + const authRequired = !PUBLIC_ENDPOINTS.some(endpoint => endpoint === req.path); + accountFromRequest(req, next, authRequired); }; const errorMiddleware = (err, req, res, {}) => { @@ -275,8 +306,10 @@ const startWorker = (workerId) => { }; const streamFrom = (id, req, output, attachCloseHandler, needsFiltering = false, notificationOnly = false) => { + const accountId = req.accountId || req.remoteAddress; + const streamType = notificationOnly ? ' (notification)' : ''; - log.verbose(req.requestId, `Starting stream from ${id} for ${req.accountId}${streamType}`); + log.verbose(req.requestId, `Starting stream from ${id} for ${accountId}${streamType}`); const listener = message => { const { event, payload, queued_at } = JSON.parse(message); @@ -286,7 +319,7 @@ const startWorker = (workerId) => { const delta = now - queued_at; const encodedPayload = typeof payload === 'object' ? JSON.stringify(payload) : payload; - log.silly(req.requestId, `Transmitting for ${req.accountId}: ${event} ${encodedPayload} Delay: ${delta}ms`); + log.silly(req.requestId, `Transmitting for ${accountId}: ${event} ${encodedPayload} Delay: ${delta}ms`); output(event, encodedPayload); }; @@ -313,26 +346,30 @@ const startWorker = (workerId) => { return; } - const queries = [ - client.query(`SELECT 1 FROM blocks WHERE (account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 2)})) OR (account_id = $2 AND target_account_id = $1) UNION SELECT 1 FROM mutes WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 2)})`, [req.accountId, unpackedPayload.account.id].concat(targetAccountIds)), - ]; + if (!req.accountId) { + const queries = [ + client.query(`SELECT 1 FROM blocks WHERE (account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 2)})) OR (account_id = $2 AND target_account_id = $1) UNION SELECT 1 FROM mutes WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 2)})`, [req.accountId, unpackedPayload.account.id].concat(targetAccountIds)), + ]; - if (accountDomain) { - queries.push(client.query('SELECT 1 FROM account_domain_blocks WHERE account_id = $1 AND domain = $2', [req.accountId, accountDomain])); - } + if (accountDomain) { + queries.push(client.query('SELECT 1 FROM account_domain_blocks WHERE account_id = $1 AND domain = $2', [req.accountId, accountDomain])); + } - Promise.all(queries).then(values => { - done(); + Promise.all(queries).then(values => { + done(); - if (values[0].rows.length > 0 || (values.length > 1 && values[1].rows.length > 0)) { - return; - } + if (values[0].rows.length > 0 || (values.length > 1 && values[1].rows.length > 0)) { + return; + } + transmit(); + }).catch(err => { + done(); + log.error(err); + }); + } else { transmit(); - }).catch(err => { - done(); - log.error(err); - }); + } }); } else { transmit(); @@ -345,13 +382,15 @@ const startWorker = (workerId) => { // Setup stream output to HTTP const streamToHttp = (req, res) => { + const accountId = req.accountId || req.remoteAddress; + res.setHeader('Content-Type', 'text/event-stream'); res.setHeader('Transfer-Encoding', 'chunked'); const heartbeat = setInterval(() => res.write(':thump\n'), 15000); req.on('close', () => { - log.verbose(req.requestId, `Ending stream for ${req.accountId}`); + log.verbose(req.requestId, `Ending stream for ${accountId}`); clearInterval(heartbeat); }); @@ -383,8 +422,10 @@ const startWorker = (workerId) => { // Setup stream end for WebSockets const streamWsEnd = (req, ws, closeHandler = false) => (id, listener) => { + const accountId = req.accountId || req.remoteAddress; + ws.on('close', () => { - log.verbose(req.requestId, `Ending stream for ${req.accountId}`); + log.verbose(req.requestId, `Ending stream for ${accountId}`); unsubscribe(id, listener); if (closeHandler) { closeHandler(); @@ -392,7 +433,7 @@ const startWorker = (workerId) => { }); ws.on('error', () => { - log.verbose(req.requestId, `Ending stream for ${req.accountId}`); + log.verbose(req.requestId, `Ending stream for ${accountId}`); unsubscribe(id, listener); if (closeHandler) { closeHandler(); @@ -401,6 +442,7 @@ const startWorker = (workerId) => { }; app.use(setRequestId); + app.use(setRemoteAddress); app.use(allowCrossDomain); app.use(authenticationMiddleware); app.use(errorMiddleware); @@ -451,6 +493,7 @@ const startWorker = (workerId) => { const req = ws.upgradeReq; const location = url.parse(req.url, true); req.requestId = uuid.v4(); + req.remoteAddress = ws._socket.remoteAddress; ws.isAlive = true; -- cgit From 2a61b9f000039a7d02315cdf6bca58138861a71c Mon Sep 17 00:00:00 2001 From: SerCom_KC Date: Tue, 12 Dec 2017 22:13:47 +0800 Subject: Update Chinese (Simplified) translations (#5991) * i18n: (zh-CN) Update translations for #5817 * i18n: (zh-CN) Add translation for #5985 * i18n: (zh-CN) Normalization --- config/locales/zh-CN.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 3ede5c4d5..0d0cac1b3 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -341,7 +341,7 @@ zh-CN: warning: 一定小心,千万不要把它分享给任何人! your_token: 你的访问令牌 auth: - agreement_html: 注册即表示你同意我们的使用条款隐私权政策。 + agreement_html: 注册即表示你同意遵守本实例的相关规定我们的使用条款。 change_password: 帐户安全 delete_account: 删除帐户 delete_account_html: 如果你想删除你的帐户,请点击这里继续。你需要确认你的操作。 @@ -591,6 +591,7 @@ zh-CN: private: 不能置顶非公开的嘟文 reblog: 不能置顶转嘟 show_more: 显示更多 + title: "%{name}:“%{quote}”" visibilities: private: 仅关注者 private_long: 只有关注你的用户能看到 -- cgit From f9f6918148ab2471292bcc89e14be8471b42c992 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 12 Dec 2017 23:54:38 +0900 Subject: Store preview image for embedded photo in preview cards (#5986) The preview image would be useful to embed in timeline. --- app/services/fetch_link_card_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 9f0c73858..09534d0ff 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -89,6 +89,7 @@ class FetchLinkCardService < BaseService when 'photo' return false unless response.respond_to?(:url) @card.embed_url = response.url + @card.image = URI.parse(response.url) @card.width = response.width.presence || 0 @card.height = response.height.presence || 0 when 'video' -- cgit From cfa3f55221733664004deb14f70764be4752b7bb Mon Sep 17 00:00:00 2001 From: abcang Date: Wed, 13 Dec 2017 01:38:42 +0900 Subject: Remove duplicate indexes in lists (#5990) --- db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb | 6 ++++++ db/schema.rb | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb diff --git a/db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb b/db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb new file mode 100644 index 000000000..03f2591a8 --- /dev/null +++ b/db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb @@ -0,0 +1,6 @@ +class RemoveDuplicateIndexesInLists < ActiveRecord::Migration[5.1] + def change + remove_index :list_accounts, name: "index_list_accounts_on_account_id" + remove_index :list_accounts, name: "index_list_accounts_on_list_id" + end +end diff --git a/db/schema.rb b/db/schema.rb index 7887f26a2..c55020fa4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171201000000) do +ActiveRecord::Schema.define(version: 20171212195226) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -202,10 +202,8 @@ ActiveRecord::Schema.define(version: 20171201000000) do t.bigint "account_id", null: false t.bigint "follow_id", null: false t.index ["account_id", "list_id"], name: "index_list_accounts_on_account_id_and_list_id", unique: true - t.index ["account_id"], name: "index_list_accounts_on_account_id" t.index ["follow_id"], name: "index_list_accounts_on_follow_id" t.index ["list_id", "account_id"], name: "index_list_accounts_on_list_id_and_account_id" - t.index ["list_id"], name: "index_list_accounts_on_list_id" end create_table "lists", force: :cascade do |t| -- cgit From 0c8b1eb577f11d33c27f28afdfdac807b7e27845 Mon Sep 17 00:00:00 2001 From: Neetshin Date: Tue, 12 Dec 2017 18:57:22 +0000 Subject: Make detect empty string before assign image description (#5994) * Add aria-autocomplete='list' in Textaria ref: https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete * Make detect empty string brefore assign upload description --- app/javascript/mastodon/features/compose/components/upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/compose/components/upload.js b/app/javascript/mastodon/features/compose/components/upload.js index 6ab76492a..3a3d17710 100644 --- a/app/javascript/mastodon/features/compose/components/upload.js +++ b/app/javascript/mastodon/features/compose/components/upload.js @@ -62,7 +62,7 @@ export default class Upload extends ImmutablePureComponent { render () { const { intl, media } = this.props; const active = this.state.hovered || this.state.focused; - const description = this.state.dirtyDescription || media.get('description') || ''; + const description = this.state.dirtyDescription || (this.state.dirtyDescription !== '' && media.get('description')) || ''; return (
-- cgit From c986218c3a98564e38d68689150b33a6aa6c4b3a Mon Sep 17 00:00:00 2001 From: erin Date: Tue, 12 Dec 2017 13:19:33 -0600 Subject: Improve error handling in streaming/index.js (#5968) On an unhandled worker exception, we should log the exception and exit with nonzero status, instead of letting workers silently fail and restarting them in an endless loop. Note: we previously tried to handle the `'error'` signal. That's not a signal Node fires; my patch traps `'uncaughtException'`, which is what the code was _trying_ to do. --- streaming/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/streaming/index.js b/streaming/index.js index 31c597cf0..198eac1ae 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -563,12 +563,14 @@ const startWorker = (workerId) => { const onError = (err) => { log.error(err); + server.close(); + process.exit(0); }; process.on('SIGINT', onExit); process.on('SIGTERM', onExit); process.on('exit', onExit); - process.on('error', onError); + process.on('uncaughtException', onError); }; throng({ -- cgit From 0370ba7b0a18d41f688269370d0eb089261047a9 Mon Sep 17 00:00:00 2001 From: Quenty31 <33203663+Quenty31@users.noreply.github.com> Date: Tue, 12 Dec 2017 20:48:26 +0100 Subject: Update: #5985 and #5817 (#5996) --- config/locales/oc.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 0167e9271..60c9e0671 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -343,7 +343,7 @@ oc: warning: Mèfi ! Agachatz de partejar aquela donada amb degun ! your_token: Vòstre geton d’accès auth: - agreement_html: En vos marcar acceptatz nòstres tèrmes de servici e politica de confidencialitat. + agreement_html: En vos marcar acceptatz las règlas de l’instància e politica de confidencialitat. change_password: Seguretat delete_account: Suprimir lo compte delete_account_html: Se volètz suprimir vòstre compte, podètz o far aquí. Vos demandarem que confirmetz. @@ -677,6 +677,7 @@ oc: private: Se pòt pas penjar los tuts pas publics reblog: Se pòt pas penjar un tut partejat show_more: Ne veire mai + title: '%{name} : "%{quote}"' visibilities: private: Seguidors solament private_long: Mostrar pas qu’als seguidors -- cgit From 0128b86d3098042cdbc3a1629f74b70f665f8dfb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 02:12:41 +0100 Subject: Use streaming API for standalone timelines on /about and /tag pages (#5998) --- .../mastodon/features/standalone/hashtag_timeline/index.js | 12 +++++------- .../mastodon/features/standalone/public_timeline/index.js | 12 +++++------- app/javascript/mastodon/stream.js | 8 +++++++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js b/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js index f15fbb2f4..f14be2aaf 100644 --- a/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js +++ b/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js @@ -8,6 +8,7 @@ import { } from '../../../actions/timelines'; import Column from '../../../components/column'; import ColumnHeader from '../../../components/column_header'; +import { connectHashtagStream } from '../../../actions/streaming'; @connect() export default class HashtagTimeline extends React.PureComponent { @@ -29,16 +30,13 @@ export default class HashtagTimeline extends React.PureComponent { const { dispatch, hashtag } = this.props; dispatch(refreshHashtagTimeline(hashtag)); - - this.polling = setInterval(() => { - dispatch(refreshHashtagTimeline(hashtag)); - }, 10000); + this.disconnect = dispatch(connectHashtagStream(hashtag)); } componentWillUnmount () { - if (typeof this.polling !== 'undefined') { - clearInterval(this.polling); - this.polling = null; + if (this.disconnect) { + this.disconnect(); + this.disconnect = null; } } diff --git a/app/javascript/mastodon/features/standalone/public_timeline/index.js b/app/javascript/mastodon/features/standalone/public_timeline/index.js index de4b5320a..5805d1a10 100644 --- a/app/javascript/mastodon/features/standalone/public_timeline/index.js +++ b/app/javascript/mastodon/features/standalone/public_timeline/index.js @@ -9,6 +9,7 @@ import { import Column from '../../../components/column'; import ColumnHeader from '../../../components/column_header'; import { defineMessages, injectIntl } from 'react-intl'; +import { connectPublicStream } from '../../../actions/streaming'; const messages = defineMessages({ title: { id: 'standalone.public_title', defaultMessage: 'A look inside...' }, @@ -35,16 +36,13 @@ export default class PublicTimeline extends React.PureComponent { const { dispatch } = this.props; dispatch(refreshPublicTimeline()); - - this.polling = setInterval(() => { - dispatch(refreshPublicTimeline()); - }, 3000); + this.disconnect = dispatch(connectPublicStream()); } componentWillUnmount () { - if (typeof this.polling !== 'undefined') { - clearInterval(this.polling); - this.polling = null; + if (this.disconnect) { + this.disconnect(); + this.disconnect = null; } } diff --git a/app/javascript/mastodon/stream.js b/app/javascript/mastodon/stream.js index 36c68ffc5..9a6f4f26d 100644 --- a/app/javascript/mastodon/stream.js +++ b/app/javascript/mastodon/stream.js @@ -62,7 +62,13 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({ export default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) { - const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?access_token=${accessToken}&stream=${stream}`); + const params = [ `stream=${stream}` ]; + + if (accessToken !== null) { + params.push(`access_token=${accessToken}`); + } + + const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`); ws.onopen = connected; ws.onmessage = e => received(JSON.parse(e.data)); -- cgit From 71965cbef2696e66be284c8ed11711ec46925603 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 02:40:32 +0100 Subject: Adjust empty list timeline message (#5997) --- app/javascript/mastodon/features/list_timeline/index.js | 2 +- app/javascript/mastodon/locales/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/list_timeline/index.js b/app/javascript/mastodon/features/list_timeline/index.js index 1dcd4de14..ae136e48f 100644 --- a/app/javascript/mastodon/features/list_timeline/index.js +++ b/app/javascript/mastodon/features/list_timeline/index.js @@ -161,7 +161,7 @@ export default class ListTimeline extends React.PureComponent { scrollKey={`list_timeline-${columnId}`} timelineId={`list:${id}`} loadMore={this.handleLoadMore} - emptyMessage={} + emptyMessage={} /> ); diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 3633025b8..5c39bd682 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -91,7 +91,7 @@ "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "Your home timeline is empty! Visit {public} or use search to get started and meet other users.", "empty_column.home.public_timeline": "the public timeline", - "empty_column.list": "There is nothing in this list yet.", + "empty_column.list": "There is nothing in this list yet. When members of this list post new statuses, they will appear here.", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", "follow_request.authorize": "Authorize", -- cgit From 5706fe18c2803a33c5cd0beceb6a07ba4da0b5ba Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 04:12:38 +0100 Subject: Fix #5952 - NameError (regression from #5762) (#5999) * Fix #5952 - NameError (regression from #5762) * Fix --- app/services/follow_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb index 20579ca63..ac0207a0a 100644 --- a/app/services/follow_service.rb +++ b/app/services/follow_service.rb @@ -22,7 +22,7 @@ class FollowService < BaseService elsif source_account.requested?(target_account) # This isn't managed by a method in AccountInteractions, so we modify it # ourselves if necessary. - req = follow_requests.find_by(target_account: other_account) + req = source_account.follow_requests.find_by(target_account: target_account) req.update!(show_reblogs: reblogs) return end -- cgit From 81923f88bac7d9df1ee92603d3d4d0838aeb740f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 07:42:22 +0100 Subject: Shorten English title for 2FA to avoid line-break (#6001) --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index ce6d7ee41..44c021bd5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -588,7 +588,7 @@ en: notifications: Notifications preferences: Preferences settings: Settings - two_factor_authentication: Two-factor Authentication + two_factor_authentication: Two-factor Auth your_apps: Your applications statuses: open_in_web: Open in web -- cgit From 155e211dd035992432623a33b809578f8315395f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 12:14:03 +0100 Subject: Fix GIF avatars not autoplaying when GIF autoplay is enabled (#6000) --- app/javascript/mastodon/components/avatar.js | 5 +++-- app/javascript/mastodon/components/avatar_overlay.js | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/javascript/mastodon/components/avatar.js b/app/javascript/mastodon/components/avatar.js index f7c484ee3..570505833 100644 --- a/app/javascript/mastodon/components/avatar.js +++ b/app/javascript/mastodon/components/avatar.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import { autoPlayGif } from '../initial_state'; export default class Avatar extends React.PureComponent { @@ -8,12 +9,12 @@ export default class Avatar extends React.PureComponent { account: ImmutablePropTypes.map.isRequired, size: PropTypes.number.isRequired, style: PropTypes.object, - animate: PropTypes.bool, inline: PropTypes.bool, + animate: PropTypes.bool, }; static defaultProps = { - animate: false, + animate: autoPlayGif, size: 20, inline: false, }; diff --git a/app/javascript/mastodon/components/avatar_overlay.js b/app/javascript/mastodon/components/avatar_overlay.js index f5d67b34e..3ec1d7730 100644 --- a/app/javascript/mastodon/components/avatar_overlay.js +++ b/app/javascript/mastodon/components/avatar_overlay.js @@ -1,22 +1,29 @@ import React from 'react'; +import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import { autoPlayGif } from '../initial_state'; export default class AvatarOverlay extends React.PureComponent { static propTypes = { account: ImmutablePropTypes.map.isRequired, friend: ImmutablePropTypes.map.isRequired, + animate: PropTypes.bool, + }; + + static defaultProps = { + animate: autoPlayGif, }; render() { - const { account, friend } = this.props; + const { account, friend, animate } = this.props; const baseStyle = { - backgroundImage: `url(${account.get('avatar_static')})`, + backgroundImage: `url(${account.get(animate ? 'avatar' : 'avatar_static')})`, }; const overlayStyle = { - backgroundImage: `url(${friend.get('avatar_static')})`, + backgroundImage: `url(${friend.get(animate ? 'avatar' : 'avatar_static')})`, }; return ( -- cgit From 20a6584d2dd9d5ecaa19a45a0c0c5ffec5a100ff Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 12:15:10 +0100 Subject: Clean up admin UI for accounts (#6004) * Add staff filter to admin UI for accounts, remove obsolete columns * Only display OStatus section in admin UI for accounts when OStatus data --- app/controllers/admin/accounts_controller.rb | 3 ++- app/helpers/admin/filter_helper.rb | 2 +- app/models/account_filter.rb | 2 ++ app/views/admin/accounts/_account.html.haml | 17 +++-------------- app/views/admin/accounts/index.html.haml | 9 ++++++--- app/views/admin/accounts/show.html.haml | 3 ++- config/locales/en.yml | 1 + 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index e9a512e70..7428c3f22 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -89,7 +89,8 @@ module Admin :username, :display_name, :email, - :ip + :ip, + :staff ) end end diff --git a/app/helpers/admin/filter_helper.rb b/app/helpers/admin/filter_helper.rb index 9443934b3..7fe3def98 100644 --- a/app/helpers/admin/filter_helper.rb +++ b/app/helpers/admin/filter_helper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin::FilterHelper - ACCOUNT_FILTERS = %i(local remote by_domain silenced suspended recent username display_name email ip).freeze + ACCOUNT_FILTERS = %i(local remote by_domain silenced suspended recent username display_name email ip staff).freeze REPORT_FILTERS = %i(resolved account_id target_account_id).freeze INVITE_FILTER = %i(available expired).freeze diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb index 189872368..dc7a03039 100644 --- a/app/models/account_filter.rb +++ b/app/models/account_filter.rb @@ -45,6 +45,8 @@ class AccountFilter else Account.default_scoped end + when 'staff' + accounts_with_users.merge User.staff else raise "Unknown filter: #{key}" end diff --git a/app/views/admin/accounts/_account.html.haml b/app/views/admin/accounts/_account.html.haml index 5265d77f6..598f6cddd 100644 --- a/app/views/admin/accounts/_account.html.haml +++ b/app/views/admin/accounts/_account.html.haml @@ -4,22 +4,11 @@ %td.domain - unless account.local? = link_to account.domain, admin_accounts_path(by_domain: account.domain) - %td.protocol - - unless account.local? - = account.protocol.humanize - %td.confirmed - - if account.local? - - if account.user_confirmed? - %i.fa.fa-check - - else - %i.fa.fa-times - %td.subscribed + %td - if account.local? - = t('admin.accounts.location.local') - - elsif account.subscribed? - %i.fa.fa-check + = t("admin.accounts.roles.#{account.user&.role}") - else - %i.fa.fa-times + = account.protocol.humanize %td = table_link_to 'circle', t('admin.accounts.web'), web_path("accounts/#{account.id}") = table_link_to 'globe', t('admin.accounts.public'), TagManager.instance.url_for(account) diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml index 27a0682d8..6aa39a80a 100644 --- a/app/views/admin/accounts/index.html.haml +++ b/app/views/admin/accounts/index.html.haml @@ -30,6 +30,11 @@ = filter_link_to t('admin.accounts.moderation.suspended'), {suspended: nil}, {suspended: '1'} - else = filter_link_to t('admin.accounts.moderation.suspended'), suspended: '1' + .filter-subset + %strong= t('admin.accounts.role') + %ul + %li= filter_link_to t('admin.accounts.moderation.all'), staff: nil + %li= filter_link_to t('admin.accounts.roles.staff'), staff: '1' .filter-subset %strong= t('admin.accounts.order.title') %ul @@ -56,9 +61,7 @@ %tr %th= t('admin.accounts.username') %th= t('admin.accounts.domain') - %th= t('admin.accounts.protocol') - %th= t('admin.accounts.confirmed') - %th= fa_icon 'paper-plane-o' + %th %th %tbody = render @accounts diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index ddb1cf15d..5f5d0995c 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -104,7 +104,7 @@ - else = link_to t('admin.accounts.perform_full_suspension'), admin_account_suspension_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button' if can?(:suspend, @account) -- unless @account.local? +- if !@account.local? && @account.hub_url.present? %hr %h3 OStatus @@ -132,6 +132,7 @@ - if @account.subscribed? = link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative' if can?(:unsubscribe, @account) +- if !@account.local? && @account.inbox_url.present? %hr %h3 ActivityPub diff --git a/config/locales/en.yml b/config/locales/en.yml index 44c021bd5..cc22d02ac 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -116,6 +116,7 @@ en: roles: admin: Administrator moderator: Moderator + staff: Staff user: User salmon_url: Salmon URL search: Search -- cgit From a8deb6648bc348e64469cc3451040b46ea057b77 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 13 Dec 2017 12:15:28 +0100 Subject: Fix redundant HTTP request in FetchLinkCardService (#6002) --- app/lib/provider_discovery.rb | 19 +++++++++-- app/services/fetch_link_card_service.rb | 58 ++++++++++++++++----------------- 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/app/lib/provider_discovery.rb b/app/lib/provider_discovery.rb index bcc4ed500..04ba38101 100644 --- a/app/lib/provider_discovery.rb +++ b/app/lib/provider_discovery.rb @@ -2,13 +2,26 @@ class ProviderDiscovery < OEmbed::ProviderDiscovery class << self + def get(url, **options) + provider = discover_provider(url, options) + + options.delete(:html) + + provider.get(url, options) + end + def discover_provider(url, **options) - res = Request.new(:get, url).perform format = options[:format] - raise OEmbed::NotFound, url if res.code != 200 || res.mime_type != 'text/html' + if options[:html] + html = Nokogiri::HTML(options[:html]) + else + res = Request.new(:get, url).perform + + raise OEmbed::NotFound, url if res.code != 200 || res.mime_type != 'text/html' - html = Nokogiri::HTML(res.to_s) + html = Nokogiri::HTML(res.to_s) + end if format.nil? || format == :json provider_endpoint ||= html.at_xpath('//link[@type="application/json+oembed"]')&.attribute('href')&.value diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 09534d0ff..d0472a1d7 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -40,6 +40,12 @@ class FetchLinkCardService < BaseService return if res.code != 405 && (res.code != 200 || res.mime_type != 'text/html') + @response = Request.new(:get, @url).perform + + return if @response.code != 200 || @response.mime_type != 'text/html' + + @html = @response.to_s + attempt_oembed || attempt_opengraph end @@ -70,32 +76,32 @@ class FetchLinkCardService < BaseService end def attempt_oembed - response = OEmbed::Providers.get(@url) + embed = OEmbed::Providers.get(@url, html: @html) - return false unless response.respond_to?(:type) + return false unless embed.respond_to?(:type) - @card.type = response.type - @card.title = response.respond_to?(:title) ? response.title : '' - @card.author_name = response.respond_to?(:author_name) ? response.author_name : '' - @card.author_url = response.respond_to?(:author_url) ? response.author_url : '' - @card.provider_name = response.respond_to?(:provider_name) ? response.provider_name : '' - @card.provider_url = response.respond_to?(:provider_url) ? response.provider_url : '' + @card.type = embed.type + @card.title = embed.respond_to?(:title) ? embed.title : '' + @card.author_name = embed.respond_to?(:author_name) ? embed.author_name : '' + @card.author_url = embed.respond_to?(:author_url) ? embed.author_url : '' + @card.provider_name = embed.respond_to?(:provider_name) ? embed.provider_name : '' + @card.provider_url = embed.respond_to?(:provider_url) ? embed.provider_url : '' @card.width = 0 @card.height = 0 case @card.type when 'link' - @card.image = URI.parse(response.thumbnail_url) if response.respond_to?(:thumbnail_url) + @card.image = URI.parse(embed.thumbnail_url) if embed.respond_to?(:thumbnail_url) when 'photo' - return false unless response.respond_to?(:url) - @card.embed_url = response.url - @card.image = URI.parse(response.url) - @card.width = response.width.presence || 0 - @card.height = response.height.presence || 0 + return false unless embed.respond_to?(:url) + @card.embed_url = embed.url + @card.image = URI.parse(embed.url) + @card.width = embed.width.presence || 0 + @card.height = embed.height.presence || 0 when 'video' - @card.width = response.width.presence || 0 - @card.height = response.height.presence || 0 - @card.html = Formatter.instance.sanitize(response.html, Sanitize::Config::MASTODON_OEMBED) + @card.width = embed.width.presence || 0 + @card.height = embed.height.presence || 0 + @card.html = Formatter.instance.sanitize(embed.html, Sanitize::Config::MASTODON_OEMBED) when 'rich' # Most providers rely on