Skip to content

Commit

Permalink
Merge pull request #599 from kmycode/upstream-20240218
Browse files Browse the repository at this point in the history
Upstream 20240218
kmycode authored Feb 22, 2024
2 parents 68eddba + a23f77a commit f9100f1
Showing 147 changed files with 3,457 additions and 2,570 deletions.
11 changes: 0 additions & 11 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -108,12 +108,6 @@ Rails/FilePath:
Rails/HttpStatus:
EnforcedStyle: numeric

# Reason: Allowed in boot ENV checker
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
Rails/Exit:
Exclude:
- 'config/boot.rb'

# Reason: Conflicts with `Lint/UselessMethodDefinition` for inherited controller actions
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railslexicallyscopedactionfilter
Rails/LexicallyScopedActionFilter:
@@ -228,11 +222,6 @@ Style/RedundantBegin:
Style/RescueStandardError:
EnforcedStyle: implicit

# Reason: Simplify some spec layouts
# https://docs.rubocop.org/rubocop/cops_style.html#stylesemicolon
Style/Semicolon:
AllowAsExpressionSeparator: true

# Reason: Originally disabled for CodeClimate, and no config consensus has been found
# https://docs.rubocop.org/rubocop/cops_style.html#stylesymbolarray
Style/SymbolArray:
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ GEM
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
doorkeeper (5.6.8)
doorkeeper (5.6.9)
railties (>= 5)
dotenv (2.8.1)
dotenv-rails (2.8.1)
@@ -693,7 +693,7 @@ GEM
scenic (1.7.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
selenium-webdriver (4.17.0)
selenium-webdriver (4.18.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
@@ -795,7 +795,7 @@ GEM
webfinger (1.2.0)
activesupport
httpclient (>= 2.4)
webmock (3.20.0)
webmock (3.21.2)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@@ -813,7 +813,7 @@ GEM
xorcist (1.1.3)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.12)
zeitwerk (2.6.13)

PLATFORMS
ruby
2 changes: 1 addition & 1 deletion app/controllers/custom_css_controller.rb
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@ def custom_css_styles
helper_method :custom_css_styles

def set_user_roles
@user_roles = UserRole.where(highlighted: true).where.not(color: [nil, ''])
@user_roles = UserRole.providing_styles
end
end
4 changes: 2 additions & 2 deletions app/javascript/mastodon/features/explore/index.jsx
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ import { NavLink, Switch, Route } from 'react-router-dom';

import { connect } from 'react-redux';

import ExploreIcon from '@/material-icons/400-24px/explore.svg?react';
import SearchIcon from '@/material-icons/400-24px/search.svg?react';
import TagIcon from '@/material-icons/400-24px/tag.svg?react';
import Column from 'mastodon/components/column';
import ColumnHeader from 'mastodon/components/column_header';
import Search from 'mastodon/features/compose/containers/search_container';
@@ -59,7 +59,7 @@ class Explore extends PureComponent {
<Column bindToDocument={!multiColumn} ref={this.setRef} label={intl.formatMessage(messages.title)}>
<ColumnHeader
icon={isSearching ? 'search' : 'hashtag'}
iconComponent={isSearching ? SearchIcon : TagIcon}
iconComponent={isSearching ? SearchIcon : ExploreIcon}
title={intl.formatMessage(isSearching ? messages.searchResults : messages.title)}
onClick={this.handleHeaderClick}
multiColumn={multiColumn}
Original file line number Diff line number Diff line change
@@ -21,34 +21,51 @@ import { DisplayName } from 'mastodon/components/display_name';
import { Icon } from 'mastodon/components/icon';
import { IconButton } from 'mastodon/components/icon_button';
import { VerifiedBadge } from 'mastodon/components/verified_badge';
import { domain } from 'mastodon/initial_state';

const messages = defineMessages({
follow: { id: 'account.follow', defaultMessage: 'Follow' },
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },
next: { id: 'lightbox.next', defaultMessage: 'Next' },
dismiss: { id: 'follow_suggestions.dismiss', defaultMessage: "Don't show again" },
friendsOfFriendsHint: { id: 'follow_suggestions.hints.friends_of_friends', defaultMessage: 'This profile is popular among the people you follow.' },
similarToRecentlyFollowedHint: { id: 'follow_suggestions.hints.similar_to_recently_followed', defaultMessage: 'This profile is similar to the profiles you have most recently followed.' },
featuredHint: { id: 'follow_suggestions.hints.featured', defaultMessage: 'This profile has been hand-picked by the {domain} team.' },
mostFollowedHint: { id: 'follow_suggestions.hints.most_followed', defaultMessage: 'This profile is one of the most followed on {domain}.'},
mostInteractionsHint: { id: 'follow_suggestions.hints.most_interactions', defaultMessage: 'This profile has been recently getting a lot of attention on {domain}.' },
});

const Source = ({ id }) => {
let label;
const intl = useIntl();

let label, hint;

switch (id) {
case 'friends_of_friends':
hint = intl.formatMessage(messages.friendsOfFriendsHint);
label = <FormattedMessage id='follow_suggestions.personalized_suggestion' defaultMessage='Personalized suggestion' />;
break;
case 'similar_to_recently_followed':
hint = intl.formatMessage(messages.similarToRecentlyFollowedHint);
label = <FormattedMessage id='follow_suggestions.personalized_suggestion' defaultMessage='Personalized suggestion' />;
break;
case 'featured':
label = <FormattedMessage id='follow_suggestions.curated_suggestion' defaultMessage="Editors' Choice" />;
hint = intl.formatMessage(messages.featuredHint, { domain });
label = <FormattedMessage id='follow_suggestions.curated_suggestion' defaultMessage='Staff pick' />;
break;
case 'most_followed':
hint = intl.formatMessage(messages.mostFollowedHint, { domain });
label = <FormattedMessage id='follow_suggestions.popular_suggestion' defaultMessage='Popular suggestion' />;
break;
case 'most_interactions':
hint = intl.formatMessage(messages.mostInteractionsHint, { domain });
label = <FormattedMessage id='follow_suggestions.popular_suggestion' defaultMessage='Popular suggestion' />;
break;
}

return (
<div className='inline-follow-suggestions__body__scrollable__card__text-stack__source'>
<div className='inline-follow-suggestions__body__scrollable__card__text-stack__source' title={hint}>
<Icon icon={InfoIcon} />
{label}
</div>
@@ -92,7 +109,7 @@ const Card = ({ id, sources }) => {
{firstVerifiedField ? <VerifiedBadge link={firstVerifiedField.get('value')} /> : <Source id={sources.get(0)} />}
</div>

<Button text={intl.formatMessage(following ? messages.unfollow : messages.follow)} onClick={handleFollow} />
<Button text={intl.formatMessage(following ? messages.unfollow : messages.follow)} secondary={following} onClick={handleFollow} />
</div>
);
};
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ import { Link } from 'react-router-dom';
import CirclesIcon from '@/material-icons/400-24px/account_circle-fill.svg?react';
import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react';
import BookmarksIcon from '@/material-icons/400-24px/bookmarks-fill.svg?react';
import ExploreIcon from '@/material-icons/400-24px/explore.svg?react';
import PeopleIcon from '@/material-icons/400-24px/group.svg?react';
import HomeIcon from '@/material-icons/400-24px/home-fill.svg?react';
import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react';
@@ -16,7 +17,6 @@ import PublicIcon from '@/material-icons/400-24px/public.svg?react';
import SearchIcon from '@/material-icons/400-24px/search.svg?react';
import SettingsIcon from '@/material-icons/400-24px/settings-fill.svg?react';
import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
import TagIcon from '@/material-icons/400-24px/tag.svg?react';
import AntennaIcon from '@/material-icons/400-24px/wifi.svg?react';
import { WordmarkLogo } from 'mastodon/components/logo';
import { NavigationPortal } from 'mastodon/components/navigation_portal';
@@ -74,7 +74,7 @@ class NavigationPanel extends Component {
const { signedIn, disabledAccountId } = this.context.identity;

const explorer = (trendsEnabled ? (
<ColumnLink transparent to='/explore' icon='hashtag' iconComponent={TagIcon} text={intl.formatMessage(messages.explore)} />
<ColumnLink transparent to='/explore' icon='hashtag' iconComponent={ExploreIcon} text={intl.formatMessage(messages.explore)} />
) : (
<ColumnLink transparent to='/search' icon='search' iconComponent={SearchIcon} text={intl.formatMessage(messages.search)} />
));
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/ar.json
Original file line number Diff line number Diff line change
@@ -277,7 +277,6 @@
"follow_request.authorize": "ترخيص",
"follow_request.reject": "رفض",
"follow_requests.unlocked_explanation": "حتى وإن كان حسابك غير مقفل، يعتقد فريق {domain} أنك قد ترغب في مراجعة طلبات المتابعة من هذه الحسابات يدوياً.",
"follow_suggestions.curated_suggestion": "خيار المحرر",
"follow_suggestions.dismiss": "لا تُظهرها مجدّدًا",
"follow_suggestions.personalized_suggestion": "توصية مخصصة",
"follow_suggestions.popular_suggestion": "توصية رائجة",
1 change: 0 additions & 1 deletion app/javascript/mastodon/locales/ast.json
Original file line number Diff line number Diff line change
@@ -199,7 +199,6 @@
"follow_request.authorize": "Autorizar",
"follow_request.reject": "Refugar",
"follow_requests.unlocked_explanation": "Magar que la to cuenta nun seya privada, el personal del dominiu «{domain}» pensó qu'a lo meyor quies revisar manualmente les solicitúes de siguimientu d'estes cuentes.",
"follow_suggestions.curated_suggestion": "Escoyeta del sirvidor",
"follow_suggestions.dismiss": "Nun volver amosar",
"follow_suggestions.personalized_suggestion": "Suxerencia personalizada",
"follow_suggestions.popular_suggestion": "Suxerencia popular",
7 changes: 6 additions & 1 deletion app/javascript/mastodon/locales/be.json
Original file line number Diff line number Diff line change
@@ -277,8 +277,13 @@
"follow_request.authorize": "Аўтарызацыя",
"follow_request.reject": "Адхіліць",
"follow_requests.unlocked_explanation": "Ваш акаўнт не схаваны, аднак прадстаўнікі {domain} палічылі, што вы можаце захацець праглядзець запыты на падпіску з гэтых профіляў уручную.",
"follow_suggestions.curated_suggestion": "Выбар сервера",
"follow_suggestions.curated_suggestion": "Выбар адміністрацыі",
"follow_suggestions.dismiss": "Не паказваць зноў",
"follow_suggestions.hints.featured": "Гэты профіль быў выбраны ўручную камандай {domain}.",
"follow_suggestions.hints.friends_of_friends": "Гэты профіль папулярны сярод людзей, на якіх вы падпісаліся.",
"follow_suggestions.hints.most_followed": "Гэты профіль - адзін з профіляў з самай вялікай колькасцю падпісак на {domain}.",
"follow_suggestions.hints.most_interactions": "У апошні час гэты профіль прыцягвае шмат увагі на {domain}.",
"follow_suggestions.hints.similar_to_recently_followed": "Гэты профіль падобны на профілі, на якія вы нядаўна падпісаліся.",
"follow_suggestions.personalized_suggestion": "Персаналізаваная прапанова",
"follow_suggestions.popular_suggestion": "Папулярная прапанова",
"follow_suggestions.view_all": "Праглядзець усё",
9 changes: 7 additions & 2 deletions app/javascript/mastodon/locales/bg.json
Original file line number Diff line number Diff line change
@@ -277,8 +277,13 @@
"follow_request.authorize": "Упълномощаване",
"follow_request.reject": "Отхвърляне",
"follow_requests.unlocked_explanation": "Въпреки че акаунтът ви не е заключен, служителите на {domain} помислиха, че може да искате да преглеждате ръчно заявките за последване на тези профили.",
"follow_suggestions.curated_suggestion": "Избор от редакторите",
"follow_suggestions.curated_suggestion": "Избор на персонал",
"follow_suggestions.dismiss": "Без ново показване",
"follow_suggestions.hints.featured": "Този профил е ръчно подбран от отбора на {domain}.",
"follow_suggestions.hints.friends_of_friends": "Този профил е популярен измежду хората, които следвате.",
"follow_suggestions.hints.most_followed": "Този профил е един от най-следваните при {domain}.",
"follow_suggestions.hints.most_interactions": "Този профил наскоро получи много внимание при {domain}.",
"follow_suggestions.hints.similar_to_recently_followed": "Този профил е подобен на профилите, които сте последвали наскоро.",
"follow_suggestions.personalized_suggestion": "Персонализирано предложение",
"follow_suggestions.popular_suggestion": "Популярно предложение",
"follow_suggestions.view_all": "Преглед на всички",
@@ -471,7 +476,7 @@
"notifications.permission_required": "Известията на работния плот ги няма, щото няма дадено нужното позволение.",
"notifications_permission_banner.enable": "Включване на известията на работния плот",
"notifications_permission_banner.how_to_control": "За да получавате известия, когато Mastodon не е отворен, включете известията на работния плот. Може да управлявате точно кои видове взаимодействия пораждат известия на работния плот чрез бутона {icon} по-горе, след като бъдат включени.",
"notifications_permission_banner.title": "Никога не пропускате нещо",
"notifications_permission_banner.title": "Никога не пропускайте нищо",
"onboarding.action.back": "Върнете ме обратно",
"onboarding.actions.back": "Върнете ме обратно",
"onboarding.actions.go_to_explore": "Виж тенденции",
26 changes: 14 additions & 12 deletions app/javascript/mastodon/locales/br.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
"account.enable_notifications": "Ma c'hemenn pa vez embannet traoù gant @{name}",
"account.endorse": "Lakaat war-wel war ar profil",
"account.featured_tags.last_status_at": "Toud diwezhañ : {date}",
"account.featured_tags.last_status_never": "Toud ebet",
"account.featured_tags.last_status_never": "Embannadur ebet",
"account.featured_tags.title": "Hashtagoù pennañ {name}",
"account.follow": "Heuliañ",
"account.follow_back": "Heuliañ d'ho tro",
@@ -62,7 +62,7 @@
"account.requested_follow": "Gant {name} eo bet goulennet ho heuliañ",
"account.share": "Skignañ profil @{name}",
"account.show_reblogs": "Diskouez skignadennoù @{name}",
"account.statuses_counter": "{count, plural, one {{counter} Toud} two {{counter} Doud} other {{counter} a Doudoù}}",
"account.statuses_counter": "{count, plural, one {{counter} C'hannad} two {{counter} Gannad} other {{counter} a Gannadoù}}",
"account.unblock": "Diverzañ @{name}",
"account.unblock_domain": "Diverzañ an domani {domain}",
"account.unblock_short": "Distankañ",
@@ -118,9 +118,9 @@
"column.lists": "Listennoù",
"column.mutes": "Implijer·ion·ezed kuzhet",
"column.notifications": "Kemennoù",
"column.pins": "Toudoù spilhennet",
"column.pins": "Embannadurioù spilhennet",
"column.public": "Red-amzer kevredet",
"column_back_button.label": "Distro",
"column_back_button.label": "Distreiñ",
"column_header.hide_settings": "Kuzhat an arventennoù",
"column_header.moveLeft_settings": "Dilec'hiañ ar bannad a-gleiz",
"column_header.moveRight_settings": "Dilec'hiañ ar bannad a-zehou",
@@ -199,9 +199,9 @@
"embed.preview": "Setu penaos e teuio war wel :",
"emoji_button.activity": "Obererezh",
"emoji_button.clear": "Diverkañ",
"emoji_button.custom": "Kempennet",
"emoji_button.custom": "Personelaet",
"emoji_button.flags": "Bannieloù",
"emoji_button.food": "Boued hag Evaj",
"emoji_button.food": "Boued & Evajoù",
"emoji_button.label": "Enlakaat un emoji",
"emoji_button.nature": "Natur",
"emoji_button.not_found": "Emoji ebet !! (╯°□°)╯︵ ┻━┻",
@@ -211,12 +211,12 @@
"emoji_button.search": "O klask...",
"emoji_button.search_results": "Disoc'hoù an enklask",
"emoji_button.symbols": "Arouezioù",
"emoji_button.travel": "Lec'hioù ha Beajoù",
"emoji_button.travel": "Beajiñ & Lec'hioù",
"empty_column.account_suspended": "Kont ehanet",
"empty_column.account_timeline": "Toud ebet amañ !",
"empty_column.account_unavailable": "Profil dihegerz",
"empty_column.blocks": "N'eus ket bet berzet implijer·ez ganeoc'h c'hoazh.",
"empty_column.bookmarked_statuses": "N'ho peus toud ebet enrollet en ho sinedoù c'hoazh. Pa vo ouzhpennet unan e teuio war wel amañ.",
"empty_column.bookmarked_statuses": "N'ho peus embannadur ebet enrollet en ho sinedoù c'hoazh. Pa vo ouzhpennet unan e teuio war wel amañ.",
"empty_column.community": "Goulo eo ar red-amzer lec'hel. Skrivit'ta un dra evit lakaat tan dezhi !",
"empty_column.domain_blocks": "N'eus domani kuzh ebet c'hoazh.",
"empty_column.explore_statuses": "N'eus tuadur ebet evit c'hoazh. Distroit diwezhatoc'h !",
@@ -260,14 +260,15 @@
"follow_request.authorize": "Aotren",
"follow_request.reject": "Nac'hañ",
"follow_requests.unlocked_explanation": "Daoust ma n'eo ket ho kont prennet, skipailh {domain} a soñj e fellfe deoc'h gwiriekaat pedadennoù heuliañ deus ar c'hontoù-se diwar-zorn.",
"follow_suggestions.view_all": "Gwelet pep tra",
"followed_tags": "Hashtagoù o heuliañ",
"footer.about": "Diwar-benn",
"footer.directory": "Kavlec'h ar profiloù",
"footer.get_app": "Pellgargañ an arload",
"footer.invite": "Pediñ tud",
"footer.keyboard_shortcuts": "Berradennoù klavier",
"footer.privacy_policy": "Reolennoù prevezded",
"footer.source_code": "Gwelet kod mammenn",
"footer.source_code": "Gwelet ar c'hod mammenn",
"footer.status": "Statud",
"generic.saved": "Enrollet",
"getting_started.heading": "Loc'hañ",
@@ -295,7 +296,7 @@
"interaction_modal.description.follow": "Gant ur gont Mastodon e c'hellit heuliañ {name} evit resev an toudoù a embann war ho red degemer.",
"interaction_modal.description.reblog": "Gant ur gont Mastodon e c'hellit skignañ an toud-mañ evit rannañ anezhañ gant ho heulierien·ezed.",
"interaction_modal.description.reply": "Gant ur gont Mastodon e c'hellit respont d'an toud-mañ.",
"interaction_modal.no_account_yet": "N'eo ket war vMastodon?",
"interaction_modal.no_account_yet": "N'emañ ket war vMastodon?",
"interaction_modal.on_another_server": "War ur servijer all",
"interaction_modal.on_this_server": "War ar servijer-mañ",
"interaction_modal.title.favourite": "Ouzhpennañ embannadur {name} d'ar re vuiañ-karet",
@@ -463,7 +464,7 @@
"onboarding.steps.setup_profile.body": "Others are more likely to interact with you with a filled out profile.",
"onboarding.steps.setup_profile.title": "Customize your profile",
"onboarding.steps.share_profile.body": "Let your friends know how to find you on Mastodon!",
"onboarding.steps.share_profile.title": "Share your profile",
"onboarding.steps.share_profile.title": "Rannit ho kont Mastodon",
"password_confirmation.mismatching": "Disheñvel eo an daou c'her-termen-se",
"picture_in_picture.restore": "Adlakaat",
"poll.closed": "Serret",
@@ -476,7 +477,8 @@
"poll.votes": "{votes, plural,one {#votadenn} other {# votadenn}}",
"poll_button.add_poll": "Ouzhpennañ ur sontadeg",
"poll_button.remove_poll": "Dilemel ar sontadeg",
"privacy.change": "Cheñch prevezded an toud",
"privacy.change": "Cheñch prevezded an embannadur",
"privacy.direct.short": "Tud resis",
"privacy.private.short": "Heulierien",
"privacy.public.short": "Publik",
"privacy_policy.last_updated": "Hizivadenn ziwezhañ {date}",
Loading

0 comments on commit f9100f1

Please sign in to comment.