Skip to content

Commit

Permalink
Merge commit '12c22ee5e71ae0220ea10199e4d10deb4140ec44' into glitch-s…
Browse files Browse the repository at this point in the history
…oc/merge-upstream
  • Loading branch information
ClearlyClaire committed Dec 19, 2023
2 parents 7db68e2 + 12c22ee commit d288a61
Show file tree
Hide file tree
Showing 90 changed files with 1,260 additions and 631 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
path: tmp/screenshots/

test-search:
name: Testing search
name: Elastic Search integration testing
runs-on: ubuntu-latest

needs:
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
- name: Load database schema
run: './bin/rails db:create db:schema:load db:seed'

- run: bundle exec rake spec:search
- run: bin/rspec --tag search

- name: Archive logs
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN apt-get update && \
corepack enable

COPY Gemfile* package.json yarn.lock .yarnrc.yml /opt/mastodon/
COPY streaming/package.json /opt/mastodon/streaming/
COPY .yarn /opt/mastodon/.yarn

RUN bundle install -j"$(nproc)"
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ group :test do
# RSpec progress bar formatter
gem 'fuubar', '~> 2.5'

# RSpec helpers for email specs
gem 'email_spec'

# Extra RSpec extenion methods and helpers for sidekiq
gem 'rspec-sidekiq', '~> 4.0'

Expand Down
10 changes: 8 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ GEM
elasticsearch-transport (7.13.3)
faraday (~> 1)
multi_json
email_spec (2.2.2)
htmlentities (~> 4.3.3)
launchy (~> 2.1)
mail (~> 2.7)
encryptor (3.0.0)
erubi (1.12.0)
et-orbi (1.2.7)
Expand Down Expand Up @@ -529,7 +533,7 @@ GEM
private_address_check (0.5.0)
psych (5.1.1.1)
stringio
public_suffix (5.0.3)
public_suffix (5.0.4)
puma (6.4.0)
nio4r (~> 2.0)
pundit (2.3.1)
Expand Down Expand Up @@ -669,10 +673,11 @@ GEM
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.22.1)
rubocop-rails (2.22.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
Expand Down Expand Up @@ -853,6 +858,7 @@ DEPENDENCIES
doorkeeper (~> 5.6)
dotenv-rails (~> 2.8)
ed25519 (~> 1.3)
email_spec
fabrication (~> 2.30)
faker (~> 3.2)
fast_blank (~> 1.0)
Expand Down
32 changes: 15 additions & 17 deletions app/javascript/mastodon/features/onboarding/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import { useHistory } from 'react-router-dom';

import { useDispatch } from 'react-redux';

import { useDispatch } from 'react-redux';

import { ReactComponent as AddPhotoAlternateIcon } from '@material-symbols/svg-600/outlined/add_photo_alternate.svg';
import { ReactComponent as EditIcon } from '@material-symbols/svg-600/outlined/edit.svg';
Expand All @@ -33,7 +33,6 @@ export const Profile = () => {
const [avatar, setAvatar] = useState(null);
const [header, setHeader] = useState(null);
const [discoverable, setDiscoverable] = useState(account.get('discoverable'));
const [indexable, setIndexable] = useState(account.get('indexable'));
const [isSaving, setIsSaving] = useState(false);
const [errors, setErrors] = useState();
const avatarFileRef = createRef();
Expand All @@ -54,10 +53,6 @@ export const Profile = () => {
setDiscoverable(e.target.checked);
}, [setDiscoverable]);

const handleIndexableChange = useCallback(e => {
setIndexable(e.target.checked);
}, [setIndexable]);

const handleAvatarChange = useCallback(e => {
setAvatar(e.target?.files?.[0]);
}, [setAvatar]);
Expand All @@ -78,12 +73,12 @@ export const Profile = () => {
avatar,
header,
discoverable,
indexable,
indexable: discoverable,
})).then(() => history.push('/start/follows')).catch(err => {
setIsSaving(false);
setErrors(err.response.data.details);
});
}, [dispatch, displayName, note, avatar, header, discoverable, indexable, history]);
}, [dispatch, displayName, note, avatar, header, discoverable, history]);

