forked from potsda.mn/mobilizon
Merge branch 'fixes' into 'main'
make recipient field placeholder translatable and an AP fix Closes #1378 See merge request framasoft/mobilizon!1493
This commit is contained in:
commit
c8f85df3db
|
@ -165,6 +165,10 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do
|
|||
"todos" => %{
|
||||
"@id" => "mz:todos",
|
||||
"@type" => "@id"
|
||||
},
|
||||
"status" => %{
|
||||
"@id" => "ical:status",
|
||||
"@type" => "ical:status"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -81,7 +81,11 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do
|
|||
external_participation_url: object["externalParticipationUrl"],
|
||||
options: options,
|
||||
metadata: metadata,
|
||||
status: object |> Map.get("ical:status", "CONFIRMED") |> String.downcase(),
|
||||
# Remove fallback in MBZ 5.x
|
||||
status:
|
||||
object
|
||||
|> Map.get("status", Map.get(object, "ical:status", "CONFIRMED"))
|
||||
|> String.downcase(),
|
||||
online_address: object |> Map.get("attachment", []) |> get_online_address(),
|
||||
phone_address: object["phoneAddress"],
|
||||
draft: object["draft"] == true,
|
||||
|
@ -142,7 +146,9 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do
|
|||
"anonymousParticipationEnabled" => event.options.anonymous_participation,
|
||||
"attachment" => Enum.map(event.metadata, &EventMetadataConverter.metadata_to_as/1),
|
||||
"draft" => event.draft,
|
||||
# Remove me in MBZ 5.x
|
||||
"ical:status" => event.status |> to_string |> String.upcase(),
|
||||
"status" => event.status |> to_string |> String.upcase(),
|
||||
"id" => event.url,
|
||||
"url" => event.url,
|
||||
"inLanguage" => event.language,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:allow-new="false"
|
||||
:open-on-focus="false"
|
||||
field="displayName"
|
||||
placeholder="Add a recipient"
|
||||
:placeholder="t('Add a recipient')"
|
||||
@typing="getActors"
|
||||
>
|
||||
<template #default="props">
|
||||
|
@ -23,6 +23,7 @@ import { Paginate } from "@/types/paginate";
|
|||
import { useLazyQuery } from "@vue/apollo-composable";
|
||||
import { computed, ref } from "vue";
|
||||
import ActorInline from "./ActorInline.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: IActor[];
|
||||
|
@ -41,6 +42,8 @@ const modelValueWithDisplayName = computed(() =>
|
|||
}))
|
||||
);
|
||||
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
const {
|
||||
load: loadSearchPersonsAndGroupsQuery,
|
||||
refetch: refetchSearchPersonsAndGroupsQuery,
|
||||
|
|
|
@ -1636,5 +1636,7 @@
|
|||
"Either your participation has already been cancelled, either the validation token is incorrect.": "Either your participation has already been cancelled, either the validation token is incorrect.",
|
||||
"Your participation has been cancelled": "Your participation has been cancelled",
|
||||
"Return to the event page": "Return to the event page",
|
||||
"Cancel participation": "Cancel participation"
|
||||
"Cancel participation": "Cancel participation",
|
||||
"Add a recipient": "Add a recipient",
|
||||
"Announcements for {eventTitle}": "Announcements for {eventTitle}"
|
||||
}
|
|
@ -1630,5 +1630,7 @@
|
|||
"Either your participation has already been cancelled, either the validation token is incorrect.": "Soit votre participation a déjà été annulée, soit le jeton de validation est incorrect.",
|
||||
"Your participation has been cancelled": "Votre participation a été annulée",
|
||||
"Return to the event page": "Retourner à la page de l'événement",
|
||||
"Cancel participation": "Annuler la participation"
|
||||
"Cancel participation": "Annuler la participation",
|
||||
"Add a recipient": "Ajouter un·e destinataire",
|
||||
"Announcements for {eventTitle}": "Annonces pour {eventTitle}"
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.EventsTest do
|
|||
"name" => @event_title,
|
||||
"repliesModerationOption" => nil,
|
||||
"startTime" => @event_begins_on,
|
||||
"status" => "CONFIRMED",
|
||||
"tag" => [],
|
||||
"to" => [@ap_public],
|
||||
"type" => "Event"
|
||||
|
@ -96,6 +97,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.EventsTest do
|
|||
"name" => @event_title,
|
||||
"repliesModerationOption" => nil,
|
||||
"startTime" => @event_begins_on,
|
||||
"status" => "CONFIRMED",
|
||||
"tag" => [],
|
||||
"to" => [^followers_url],
|
||||
"type" => "Event"
|
||||
|
@ -152,6 +154,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.EventsTest do
|
|||
"name" => @event_title,
|
||||
"repliesModerationOption" => nil,
|
||||
"startTime" => @event_begins_on,
|
||||
"status" => "CONFIRMED",
|
||||
"tag" => [],
|
||||
"to" => [@ap_public],
|
||||
"type" => "Event"
|
||||
|
@ -200,6 +203,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.EventsTest do
|
|||
"name" => @event_updated_title,
|
||||
"repliesModerationOption" => nil,
|
||||
"startTime" => @event_begins_on,
|
||||
"status" => "CONFIRMED",
|
||||
"tag" => [],
|
||||
"to" => [@ap_public],
|
||||
"type" => "Event"
|
||||
|
@ -260,6 +264,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.EventsTest do
|
|||
"name" => @event_updated_title,
|
||||
"repliesModerationOption" => nil,
|
||||
"startTime" => @event_begins_on,
|
||||
"status" => "CONFIRMED",
|
||||
"tag" => [],
|
||||
"to" => [@ap_public],
|
||||
"type" => "Event"
|
||||
|
@ -320,6 +325,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.EventsTest do
|
|||
"name" => @event_updated_title,
|
||||
"repliesModerationOption" => nil,
|
||||
"startTime" => @event_begins_on,
|
||||
"status" => "CONFIRMED",
|
||||
"tag" => [],
|
||||
"to" => [@ap_public],
|
||||
"type" => "Event"
|
||||
|
|
Loading…
Reference in a new issue