diff --git a/Gemfile b/Gemfile
index 9489fe1e81..a2941923a2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -67,7 +67,6 @@ gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
gem 'mime-types', '~> 3.7.0', require: 'mime/types/columnar'
gem 'mutex_m'
gem 'nokogiri', '~> 1.15'
-gem 'oj', '~> 3.14'
gem 'ox', '~> 2.14'
gem 'parslet'
gem 'premailer-rails'
@@ -96,6 +95,7 @@ gem 'tzinfo-data', '~> 1.2023'
gem 'webauthn', '~> 3.0'
gem 'webpush', github: 'mastodon/webpush', ref: '9631ac63045cfabddacc69fc06e919b4c13eb913'
+gem 'json'
gem 'json-ld'
gem 'json-ld-preloaded', '~> 3.2'
gem 'rdf-normalize', '~> 0.5'
diff --git a/Gemfile.lock b/Gemfile.lock
index dc1c09c46f..84eb20d3ab 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -10,7 +10,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- action_text-trix (2.1.16)
+ action_text-trix (2.1.17)
railties
actioncable (8.1.2)
actionpack (= 8.1.2)
@@ -429,7 +429,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
- loofah (2.25.0)
+ loofah (2.25.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.9.0)
@@ -473,9 +473,6 @@ GEM
nokogiri (1.19.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- oj (3.16.16)
- bigdecimal (>= 3.0)
- ostruct (>= 0.2)
omniauth (2.1.4)
hashie (>= 3.4.6)
logger
@@ -997,6 +994,7 @@ DEPENDENCIES
inline_svg
irb (~> 1.8)
jd-paperclip-azure (~> 3.0)
+ json
json-ld
json-ld-preloaded (~> 3.2)
json-schema (~> 6.0)
@@ -1015,7 +1013,6 @@ DEPENDENCIES
net-http (~> 0.6.0)
net-ldap (~> 0.18)
nokogiri (~> 1.15)
- oj (~> 3.14)
omniauth (~> 2.0)
omniauth-cas (~> 3.0.0.beta.1)
omniauth-rails_csrf_protection (~> 2.0)
diff --git a/app/javascript/flavours/glitch/styles/application.scss b/app/javascript/flavours/glitch/styles/application.scss
index cc23627a15..18ad044b42 100644
--- a/app/javascript/flavours/glitch/styles/application.scss
+++ b/app/javascript/flavours/glitch/styles/application.scss
@@ -1 +1,27 @@
-@use 'common';
+@use 'mastodon/variables';
+@use 'mastodon/mixins';
+@use '@/styles/fonts/roboto';
+@use '@/styles/fonts/roboto-mono';
+
+@use 'mastodon/reset';
+@use 'mastodon/theme';
+@use 'mastodon/basics';
+@use 'mastodon/branding';
+@use 'mastodon/containers';
+@use 'mastodon/lists';
+@use 'mastodon/widgets';
+@use 'mastodon/forms';
+@use 'mastodon/accounts';
+@use 'mastodon/components';
+@use 'mastodon/polls';
+@use 'mastodon/modal';
+@use 'mastodon/emoji_picker';
+@use 'mastodon/about';
+@use 'mastodon/tables';
+@use 'mastodon/admin';
+@use 'mastodon/dashboard';
+@use 'mastodon/rtl';
+@use 'mastodon/accessibility';
+@use 'mastodon/rich_text';
+@use 'mastodon/glitch/local_settings';
+@use 'mastodon/glitch/doodle';
diff --git a/app/javascript/flavours/glitch/styles/common.scss b/app/javascript/flavours/glitch/styles/common.scss
deleted file mode 100644
index 18ad044b42..0000000000
--- a/app/javascript/flavours/glitch/styles/common.scss
+++ /dev/null
@@ -1,27 +0,0 @@
-@use 'mastodon/variables';
-@use 'mastodon/mixins';
-@use '@/styles/fonts/roboto';
-@use '@/styles/fonts/roboto-mono';
-
-@use 'mastodon/reset';
-@use 'mastodon/theme';
-@use 'mastodon/basics';
-@use 'mastodon/branding';
-@use 'mastodon/containers';
-@use 'mastodon/lists';
-@use 'mastodon/widgets';
-@use 'mastodon/forms';
-@use 'mastodon/accounts';
-@use 'mastodon/components';
-@use 'mastodon/polls';
-@use 'mastodon/modal';
-@use 'mastodon/emoji_picker';
-@use 'mastodon/about';
-@use 'mastodon/tables';
-@use 'mastodon/admin';
-@use 'mastodon/dashboard';
-@use 'mastodon/rtl';
-@use 'mastodon/accessibility';
-@use 'mastodon/rich_text';
-@use 'mastodon/glitch/local_settings';
-@use 'mastodon/glitch/doodle';
diff --git a/app/javascript/mastodon/locales/be.json b/app/javascript/mastodon/locales/be.json
index c155c8ffdc..3b2f982c12 100644
--- a/app/javascript/mastodon/locales/be.json
+++ b/app/javascript/mastodon/locales/be.json
@@ -1131,7 +1131,7 @@
"status.quote_manual_review": "Аўтар зробіць агляд уручную",
"status.quote_noun": "Цытаваць",
"status.quote_policy_change": "Змяніць, хто можа цытаваць",
- "status.quote_post_author": "Цытаваў допіс @{name}",
+ "status.quote_post_author": "Цытаваў(-ла) допіс @{name}",
"status.quote_private": "Прыватныя допісы нельга цытаваць",
"status.quotes.empty": "Яшчэ ніхто не цытаваў гэты допіс. Калі гэта адбудзецца, то Вы пабачыце гэта тут.",
"status.quotes.local_other_disclaimer": "Цытаты, у якіх адмовіў аўтар, паказаныя не будуць.",
diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json
index 2def40b593..ed31db9adc 100644
--- a/app/javascript/mastodon/locales/de.json
+++ b/app/javascript/mastodon/locales/de.json
@@ -188,7 +188,7 @@
"account_edit.image_alt_modal.details_content": "Richtig:
- Beschreibe dich selbst wie abgebildet
- Verwende beim Beschreiben die 3. Person (z. B. „Axel“ anstatt „ich“)
- Formuliere kurz und knackig – ein paar Wörter sind ausreichend
Falsch: - Mit „Bild von“ beginnen – bei Screenreadern überflüssig
Korrektes Beispiel: - „Axel trägt ein grünes T-Shirt und eine Brille.“
",
"account_edit.image_alt_modal.details_title": "Hinweis: Bildbeschreibung für Profilbilder",
"account_edit.image_alt_modal.edit_title": "Bildbeschreibung bearbeiten",
- "account_edit.image_alt_modal.text_hint": "Bildbeschreibungen können von Screenreadern erfasst werden. Dadurch können Menschen, die darauf angewiesen sind, deine Medieninhalte besser wahrnehmen.",
+ "account_edit.image_alt_modal.text_hint": "Bildbeschreibungen können sehbehinderten oder blinden Menschen helfen, deine Medieninhalte mithilfe eines Screenreaders besser zu verstehen und einzuordnen.",
"account_edit.image_alt_modal.text_label": "Bildbeschreibung",
"account_edit.image_delete_modal.confirm": "Möchtest du dieses Bild wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
"account_edit.image_delete_modal.delete_button": "Löschen",
diff --git a/app/javascript/mastodon/locales/el.json b/app/javascript/mastodon/locales/el.json
index cdb0312a2d..6a1649f253 100644
--- a/app/javascript/mastodon/locales/el.json
+++ b/app/javascript/mastodon/locales/el.json
@@ -10,7 +10,7 @@
"about.domain_blocks.suspended.explanation": "Τα δεδομένα αυτού του διακομιστή, δε θα επεξεργάζονται, δε θα αποθηκεύονται και δε θα ανταλλάσσονται, καθιστώντας οποιαδήποτε αλληλεπίδραση ή επικοινωνία με χρήστες από αυτόν το διακομιστή αδύνατη.",
"about.domain_blocks.suspended.title": "Σε αναστολή",
"about.language_label": "Γλώσσα",
- "about.not_available": "Αυτές οι πληροφορίες δεν έχουν είναι διαθέσιμες σε αυτόν τον διακομιστή.",
+ "about.not_available": "Αυτές οι πληροφορίες δεν έχουν γίνει διαθέσιμες σε αυτόν τον διακομιστή.",
"about.powered_by": "Αποκεντρωμένο μέσο κοινωνικής δικτύωσης που βασίζεται στο {mastodon}",
"about.rules": "Κανόνες διακομιστή",
"account.account_note_header": "Προσωπική σημείωση",
@@ -67,7 +67,7 @@
"account.followers_counter": "{count, plural, one {{counter} ακόλουθος} other {{counter} ακόλουθοι}}",
"account.followers_you_know_counter": "{counter} που ξέρεις",
"account.following": "Ακολουθείτε",
- "account.following_counter": "{count, plural, one {{counter} ακολουθεί} other {{counter} ακολουθούν}}",
+ "account.following_counter": "{count, plural, one {{counter} ακολουθεί} other {{counter} ακολουθεί}}",
"account.follows.empty": "Αυτός ο χρήστης δεν ακολουθεί κανέναν ακόμη.",
"account.follows_you": "Σε ακολουθεί",
"account.go_to_profile": "Μετάβαση στο προφίλ",
diff --git a/app/javascript/mastodon/locales/et.json b/app/javascript/mastodon/locales/et.json
index 638e723863..d262f98c0e 100644
--- a/app/javascript/mastodon/locales/et.json
+++ b/app/javascript/mastodon/locales/et.json
@@ -44,9 +44,11 @@
"account.familiar_followers_two": "Jälgijateks {name1} ja {name2}",
"account.featured": "Esiletõstetud",
"account.featured.accounts": "Profiilid",
+ "account.featured.collections": "Kogud",
"account.featured.hashtags": "Teemaviited",
"account.featured_tags.last_status_at": "Viimane postitus: {date}",
"account.featured_tags.last_status_never": "Postitusi pole",
+ "account.field_overflow": "Näita kogu sisu",
"account.filters.all": "Kõik tegevused",
"account.filters.boosts_toggle": "Näita hooandmisi",
"account.filters.posts_boosts": "Postitused ja hooandmised",
diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json
index 6df8f1952c..56214f153f 100644
--- a/app/javascript/mastodon/locales/fi.json
+++ b/app/javascript/mastodon/locales/fi.json
@@ -185,8 +185,10 @@
"account_edit.field_reorder_modal.handle_label": "Siirrä kenttää ”{item}”",
"account_edit.field_reorder_modal.title": "Järjestele kenttiä",
"account_edit.image_alt_modal.add_title": "Lisää tekstivastine",
+ "account_edit.image_alt_modal.details_content": "TEE NÄIN: - Kuvaile itseäsi kuvan mukaisesti
- Käytä kolmannen persoonan muotoja (esim. ”Aleksi” eikä ”minä”)
- Ole ytimekäs – usein muutama sana riittää
ÄLÄ TEE NÄIN: - Aloita sanalla ”Kuva” – sen on tarpeetonta näytönlukuohjelmille
ESIMERKKI: - ”Aleksi yllään vihreä paita ja lasit”
",
"account_edit.image_alt_modal.details_title": "Vinkkejä: profiilikuvien tekstivastineet",
"account_edit.image_alt_modal.edit_title": "Muokkaa tekstivastinetta",
+ "account_edit.image_alt_modal.text_hint": "Teksivastine auttaa näytönlukuohjelmien käyttäjiä ymmärtämään sisältöä.",
"account_edit.image_alt_modal.text_label": "Tekstivastine",
"account_edit.image_delete_modal.confirm": "Haluatko varmasti poistaa tämän kuvan? Tätä toimea ei voi kumota.",
"account_edit.image_delete_modal.delete_button": "Poista",
diff --git a/app/javascript/mastodon/locales/fr-CA.json b/app/javascript/mastodon/locales/fr-CA.json
index b6990d4d22..802aed5bea 100644
--- a/app/javascript/mastodon/locales/fr-CA.json
+++ b/app/javascript/mastodon/locales/fr-CA.json
@@ -184,6 +184,7 @@
"account_edit.field_reorder_modal.drag_start": "Champ « {item} » sélectionné.",
"account_edit.field_reorder_modal.handle_label": "Faites glisser le champ « {item} »",
"account_edit.field_reorder_modal.title": "Réorganiser les champs",
+ "account_edit.image_alt_modal.add_title": "Ajouter un texte alternatif",
"account_edit.image_edit.add_button": "Ajouter une image",
"account_edit.image_edit.alt_add_button": "Ajouter un texte alternatif",
"account_edit.image_edit.alt_edit_button": "Modifier le texte alternatif",
diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json
index da6c7e7301..9947452dc8 100644
--- a/app/javascript/mastodon/locales/fr.json
+++ b/app/javascript/mastodon/locales/fr.json
@@ -184,6 +184,7 @@
"account_edit.field_reorder_modal.drag_start": "Champ « {item} » sélectionné.",
"account_edit.field_reorder_modal.handle_label": "Faites glisser le champ « {item} »",
"account_edit.field_reorder_modal.title": "Réorganiser les champs",
+ "account_edit.image_alt_modal.add_title": "Ajouter un texte alternatif",
"account_edit.image_edit.add_button": "Ajouter une image",
"account_edit.image_edit.alt_add_button": "Ajouter un texte alternatif",
"account_edit.image_edit.alt_edit_button": "Modifier le texte alternatif",
diff --git a/app/javascript/mastodon/locales/he.json b/app/javascript/mastodon/locales/he.json
index 34cfae819a..27e5badca1 100644
--- a/app/javascript/mastodon/locales/he.json
+++ b/app/javascript/mastodon/locales/he.json
@@ -184,6 +184,15 @@
"account_edit.field_reorder_modal.drag_start": "השדה \"{item}\" נבחר.",
"account_edit.field_reorder_modal.handle_label": "הזזת השדה \"{item}\"",
"account_edit.field_reorder_modal.title": "סידור שדות",
+ "account_edit.image_alt_modal.add_title": "הוספת מלל חלופי",
+ "account_edit.image_alt_modal.details_content": "עשו: - תארו עצמכם כפי שאתם בצילום
- השתמשו בשפה בגוף שלישי (למשל \"רונית\" במקום \"אני\")
- היו תמציתיים - מילים ספורות יספיקו לרוב
אל תעשו: - להתחיל תיאור עם \"תמונה של...\" - זה חזרתי מבחינת קוראי מסך
דוגמא: - \"רונית לבושה בחולצה ירוקה ומרכיבה משקפים\"
",
+ "account_edit.image_alt_modal.details_title": "עצות: מלל חלופי לתמונות פרופיל",
+ "account_edit.image_alt_modal.edit_title": "עריכת מלל חלופי",
+ "account_edit.image_alt_modal.text_hint": "מלל חלופי מסייע למשתמשי קוראי מסך להבין את התוכן שלך.",
+ "account_edit.image_alt_modal.text_label": "מלל חלופי",
+ "account_edit.image_delete_modal.confirm": "האם למחוק את התמונה? לא ניתן לבטל פעולה זו.",
+ "account_edit.image_delete_modal.delete_button": "מחיקה",
+ "account_edit.image_delete_modal.title": "למחוק תמונה?",
"account_edit.image_edit.add_button": "הוספת תמונה",
"account_edit.image_edit.alt_add_button": "הוספת מלל חלופי",
"account_edit.image_edit.alt_edit_button": "עריכת מלל חלופי",
@@ -203,6 +212,16 @@
"account_edit.profile_tab.subtitle": "התאימו את הטאבים בפרופיל שלכם ומה שהם יציגו.",
"account_edit.profile_tab.title": "הגדרות טאבים לפרופיל",
"account_edit.save": "שמירה",
+ "account_edit.upload_modal.back": "חזרה",
+ "account_edit.upload_modal.done": "בוצע",
+ "account_edit.upload_modal.next": "הבא",
+ "account_edit.upload_modal.step_crop.zoom": "הגדלה",
+ "account_edit.upload_modal.step_upload.button": "עיון בקבצים",
+ "account_edit.upload_modal.step_upload.dragging": "גרור להעלאה",
+ "account_edit.upload_modal.step_upload.header": "בחר/י תמונה",
+ "account_edit.upload_modal.step_upload.hint": "תכנים בתקן WEBP, PNG, GIF או JPG, עד לגודל {limit} מ\"ב.{br}התמונה תתוקן לגודל {width} על {height} פיקסלים.",
+ "account_edit.upload_modal.title_add": "הוספת תמונת פרופיל",
+ "account_edit.upload_modal.title_replace": "החלפת תמונת פרופיל",
"account_edit.verified_modal.details": "הוספת אמינות לחשבון המסטודון על ידי הוספת קישורים מוודאים לאתרים אישיים. כך זה עובד:",
"account_edit.verified_modal.invisible_link.details": "הוסיפו את הקישור בכותרת. החלק החשוב הוא rel=\"me\" שמונע התחזות על אתרים עם תוכן משתמשים. ניתן גם ליצור תגית link בכותרת העמוד במקום קישור {tag} אבל קוד ה־HTML חייב להופיע שם ללא הרצה של ג'אווהסקריפט.",
"account_edit.verified_modal.invisible_link.summary": "כיצד לגרום לקישור להיות בלתי נראה?",
diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json
index a17b30fa66..caaf831c8a 100644
--- a/app/javascript/mastodon/locales/nl.json
+++ b/app/javascript/mastodon/locales/nl.json
@@ -184,6 +184,15 @@
"account_edit.field_reorder_modal.drag_start": "Opgepakt veld \"{item}\".",
"account_edit.field_reorder_modal.handle_label": "Veld \"{item}\" slepen",
"account_edit.field_reorder_modal.title": "Velden herschikken",
+ "account_edit.image_alt_modal.add_title": "Alt-tekst toevoegen",
+ "account_edit.image_alt_modal.details_content": "DOEN: - Beschrijf jezelf zoals afgebeeld
- Gebruik taal van een derde persoon (bijv. “Alex” in plaats van “ik”)
- Wees beknopt - een paar woorden is vaak genoeg
NIET DOEN: - Begin met “Foto van” - dit is overbodig voor schermlezers
VOORBEELD: - “Alex draagt een groen shirt en een bril”
",
+ "account_edit.image_alt_modal.details_title": "Tips: Alt-tekst voor profielfoto's",
+ "account_edit.image_alt_modal.edit_title": "Alt-tekst bewerken",
+ "account_edit.image_alt_modal.text_hint": "Alt-text helpt gebruikers van schermlezer jouw inhoud te begrijpen.",
+ "account_edit.image_alt_modal.text_label": "Alt-tekst",
+ "account_edit.image_delete_modal.confirm": "Weet je zeker dat je deze afbeelding wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",
+ "account_edit.image_delete_modal.delete_button": "Verwijderen",
+ "account_edit.image_delete_modal.title": "Afbeelding verwijderen?",
"account_edit.image_edit.add_button": "Afbeelding toevoegen",
"account_edit.image_edit.alt_add_button": "Alt-tekst toevoegen",
"account_edit.image_edit.alt_edit_button": "Alt-tekst bewerken",
@@ -203,6 +212,16 @@
"account_edit.profile_tab.subtitle": "De tabbladen op je profiel aanpassen en wat er op wordt weergegeven.",
"account_edit.profile_tab.title": "Instellingen voor tabblad Profiel",
"account_edit.save": "Opslaan",
+ "account_edit.upload_modal.back": "Terug",
+ "account_edit.upload_modal.done": "Klaar",
+ "account_edit.upload_modal.next": "Volgende",
+ "account_edit.upload_modal.step_crop.zoom": "Zoom",
+ "account_edit.upload_modal.step_upload.button": "Door bestanden bladeren",
+ "account_edit.upload_modal.step_upload.dragging": "Hierheen slepen om te uploaden",
+ "account_edit.upload_modal.step_upload.header": "Kies een afbeelding",
+ "account_edit.upload_modal.step_upload.hint": "WEBP-, PNG-, GIF- of JPG-formaat, tot max. {limit}MB.{br}Afbeelding wordt geschaald naar {width}x{height}px.",
+ "account_edit.upload_modal.title_add": "Profielfoto toevoegen",
+ "account_edit.upload_modal.title_replace": "Profielfoto vervangen",
"account_edit.verified_modal.details": "Voeg geloofwaardigheid toe aan je Mastodonprofiel door links naar persoonlijke websites te verifiëren. Zo werkt het:",
"account_edit.verified_modal.invisible_link.details": "Voeg de link toe aan uw header. Het belangrijke onderdeel is rel=\"me\" om te voorkomen dat websites impersoneren met door de gebruiker gegenereerde inhoud. Je kunt zelfs een linktag gebruiken in de kop van de pagina in plaats van {tag}, maar de HTML moet toegankelijk zijn zonder JavaScript uit te voeren.",
"account_edit.verified_modal.invisible_link.summary": "Hoe maak ik de link onzichtbaar?",
diff --git a/app/javascript/mastodon/locales/pt-PT.json b/app/javascript/mastodon/locales/pt-PT.json
index 62f51fc30c..b1bb9de59b 100644
--- a/app/javascript/mastodon/locales/pt-PT.json
+++ b/app/javascript/mastodon/locales/pt-PT.json
@@ -183,6 +183,13 @@
"account_edit.field_reorder_modal.drag_start": "Apanhou o campo \"{item}\".",
"account_edit.field_reorder_modal.handle_label": "Arrastar o campo \"{item}\"",
"account_edit.field_reorder_modal.title": "Reordenar campos",
+ "account_edit.image_alt_modal.add_title": "Adicionar texto alternativo",
+ "account_edit.image_alt_modal.edit_title": "Editar texto alternativo",
+ "account_edit.image_alt_modal.text_hint": "O texto alternativo ajuda os utilizadores que usam um leitor de ecrã a entender seu conteúdo.",
+ "account_edit.image_alt_modal.text_label": "Texto alternativo",
+ "account_edit.image_delete_modal.confirm": "Tem a certeza que pretende eliminar esta imagem? Esta ação é irreversível.",
+ "account_edit.image_delete_modal.delete_button": "Eliminar",
+ "account_edit.image_delete_modal.title": "Eliminar imagem?",
"account_edit.image_edit.add_button": "Adicionar imagem",
"account_edit.image_edit.alt_add_button": "Adicionar texto alternativo",
"account_edit.image_edit.alt_edit_button": "Editar texto alternativo",
@@ -201,6 +208,15 @@
"account_edit.profile_tab.subtitle": "Personalize as abas do seu perfil e o que elas exibem.",
"account_edit.profile_tab.title": "Configurações da aba do perfil",
"account_edit.save": "Guardar",
+ "account_edit.upload_modal.back": "Voltar",
+ "account_edit.upload_modal.done": "Concluído",
+ "account_edit.upload_modal.next": "Seguinte",
+ "account_edit.upload_modal.step_crop.zoom": "Ampliação",
+ "account_edit.upload_modal.step_upload.button": "Explorar ficheiros",
+ "account_edit.upload_modal.step_upload.dragging": "Solte para transferir",
+ "account_edit.upload_modal.step_upload.header": "Escolha uma imagem",
+ "account_edit.upload_modal.title_add": "Adicionar foto de perfil",
+ "account_edit.upload_modal.title_replace": "Substituir foto de perfil",
"account_edit.verified_modal.details": "Adicione credibilidade ao seu perfil no Mastodon verificando links para sites pessoais. Veja como funciona:",
"account_edit.verified_modal.invisible_link.details": "Adicione o link ao seu cabeçalho. A parte importante é rel=\"me\", que evita a personificação em sites com conteúdo gerado por utilizadores. Você também pode usar uma tag de link no cabeçalho da página em vez de {tag}, mas o HTML deve ser acessível sem executar JavaScript.",
"account_edit.verified_modal.invisible_link.summary": "Como faço para tornar o link invisível?",
@@ -372,6 +388,7 @@
"collections.search_accounts_max_reached": "Já adicionou o máximo de contas",
"collections.sensitive": "Sensível",
"collections.topic_hint": "Adicione uma etiqueta para ajudar outros a entender o tópico principal desta coleção.",
+ "collections.topic_special_chars_hint": "Os carateres especiais serão removidos ao guardar",
"collections.view_collection": "Ver coleções",
"collections.view_other_collections_by_user": "Ver outras coleções deste utilizador",
"collections.visibility_public": "Pública",
diff --git a/app/javascript/mastodon/locales/tr.json b/app/javascript/mastodon/locales/tr.json
index 687c51507a..a02425a27b 100644
--- a/app/javascript/mastodon/locales/tr.json
+++ b/app/javascript/mastodon/locales/tr.json
@@ -184,6 +184,15 @@
"account_edit.field_reorder_modal.drag_start": "\"{item}\" alanı seçildi.",
"account_edit.field_reorder_modal.handle_label": "\"{item}\" alanını sürükle",
"account_edit.field_reorder_modal.title": "Alanları yeniden düzenle",
+ "account_edit.image_alt_modal.add_title": "Alternatif metin ekle",
+ "account_edit.image_alt_modal.details_content": "Yapılması gerekenler: - Kendinizi resimdeki gibi tanımlayın
- Üçüncü şahıs zamirleri kullanın (ör. “ben” yerine “Alex”)
- Kısa ve öz olun – genellikle birkaç kelime yeterlidir
Yapılmaması gerekenler:- “Fotoğrafında” ifadesiyle başlamayın – bu, ekran okuyucular için gereksizdir
Örnek:- \"Yeşil gömlek ve gözlük takan Alex
",
+ "account_edit.image_alt_modal.details_title": "İpuçları: Profil fotoğrafları için alternatif metinler",
+ "account_edit.image_alt_modal.edit_title": "Alternatif metni düzenle",
+ "account_edit.image_alt_modal.text_hint": "Alternatif metin ekran okuyucu kullanan kullanıcıların içeriği anlamasına yardımcı olur.",
+ "account_edit.image_alt_modal.text_label": "Alternatif metin",
+ "account_edit.image_delete_modal.confirm": "Bu görseli silmek istediğinize emin misiniz? Bu işlem geri alınamaz.",
+ "account_edit.image_delete_modal.delete_button": "Sil",
+ "account_edit.image_delete_modal.title": "Resim silinsin mi?",
"account_edit.image_edit.add_button": "Görsel ekle",
"account_edit.image_edit.alt_add_button": "Alternatif metin ekle",
"account_edit.image_edit.alt_edit_button": "Alternatif metni düzenle",
diff --git a/app/javascript/mastodon/locales/vi.json b/app/javascript/mastodon/locales/vi.json
index 148e624219..95b35aec0a 100644
--- a/app/javascript/mastodon/locales/vi.json
+++ b/app/javascript/mastodon/locales/vi.json
@@ -184,6 +184,15 @@
"account_edit.field_reorder_modal.drag_start": "Đã chọn trường \"{item}\".",
"account_edit.field_reorder_modal.handle_label": "Kéo trường \"{item}\"",
"account_edit.field_reorder_modal.title": "Sắp xếp lại trường",
+ "account_edit.image_alt_modal.add_title": "Thêm văn bản thay thế",
+ "account_edit.image_alt_modal.details_content": "NÊN: - Mô tả bản thân bạn trong hình
- Dùng ngôn ngữ góc nhìn thứ ba (ví dụ “Alex” thay vì “tôi”)
- Súc tích – một vài từ là đủ
KHÔNG NÊN: - Bắt đầu bằng “Hình ảnh của” – điều này là thừa đối với trình đọc màn hình.
VÍ DỤ: - “Alex mặc áo xanh và đeo kính”
",
+ "account_edit.image_alt_modal.details_title": "Gợi ý: Văn bản thay thế của ảnh đại diện",
+ "account_edit.image_alt_modal.edit_title": "Sửa văn bản thay thế",
+ "account_edit.image_alt_modal.text_hint": "Văn bản thay thế giúp người dùng phần mềm đọc màn hình hiểu được nội dung của bạn.",
+ "account_edit.image_alt_modal.text_label": "Văn bản thay thế",
+ "account_edit.image_delete_modal.confirm": "Bạn có chắc chắn muốn xóa hình ảnh này? Hành động này không thể hoàn tác.",
+ "account_edit.image_delete_modal.delete_button": "Xóa",
+ "account_edit.image_delete_modal.title": "Xóa hình ảnh?",
"account_edit.image_edit.add_button": "Thêm ảnh",
"account_edit.image_edit.alt_add_button": "Thêm văn bản thay thế",
"account_edit.image_edit.alt_edit_button": "Sửa văn bản thay thế",
diff --git a/app/javascript/mastodon/locales/zh-CN.json b/app/javascript/mastodon/locales/zh-CN.json
index 9f1689fba9..32e431cef8 100644
--- a/app/javascript/mastodon/locales/zh-CN.json
+++ b/app/javascript/mastodon/locales/zh-CN.json
@@ -186,7 +186,7 @@
"account_edit.field_reorder_modal.title": "重新排列字段",
"account_edit.image_alt_modal.add_title": "添加替代文本",
"account_edit.image_alt_modal.details_content": "建议这么做: - 根据图片内容描述你自己的样子
- 文本使用第三人称(例如称呼自己为“Alex”而不是“我”)
- 保持简洁:通常只需要简单描述一下
不建议这么做: - 以“……的图片”开头或结尾:屏幕阅读器自己会说这是图片
示例:",
- "account_edit.image_alt_modal.details_title": "小贴士:为头像添加替代文本",
+ "account_edit.image_alt_modal.details_title": "小贴士:为头像添加替代文本的注意事项",
"account_edit.image_alt_modal.edit_title": "编辑替代文本",
"account_edit.image_alt_modal.text_hint": "替代文本可以帮助使用屏幕阅读器的用户理解你的内容。",
"account_edit.image_alt_modal.text_label": "替代文本",
diff --git a/app/javascript/styles/application.scss b/app/javascript/styles/application.scss
index cc23627a15..aca615414f 100644
--- a/app/javascript/styles/application.scss
+++ b/app/javascript/styles/application.scss
@@ -1 +1,24 @@
-@use 'common';
+@use 'mastodon/variables';
+@use 'mastodon/mixins';
+@use 'fonts/roboto';
+@use 'fonts/roboto-mono';
+
+@use 'mastodon/reset';
+@use 'mastodon/theme';
+@use 'mastodon/basics';
+@use 'mastodon/branding';
+@use 'mastodon/containers';
+@use 'mastodon/lists';
+@use 'mastodon/widgets';
+@use 'mastodon/forms';
+@use 'mastodon/accounts';
+@use 'mastodon/components';
+@use 'mastodon/polls';
+@use 'mastodon/modal';
+@use 'mastodon/emoji_picker';
+@use 'mastodon/about';
+@use 'mastodon/tables';
+@use 'mastodon/admin';
+@use 'mastodon/dashboard';
+@use 'mastodon/rtl';
+@use 'mastodon/rich_text';
diff --git a/app/javascript/styles/common.scss b/app/javascript/styles/common.scss
deleted file mode 100644
index aca615414f..0000000000
--- a/app/javascript/styles/common.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-@use 'mastodon/variables';
-@use 'mastodon/mixins';
-@use 'fonts/roboto';
-@use 'fonts/roboto-mono';
-
-@use 'mastodon/reset';
-@use 'mastodon/theme';
-@use 'mastodon/basics';
-@use 'mastodon/branding';
-@use 'mastodon/containers';
-@use 'mastodon/lists';
-@use 'mastodon/widgets';
-@use 'mastodon/forms';
-@use 'mastodon/accounts';
-@use 'mastodon/components';
-@use 'mastodon/polls';
-@use 'mastodon/modal';
-@use 'mastodon/emoji_picker';
-@use 'mastodon/about';
-@use 'mastodon/tables';
-@use 'mastodon/admin';
-@use 'mastodon/dashboard';
-@use 'mastodon/rtl';
-@use 'mastodon/rich_text';
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 04f9570f92..6a2bdd730d 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -142,7 +142,7 @@ class FeedManager
def unpush_from_direct(account, status, update: false)
return false unless remove_from_feed(:direct, account.id, status)
- redis.publish("timeline:direct:#{account.id}", Oj.dump(event: :delete, payload: status.id.to_s)) unless update
+ redis.publish("timeline:direct:#{account.id}", { event: :delete, payload: status.id.to_s }.to_json) unless update
true
end
diff --git a/app/models/form/redirect.rb b/app/models/form/redirect.rb
index 6ab95f21f1..5721674ef9 100644
--- a/app/models/form/redirect.rb
+++ b/app/models/form/redirect.rb
@@ -2,15 +2,20 @@
class Form::Redirect
include ActiveModel::Model
+ include ActiveModel::Attributes
+ include ActiveModel::Attributes::Normalization
- attr_accessor :account, :target_account, :current_password,
- :current_username
+ attr_accessor :account, :target_account, :current_password
- attr_reader :acct
+ attribute :acct, :string
+ attribute :current_username, :string
validates :acct, presence: true, domain: { acct: true }
validate :validate_target_account
+ normalizes :acct, with: ->(value) { value.to_s.strip.gsub(/\A@/, '') }, apply_to_nil: true
+ normalizes :current_username, with: ->(value) { value.strip.delete_prefix('@') }
+
def valid_with_challenge?(current_user)
if current_user.encrypted_password.present?
errors.add(:current_password, :invalid) unless current_user.valid_password?(current_password)
@@ -24,10 +29,6 @@ class Form::Redirect
valid?
end
- def acct=(val)
- @acct = val.to_s.strip.gsub(/\A@/, '')
- end
-
private
def set_target_account
diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb
index 3ac1d32205..c003fb701c 100644
--- a/app/services/backup_service.rb
+++ b/app/services/backup_service.rb
@@ -25,13 +25,11 @@ class BackupService < BaseService
skeleton[:orderedItems] = ['!PLACEHOLDER!']
skeleton = JSON.generate(skeleton)
prepend, append = skeleton.split('"!PLACEHOLDER!"')
- add_comma = false
file.write(prepend)
- account.statuses.with_includes.reorder(nil).find_in_batches do |statuses|
- file.write(',') if add_comma
- add_comma = true
+ account.statuses.with_includes.reorder(nil).find_in_batches.with_index do |statuses, batch|
+ file.write(',') unless batch.zero?
file.write(statuses.map do |status|
serializer = status.reblog? ? ActivityPub::AnnounceNoteSerializer : ActivityPub::CreateNoteSerializer
@@ -124,11 +122,8 @@ class BackupService < BaseService
zipfile.get_output_stream('likes.json') do |io|
io.write(prepend)
- add_comma = false
-
- Status.reorder(nil).joins(:favourites).includes(:account).merge(account.favourites).find_in_batches do |statuses|
- io.write(',') if add_comma
- add_comma = true
+ Status.reorder(nil).joins(:favourites).includes(:account).merge(account.favourites).find_in_batches.with_index do |statuses, batch|
+ io.write(',') unless batch.zero?
io.write(statuses.map do |status|
JSON.generate(ActivityPub::TagManager.instance.uri_for(status))
@@ -151,10 +146,8 @@ class BackupService < BaseService
zipfile.get_output_stream('bookmarks.json') do |io|
io.write(prepend)
- add_comma = false
- Status.reorder(nil).joins(:bookmarks).includes(:account).merge(account.bookmarks).find_in_batches do |statuses|
- io.write(',') if add_comma
- add_comma = true
+ Status.reorder(nil).joins(:bookmarks).includes(:account).merge(account.bookmarks).find_in_batches.with_index do |statuses, batch|
+ io.write(',') unless batch.zero?
io.write(statuses.map do |status|
JSON.generate(ActivityPub::TagManager.instance.uri_for(status))
diff --git a/config/initializers/oj.rb b/config/initializers/oj.rb
deleted file mode 100644
index 9b2d908637..0000000000
--- a/config/initializers/oj.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# frozen_string_literal: true
-
-Oj.default_options = { mode: :compat, time_format: :ruby, use_to_json: true }
diff --git a/config/locales/be.yml b/config/locales/be.yml
index bcd568fa54..425d3e606f 100644
--- a/config/locales/be.yml
+++ b/config/locales/be.yml
@@ -1321,6 +1321,7 @@ be:
progress:
confirm: Пацвердзіць email
details: Вашы даныя
+ list: Прагрэс рэгістрацыі
review: Наш водгук
rules: Прыняць правілы
providers:
diff --git a/config/locales/da.yml b/config/locales/da.yml
index 2df10f12b1..adf3049fd4 100644
--- a/config/locales/da.yml
+++ b/config/locales/da.yml
@@ -1279,6 +1279,7 @@ da:
progress:
confirm: Bekræft e-mail
details: Dine detaljer
+ list: Status for tilmelding
review: Vores gennemgang
rules: Acceptér regler
providers:
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 0e1368d1e3..f6eb4a6d7b 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -779,7 +779,7 @@ de:
delete_user_data: Kontodaten löschen
delete_user_data_description: Daten anderer Profile ohne Verzögerung löschen
invite_users: Einladungen
- invite_users_description: Erlaubt bereits registrierten Benutzer*innen, neue Leute zum Server einzuladen
+ invite_users_description: Neue Benutzer*innen zur Registrierung auf diesem Server einladen
manage_announcements: Ankündigungen
manage_announcements_description: Ankündigungen dieses Servers verwalten
manage_appeals: Einsprüche
@@ -805,7 +805,7 @@ de:
manage_user_access: Kontozugriff
manage_user_access_description: Zwei-Faktor-Authentisierungen anderer können deaktiviert, E-Mail-Adressen geändert und Passwörter zurückgesetzt werden
manage_users: Konten
- manage_users_description: Erlaubt es Benutzer*innen, die Details anderer Profile einzusehen und diese Accounts zu moderieren
+ manage_users_description: Details anderer Profile einsehen und Moderation von Konten
manage_webhooks: Webhooks
manage_webhooks_description: Webhooks für administrative Vorgänge einrichten
view_audit_log: Protokoll anzeigen
@@ -814,7 +814,7 @@ de:
view_dashboard_description: Dashboard und verschiedene Metriken
view_devops: DevOps
view_devops_description: Auf Sidekiq- und pgHero-Dashboards zugreifen
- view_feeds: Live-Feeds und Hashtags anzeigen
+ view_feeds: Live-Feeds und Hashtags
view_feeds_description: Zugriff auf Live-Feeds und Hashtags – unabhängig der Servereinstellungen
requires_2fa: Zwei-Faktor-Authentisierung erforderlich
title: Rollen
@@ -1279,6 +1279,7 @@ de:
progress:
confirm: E-Mail bestätigen
details: Deine Daten
+ list: Registrierungsfortschritt
review: Unsere Überprüfung
rules: Serverregeln akzeptieren
providers:
diff --git a/config/locales/doorkeeper.de.yml b/config/locales/doorkeeper.de.yml
index a499f6503f..2faa5bd64b 100644
--- a/config/locales/doorkeeper.de.yml
+++ b/config/locales/doorkeeper.de.yml
@@ -125,7 +125,7 @@ de:
accounts: Konten
admin/accounts: Kontenverwaltung
admin/all: Alle administrativen Funktionen
- admin/reports: Meldungen verwalten
+ admin/reports: Meldungen
all: Voller Zugriff auf dein Mastodon-Konto
blocks: Blockierungen
bookmarks: Lesezeichen
diff --git a/config/locales/el.yml b/config/locales/el.yml
index f46dbccd29..6b808e7339 100644
--- a/config/locales/el.yml
+++ b/config/locales/el.yml
@@ -14,7 +14,7 @@ el:
other: Ακόλουθοι
following:
one: Ακολουθεί
- other: Ακολουθούν
+ other: Ακολουθεί
instance_actor_flash: Αυτός ο λογαριασμός είναι εικονικός και χρησιμοποιείται για να αντιπροσωπεύει τον ίδιο τον διακομιστή και όχι κάποιον μεμονωμένο χρήστη. Χρησιμοποιείται για σκοπούς ομοσπονδίας και δεν πρέπει να ανασταλεί.
last_active: τελευταία ενεργός/ή
link_verified_on: Η ιδιοκτησία αυτού του συνδέσμου ελέγχθηκε στις %{date}
@@ -1279,6 +1279,7 @@ el:
progress:
confirm: Επιβεβαίωση email
details: Τα στοιχεία σας
+ list: Πρόοδος εγγραφής
review: Η αξιολόγησή μας
rules: Αποδοχή κανόνων
providers:
@@ -1601,7 +1602,7 @@ el:
blocking: Λίστα αποκλεισμού
bookmarks: Σελιδοδείκτες
domain_blocking: Λίστα αποκλεισμένων τομέων
- following: Λίστα ατόμων που ακολουθείτε
+ following: Λίστα λογαριασμών που ακολουθείτε
lists: Λίστες
muting: Λίστα αποσιωπήσεων
upload: Μεταφόρτωση
diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml
index 108c17149e..815378fbdd 100644
--- a/config/locales/en-GB.yml
+++ b/config/locales/en-GB.yml
@@ -1279,7 +1279,6 @@ en-GB:
progress:
confirm: Confirm email
details: Your details
- list: Sign up progress
review: Our review
rules: Accept rules
providers:
diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml
index c701683e82..c43de642a8 100644
--- a/config/locales/es-AR.yml
+++ b/config/locales/es-AR.yml
@@ -1279,6 +1279,7 @@ es-AR:
progress:
confirm: Confirmar correo electrónico
details: Tus detalles
+ list: Proceso de registro
review: Nuestra reseña
rules: Aceptar reglas
providers:
diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml
index bf05a6d405..1710a61fe8 100644
--- a/config/locales/es-MX.yml
+++ b/config/locales/es-MX.yml
@@ -1279,6 +1279,7 @@ es-MX:
progress:
confirm: Confirmar dirección de correo
details: Tus detalles
+ list: Registrar el progreso
review: Nuestra revisión
rules: Aceptar reglas
providers:
diff --git a/config/locales/fi.yml b/config/locales/fi.yml
index 66b29268b5..551bb1ffa3 100644
--- a/config/locales/fi.yml
+++ b/config/locales/fi.yml
@@ -1279,6 +1279,7 @@ fi:
progress:
confirm: Vahvista sähköpostiosoite
details: Omat tietosi
+ list: Rekisteröitymisprosessi
review: Arviomme
rules: Hyväksy säännöt
providers:
diff --git a/config/locales/gl.yml b/config/locales/gl.yml
index 7c59072d8f..b16f32631a 100644
--- a/config/locales/gl.yml
+++ b/config/locales/gl.yml
@@ -1279,6 +1279,7 @@ gl:
progress:
confirm: Confirmar correo
details: Detalles
+ list: Progreso da creación da conta
review: A nosa revisión
rules: Aceptar regras
providers:
diff --git a/config/locales/he.yml b/config/locales/he.yml
index 62bbecccd1..b473c34a81 100644
--- a/config/locales/he.yml
+++ b/config/locales/he.yml
@@ -1321,6 +1321,7 @@ he:
progress:
confirm: אימות כתובת הדואל
details: הפרטים שלך
+ list: התקדמות תהליך ההרשמה
review: הבדיקה שלנו
rules: הסכמה לתקנות
providers:
diff --git a/config/locales/is.yml b/config/locales/is.yml
index d173cc31c7..19808132a2 100644
--- a/config/locales/is.yml
+++ b/config/locales/is.yml
@@ -1283,6 +1283,7 @@ is:
progress:
confirm: Staðfesta tölvupóstfang
details: Nánari upplýsingar þínar
+ list: Nýskráningarferli
review: Yfirferð okkar
rules: Samþykkja reglur
providers:
diff --git a/config/locales/it.yml b/config/locales/it.yml
index b42af3c673..987464371f 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -1279,6 +1279,7 @@ it:
progress:
confirm: Conferma l'e-mail
details: I tuoi dettagli
+ list: Stato della registrazione
review: La nostra revisione
rules: Accetta le regole
providers:
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index ffa8a49459..24b59990fb 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -1279,6 +1279,7 @@ nl:
progress:
confirm: E-mailadres bevestigen
details: Jouw gegevens
+ list: Voortgang aanmelding
review: Onze beoordeling
rules: Regels accepteren
providers:
diff --git a/config/locales/sq.yml b/config/locales/sq.yml
index 9daddea9c4..4ac19efd40 100644
--- a/config/locales/sq.yml
+++ b/config/locales/sq.yml
@@ -1268,6 +1268,7 @@ sq:
progress:
confirm: Ripohoni email-in
details: Hollësitë tuaja
+ list: Ecuri regjistrimi
review: Shqyrtimi ynë
rules: Pranoni rregulla
providers:
diff --git a/config/locales/tr.yml b/config/locales/tr.yml
index 4744417181..f7971c84c5 100644
--- a/config/locales/tr.yml
+++ b/config/locales/tr.yml
@@ -1279,6 +1279,7 @@ tr:
progress:
confirm: E-postanızı onaylayın
details: Ayrıntılarınız
+ list: Kayıt ilerlemesi
review: İncelememiz
rules: Kabul kuralları
providers:
diff --git a/config/locales/vi.yml b/config/locales/vi.yml
index 4c470d2e6c..7fb70916e5 100644
--- a/config/locales/vi.yml
+++ b/config/locales/vi.yml
@@ -1258,6 +1258,7 @@ vi:
progress:
confirm: Xác nhận email
details: Điền thông tin
+ list: Quy trình đăng ký
review: Đợi duyệt
rules: Đọc nội quy
providers:
diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml
index da5d7ae2c9..79ebb5fe00 100644
--- a/config/locales/zh-CN.yml
+++ b/config/locales/zh-CN.yml
@@ -1258,6 +1258,7 @@ zh-CN:
progress:
confirm: 确认邮箱
details: 你的详细信息
+ list: 注册流程
review: 我们的审核
rules: 接受规则
providers:
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
index d7c00ec9df..90b9077c3c 100644
--- a/config/locales/zh-TW.yml
+++ b/config/locales/zh-TW.yml
@@ -1260,6 +1260,7 @@ zh-TW:
progress:
confirm: 驗證電子郵件地址
details: 您的個人資料
+ list: 註冊流程
review: 我們的審核
rules: 接受規則
providers:
diff --git a/db/migrate/20260209143307_glitch_migrate_user_skin.rb b/db/migrate/20260209143307_glitch_migrate_user_skin.rb
index c0cb993749..281096d365 100644
--- a/db/migrate/20260209143307_glitch_migrate_user_skin.rb
+++ b/db/migrate/20260209143307_glitch_migrate_user_skin.rb
@@ -8,7 +8,7 @@ class GlitchMigrateUserSkin < ActiveRecord::Migration[8.0]
def up
User.where.not(settings: nil).find_each do |user|
- settings = Oj.load(user.attributes_before_type_cast['settings'])
+ settings = JSON.parse(user.attributes_before_type_cast['settings'])
next if settings.nil? || settings['skin'].blank? || %w(system default mastodon-light contrast).exclude?(settings['skin'])
case settings['skin']
@@ -25,7 +25,7 @@ class GlitchMigrateUserSkin < ActiveRecord::Migration[8.0]
settings['skin'] = 'default'
- user.update_column('settings', Oj.dump(settings))
+ user.update_column('settings', JSON.generate(settings))
end
end
end
diff --git a/spec/models/form/redirect_spec.rb b/spec/models/form/redirect_spec.rb
index 4427a0bb86..afd10c3ccb 100644
--- a/spec/models/form/redirect_spec.rb
+++ b/spec/models/form/redirect_spec.rb
@@ -29,4 +29,11 @@ RSpec.describe Form::Redirect do
end
end
end
+
+ describe 'Normalizations' do
+ it { is_expected.to normalize(:acct).from(nil).to('') }
+ it { is_expected.to normalize(:acct).from(' @username ').to('username') }
+
+ it { is_expected.to normalize(:current_username).from(' @username ').to('username') }
+ end
end
diff --git a/spec/services/backup_service_spec.rb b/spec/services/backup_service_spec.rb
index 1dcebc24d2..1ca5600097 100644
--- a/spec/services/backup_service_spec.rb
+++ b/spec/services/backup_service_spec.rb
@@ -10,7 +10,9 @@ RSpec.describe BackupService do
let!(:status) { Fabricate(:status, account: user.account, text: 'Hello', visibility: :public, media_attachments: [attachment]) }
let!(:private_status) { Fabricate(:status, account: user.account, text: 'secret', visibility: :private) }
let!(:favourite) { Fabricate(:favourite, account: user.account) }
+ let!(:more_favourite) { Fabricate(:favourite, account: user.account) }
let!(:bookmark) { Fabricate(:bookmark, account: user.account) }
+ let!(:more_bookmark) { Fabricate(:bookmark, account: user.account) }
let!(:backup) { Fabricate(:backup, user: user) }
def read_zip_file(backup, filename)
@@ -71,21 +73,27 @@ RSpec.describe BackupService do
end
def expect_likes_export
- json = export_json(:likes)
-
- aggregate_failures do
- expect(json['type']).to eq 'OrderedCollection'
- expect(json['orderedItems']).to eq [ActivityPub::TagManager.instance.uri_for(favourite.status)]
- end
+ expect(export_json(:likes).deep_symbolize_keys)
+ .to include(
+ id: 'likes.json',
+ type: 'OrderedCollection',
+ orderedItems: contain_exactly(
+ ActivityPub::TagManager.instance.uri_for(favourite.status),
+ ActivityPub::TagManager.instance.uri_for(more_favourite.status)
+ )
+ )
end
def expect_bookmarks_export
- json = export_json(:bookmarks)
-
- aggregate_failures do
- expect(json['type']).to eq 'OrderedCollection'
- expect(json['orderedItems']).to eq [ActivityPub::TagManager.instance.uri_for(bookmark.status)]
- end
+ expect(export_json(:bookmarks).deep_symbolize_keys)
+ .to include(
+ id: 'bookmarks.json',
+ type: 'OrderedCollection',
+ orderedItems: contain_exactly(
+ ActivityPub::TagManager.instance.uri_for(bookmark.status),
+ ActivityPub::TagManager.instance.uri_for(more_bookmark.status)
+ )
+ )
end
def export_json_raw(type)
diff --git a/spec/system/settings/migration/redirects_spec.rb b/spec/system/settings/migration/redirects_spec.rb
index b59be5ac1f..11882c571d 100644
--- a/spec/system/settings/migration/redirects_spec.rb
+++ b/spec/system/settings/migration/redirects_spec.rb
@@ -32,6 +32,19 @@ RSpec.describe 'Settings Migration Redirects' do
.to have_content(I18n.t('migrations.cancelled_msg'))
end
+ context 'when user has blank encrypted password' do
+ before { user.update! encrypted_password: '' }
+
+ it 'saves a redirect via username confirmation' do
+ visit new_settings_migration_redirect_path
+
+ fill_in 'form_redirect_acct', with: 'new@example.host'
+ fill_in 'form_redirect_current_username', with: " @#{user.account.username} "
+ expect { click_on I18n.t('migrations.set_redirect') }
+ .to(change { user.reload.account.moved_to_account_id }.from(nil))
+ end
+ end
+
private
def stub_resolver