return (
<>
Expand Down Expand Up @@ -141,17 +136,20 @@ export const Profile = () => {
<textarea id='note' value={note} onChange={handleNoteChange} maxLength={500} />
</div>
</div>
</div>

<label className='report-dialog-modal__toggle'>
<Toggle checked={discoverable} onChange={handleDiscoverableChange} />
<FormattedMessage id='onboarding.profile.discoverable' defaultMessage='Feature profile and posts in discovery algorithms' />
</label>
<label className='app-form__toggle'>
<div className='app-form__toggle__label'>
<strong><FormattedMessage id='onboarding.profile.discoverable' defaultMessage='Make my profile discoverable' /></strong> <span className='recommended'><FormattedMessage id='recommended' defaultMessage='Recommended' /></span>
<span className='hint'><FormattedMessage id='onboarding.profile.discoverable_hint' defaultMessage='When you opt in to discoverability on Mastodon, your posts may appear in search results and trending, and your profile may be suggested to people with similar interests to you.' /></span>
</div>

<label className='report-dialog-modal__toggle'>
<Toggle checked={indexable} onChange={handleIndexableChange} />
<FormattedMessage id='onboarding.profile.indexable' defaultMessage='Include public posts in search results' />
</label>
<div className='app-form__toggle__toggle'>
<div>
<Toggle checked={discoverable} onChange={handleDiscoverableChange} />
</div>
</div>
</label>
</div>

<div className='onboarding__footer'>
<Button block onClick={handleSubmit} disabled={isSaving}>{isSaving ? <LoadingIndicator /> : <FormattedMessage id='onboarding.profile.save_and_continue' defaultMessage='Save and continue' />}</Button>
Expand Down
11 changes: 11 additions & 0 deletions app/javascript/mastodon/locales/ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,38 @@
"about.rules": "Normes del sirvidor",
"account.account_note_header": "Nota",
"account.add_or_remove_from_list": "Amestar o quitar de les llistes",
"account.badges.bot": "Automatizáu",
"account.badges.group": "Grupu",
"account.block": "Bloquiar a @{name}",
"account.block_domain": "Bloquiar el dominiu {domain}",
"account.block_short": "Bloquiar",
"account.blocked": "Perfil bloquiáu",
"account.browse_more_on_origin_server": "Restolar más nel perfil orixinal",
"account.cancel_follow_request": "Atayar siguimientu",
"account.copy": "Copiar I'enllaz al perfil",
"account.direct": "Mentar a @{name} per privao",
"account.disable_notifications": "Dexar d'avisame cuando @{name} espublice artículos",
"account.domain_blocked": "Dominiu bloquiáu",
"account.edit_profile": "Editar el perfil",
"account.enable_notifications": "Avisame cuando @{name} espublice artículos",
"account.endorse": "Destacar nel perfil",
"account.featured_tags.last_status_at": "Últimu estáu en {date}",
"account.featured_tags.last_status_never": "Sin estaos",
"account.featured_tags.title": "Etiquetes destacaes de: {name}",
"account.follow": "Siguir",
"account.followers": "Siguidores",
"account.followers.empty": "Naide sigue a esti perfil.",
"account.followers_counter": "{count, plural, one {{counter} Siguíu} other {{counter} Siguíos}}",
"account.following": "Siguiendo",
"account.following_counter": "{count, plural,one {Sigue a {counter}} other {Sigue a {counter}}}",
"account.follows.empty": "Esti perfil nun sigue a naide.",
"account.follows_you": "Síguete",
"account.go_to_profile": "Dir al perfil",
"account.hide_reblogs": "Anubrir los artículos compartíos de @{name}",
"account.in_memoriam": "N'alcordanza.",
"account.joined_short": "Data de xunión",
"account.languages": "Camudar llingües suscrites",
"account.link_verified_on": "La propiedá d'esti enllaz foi comprobada'l {date}",
"account.media": "Multimedia",
"account.mention": "Mentar a @{name}",
"account.moved_to": "{name} indicó qu'agora la so cuenta nueva ye:",
Expand Down
7 changes: 5 additions & 2 deletions app/javascript/mastodon/locales/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Заблакіраваны",
"account.browse_more_on_origin_server": "Глядзіце больш у арыгінальным профілі",
"account.cancel_follow_request": "Скасаваць запыт на падпіску",
"account.copy": "Скапіраваць спасылку на профіль",
"account.direct": "Згадаць асабіста @{name}",
"account.disable_notifications": "Не паведамляць мне пра публікацыі @{name}",
"account.domain_blocked": "Дамен заблакаваны",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Адзначыць прачытаным",
"conversation.open": "Прагледзець размову",
"conversation.with": "З {names}",
"copy_icon_button.copied": "Скапіявана ў буфер абмену",
"copypaste.copied": "Скапіравана",
"copypaste.copy_to_clipboard": "Капіраваць у буфер абмену",
"directory.federated": "З вядомага федэсвету",
Expand Down Expand Up @@ -479,10 +481,10 @@
"onboarding.follows.empty": "На жаль, зараз немагчыма паказаць вынікі. Вы можаце паспрабаваць выкарыстоўваць пошук і праглядзець старонку агляду, каб знайсці людзей, на якіх можна падпісацца, або паўтарыце спробу пазней.",
"onboarding.follows.lead": "Вы самі ствараеце свой хатні канал. Чым больш людзей вы падпішаце, тым больш актыўна і цікавей гэта будзе. Гэтыя профілі могуць стаць добрай адпраўной кропкай — вы заўсёды можаце адмяніць падпіску на іх пазней!",
"onboarding.follows.title": "Папулярна на Mastodon",
"onboarding.profile.discoverable": "Уключыць профіль і допісы ў алгарытмы рэкамендацый",
"onboarding.profile.discoverable": "Зрабіць мой профіль бачным",
"onboarding.profile.discoverable_hint": "Калі вы звяртаецеся да адкрытасці на Mastodon, вашы паведамленні могуць з'яўляцца ў выніках пошуку і тэндэнцый, а ваш профіль можа быць прапанаваны людзям з такімі ж інтарэсамі.",
"onboarding.profile.display_name": "Бачнае імя",
"onboarding.profile.display_name_hint": "Ваша поўнае імя або ваш псеўданім…",
"onboarding.profile.indexable": "Індэксаваць публічныя допісы ў пошукавых сістэмах",
"onboarding.profile.lead": "Вы заўсёды можаце выканаць гэта пазней у Наладах, дзе даступна яшчэ больш параметраў.",
"onboarding.profile.note": "Біяграфія",
"onboarding.profile.note_hint": "Вы можаце @згадаць іншых людзей або выкарыстоўваць #хэштэгі…",
Expand Down Expand Up @@ -533,6 +535,7 @@
"privacy.unlisted.short": "Не ў стужках",
"privacy_policy.last_updated": "Адноўлена {date}",
"privacy_policy.title": "Палітыка канфідэнцыйнасці",
"recommended": "Рэкамендуем",
"refresh": "Абнавiць",
"regeneration_indicator.label": "Загрузка…",
"regeneration_indicator.sublabel": "Пачакайце, рыхтуем вашу стужку!",
Expand Down
2 changes: 0 additions & 2 deletions app/javascript/mastodon/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,8 @@
"onboarding.follows.empty": "За съжаление, в момента не могат да се показват резултати. Може да опитате да употребявате търсене или да прегледате страницата за изследване, за да намерите страница за последване, или да опитате пак по-късно.",
"onboarding.follows.lead": "Може да бъдете куратор на началния си инфоканал. Последвайки повече хора, по-деен и по-интересен ще става. Тези профили може да са добра начална точка, от която винаги по-късно да спрете да следвате!",
"onboarding.follows.title": "Популярно в Mastodon",
"onboarding.profile.discoverable": "Включване на профила и публикации в алгоритмите за откриване",
"onboarding.profile.display_name": "Името на показ",
"onboarding.profile.display_name_hint": "Вашето пълно име или псевдоним…",
"onboarding.profile.indexable": "Включване на обществени публикации в резултатите от търсене",
"onboarding.profile.lead": "Винаги може да завършите това по-късно в настройките, където дори има повече възможности за настройване.",
"onboarding.profile.note": "Биогр.",
"onboarding.profile.note_hint": "Може да @споменавате други хора или #хаштагове…",
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Blokovaný",
"account.browse_more_on_origin_server": "Více na původním profilu",
"account.cancel_follow_request": "Zrušit žádost o sledování",
"account.copy": "Kopírovat odkaz na profil",
"account.direct": "Soukromě zmínit @{name}",
"account.disable_notifications": "Přestat mě upozorňovat, když @{name} zveřejní příspěvek",
"account.domain_blocked": "Doména blokována",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Označit jako přečtené",
"conversation.open": "Zobrazit konverzaci",
"conversation.with": "S {names}",
"copy_icon_button.copied": "Zkopírováno do schránky",
"copypaste.copied": "Zkopírováno",
"copypaste.copy_to_clipboard": "Zkopírovat do schránky",
"directory.federated": "Ze známého fedivesmíru",
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/mastodon/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
"conversation.mark_as_read": "Nodi fel wedi'i ddarllen",
"conversation.open": "Gweld sgwrs",
"conversation.with": "Gyda {names}",
"copy_icon_button.copied": "Copïwyd i'r clipfwrdd",
"copypaste.copied": "Wedi ei gopïo",
"copypaste.copy_to_clipboard": "Copïo i'r clipfwrdd",
"directory.federated": "O'r ffedysawd cyfan",
Expand Down Expand Up @@ -390,6 +391,7 @@
"lists.search": "Chwilio ymysg pobl rydych yn eu dilyn",
"lists.subheading": "Eich rhestrau",
"load_pending": "{count, plural, one {# eitem newydd} other {# eitem newydd}}",
"loading_indicator.label": "Yn llwytho…",
"media_gallery.toggle_visible": "{number, plural, one {Cuddio delwedd} other {Cuddio delwedd}}",
"moved_to_account_banner.text": "Ar hyn y bryd, mae eich cyfrif {disabledAccount} wedi ei analluogi am i chi symud i {movedToAccount}.",
"mute_modal.duration": "Hyd",
Expand Down Expand Up @@ -478,6 +480,12 @@
"onboarding.follows.empty": "Yn anffodus, nid oes modd dangos unrhyw ganlyniadau ar hyn o bryd. Gallwch geisio defnyddio chwilio neu bori'r dudalen archwilio i ddod o hyd i bobl i'w dilyn, neu ceisio eto yn nes ymlaen.",
"onboarding.follows.lead": "Rydych chi'n curadu eich ffrwd gartref eich hun. Po fwyaf o bobl y byddwch chi'n eu dilyn, y mwyaf egnïol a diddorol fydd hi. Gall y proffiliau hyn fod yn fan cychwyn da - gallwch chi bob amser eu dad-ddilyn yn nes ymlaen:",
"onboarding.follows.title": "Yn boblogaidd ar Mastodon",
"onboarding.profile.display_name_hint": "Eich enw llawn neu'ch enw hwyl…",
"onboarding.profile.note": "Bywgraffiad",
"onboarding.profile.note_hint": "Gallwch @grybwyll pobl eraill neu #hashnodau…",
"onboarding.profile.save_and_continue": "Cadw a pharhau",
"onboarding.profile.title": "Gosodiad proffil",
"onboarding.profile.upload_avatar": "Llwytho llun proffil",
"onboarding.share.lead": "Cofiwch ddweud wrth bobl sut y gallan nhw ddod o hyd i chi ar Mastodon!",
"onboarding.share.message": "Fi yw {username} ar #Mastodon! Dewch i'm dilyn i yn {url}",
"onboarding.share.next_steps": "Camau nesaf posib:",
Expand Down
7 changes: 5 additions & 2 deletions app/javascript/mastodon/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Blokeret",
"account.browse_more_on_origin_server": "Se mere på den oprindelige profil",
"account.cancel_follow_request": "Annullér anmodning om at følge",
"account.copy": "Kopiér link til profil",
"account.direct": "Privat omtale @{name}",
"account.disable_notifications": "Advisér mig ikke længere, når @{name} poster",
"account.domain_blocked": "Domæne blokeret",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Markér som læst",
"conversation.open": "Vis samtale",
"conversation.with": "Med {names}",
"copy_icon_button.copied": "Kopieret til udklipsholderen",
"copypaste.copied": "Kopieret",
"copypaste.copy_to_clipboard": "Kopiér til udklipsholder",
"directory.federated": "Fra kendt fedivers",
Expand Down Expand Up @@ -479,10 +481,10 @@
"onboarding.follows.empty": "Ingen resultater tilgængelige pt. Prøv at bruge søgning eller gennemse siden for at finde personer at følge, eller forsøg igen senere.",
"onboarding.follows.lead": "Man kurerer sin eget hjemme-feed. Jo flere personer man følger, des mere aktiv og interessant vil det være. Disse profiler kan være et godt udgangspunkt – de kan altid fjernes senere!",
"onboarding.follows.title": "Populært på Mastodon",
"onboarding.profile.discoverable": "Fremhæv profil og indlæg i detekteringsalgoritmer",
"onboarding.profile.discoverable": "Gør min profil synlig",
"onboarding.profile.discoverable_hint": "Når man vælger at være synlig på Mastodon, kan ens indlæg fremgå i søgeresultater og tendenser, og profilen kan blive foreslået til andre med tilsvarende interesse.",
"onboarding.profile.display_name": "Visningsnavn",
"onboarding.profile.display_name_hint": "Fulde navn eller dit sjove navn…",
"onboarding.profile.indexable": "Medtag offentlige indlæg i søgeresultater",
"onboarding.profile.lead": "Dette kan altid færdiggøres senere i indstillingerne, hvor endnu flere tilpasningsmuligheder forefindes.",
"onboarding.profile.note": "Bio",
"onboarding.profile.note_hint": "Man kan @omtale andre personer eller #hashtags…",
Expand Down Expand Up @@ -533,6 +535,7 @@
"privacy.unlisted.short": "Diskret",
"privacy_policy.last_updated": "Senest opdateret {date}",
"privacy_policy.title": "Privatlivspolitik",
"recommended": "Anbefalet",
"refresh": "Genindlæs",
"regeneration_indicator.label": "Indlæser…",
"regeneration_indicator.sublabel": "Din hjemmetidslinje klargøres!",
Expand Down
Loading

0 comments on commit d288a61

Please sign in to comment.