diff options
Diffstat (limited to 'app')
63 files changed, 150 insertions, 83 deletions
diff --git a/app/controllers/api/v1/accounts/follower_accounts_controller.rb b/app/controllers/api/v1/accounts/follower_accounts_controller.rb index b61de13b9..208e06ed6 100644 --- a/app/controllers/api/v1/accounts/follower_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/follower_accounts_controller.rb @@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController end def hide_results? - @account.suspended? || (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) + !user_signed_in? || @account.suspended? || (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts diff --git a/app/controllers/api/v1/accounts/following_accounts_controller.rb b/app/controllers/api/v1/accounts/following_accounts_controller.rb index 37d3c2d78..155ca0907 100644 --- a/app/controllers/api/v1/accounts/following_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/following_accounts_controller.rb @@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController end def hide_results? - @account.suspended? || (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) + !user_signed_in? || @account.suspended? || (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts diff --git a/app/controllers/api/v1/accounts/relationships_controller.rb b/app/controllers/api/v1/accounts/relationships_controller.rb index 1d3992a28..865529e25 100644 --- a/app/controllers/api/v1/accounts/relationships_controller.rb +++ b/app/controllers/api/v1/accounts/relationships_controller.rb @@ -5,10 +5,14 @@ class Api::V1::Accounts::RelationshipsController < Api::BaseController before_action :require_user! def index - accounts = Account.where(id: account_ids).select('id') - # .where doesn't guarantee that our results are in the same order - # we requested them, so return the "right" order to the requestor. - @accounts = accounts.index_by(&:id).values_at(*account_ids).compact + if user_signed_in? + accounts = Account.where(id: account_ids).select('id') + # .where doesn't guarantee that our results are in the same order + # we requested them, so return the "right" order to the requestor. + @accounts = accounts.index_by(&:id).values_at(*account_ids).compact + else + @accounts = Account.none + end render json: @accounts, each_serializer: REST::RelationshipSerializer, relationships: relationships end diff --git a/app/controllers/api/v1/accounts/search_controller.rb b/app/controllers/api/v1/accounts/search_controller.rb index 3061fcb7e..aa8745931 100644 --- a/app/controllers/api/v1/accounts/search_controller.rb +++ b/app/controllers/api/v1/accounts/search_controller.rb @@ -12,6 +12,7 @@ class Api::V1::Accounts::SearchController < Api::BaseController private def account_search + return Account.none unless user_signed_in? AccountSearchService.new.call( params[:q], current_account, diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 38c9f5a20..a68d266a7 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -22,6 +22,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController end def cached_account_statuses + return Status.none unless user_signed_in? cache_collection_paginated_by_id( AccountStatusesFilter.new(@account, current_account, params).results, Status, diff --git a/app/helpers/languages_helper.rb b/app/helpers/languages_helper.rb index fff073ced..5086de5f6 100644 --- a/app/helpers/languages_helper.rb +++ b/app/helpers/languages_helper.rb @@ -200,8 +200,12 @@ module LanguagesHelper zba: ['Balaibalan', 'باليبلن'].freeze, zgh: ['Standard Moroccan Tamazight', 'ⵜⴰⵎⴰⵣⵉⵖⵜ'].freeze, }.freeze + + CUSTOM = { + 'en-cafe': ['English (Plural Cafe)', 'English (Plural Cafe)'].freeze, + }.freeze - SUPPORTED_LOCALES = {}.merge(ISO_639_1).merge(ISO_639_3).freeze + SUPPORTED_LOCALES = {}.merge(ISO_639_1).merge(ISO_639_3).merge(CUSTOM).freeze # For ISO-639-1 and ISO-639-3 language codes, we have their official # names, but for some translations, we need the names of the diff --git a/app/javascript/flavours/glitch/features/getting_started/components/trends.js b/app/javascript/flavours/glitch/features/getting_started/components/trends.js index ce4d94c64..5158f6689 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/trends.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/trends.js @@ -38,7 +38,7 @@ export default class Trends extends ImmutablePureComponent { <div className='getting-started__trends'> <h4><FormattedMessage id='trends.trending_now' defaultMessage='Trending now' /></h4> - {trends.take(3).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)} + {trends.take(1).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)} </div> ); } diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index d7a4cf130..28adf5e06 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -79,8 +79,6 @@ class LinkFooter extends React.PureComponent { {' '} <a href='https://joinmastodon.org' target='_blank'><FormattedMessage id='footer.about' defaultMessage='About' /></a> {' · '} - <a href='https://joinmastodon.org/apps' target='_blank'><FormattedMessage id='footer.get_app' defaultMessage='Get the app' /></a> - {' · '} <Link to='/keyboard-shortcuts'><FormattedMessage id='footer.keyboard_shortcuts' defaultMessage='Keyboard shortcuts' /></Link> {' · '} <a href={source_url} rel='noopener noreferrer' target='_blank'><FormattedMessage id='footer.source_code' defaultMessage='View source code' /></a> diff --git a/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.js b/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.js index 611fae1ce..5ca003ee9 100644 --- a/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.js @@ -142,17 +142,18 @@ const PageSix = ({ admin, domain }) => { <h1><FormattedMessage id='onboarding.page_six.almost_done' defaultMessage='Almost done...' /></h1> {adminSection} <p> - <FormattedMessage - id='onboarding.page_six.github' - defaultMessage='{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}. Glitchsoc is fully compatible with all Mastodon apps and instances. Glitchsoc is free open-source software. You can report bugs, request features, or contribute to the code on {github}.' - values={{ - domain, - fork: <a href='https://en.wikipedia.org/wiki/Fork_(software_development)' target='_blank' rel='noopener'>fork</a>, - Mastodon: <a href='https://github.com/mastodon/mastodon' target='_blank' rel='noopener'>Mastodon</a>, - github: <a href={source_url} target='_blank' rel='noopener'>GitHub</a>, - }} - /> - </p> + <FormattedMessage + id='onboarding.page_six.github' + defaultMessage='{domain} runs on GlitchCafé, which is based on {Glitchsoc}, a friendly {fork} of {Mastodon}. GlitchCafé is fully compatible with all Mastodon apps and instances. GlitchCafé is free open-source software. You can view the source code on {git} and report bugs, request features, or contribute to the code by emailing {admin}.' + values={{ + domain, + fork: <a href='https://en.wikipedia.org/wiki/Fork_(software_development)' target='_blank' rel='noopener'>fork</a>, + Mastodon: <a href='https://github.com/mastodon/mastodon' target='_blank' rel='noopener'>Mastodon</a>, + Glitchsoc: <a href='https://github.com/glitch-soc/mastodon' target='_blank' rel='noopener'>GlitchSoc</a>, + git: <a href='https://git.starfall.systems/pluralcafe/mastodon/' rel='noopener noreferrer' target='_blank'>our Git repository</a>, + admin: <a href='mailto://admin@plural.cafe' rel='noopener noreferrer'>admin@plural.cafe</a> }} + /> + </p> <p><FormattedMessage id='onboarding.page_six.apps_available' defaultMessage='There are {apps} available for iOS, Android and other platforms.' values={{ domain, apps: <a href='https://joinmastodon.org/apps' target='_blank' rel='noopener'><FormattedMessage id='onboarding.page_six.various_app' defaultMessage='mobile apps' /></a> }} /></p> <p><em><FormattedMessage id='onboarding.page_six.appetoot' defaultMessage='Bon Appetoot!' /></em></p> </div> diff --git a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js index 3cd0707f2..ddb991d54 100644 --- a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js +++ b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js @@ -31,8 +31,6 @@ const makeGetStatusIds = (pending = false) => createSelector([ const statusForId = statuses.get(id); let showStatus = true; - if (statusForId.get('account') === me) return true; - if (columnSettings.getIn(['shows', 'reblog']) === false) { showStatus = showStatus && statusForId.get('reblog') === null; } diff --git a/app/javascript/flavours/glitch/locales/en-cafe.js b/app/javascript/flavours/glitch/locales/en-cafe.js new file mode 100755 index 000000000..ea902c8aa --- /dev/null +++ b/app/javascript/flavours/glitch/locales/en-cafe.js @@ -0,0 +1,9 @@ +import base_english from 'flavours/glitch/locales/en'; +import inherited from 'mastodon/locales/en-cafe.json'; + +const messages = { + 'getting_started.open_source_notice': 'GlitchCafé is free open source software, based on {Glitchsoc} which is a friendly fork of {Mastodon}. You can see our source code on {github} and report bugs, request features, or contribute by emailing {admin}.', + 'onboarding.page_six.github': '{domain} runs on GlitchCafé, which is based on {Glitchsoc}, a friendly {fork} of {Mastodon}. Glitchsoc is fully compatible with all Mastodon apps and instances. GlitchCafé is free open-source software. You can view the source code on {github} and report bugs, request features, or contribute to the code by emailing {admin}.', +}; + +export default Object.assign({}, base_english, inherited, messages); diff --git a/app/javascript/flavours/glitch/styles/accounts.scss b/app/javascript/flavours/glitch/styles/accounts.scss index cdc506cf4..04a18de04 100644 --- a/app/javascript/flavours/glitch/styles/accounts.scss +++ b/app/javascript/flavours/glitch/styles/accounts.scss @@ -204,8 +204,6 @@ } .account-role, -.simple_form .recommended, -.simple_form .not_recommended, .simple_form .glitch_only { display: inline-block; padding: 4px 6px; diff --git a/app/javascript/flavours/glitch/styles/components/drawer.scss b/app/javascript/flavours/glitch/styles/components/drawer.scss index 61969abee..dfb9dc595 100644 --- a/app/javascript/flavours/glitch/styles/components/drawer.scss +++ b/app/javascript/flavours/glitch/styles/components/drawer.scss @@ -117,6 +117,10 @@ flex: 1 1 auto; margin-left: 8px; overflow: hidden; + + & > a:hover { + text-decoration: underline; + } } .drawer--results { diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index 054110e41..5e4bddc67 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -134,19 +134,19 @@ } ul, ol { - margin-left: 2em; - p { margin: 0; } } ul { + margin-left: 1em; list-style-type: disc; } ol { list-style-type: decimal; + list-style-position: inside; } } @@ -389,7 +389,7 @@ } .display-name:hover .display-name__html { - text-decoration: none; + text-decoration: underline; } .status__content { @@ -410,7 +410,7 @@ } a:hover { - text-decoration: none; + text-decoration: underline; } } &:focus > .status__content:after { @@ -431,6 +431,10 @@ .notification__message { margin: -10px 0px 10px 0; + + a:hover { + text-decoration: underline; + } } } @@ -571,6 +575,10 @@ overflow: hidden; text-overflow: ellipsis; } + + a:hover { + text-decoration: underline; + } } .status__action-bar { diff --git a/app/javascript/flavours/glitch/styles/forms.scss b/app/javascript/flavours/glitch/styles/forms.scss index 01b7a11e9..fd0ff6d93 100644 --- a/app/javascript/flavours/glitch/styles/forms.scss +++ b/app/javascript/flavours/glitch/styles/forms.scss @@ -102,9 +102,6 @@ code { text-decoration: none; } } - - .recommended, - .not_recommended, .glitch_only { position: absolute; margin: 0 4px; diff --git a/app/javascript/icons/android-chrome-144x144.png b/app/javascript/icons/android-chrome-144x144.png index 698fb4a26..1b040e070 100644 --- a/app/javascript/icons/android-chrome-144x144.png +++ b/app/javascript/icons/android-chrome-144x144.png Binary files differdiff --git a/app/javascript/icons/android-chrome-192x192.png b/app/javascript/icons/android-chrome-192x192.png index 2b6b63264..0fab4ca6b 100644 --- a/app/javascript/icons/android-chrome-192x192.png +++ b/app/javascript/icons/android-chrome-192x192.png Binary files differdiff --git a/app/javascript/icons/android-chrome-256x256.png b/app/javascript/icons/android-chrome-256x256.png index 51e3849a2..4a3c00272 100644 --- a/app/javascript/icons/android-chrome-256x256.png +++ b/app/javascript/icons/android-chrome-256x256.png Binary files differdiff --git a/app/javascript/icons/android-chrome-36x36.png b/app/javascript/icons/android-chrome-36x36.png index 925f69c4f..939df3019 100644 --- a/app/javascript/icons/android-chrome-36x36.png +++ b/app/javascript/icons/android-chrome-36x36.png Binary files differdiff --git a/app/javascript/icons/android-chrome-384x384.png b/app/javascript/icons/android-chrome-384x384.png index 9d256a83c..18c3a8e88 100644 --- a/app/javascript/icons/android-chrome-384x384.png +++ b/app/javascript/icons/android-chrome-384x384.png Binary files differdiff --git a/app/javascript/icons/android-chrome-48x48.png b/app/javascript/icons/android-chrome-48x48.png index bcfe7475d..b690555d3 100644 --- a/app/javascript/icons/android-chrome-48x48.png +++ b/app/javascript/icons/android-chrome-48x48.png Binary files differdiff --git a/app/javascript/icons/android-chrome-512x512.png b/app/javascript/icons/android-chrome-512x512.png index bffacfb69..752540b46 100644 --- a/app/javascript/icons/android-chrome-512x512.png +++ b/app/javascript/icons/android-chrome-512x512.png Binary files differdiff --git a/app/javascript/icons/android-chrome-72x72.png b/app/javascript/icons/android-chrome-72x72.png index 16679d573..e45896701 100644 --- a/app/javascript/icons/android-chrome-72x72.png +++ b/app/javascript/icons/android-chrome-72x72.png Binary files differdiff --git a/app/javascript/icons/android-chrome-96x96.png b/app/javascript/icons/android-chrome-96x96.png index 9ade87cf3..112e43896 100644 --- a/app/javascript/icons/android-chrome-96x96.png +++ b/app/javascript/icons/android-chrome-96x96.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-1024x1024.png b/app/javascript/icons/apple-touch-icon-1024x1024.png index 8ec371eb2..b6a064991 100644 --- a/app/javascript/icons/apple-touch-icon-1024x1024.png +++ b/app/javascript/icons/apple-touch-icon-1024x1024.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-114x114.png b/app/javascript/icons/apple-touch-icon-114x114.png index e1563f51e..252c5b4b4 100644 --- a/app/javascript/icons/apple-touch-icon-114x114.png +++ b/app/javascript/icons/apple-touch-icon-114x114.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-120x120.png b/app/javascript/icons/apple-touch-icon-120x120.png index e9a5f5b0e..90a2e2608 100644 --- a/app/javascript/icons/apple-touch-icon-120x120.png +++ b/app/javascript/icons/apple-touch-icon-120x120.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-144x144.png b/app/javascript/icons/apple-touch-icon-144x144.png index 698fb4a26..1b040e070 100644 --- a/app/javascript/icons/apple-touch-icon-144x144.png +++ b/app/javascript/icons/apple-touch-icon-144x144.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-152x152.png b/app/javascript/icons/apple-touch-icon-152x152.png index 0cc93cc28..b26610ba8 100644 --- a/app/javascript/icons/apple-touch-icon-152x152.png +++ b/app/javascript/icons/apple-touch-icon-152x152.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-167x167.png b/app/javascript/icons/apple-touch-icon-167x167.png index 9bbbf5312..df7c641da 100644 --- a/app/javascript/icons/apple-touch-icon-167x167.png +++ b/app/javascript/icons/apple-touch-icon-167x167.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-180x180.png b/app/javascript/icons/apple-touch-icon-180x180.png index 329b803b9..0d0c53437 100644 --- a/app/javascript/icons/apple-touch-icon-180x180.png +++ b/app/javascript/icons/apple-touch-icon-180x180.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-57x57.png b/app/javascript/icons/apple-touch-icon-57x57.png index e00e142c6..4fff3e56d 100644 --- a/app/javascript/icons/apple-touch-icon-57x57.png +++ b/app/javascript/icons/apple-touch-icon-57x57.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-60x60.png b/app/javascript/icons/apple-touch-icon-60x60.png index 011285b56..29eda300d 100644 --- a/app/javascript/icons/apple-touch-icon-60x60.png +++ b/app/javascript/icons/apple-touch-icon-60x60.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-72x72.png b/app/javascript/icons/apple-touch-icon-72x72.png index 16679d573..e45896701 100644 --- a/app/javascript/icons/apple-touch-icon-72x72.png +++ b/app/javascript/icons/apple-touch-icon-72x72.png Binary files differdiff --git a/app/javascript/icons/apple-touch-icon-76x76.png b/app/javascript/icons/apple-touch-icon-76x76.png index 83c874887..7dae1cbd1 100644 --- a/app/javascript/icons/apple-touch-icon-76x76.png +++ b/app/javascript/icons/apple-touch-icon-76x76.png Binary files differdiff --git a/app/javascript/icons/favicon-16x16.png b/app/javascript/icons/favicon-16x16.png index eed8e0035..b9f0b9b6f 100644 --- a/app/javascript/icons/favicon-16x16.png +++ b/app/javascript/icons/favicon-16x16.png Binary files differdiff --git a/app/javascript/icons/favicon-32x32.png b/app/javascript/icons/favicon-32x32.png index 9165746bc..428dd69cd 100644 --- a/app/javascript/icons/favicon-32x32.png +++ b/app/javascript/icons/favicon-32x32.png Binary files differdiff --git a/app/javascript/icons/favicon-48x48.png b/app/javascript/icons/favicon-48x48.png index 259676c0a..43d3b9392 100644 --- a/app/javascript/icons/favicon-48x48.png +++ b/app/javascript/icons/favicon-48x48.png Binary files differdiff --git a/app/javascript/locales/locale-data/en-cafe.js b/app/javascript/locales/locale-data/en-cafe.js new file mode 100755 index 000000000..363aabc2b --- /dev/null +++ b/app/javascript/locales/locale-data/en-cafe.js @@ -0,0 +1,8 @@ +/*eslint eqeqeq: "off"*/ +/*eslint no-nested-ternary: "off"*/ +/*eslint quotes: "off"*/ + +export default [{ + locale: "en-cafe', + parentLocale: 'en', +}]; diff --git a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js index 8d4057782..d04d58011 100644 --- a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js +++ b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js @@ -34,10 +34,6 @@ class FollowRequestsColumnLink extends React.Component { render () { const { count, intl } = this.props; - if (count === 0) { - return null; - } - return ( <ColumnLink transparent diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json index 223e68912..3cf08a855 100644 --- a/app/javascript/mastodon/locales/de.json +++ b/app/javascript/mastodon/locales/de.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Beschreibe die Audiodatei für Menschen mit Hörschädigungen", "upload_form.description": "Bildbeschreibung für blinde und sehbehinderte Menschen", "upload_form.description_missing": "Keine Beschreibung hinzugefügt", - "upload_form.edit": "Bearbeiten", + "upload_form.edit": "Beschreiben", "upload_form.thumbnail": "Miniaturansicht ändern", "upload_form.undo": "Löschen", "upload_form.video_description": "Beschreibe das Video für Menschen mit einer Hör- oder Sehbehinderung", diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index f7ea661d7..676dac78d 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -1708,7 +1708,7 @@ "id": "upload_form.undo" }, { - "defaultMessage": "Edit", + "defaultMessage": "Describe", "id": "upload_form.edit" }, { diff --git a/app/javascript/mastodon/locales/en-cafe.json b/app/javascript/mastodon/locales/en-cafe.json new file mode 100755 index 000000000..95ea9c8cb --- /dev/null +++ b/app/javascript/mastodon/locales/en-cafe.json @@ -0,0 +1,53 @@ +{ + "account.posts": "Toots", + "account.posts_with_replies": "Toots and replies", + "account.statuses_counter": "{count, plural, one {{counter} Toot} other {{counter} Toots}}", + "column.pins": "Pinned toots", + "compose_form.direct_message_warning": "This toot will only be sent to the mentioned users.", + "compose_form.hashtag_warning": "This toot won't be listed under any hashtag as it is unlisted. Only public toots can be searched by hashtag.", + "compose_form.publish": "Toot", + "confirmations.delete.message": "Are you sure you want to delete this toot?", + "confirmations.redraft.message": "Are you sure you want to delete this toot and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.", + "embed.instructions": "Embed this toot on your website by copying the code below.", + "empty_column.account_timeline": "No toots here!", + "empty_column.bookmarked_statuses": "You don't have any bookmarked toots yet. When you bookmark one, it will show up here.", + "empty_column.favourited_statuses": "You don't have any favourite toots yet. When you favourite one, it will show up here.", + "empty_column.favourites": "No one has favourited this toot yet. When someone does, they will show up here.", + "empty_column.list": "There is nothing in this list yet. When members of this list post new toots, they will appear here.", + "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.", + "introduction.interactions.reblog.text": "You can share other people's toots with your followers by boosting them.", + "introduction.interactions.reply.text": "You can reply to other people's and your own toots, which will chain them together in a conversation.", + "keyboard_shortcuts.column": "to focus a toot in one of the columns", + "keyboard_shortcuts.enter": "to open toot", + "keyboard_shortcuts.pinned": "to open pinned toots list", + "keyboard_shortcuts.toot": "to start a brand new toot", + "navigation_bar.compose": "Compose new toot", + "navigation_bar.pins": "Pinned toots", + "notification.favourite": "{name} favourited your toot", + "notification.reblog": "{name} boosted your toot", + "notifications.column_settings.status": "New toots:", + "privacy.change": "Change toot privacy", + "search_popout.tips.full_text": "Simple text returns toots you have written, favourited, boosted, or have been mentioned in, as well as matching usernames, display names, and hashtags.", + "search_popout.tips.status": "toot", + "search_results.statuses": "Toots", + "search_results.statuses_fts_disabled": "Searching toots by their content is not enabled on this Mastodon server.", + "status.admin_status": "Open this toot in the moderation interface", + "status.copy": "Copy link to toot", + "status.open": "Expand this toot", + "status.pinned": "Pinned toot", + "status.reblogs.empty": "No one has boosted this toot yet. When someone does, they will show up here.", + "status.show_more_all": "Expand all toots", + "timeline_hint.resources.statuses": "Older toots", + + "upload_form.edit": "Describe", + "upload_modal.description_placeholder": "Jackdaws love my big sphinx of quartz", + "upload_modal.edit_media": "Add description", + + "column.community": "Plural Café", + "directory.local": "From Plural Café only", + "empty_column.community": "The Plural Café timeline is empty. Write something publicly to get the ball rolling!", + "getting_started.open_source_notice": "GlitchCafé is open source software. You can contribute or report issues on GitHub at {github}.", + "introduction.federation.local.text": "Public posts from people on Plural Café will appear in the local timeline.", + "navigation_bar.community_timeline": "Plural Café timeline", + "tabs_bar.local_timeline": "Plural Café" +} diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 9dc00fbf1..2409daada 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -628,7 +628,7 @@ "upload_form.audio_description": "Describe for people with hearing loss", "upload_form.description": "Describe for the visually impaired", "upload_form.description_missing": "No description added", - "upload_form.edit": "Edit", + "upload_form.edit": "Describe", "upload_form.thumbnail": "Change thumbnail", "upload_form.undo": "Delete", "upload_form.video_description": "Describe for people with hearing loss or visual impairment", diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json index e9ae96ca5..c4c625d2f 100644 --- a/app/javascript/mastodon/locales/es.json +++ b/app/javascript/mastodon/locales/es.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Describir para personas con problemas auditivos", "upload_form.description": "Describir para los usuarios con dificultad visual", "upload_form.description_missing": "Ninguna descripción añadida", - "upload_form.edit": "Editar", + "upload_form.edit": "Describir", "upload_form.thumbnail": "Cambiar miniatura", "upload_form.undo": "Borrar", "upload_form.video_description": "Describir para personas con problemas auditivos o visuales", diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json index 22c76f4db..3d1454866 100644 --- a/app/javascript/mastodon/locales/fi.json +++ b/app/javascript/mastodon/locales/fi.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Kuvaile kuulovammaisille", "upload_form.description": "Anna kuvaus näkörajoitteisia varten", "upload_form.description_missing": "Kuvausta ei ole lisätty", - "upload_form.edit": "Muokkaa", + "upload_form.edit": "Kuvaile", "upload_form.thumbnail": "Vaihda pikkukuva", "upload_form.undo": "Peru", "upload_form.video_description": "Kuvaile kuulo- tai näkövammaisille", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index eeb5d9ee7..a362ba2e2 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Décrire pour les personnes ayant des difficultés d’audition", "upload_form.description": "Décrire pour les malvoyant·e·s", "upload_form.description_missing": "Description manquante", - "upload_form.edit": "Modifier", + "upload_form.edit": "Décrire", "upload_form.thumbnail": "Changer la vignette", "upload_form.undo": "Supprimer", "upload_form.video_description": "Décrire pour les personnes ayant des problèmes de vue ou d'audition", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index a93b94722..9bc323607 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -627,7 +627,7 @@ "upload_form.audio_description": "聴き取りが難しいユーザーへの説明", "upload_form.description": "閲覧が難しいユーザーへの説明", "upload_form.description_missing": "説明を追加していません", - "upload_form.edit": "編集", + "upload_form.edit": "説明", "upload_form.thumbnail": "サムネイルを変更", "upload_form.undo": "削除", "upload_form.video_description": "視聴が難しいユーザーへの説明", diff --git a/app/javascript/mastodon/locales/locale-data/en-cafe.js b/app/javascript/mastodon/locales/locale-data/en-cafe.js new file mode 100755 index 000000000..363aabc2b --- /dev/null +++ b/app/javascript/mastodon/locales/locale-data/en-cafe.js @@ -0,0 +1,8 @@ +/*eslint eqeqeq: "off"*/ +/*eslint no-nested-ternary: "off"*/ +/*eslint quotes: "off"*/ + +export default [{ + locale: "en-cafe', + parentLocale: 'en', +}]; diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index bdc13673d..131d56298 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Omschrijf dit voor mensen met een auditieve beperking", "upload_form.description": "Omschrijf dit voor mensen met een visuele beperking", "upload_form.description_missing": "Geen omschrijving toegevoegd", - "upload_form.edit": "Bewerken", + "upload_form.edit": "Omschrijf", "upload_form.thumbnail": "Miniatuurafbeelding wijzigen", "upload_form.undo": "Verwijderen", "upload_form.video_description": "Omschrijf dit voor mensen met een auditieve of visuele beperking", diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json index 0e342d5d6..78b09ca53 100644 --- a/app/javascript/mastodon/locales/pl.json +++ b/app/javascript/mastodon/locales/pl.json @@ -628,7 +628,7 @@ "upload_form.audio_description": "Opisz dla osób niesłyszących i niedosłyszących", "upload_form.description": "Wprowadź opis dla niewidomych i niedowidzących", "upload_form.description_missing": "Nie dodano opisu", - "upload_form.edit": "Edytuj", + "upload_form.edit": "Opisz", "upload_form.thumbnail": "Zmień miniaturę", "upload_form.undo": "Usuń", "upload_form.video_description": "Opisz dla osób niesłyszących, niedosłyszących, niewidomych i niedowidzących", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index ab241a422..f9881dbc6 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Descrever para deficientes auditivos", "upload_form.description": "Descrever para deficientes visuais", "upload_form.description_missing": "Sem descrição", - "upload_form.edit": "Editar", + "upload_form.edit": "Descreva", "upload_form.thumbnail": "Alterar miniatura", "upload_form.undo": "Excluir", "upload_form.video_description": "Descrever para deficientes auditivos ou visuais", diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json index db5c67b20..ef511918c 100644 --- a/app/javascript/mastodon/locales/ru.json +++ b/app/javascript/mastodon/locales/ru.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Опишите аудиофайл для людей с нарушением слуха", "upload_form.description": "Добавьте описание для людей с нарушениями зрения:", "upload_form.description_missing": "Описание не добавлено", - "upload_form.edit": "Изменить", + "upload_form.edit": "Опишите", "upload_form.thumbnail": "Изменить обложку", "upload_form.undo": "Отменить", "upload_form.video_description": "Опишите видео для людей с нарушением слуха или зрения", diff --git a/app/javascript/mastodon/locales/sv.json b/app/javascript/mastodon/locales/sv.json index dd4fa8683..7556b4141 100644 --- a/app/javascript/mastodon/locales/sv.json +++ b/app/javascript/mastodon/locales/sv.json @@ -623,7 +623,7 @@ "upload_form.audio_description": "Beskriv för personer med hörselnedsättning", "upload_form.description": "Beskriv för synskadade", "upload_form.description_missing": "Beskrivning saknas", - "upload_form.edit": "Redigera", + "upload_form.edit": "Beskriv", "upload_form.thumbnail": "Ändra miniatyr", "upload_form.undo": "Radera", "upload_form.video_description": "Beskriv för personer med hörsel- eller synnedsättning", diff --git a/app/javascript/mastodon/locales/whitelist_en-cafe.json b/app/javascript/mastodon/locales/whitelist_en-cafe.json new file mode 100755 index 000000000..0d4f101c7 --- /dev/null +++ b/app/javascript/mastodon/locales/whitelist_en-cafe.json @@ -0,0 +1,2 @@ +[ +] diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss index 928af8453..30c8320bf 100644 --- a/app/javascript/styles/mastodon-light/diff.scss +++ b/app/javascript/styles/mastodon-light/diff.scss @@ -644,12 +644,6 @@ html { background: rgba($error-red, 0.5); text-shadow: none; } - - .recommended { - border-color: $ui-highlight-color; - color: $ui-highlight-color; - background-color: rgba($ui-highlight-color, 0.1); - } } .compose-form .compose-form__warning { diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index c007eb4b5..0497d51d5 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -201,9 +201,7 @@ } } -.account-role, -.simple_form .recommended, -.simple_form .not_recommended { +.account-role { display: inline-block; padding: 4px 6px; cursor: default; diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index 1841dc8bf..0d5cdf382 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -102,13 +102,6 @@ code { text-decoration: none; } } - - .recommended, - .not_recommended { - position: absolute; - margin: 0 4px; - margin-top: -2px; - } } } diff --git a/app/models/account.rb b/app/models/account.rb index 7059c555f..6b3bd3af5 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -404,11 +404,6 @@ class Account < ApplicationRecord DISALLOWED_TSQUERY_CHARACTERS = /['?\\:‘’]/.freeze TEXTSEARCH = "(setweight(to_tsvector('simple', accounts.display_name), 'A') || setweight(to_tsvector('simple', accounts.username), 'B') || setweight(to_tsvector('simple', coalesce(accounts.domain, '')), 'C'))" - REPUTATION_SCORE_FUNCTION = '(greatest(0, coalesce(s.followers_count, 0)) / (greatest(0, coalesce(s.following_count, 0)) + 1.0))' - FOLLOWERS_SCORE_FUNCTION = 'log(greatest(0, coalesce(s.followers_count, 0)) + 2)' - TIME_DISTANCE_FUNCTION = '(case when s.last_status_at is null then 0 else exp(-1.0 * ((greatest(0, abs(extract(DAY FROM age(s.last_status_at))) - 30.0)^2) / (2.0 * ((-1.0 * 30^2) / (2.0 * ln(0.3)))))) end)' - BOOST = "((#{REPUTATION_SCORE_FUNCTION} + #{FOLLOWERS_SCORE_FUNCTION} + #{TIME_DISTANCE_FUNCTION}) / 3.0)" - def readonly_attributes super - %w(statuses_count following_count followers_count) end @@ -424,10 +419,9 @@ class Account < ApplicationRecord sql = <<-SQL.squish SELECT accounts.*, - #{BOOST} * ts_rank_cd(#{TEXTSEARCH}, to_tsquery('simple', :tsquery), 32) AS rank + ts_rank_cd(#{TEXTSEARCH}, to_tsquery('simple', :tsquery), 32) AS rank FROM accounts LEFT JOIN users ON accounts.id = users.account_id - LEFT JOIN account_stats AS s ON accounts.id = s.account_id WHERE to_tsquery('simple', :tsquery) @@ #{TEXTSEARCH} AND accounts.suspended_at IS NULL AND accounts.moved_to_account_id IS NULL @@ -489,15 +483,14 @@ class Account < ApplicationRecord ) SELECT accounts.*, - (count(f.id) + 1) * #{BOOST} * ts_rank_cd(#{TEXTSEARCH}, to_tsquery('simple', :tsquery), 32) AS rank + (count(f.id) + 1) * ts_rank_cd(#{TEXTSEARCH}, to_tsquery('simple', :tsquery), 32) AS rank FROM accounts LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = :id) - LEFT JOIN account_stats AS s ON accounts.id = s.account_id WHERE accounts.id IN (SELECT * FROM first_degree) AND to_tsquery('simple', :tsquery) @@ #{TEXTSEARCH} AND accounts.suspended_at IS NULL AND accounts.moved_to_account_id IS NULL - GROUP BY accounts.id, s.id + GROUP BY accounts.id ORDER BY rank DESC LIMIT :limit OFFSET :offset SQL @@ -505,16 +498,15 @@ class Account < ApplicationRecord <<-SQL.squish SELECT accounts.*, - (count(f.id) + 1) * #{BOOST} * ts_rank_cd(#{TEXTSEARCH}, to_tsquery('simple', :tsquery), 32) AS rank + (count(f.id) + 1) * ts_rank_cd(#{TEXTSEARCH}, to_tsquery('simple', :tsquery), 32) AS rank FROM accounts LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = :id) OR (accounts.id = f.target_account_id AND f.account_id = :id) LEFT JOIN users ON accounts.id = users.account_id - LEFT JOIN account_stats AS s ON accounts.id = s.account_id WHERE to_tsquery('simple', :tsquery) @@ #{TEXTSEARCH} AND accounts.suspended_at IS NULL AND accounts.moved_to_account_id IS NULL AND (accounts.domain IS NOT NULL OR (users.approved = TRUE AND users.confirmed_at IS NOT NULL)) - GROUP BY accounts.id, s.id + GROUP BY accounts.id ORDER BY rank DESC LIMIT :limit OFFSET :offset SQL diff --git a/app/models/report_note.rb b/app/models/report_note.rb index 6d7167e0e..6f39df623 100644 --- a/app/models/report_note.rb +++ b/app/models/report_note.rb @@ -17,5 +17,5 @@ class ReportNote < ApplicationRecord scope :latest, -> { reorder(created_at: :desc) } - validates :content, presence: true, length: { maximum: 500 } + validates :content, presence: true, length: { maximum: 2000 } end diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index 1aaf5a5d0..d48073995 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class PollValidator < ActiveModel::Validator - MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 5).to_i + MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 6).to_i MAX_OPTION_CHARS = (ENV['MAX_POLL_OPTION_CHARS'] || 100).to_i MAX_EXPIRATION = 1.month.freeze MIN_EXPIRATION = 5.minutes.freeze @@ -9,7 +9,7 @@ class PollValidator < ActiveModel::Validator def validate(poll) current_time = Time.now.utc - poll.errors.add(:options, I18n.t('polls.errors.too_few_options')) unless poll.options.size > 1 + poll.errors.add(:options, I18n.t('polls.errors.too_few_options')) unless poll.options.size > 0 poll.errors.add(:options, I18n.t('polls.errors.too_many_options', max: MAX_OPTIONS)) if poll.options.size > MAX_OPTIONS poll.errors.add(:options, I18n.t('polls.errors.over_character_limit', max: MAX_OPTION_CHARS)) if poll.options.any? { |option| option.mb_chars.grapheme_length > MAX_OPTION_CHARS } poll.errors.add(:options, I18n.t('polls.errors.duplicate_options')) unless poll.options.uniq.size == poll.options.size diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index a252289b0..0e7266788 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -25,7 +25,7 @@ = f.input :setting_use_pending_items, as: :boolean, wrapper: :with_label .fields-group - = f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label, recommended: true + = f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label = f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label = f.input :setting_disable_swiping, as: :boolean, wrapper: :with_label = f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml index fb3d21060..f12ff3975 100644 --- a/app/views/settings/preferences/other/show.html.haml +++ b/app/views/settings/preferences/other/show.html.haml @@ -11,7 +11,7 @@ = f.input :setting_noindex, as: :boolean, wrapper: :with_label .fields-group - = f.input :setting_aggregate_reblogs, as: :boolean, wrapper: :with_label, recommended: true + = f.input :setting_aggregate_reblogs, as: :boolean, wrapper: :with_label - unless Setting.hide_followers_count .fields-group @@ -30,7 +30,7 @@ = f.input :setting_default_sensitive, as: :boolean, wrapper: :with_label .fields-group - = f.input :setting_show_application, as: :boolean, wrapper: :with_label, recommended: true + = f.input :setting_show_application, as: :boolean, wrapper: :with_label .fields-group = f.input :setting_default_content_type, collection: ['text/plain', 'text/markdown', 'text/html'], wrapper: :with_label, include_blank: false, label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', glitch_only: true |