Skip to content

Commit

Permalink
Merge remote-tracking branch 'parent/main' into upstream-20231120
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Nov 20, 2023
2 parents 866f93b + 60f143e commit abec232
Show file tree
Hide file tree
Showing 85 changed files with 1,317 additions and 461 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
path: tmp/screenshots/

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

needs:
Expand Down Expand Up @@ -329,7 +329,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
5 changes: 5 additions & 0 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 @@ -855,6 +859,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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ DB_USER=postgres DB_PASS=password foreman start
RAILS_ENV=test bundle exec rspec spec
# ElasticSearch連携テストを行う
RAILS_ENV=test ES_ENABLED=true bundle exec rspec --tag search
RAILS_ENV=test ES_ENABLED=true RUN_SEARCH_SPECS=true bundle exec rspec spec/search
```

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
2 changes: 2 additions & 0 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
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
7 changes: 7 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,11 @@
"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.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
2 changes: 2 additions & 0 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
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Blockiert",
"account.browse_more_on_origin_server": "Mehr auf dem Originalprofil durchsuchen",
"account.cancel_follow_request": "Folgeanfrage zurückziehen",
"account.copy": "Link zum Profil kopieren",
"account.direct": "@{name} privat erwähnen",
"account.disable_notifications": "Höre auf mich zu benachrichtigen wenn @{name} etwas postet",
"account.domain_blocked": "Domain versteckt",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Als gelesen markieren",
"conversation.open": "Unterhaltung anzeigen",
"conversation.with": "Mit {names}",
"copy_icon_button.copied": "In die Zwischenablage kopiert",
"copypaste.copied": "Kopiert",
"copypaste.copy_to_clipboard": "In die Zwischenablage kopieren",
"directory.federated": "Aus bekanntem Fediverse",
Expand Down
5 changes: 3 additions & 2 deletions app/javascript/mastodon/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,10 @@
"onboarding.follows.empty": "Unfortunately, no results can be shown right now. You can try using search or browsing the explore page to find people to follow, or try again later.",
"onboarding.follows.lead": "Your home feed is the primary way to experience Mastodon. The more people you follow, the more active and interesting it will be. To get you started, here are some suggestions:",
"onboarding.follows.title": "Personalize your home feed",
"onboarding.profile.discoverable": "Feature profile and posts in discovery algorithms",
"onboarding.profile.discoverable": "Make my profile discoverable",
"onboarding.profile.discoverable_hint": "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.",
"onboarding.profile.display_name": "Display name",
"onboarding.profile.display_name_hint": "Your full name or your fun name…",
"onboarding.profile.indexable": "Include public posts in search results",
"onboarding.profile.lead": "You can always complete this later in the settings, where even more customization options are available.",
"onboarding.profile.note": "Bio",
"onboarding.profile.note_hint": "You can @mention other people or #hashtags…",
Expand Down Expand Up @@ -570,6 +570,7 @@
"privacy_policy.title": "Privacy Policy",
"reaction_deck.add": "Add",
"reaction_deck.remove": "Remove",
"recommended": "Recommended",
"refresh": "Refresh",
"regeneration_indicator.label": "Loading…",
"regeneration_indicator.sublabel": "Your home feed is being prepared!",
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/es-AR.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Bloqueado",
"account.browse_more_on_origin_server": "Explorar más en el perfil original",
"account.cancel_follow_request": "Dejar de seguir",
"account.copy": "Copiar enlace al perfil",
"account.direct": "Mención privada a @{name}",
"account.disable_notifications": "Dejar de notificarme cuando @{name} envíe mensajes",
"account.domain_blocked": "Dominio bloqueado",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Marcar como leída",
"conversation.open": "Ver conversación",
"conversation.with": "Con {names}",
"copy_icon_button.copied": "Copiado en el portapapeles",
"copypaste.copied": "Copiado",
"copypaste.copy_to_clipboard": "Copiar al portapapeles",
"directory.federated": "Desde fediverso conocido",
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/es-MX.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Bloqueado",
"account.browse_more_on_origin_server": "Ver más en el perfil original",
"account.cancel_follow_request": "Retirar solicitud de seguimiento",
"account.copy": "Copiar enlace al perfil",
"account.direct": "Mención privada @{name}",
"account.disable_notifications": "Dejar de notificarme cuando @{name} publique algo",
"account.domain_blocked": "Dominio oculto",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Marcar como leído",
"conversation.open": "Ver conversación",
"conversation.with": "Con {names}",
"copy_icon_button.copied": "Copiado al portapapeles",
"copypaste.copied": "Copiado",
"copypaste.copy_to_clipboard": "Copiar al portapapeles",
"directory.federated": "Desde el fediverso conocido",
Expand Down
12 changes: 12 additions & 0 deletions app/javascript/mastodon/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Bloqueado",
"account.browse_more_on_origin_server": "Ver más en el perfil original",
"account.cancel_follow_request": "Retirar solicitud de seguimiento",
"account.copy": "Copiar enlace al perfil",
"account.direct": "Mención privada a @{name}",
"account.disable_notifications": "Dejar de notificarme cuando @{name} publique algo",
"account.domain_blocked": "Dominio bloqueado",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Marcar como leído",
"conversation.open": "Ver conversación",
"conversation.with": "Con {names}",
"copy_icon_button.copied": "Copiado al portapapeles",
"copypaste.copied": "Copiado",
"copypaste.copy_to_clipboard": "Copiar al portapapeles",
"directory.federated": "Desde el fediverso conocido",
Expand Down Expand Up @@ -479,7 +481,17 @@
"onboarding.follows.empty": "Desafortunadamente, no se pueden mostrar resultados en este momento. Puedes intentar usar la búsqueda o navegar por la página de exploración para encontrar personas a las que seguir, o inténtalo de nuevo más tarde.",
"onboarding.follows.lead": "Tu línea de inicio es la forma principal de experimentar Mastodon. Cuanta más personas sigas, más activa e interesante será. Para empezar, aquí hay algunas sugerencias:",
"onboarding.follows.title": "Personaliza tu línea de inicio",
"onboarding.profile.discoverable": "Destacar perfil y publicaciones en algoritmos de descubrimiento",
"onboarding.profile.display_name": "Nombre para mostrar",
"onboarding.profile.display_name_hint": "Tu nombre completo o tu apodo…",
"onboarding.profile.indexable": "Incluir publicaciones públicas en los resultados de búsqueda",
"onboarding.profile.lead": "Siempre puedes completar esto más tarde en los ajustes, donde hay aún más opciones de personalización disponibles.",
"onboarding.profile.note": "Biografía",
"onboarding.profile.note_hint": "Puedes @mencionar a otras personas o #etiquetas…",
"onboarding.profile.save_and_continue": "Guardar y continuar",
"onboarding.profile.title": "Configuración del perfil",
"onboarding.profile.upload_avatar": "Subir foto de perfil",
"onboarding.profile.upload_header": "Subir encabezado de perfil",
"onboarding.share.lead": "¡Cuéntale a otras personas cómo te pueden encontrar en Mastodon!",
"onboarding.share.message": "¡Soy {username} en #Mastodon! Ven a seguirme en {url}",
"onboarding.share.next_steps": "Posibles siguientes pasos:",
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Blokeatuta",
"account.browse_more_on_origin_server": "Arakatu gehiago jatorrizko profilean",
"account.cancel_follow_request": "Baztertu jarraitzeko eskaera",
"account.copy": "Kopiatu profilerako esteka",
"account.direct": "Aipatu pribatuki @{name}",
"account.disable_notifications": "Utzi jakinarazteari @{name} erabiltzailearen bidalketetan",
"account.domain_blocked": "Ezkutatutako domeinua",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Markatu irakurrita bezala",
"conversation.open": "Ikusi elkarrizketa",
"conversation.with": "Hauekin: {names}",
"copy_icon_button.copied": "Arbelera kopiatu da",
"copypaste.copied": "Kopiatuta",
"copypaste.copy_to_clipboard": "Kopiatu arbelera",
"directory.federated": "Fedibertso ezagunekoak",
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Estetty",
"account.browse_more_on_origin_server": "Selaile lisää alkuperäisellä palvelimella",
"account.cancel_follow_request": "Peruuta seurantapyyntö",
"account.copy": "Kopioi profiilin linkki",
"account.direct": "Mainitse @{name} yksityisesti",
"account.disable_notifications": "Lopeta ilmoittamasta minulle, kun @{name} julkaisee",
"account.domain_blocked": "Verkkotunnus estetty",
Expand Down Expand Up @@ -191,6 +192,7 @@
"conversation.mark_as_read": "Merkitse luetuksi",
"conversation.open": "Näytä keskustelu",
"conversation.with": "{names} kanssa",
"copy_icon_button.copied": "Kopioitu leikepöydälle",
"copypaste.copied": "Kopioitu",
"copypaste.copy_to_clipboard": "Kopioi leikepöydälle",
"directory.federated": "Koko tunnettu fediversumi",
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/mastodon/locales/fr-QC.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@
"lists.search": "Rechercher parmi les gens que vous suivez",
"lists.subheading": "Vos listes",
"load_pending": "{count, plural, one {# nouvel élément} other {# nouveaux éléments}}",
"loading_indicator.label": "Chargement…",
"media_gallery.toggle_visible": "{number, plural, one {Cacher l’image} other {Cacher les images}}",
"moved_to_account_banner.text": "Votre compte {disabledAccount} est actuellement désactivé parce que vous avez déménagé sur {movedToAccount}.",
"mute_modal.duration": "Durée",
Expand Down Expand Up @@ -478,6 +479,9 @@
"onboarding.follows.empty": "Malheureusement, aucun résultat ne peut être affiché pour le moment. Vous pouvez essayer de rechercher ou de parcourir la page \"Explorer\" pour trouver des personnes à suivre, ou réessayer plus tard.",
"onboarding.follows.lead": "You curate your own home feed. The more people you follow, the more active and interesting it will be. These profiles may be a good starting point—you can always unfollow them later!",
"onboarding.follows.title": "Popular on Mastodon",
"onboarding.profile.discoverable": "Autoriser des algorithmes de découverte à mettre en avant votre profil et vos messages",
"onboarding.profile.save_and_continue": "Enregistrer et continuer",
"onboarding.profile.upload_avatar": "Importer une photo de profil",
"onboarding.share.lead": "Faites savoir aux gens comment vous trouver sur Mastodon!",
"onboarding.share.message": "Je suis {username} sur #Mastodon! Suivez-moi sur {url}",
"onboarding.share.next_steps": "Étapes suivantes possibles:",
Expand Down
Loading

0 comments on commit abec232

Please sign in to comment.