From f66a7860291e6b2fef1844b580c22296dbad9202 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Mar 2018 09:33:14 +0100 Subject: [PATCH 1/7] Hide floating action button on thread views (#6859) --- .../mastodon/features/ui/components/columns_area.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index e82c46402..05cdb4e3b 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -28,6 +28,8 @@ const componentMap = { 'LIST': ListTimeline, }; +const shouldHideFAB = path => path.match(/^\/statuses\//); + @component => injectIntl(component, { withRef: true }) export default class ColumnsArea extends ImmutablePureComponent { @@ -153,7 +155,7 @@ export default class ColumnsArea extends ImmutablePureComponent { this.pendingIndex = null; if (singleColumn) { - const floatingActionButton = this.context.router.history.location.pathname === '/statuses/new' ? null : ; + const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : ; return columnIndex !== -1 ? [ From 6f531d140b8398a4680567934fe66cb0ca465fbc Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 22 Mar 2018 10:45:48 +0100 Subject: [PATCH 2/7] Fix MENTION_RE to not match nil usernames (#6862) --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index 14269860f..c88c6ec44 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -48,7 +48,7 @@ class Account < ApplicationRecord USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.]+[a-z0-9_]+)?/i - MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE}?)(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i + MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i include AccountAvatar include AccountFinderConcern From da70aca28eaa68f21c450c8f7b6ecb6168d29941 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Mar 2018 11:30:22 +0100 Subject: [PATCH 3/7] Restore username validation to disallow dots, for now (#6863) Usernames with dots in them do not work with routes, because the dot usually separates the desired page format (e.g. json). I don't want to mess with changing route constraints for this patch release. --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index c88c6ec44..9a83d979f 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -69,7 +69,7 @@ class Account < ApplicationRecord validates :username, uniqueness: { scope: :domain, case_sensitive: true }, if: -> { !local? && will_save_change_to_username? } # Local user validations - validates :username, format: { with: /\A#{USERNAME_RE}\z/i }, length: { maximum: 30 }, if: -> { local? && will_save_change_to_username? } + validates :username, format: { with: /\A[a-z0-9_]+\z/i }, length: { maximum: 30 }, if: -> { local? && will_save_change_to_username? } validates_with UniqueUsernameValidator, if: -> { local? && will_save_change_to_username? } validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? } validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? } From 9fe1619db94e3267b263633ecd4d05a840064215 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Mar 2018 11:31:17 +0100 Subject: [PATCH 4/7] Do not re-query mentions from serializers (#6858) Fix performance regression from #6836 --- app/serializers/activitypub/note_serializer.rb | 2 +- app/serializers/rest/status_serializer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index abaf29047..ddafb540d 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -57,7 +57,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer end def virtual_tags - object.mentions.order(:id) + object.tags + object.emojis + object.mentions.to_a.sort_by(&:id) + object.tags + object.emojis end def atom_uri diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 67da92cd5..fe3dc9bfc 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -87,7 +87,7 @@ class REST::StatusSerializer < ActiveModel::Serializer end def ordered_mentions - object.mentions.order(:id) + object.mentions.to_a.sort_by(&:id) end class ApplicationSerializer < ActiveModel::Serializer From dafae9818da27573fdd872cfdb8680fdbca3fdd8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Mar 2018 11:31:52 +0100 Subject: [PATCH 5/7] Bump version to 2.3.2rc5 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 80650761a..035aafa9d 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc4' + 'rc5' end def to_a From 6cc432bbc4b6ba64f71e559e7614144c2610eda1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Mar 2018 14:13:46 +0100 Subject: [PATCH 6/7] Bump version to 2.3.2 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 035aafa9d..121c5c693 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc5' + '' end def to_a From ecdc5957a34b7f7a7a342c631690802d79d13f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Fri, 23 Mar 2018 10:52:25 +0100 Subject: [PATCH 7/7] [i18n] Occitan update (#6869) * Update oc.yml * Update simple_form.oc.yml * Update oc.json * Update oc.yml * bundle exec i18n-tasks normalize --- app/javascript/mastodon/locales/oc.json | 44 ++++++++++++------------- config/locales/oc.yml | 39 ++++++++++++++++++++-- config/locales/simple_form.oc.yml | 2 ++ 3 files changed, 60 insertions(+), 25 deletions(-) diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index c7a26c1c6..f93fe29f6 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -1,9 +1,9 @@ { "account.block": "Blocar @{name}", "account.block_domain": "Tot amagar del domeni {domain}", - "account.blocked": "Blocked", + "account.blocked": "Blocat", "account.disclaimer_full": "Aquelas informacions de perfil pòdon èsser incomplètas.", - "account.domain_blocked": "Domain hidden", + "account.domain_blocked": "Domeni amagat", "account.edit_profile": "Modificar lo perfil", "account.follow": "Sègre", "account.followers": "Seguidors", @@ -15,9 +15,9 @@ "account.moved_to": "{name} a mudat los catons a :", "account.mute": "Rescondre @{name}", "account.mute_notifications": "Rescondre las notificacions de @{name}", - "account.muted": "Muted", - "account.posts": "Estatuts", - "account.posts_with_replies": "Toots with replies", + "account.muted": "Mes en silenci", + "account.posts": "Tuts", + "account.posts_with_replies": "Tuts amb responsas", "account.report": "Senhalar @{name}", "account.requested": "Invitacion mandada. Clicatz per anullar", "account.share": "Partejar lo perfil a @{name}", @@ -60,10 +60,10 @@ "compose_form.placeholder": "A de qué pensatz ?", "compose_form.publish": "Tut", "compose_form.publish_loud": "{publish} !", - "compose_form.sensitive.marked": "Media is marked as sensitive", - "compose_form.sensitive.unmarked": "Media is not marked as sensitive", - "compose_form.spoiler.marked": "Text is hidden behind warning", - "compose_form.spoiler.unmarked": "Text is not hidden", + "compose_form.sensitive.marked": "Lo mèdia es marcat coma sensible", + "compose_form.sensitive.unmarked": "Lo mèdia es pas marcat coma sensible", + "compose_form.spoiler.marked": "Lo tèxte es rescondut jos l’avertiment", + "compose_form.spoiler.unmarked": "Lo tèxte es pas rescondut", "compose_form.spoiler_placeholder": "Escrivètz l’avertiment aquí", "confirmation_modal.cancel": "Anullar", "confirmations.block.confirm": "Blocar", @@ -207,28 +207,28 @@ "privacy.unlisted.short": "Pas-listat", "regeneration_indicator.label": "Cargament…", "regeneration_indicator.sublabel": "Sèm a preparar vòstre flux d’acuèlh !", - "relative_time.days": "fa {number}d", + "relative_time.days": "fa {number} d", "relative_time.hours": "fa {number}h", "relative_time.just_now": "ara", - "relative_time.minutes": "fa {number}min", + "relative_time.minutes": "fa {number} min", "relative_time.seconds": "fa {number}s", "reply_indicator.cancel": "Anullar", - "report.forward": "Forward to {target}", - "report.forward_hint": "The account is from another server. Send an anonymized copy of the report there as well?", - "report.hint": "The report will be sent to your instance moderators. You can provide an explanation of why you are reporting this account below:", + "report.forward": "Far sègre a {target}", + "report.forward_hint": "Lo compte ven d’un autre servidor. Volètz mandar una còpia anonima del rapòrt enlai tanben ?", + "report.hint": "Lo moderator de l’instància aurà lo rapòrt. Podètz fornir una explicacion de vòstre senhalament aquí dejós :", "report.placeholder": "Comentaris addicionals", "report.submit": "Mandar", "report.target": "Senhalar {target}", "search.placeholder": "Recercar", "search_popout.search_format": "Format recèrca avançada", - "search_popout.tips.full_text": "Simple text returns statuses you have written, favourited, boosted, or have been mentioned in, as well as matching usernames, display names, and hashtags.", + "search_popout.tips.full_text": "Un tèxte simple que tòrna los estatuts qu’avètz escriches, mes en favorits, partejats, o ont sètz mencionat, e tanben los noms d’utilizaires, escais-noms e etiquetas que correspondonas.", "search_popout.tips.hashtag": "etiqueta", "search_popout.tips.status": "estatut", "search_popout.tips.text": "Lo tèxt brut tòrna escais, noms d’utilizaire e etiquetas correspondents", "search_popout.tips.user": "utilizaire", - "search_results.accounts": "People", - "search_results.hashtags": "Hashtags", - "search_results.statuses": "Toots", + "search_results.accounts": "Monde", + "search_results.hashtags": "Etiquetas", + "search_results.statuses": "Tuts", "search_results.total": "{count, number} {count, plural, one {resultat} other {resultats}}", "standalone.public_title": "Una ulhada dedins…", "status.block": "Blocar @{name}", @@ -244,7 +244,7 @@ "status.mute_conversation": "Rescondre la conversacion", "status.open": "Desplegar aqueste estatut", "status.pin": "Penjar al perfil", - "status.pinned": "Pinned toot", + "status.pinned": "Tut penjat", "status.reblog": "Partejar", "status.reblogged_by": "{name} a partejat", "status.reply": "Respondre", @@ -254,9 +254,9 @@ "status.sensitive_warning": "Contengut sensible", "status.share": "Partejar", "status.show_less": "Tornar plegar", - "status.show_less_all": "Show less for all", + "status.show_less_all": "Los tornar plegar totes", "status.show_more": "Desplegar", - "status.show_more_all": "Show more for all", + "status.show_more_all": "Los desplegar totes", "status.unmute_conversation": "Tornar mostrar la conversacion", "status.unpin": "Tirar del perfil", "tabs_bar.federated_timeline": "Flux public global", @@ -267,7 +267,7 @@ "upload_area.title": "Lisatz e depausatz per mandar", "upload_button.label": "Ajustar un mèdia", "upload_form.description": "Descripcion pels mal vesents", - "upload_form.focus": "Crop", + "upload_form.focus": "Retalhar", "upload_form.undo": "Anullar", "upload_progress.label": "Mandadís…", "video.close": "Tampar la vidèo", diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 160bbc3ed..49b1df8bf 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -193,7 +193,7 @@ oc: create: Crear blocatge hint: Lo blocatge empacharà pas la creacion de compte dins la basa de donadas, mai aplicarà la moderacion sus aquestes comptes. severity: - desc_html: "Silenci farà venir invisibles los estatuts del compte al mond que son pas de seguidors. Suspendre levarà tot lo contengut del compte, los mèdias e las donadas de perfil." + desc_html: "Silenci farà venir invisibles los estatuts del compte al monde que son pas de seguidors. Suspendre levarà tot lo contengut del compte, los mèdias e las donadas de perfil. Utilizatz Cap se volètz regetar totes los mèdias." noop: Cap silence: Silenci suspend: Suspendre @@ -273,6 +273,9 @@ oc: contact_information: email: Picatz una adreça de corrièl username: Picatz un nom d’utilizaire + hero: + desc_html: Mostrat en primièra pagina. Almens 600x100px recomandat. S’es pas configurat l’imatge de l’instància serà mostrat + title: Imatge de l’eròi peers_api_enabled: desc_html: Noms de domeni qu’aquesta instància a trobats pel fediverse title: Publica la lista de las instàncias conegudas @@ -289,6 +292,9 @@ oc: open: desc_html: Autorizar lo mond a se marcar title: Inscripcions + show_known_fediverse_at_about_page: + desc_html: Un còp activat mostrarà los tuts de totes los fediverse dins l’apercebut. Autrament mostrarà pas que los tuts locals. + title: Mostrar los fediverse coneguts dins l’apercebut del flux show_staff_badge: desc_html: Mostrar lo badge Personal sus la pagina de perfil title: Mostrar lo badge personal @@ -353,6 +359,8 @@ oc: your_token: Vòstre geton d’accès auth: agreement_html: En vos marcar acceptatz las règlas de l’instància e politica de confidencialitat. + change_password: Senhal + confirm_email: Confirmar lo corrièl delete_account: Suprimir lo compte delete_account_html: Se volètz suprimir vòstre compte, podètz o far aquí. Vos demandarem que confirmetz. didnt_get_confirmation: Avètz pas recebut las instruccions de confirmacion ? @@ -362,10 +370,13 @@ oc: logout: Se desconnectar migrate_account: Mudar endacòm mai migrate_account_html: Se volètz mandar los visitors d’aqueste compte a un autre, podètz o configurar aquí. + or: o + or_log_in_with: O autentificatz-vos amb providers: cas: CAS saml: SAML register: Se marcar + register_elsewhere: Se marcar endacòm mai resend_confirmation: Tornar mandar las instruccions de confirmacion reset_password: Reïnicializar lo senhal security: Seguretat @@ -493,6 +504,13 @@ oc: title: Aquesta pagina es incorrècta noscript_html: Per utilizar l’aplicacion web de Mastodon, mercés d’activar JavaScript. O podètz utilizar una aplicacion per vòstra plataforma coma alernativa. exports: + archive_takeout: + date: Data + download: Telecargar vòstre archiu + hint_html: Podètz demandar un archiu de vòstres tuts e mèdias enviats. Las donadas exportadas seràn al format ActivityPub, ligible pels logicials compatibles. + in_progress: Complilacion de vòstre archiu... + request: Demandar vòstre archiu + size: Talha blocks: Personas que blocatz csv: CSV follows: Personas que seguètz @@ -565,7 +583,7 @@ oc: notification_mailer: digest: action: Veire totas las notificacions - body: 'Trobatz aquí un resumit dels messatges qu’avètz mancats dempuèi vòstra darrièra visita lo %{since} :' + body: Trobatz aquí un resumit dels messatges qu’avètz mancats dempuèi vòstra darrièra visita lo %{since} mention: "%{name} vos a mencionat dins :" new_followers_summary: one: Avètz un nòu seguidor dempuèi vòstra darrièra visita ! Ouà ! @@ -608,7 +626,9 @@ oc: trillion: T unit: '' pagination: + newer: Mai recent next: Seguent + older: Mai ancian prev: Precedent truncate: "…" preferences: @@ -692,6 +712,14 @@ oc: two_factor_authentication: Autentificacion en dos temps your_apps: Vòstras aplicacions statuses: + attached: + description: 'Ajustat : %{attached}' + image: + one: "%{count} imatge" + other: "%{count} imatges" + video: + one: "%{count} vidèo" + other: "%{count} vidèos" open_in_web: Dobrir sul web over_character_limit: limit de %{max} caractèrs passat pin_errors: @@ -799,10 +827,14 @@ oc: manual_instructions: 'Se podètz pas numerizar lo còdi QR e que vos cal picar lo còdi a la man, vaquí lo còdi en clar :' recovery_codes: Salvar los còdis de recuperacion recovery_codes_regenerated: Los còdis de recuperacion son ben estats tornats generar - recovery_instructions_html: Se vos arriba de perdre vòstre mobil, podètz utilizar un dels còdis de recuperacion cai-jos per poder tornar accedir a vòstre compte. Gardatz los còdis en seguretat, per exemple, imprimissètz los e gardatz los amb vòstres documents importants. + recovery_instructions_html: Se vos arriba de perdre vòstre mobil, podètz utilizar un dels còdis de recuperacion cai-jos per poder tornar accedir a vòstre compte. Gardatz los còdis en seguretat, per exemple, imprimissètz los e gardatz los amb vòstres documents importants. setup: Paramètres wrong_code: Lo còdi picat es invalid ! L’ora es la bona sul servidor e lo mobil ? user_mailer: + backup_ready: + explanation: Avètz demandat una salvagarda complèta de vòstre compte Mastodon. Es prèsta per telecargament ! + subject: Vòstre archiu es prèst per telecargament + title: Archiu per emportar welcome: edit_profile_action: Configuracion del perfil edit_profile_step: Podètz personalizar lo perfil en mandar un avatard, cambiar l’escais-nom e mai. Se volètz repassar las demandas d’abonaments abans que los nòus seguidors pòscan veire vòstre perfil, podètz clavar vòstre compte. @@ -824,4 +856,5 @@ oc: users: invalid_email: L’adreça de corrièl es invalida invalid_otp_token: Còdi d’autentificacion en dos temps invalid + seamless_external_login: Sètz connectat via un servici extèrn, los paramètres de senhal e de corrièl son doncas pas disponibles. signed_in_as: 'Session a :' diff --git a/config/locales/simple_form.oc.yml b/config/locales/simple_form.oc.yml index addca75ce..690d1de20 100644 --- a/config/locales/simple_form.oc.yml +++ b/config/locales/simple_form.oc.yml @@ -45,6 +45,7 @@ oc: setting_default_privacy: Confidencialitat de las publicacions setting_default_sensitive: Totjorn marcar los mèdias coma sensibles setting_delete_modal: Afichar una fenèstra de confirmacion abans de suprimir un estatut + setting_display_sensitive_media: Totjorn mostrar los mèdias coma sensibles setting_noindex: Èsser pas indexat pels motors de recèrca setting_reduce_motion: Reduire la velocitat de las animacions setting_system_font_ui: Utilizar la polissa del sisèma @@ -53,6 +54,7 @@ oc: severity: Severitat type: Tip d’impòrt username: Nom d’utilizaire + username_or_email: Nom d’utilizaire o corrièl interactions: must_be_follower: Blocar las notificacions del mond que vos sègon pas must_be_following: Blocar las notificacions del mond que seguètz pas