From 94036b5854b0c851775fc6c65cfa5f5c2c83472a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 2 Oct 2020 09:52:47 +0200 Subject: [PATCH] Disallow accessing identity page when logged in And disallow calls to fetchPerson when not our own profile or unlogged Signed-off-by: Thomas Citharel --- .../views/Account/children/EditIdentity.vue | 9 + lib/graphql/error.ex | 24 +- lib/graphql/resolvers/person.ex | 31 +- priv/gettext/ar/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/be/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/ca/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/cs/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/de/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/en/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/errors.pot | 94 +++--- priv/gettext/es/LC_MESSAGES/errors.po | 96 ++++--- priv/gettext/fi/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/fr/LC_MESSAGES/errors.po | 267 +++++------------- priv/gettext/it/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/ja/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/nl/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/oc/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/pl/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/pt/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/pt_BR/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/ru/LC_MESSAGES/errors.po | 94 +++--- priv/gettext/sv/LC_MESSAGES/errors.po | 94 +++--- test/graphql/resolvers/person_test.exs | 98 +++---- 23 files changed, 1097 insertions(+), 1026 deletions(-) diff --git a/js/src/views/Account/children/EditIdentity.vue b/js/src/views/Account/children/EditIdentity.vue index f33bf4347..2ab01d65b 100644 --- a/js/src/views/Account/children/EditIdentity.vue +++ b/js/src/views/Account/children/EditIdentity.vue @@ -161,6 +161,9 @@ import identityEditionMixin from "../../../mixins/identityEdition"; return !this.identityName; }, update: (data) => new Person(data.fetchPerson), + error({ graphQLErrors }) { + this.handleErrors(graphQLErrors); + }, }, }, }) @@ -321,6 +324,12 @@ export default class EditIdentity extends mixins(identityEditionMixin) { } } + handleErrors(errors: any[]): void { + if (errors.some((error) => error.status_code === 401)) { + this.$router.push({ name: RouteName.LOGIN }); + } + } + // eslint-disable-next-line class-methods-use-this get getInstanceHost(): string { return MOBILIZON_INSTANCE_HOST; diff --git a/lib/graphql/error.ex b/lib/graphql/error.ex index 0399fdf11..9483fed5d 100644 --- a/lib/graphql/error.ex +++ b/lib/graphql/error.ex @@ -71,17 +71,23 @@ defmodule Mobilizon.GraphQL.Error do # Build Error Metadata # -------------------- - defp metadata(:unknown_resource), do: {400, "Unknown Resource"} - defp metadata(:invalid_argument), do: {400, "Invalid arguments passed"} - defp metadata(:unauthenticated), do: {401, "You need to be logged in"} - defp metadata(:password_hash_missing), do: {401, "Reset your password to login"} - defp metadata(:incorrect_password), do: {401, "Invalid credentials"} - defp metadata(:unauthorized), do: {403, "You don't have permission to do this"} - defp metadata(:not_found), do: {404, "Resource not found"} - defp metadata(:user_not_found), do: {404, "User not found"} + defp metadata(:unknown_resource), do: {400, dgettext("errors", "Unknown Resource")} + defp metadata(:invalid_argument), do: {400, dgettext("errors", "Invalid arguments passed")} + defp metadata(:unauthenticated), do: {401, dgettext("errors", "You need to be logged in")} + + defp metadata(:password_hash_missing), + do: {401, dgettext("errors", "Reset your password to login")} + + defp metadata(:incorrect_password), do: {401, dgettext("errors", "Invalid credentials")} + + defp metadata(:unauthorized), + do: {403, dgettext("errors", "You don't have permission to do this")} + + defp metadata(:not_found), do: {404, dgettext("errors", "Resource not found")} + defp metadata(:user_not_found), do: {404, dgettext("errors", "User not found")} defp metadata(:post_not_found), do: {404, dgettext("errors", "Post not found")} defp metadata(:event_not_found), do: {404, dgettext("errors", "Event not found")} - defp metadata(:unknown), do: {500, "Something went wrong"} + defp metadata(:unknown), do: {500, dgettext("errors", "Something went wrong")} defp metadata(code) do Logger.warn("Unhandled error code: #{inspect(code)}") diff --git a/lib/graphql/resolvers/person.ex b/lib/graphql/resolvers/person.ex index 9310da9f1..a3881679f 100644 --- a/lib/graphql/resolvers/person.ex +++ b/lib/graphql/resolvers/person.ex @@ -35,12 +35,18 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do @doc """ Find a person """ - def fetch_person(_parent, %{preferred_username: preferred_username}, _resolution) do - with {:ok, %Actor{} = actor} <- + def fetch_person(_parent, %{preferred_username: preferred_username}, %{ + context: %{current_user: %User{} = user} + }) do + with {:ok, %Actor{id: actor_id} = actor} <- ActivityPub.find_or_make_actor_from_nickname(preferred_username), + {:own, {:is_owned, _}} <- {:own, User.owns_actor(user, actor_id)}, actor <- proxify_pictures(actor) do {:ok, actor} else + {:own, nil} -> + {:error, :unauthorized} + _ -> {:error, dgettext("errors", "Person with username %{username} not found", @@ -49,6 +55,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do end end + def fetch_person(_parent, _args, _resolution), do: {:error, :unauthenticated} + def list_persons( _parent, %{ @@ -69,8 +77,15 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do Actors.list_actors(:Person, preferred_username, name, domain, local, suspended, page, limit)} end + def list_persons(_parent, _args, %{ + context: %{current_user: %User{role: role}} + }) + when not is_moderator(role) do + {:error, :unauthorized} + end + def list_persons(_parent, _args, _resolution) do - {:error, dgettext("errors", "You need to be logged-in and a moderator to list persons")} + {:error, :unauthenticated} end @doc """ @@ -81,7 +96,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do end def get_current_person(_parent, _args, _resolution) do - {:error, dgettext("errors", "You need to be logged-in to view current person")} + {:error, :unauthenticated} end @doc """ @@ -92,7 +107,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do end def identities(_parent, _args, _resolution) do - {:error, dgettext("errors", "You need to be logged-in to view your list of identities")} + {:error, :unauthenticated} end @doc """ @@ -115,7 +130,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do This function is used to create more identities from an existing user """ def create_person(_parent, _args, _resolution) do - {:error, dgettext("errors", "You need to be logged-in to create a new identity")} + {:error, :unauthenticated} end @doc """ @@ -144,7 +159,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do end def update_person(_parent, _args, _resolution) do - {:error, dgettext("errors", "You need to be logged-in to update an identity")} + {:error, :unauthenticated} end @doc """ @@ -178,7 +193,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do end def delete_person(_parent, _args, _resolution) do - {:error, dgettext("errors", "You need to be logged-in to delete an identity")} + {:error, :unauthenticated} end defp last_identity?(user) do diff --git a/priv/gettext/ar/LC_MESSAGES/errors.po b/priv/gettext/ar/LC_MESSAGES/errors.po index 2e87d1644..0ea5c3f3f 100644 --- a/priv/gettext/ar/LC_MESSAGES/errors.po +++ b/priv/gettext/ar/LC_MESSAGES/errors.po @@ -181,7 +181,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -190,9 +190,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -379,12 +379,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -414,7 +414,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -478,7 +478,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -517,7 +517,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -573,12 +573,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -663,11 +663,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -708,11 +703,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -738,11 +728,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -768,11 +753,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -788,16 +768,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -839,6 +809,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/be/LC_MESSAGES/errors.po b/priv/gettext/be/LC_MESSAGES/errors.po index 1d4d39b83..9aae9af05 100644 --- a/priv/gettext/be/LC_MESSAGES/errors.po +++ b/priv/gettext/be/LC_MESSAGES/errors.po @@ -155,7 +155,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -164,9 +164,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -353,12 +353,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -388,7 +388,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -452,7 +452,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -491,7 +491,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -547,12 +547,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -637,11 +637,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -682,11 +677,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -712,11 +702,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -742,11 +727,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -762,16 +742,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -813,6 +783,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/ca/LC_MESSAGES/errors.po b/priv/gettext/ca/LC_MESSAGES/errors.po index 99d820cb3..fc33a9a46 100644 --- a/priv/gettext/ca/LC_MESSAGES/errors.po +++ b/priv/gettext/ca/LC_MESSAGES/errors.po @@ -149,7 +149,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -158,9 +158,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -347,12 +347,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -382,7 +382,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -446,7 +446,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -485,7 +485,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -541,12 +541,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -631,11 +631,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -676,11 +671,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -706,11 +696,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -736,11 +721,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -756,16 +736,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -807,6 +777,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/cs/LC_MESSAGES/errors.po b/priv/gettext/cs/LC_MESSAGES/errors.po index 8dd94c845..d7008b71d 100644 --- a/priv/gettext/cs/LC_MESSAGES/errors.po +++ b/priv/gettext/cs/LC_MESSAGES/errors.po @@ -155,7 +155,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -164,9 +164,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -353,12 +353,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -388,7 +388,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -452,7 +452,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -491,7 +491,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -547,12 +547,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -637,11 +637,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -682,11 +677,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -712,11 +702,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -742,11 +727,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -762,16 +742,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -813,6 +783,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/de/LC_MESSAGES/errors.po b/priv/gettext/de/LC_MESSAGES/errors.po index 6848459a6..0b36ac3ff 100644 --- a/priv/gettext/de/LC_MESSAGES/errors.po +++ b/priv/gettext/de/LC_MESSAGES/errors.po @@ -149,7 +149,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -158,9 +158,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -347,12 +347,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -382,7 +382,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -446,7 +446,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -485,7 +485,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -541,12 +541,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -631,11 +631,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -676,11 +671,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -706,11 +696,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -736,11 +721,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -756,16 +736,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -807,6 +777,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/errors.po b/priv/gettext/en/LC_MESSAGES/errors.po index 77b43a410..55d96436f 100644 --- a/priv/gettext/en/LC_MESSAGES/errors.po +++ b/priv/gettext/en/LC_MESSAGES/errors.po @@ -159,7 +159,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -168,9 +168,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -357,12 +357,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -392,7 +392,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -456,7 +456,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -495,7 +495,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -551,12 +551,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -641,11 +641,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -686,11 +681,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -716,11 +706,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -746,11 +731,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -766,16 +746,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -817,6 +787,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot index ff7bcd484..0e30bcb97 100644 --- a/priv/gettext/errors.pot +++ b/priv/gettext/errors.pot @@ -156,7 +156,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -165,9 +165,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -354,12 +354,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -389,7 +389,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -453,7 +453,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -492,7 +492,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -548,12 +548,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -638,11 +638,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -683,11 +678,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -713,11 +703,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -743,11 +728,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -763,16 +743,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -814,6 +784,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/errors.po b/priv/gettext/es/LC_MESSAGES/errors.po index cababa37d..80308da89 100644 --- a/priv/gettext/es/LC_MESSAGES/errors.po +++ b/priv/gettext/es/LC_MESSAGES/errors.po @@ -157,7 +157,7 @@ msgid "No user to validate with this email was found" msgstr "No se encontró ningún usuario para validar con este correo electrónico" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "No se encontró ningún usuario con este correo electrónico" @@ -166,9 +166,9 @@ msgstr "No se encontró ningún usuario con este correo electrónico" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "El perfil no es propiedad del usuario autenticado" @@ -360,12 +360,12 @@ msgid "Anonymous participation is not enabled" msgstr "La participación anónima no está habilitada" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "No se puede eliminar al último administrador de un grupo" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "No se puede eliminar la última identidad de un usuario" @@ -395,7 +395,7 @@ msgid "Event id not found" msgstr "ID de evento no encontrado" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "Evento no encontrado" @@ -459,7 +459,7 @@ msgid "Person with ID %{id} not found" msgstr "Persona con ID%{id} no encontrada" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "Persona con nombre de usuario %{username} no encontrada" @@ -498,7 +498,7 @@ msgid "Profile is not member of group" msgstr "El perfil no es miembro del grupo" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "Perfil no encontrado" @@ -554,12 +554,12 @@ msgid "User doesn't own profile" msgstr "El usuario no posee el perfil" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "Usuario no encontrado" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "Ya tienes un perfil para este usuario" @@ -649,11 +649,6 @@ msgid "You need to be logged-in and a moderator to list action logs" msgstr "" "Debe iniciar sesión y un moderador para enumerar los registros de acción" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "Debe iniciar sesión y un moderador para enumerar personas" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -700,11 +695,6 @@ msgstr "Debe iniciar sesión para acceder a las discusiones" msgid "You need to be logged-in to access resources" msgstr "Debes iniciar sesión para acceder a los recursos" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "Debe iniciar sesión para crear una nueva identidad" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -730,11 +720,6 @@ msgstr "Debe iniciar sesión para crear recursos" msgid "You need to be logged-in to delete an event" msgstr "Debe iniciar sesión para eliminar un evento" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "Debe iniciar sesión para eliminar una identidad" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -760,11 +745,6 @@ msgstr "Debes iniciar sesión para salir de un evento" msgid "You need to be logged-in to update an event" msgstr "Debe iniciar sesión para actualizar un evento" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "Debe iniciar sesión para actualizar una identidad" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -780,16 +760,6 @@ msgstr "Debes iniciar sesión para actualizar los recursos" msgid "You need to be logged-in to view a resource preview" msgstr "Debe iniciar sesión para ver una vista previa del recurso" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "Debes iniciar sesión para ver la persona actual" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "Debe iniciar sesión para ver su lista de identidades" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -834,7 +804,47 @@ msgstr "" msgid "This email is already used." msgstr "" -#, elixir-format, fuzzy -#: lib/graphql/error.ex:82 +#, elixir-format +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "Informe no encontrado" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "Informe no encontrado" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "No tienes permiso para eliminar este token" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "Debes iniciar sesión para eliminar su cuenta" diff --git a/priv/gettext/fi/LC_MESSAGES/errors.po b/priv/gettext/fi/LC_MESSAGES/errors.po index f8b9292e3..adcfbd036 100644 --- a/priv/gettext/fi/LC_MESSAGES/errors.po +++ b/priv/gettext/fi/LC_MESSAGES/errors.po @@ -156,7 +156,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -165,9 +165,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -354,12 +354,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -389,7 +389,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -453,7 +453,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -492,7 +492,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -548,12 +548,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -638,11 +638,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -683,11 +678,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -713,11 +703,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -743,11 +728,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -763,16 +743,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -814,6 +784,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/fr/LC_MESSAGES/errors.po b/priv/gettext/fr/LC_MESSAGES/errors.po index 1390562c9..5cebee87a 100644 --- a/priv/gettext/fr/LC_MESSAGES/errors.po +++ b/priv/gettext/fr/LC_MESSAGES/errors.po @@ -8,7 +8,7 @@ # # to merge POT files into PO files. msgid "" msgstr "" -"PO-Revision-Date: 2020-10-01 14:04+0200\n" +"PO-Revision-Date: 2020-10-02 09:46+0200\n" "Last-Translator: Thomas Citharel \n" "Language-Team: French \n" "Language: fr\n" @@ -95,731 +95,590 @@ msgstr "doit être supérieur ou égal à %{number}" msgid "must be equal to %{number}" msgstr "doit être égal à %{number}" -#, elixir-format #: lib/graphql/resolvers/user.ex:103 msgid "Cannot refresh the token" msgstr "Impossible de rafraîchir le jeton" -#, elixir-format #: lib/graphql/resolvers/group.ex:139 lib/graphql/resolvers/group.ex:170 msgid "Creator profile is not owned by the current user" msgstr "Le profil créateur n'est pas possédé par l'utilisateur actuel" -#, elixir-format #: lib/graphql/resolvers/group.ex:201 msgid "Current profile is not a member of this group" msgstr "Le profil actuel n'est pas un membre de ce groupe" -#, elixir-format #: lib/graphql/resolvers/group.ex:205 msgid "Current profile is not an administrator of the selected group" msgstr "Le profil actuel n'est pas un·e administrateur·ice du groupe sélectionné" -#, elixir-format #: lib/graphql/resolvers/user.ex:514 msgid "Error while saving user settings" msgstr "Erreur lors de la sauvegarde des paramètres utilisateur" -#, elixir-format -#: lib/graphql/resolvers/group.ex:198 lib/graphql/resolvers/group.ex:246 -#: lib/graphql/resolvers/group.ex:281 lib/graphql/resolvers/member.ex:80 +#: lib/graphql/resolvers/group.ex:198 lib/graphql/resolvers/group.ex:246 lib/graphql/resolvers/group.ex:281 +#: lib/graphql/resolvers/member.ex:80 msgid "Group not found" msgstr "Groupe non trouvé" -#, elixir-format #: lib/graphql/resolvers/group.ex:69 msgid "Group with ID %{id} not found" msgstr "Groupe avec l'ID %{id} non trouvé" -#, elixir-format #: lib/graphql/resolvers/group.ex:41 lib/graphql/resolvers/group.ex:55 msgid "Group with name %{name} not found" msgstr "Groupe avec le nom %{name} non trouvé" -#, elixir-format #: lib/graphql/resolvers/user.ex:83 msgid "Impossible to authenticate, either your email or password are invalid." msgstr "Impossible de s'authentifier, votre adresse e-mail ou bien votre mot de passe sont invalides." -#, elixir-format #: lib/graphql/resolvers/group.ex:278 msgid "Member not found" msgstr "Membre non trouvé" -#, elixir-format -#: lib/graphql/resolvers/actor.ex:58 lib/graphql/resolvers/actor.ex:88 -#: lib/graphql/resolvers/user.ex:417 +#: lib/graphql/resolvers/actor.ex:58 lib/graphql/resolvers/actor.ex:88 lib/graphql/resolvers/user.ex:417 msgid "No profile found for the moderator user" msgstr "Aucun profil trouvé pour l'utilisateur modérateur" -#, elixir-format #: lib/graphql/resolvers/user.ex:195 msgid "No user to validate with this email was found" msgstr "Aucun·e utilisateur·ice à valider avec cet email n'a été trouvé·e" -#, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 -#: lib/graphql/resolvers/user.ex:219 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "Aucun·e utilisateur·ice avec cette adresse e-mail n'a été trouvé·e" -#, elixir-format -#: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 -#: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 -#: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 -#: lib/graphql/resolvers/todos.ex:57 +#: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 lib/graphql/resolvers/event.ex:281 +#: lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 lib/graphql/resolvers/member.ex:77 +#: lib/graphql/resolvers/participant.ex:29 lib/graphql/resolvers/participant.ex:163 +#: lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 lib/graphql/resolvers/person.ex:191 +#: lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 lib/graphql/resolvers/person.ex:301 +#: lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "Le profil n'est pas possédé par l'utilisateur connecté" -#, elixir-format #: lib/graphql/resolvers/user.ex:125 msgid "Registrations are not open" msgstr "Les inscriptions ne sont pas ouvertes" -#, elixir-format #: lib/graphql/resolvers/user.ex:330 msgid "The current password is invalid" msgstr "Le mot de passe actuel est invalid" -#, elixir-format #: lib/graphql/resolvers/user.ex:382 msgid "The new email doesn't seem to be valid" msgstr "La nouvelle adresse e-mail ne semble pas être valide" -#, elixir-format #: lib/graphql/resolvers/user.ex:379 msgid "The new email must be different" msgstr "La nouvelle adresse e-mail doit être différente" -#, elixir-format #: lib/graphql/resolvers/user.ex:333 msgid "The new password must be different" msgstr "Le nouveau mot de passe doit être différent" -#, elixir-format -#: lib/graphql/resolvers/user.ex:376 lib/graphql/resolvers/user.ex:439 -#: lib/graphql/resolvers/user.ex:442 +#: lib/graphql/resolvers/user.ex:376 lib/graphql/resolvers/user.ex:439 lib/graphql/resolvers/user.ex:442 msgid "The password provided is invalid" msgstr "Le mot de passe fourni est invalide" -#, elixir-format #: lib/graphql/resolvers/user.ex:337 msgid "The password you have chosen is too short. Please make sure your password contains at least 6 characters." msgstr "" "Le mot de passe que vous avez choisi est trop court. Merci de vous assurer que votre mot de passe contienne au moins " "6 caractères." -#, elixir-format #: lib/graphql/resolvers/user.ex:215 msgid "This user can't reset their password" msgstr "Cet·te utilisateur·ice ne peut pas réinitialiser son mot de passe" -#, elixir-format #: lib/graphql/resolvers/user.ex:79 msgid "This user has been disabled" msgstr "Cet·te utilisateur·ice a été désactivé·e" -#, elixir-format #: lib/graphql/resolvers/user.ex:179 msgid "Unable to validate user" msgstr "Impossible de valider l'utilisateur·ice" -#, elixir-format #: lib/graphql/resolvers/user.ex:420 msgid "User already disabled" msgstr "L'utilisateur·ice est déjà désactivé·e" -#, elixir-format #: lib/graphql/resolvers/user.ex:489 msgid "User requested is not logged-in" msgstr "L'utilisateur·ice demandé·e n'est pas connecté·e" -#, elixir-format #: lib/graphql/resolvers/group.ex:252 msgid "You are already a member of this group" msgstr "Vous êtes déjà membre de ce groupe" -#, elixir-format #: lib/graphql/resolvers/group.ex:285 msgid "You can't leave this group because you are the only administrator" msgstr "Vous ne pouvez pas quitter ce groupe car vous en êtes le ou la seul·e administrateur·ice" -#, elixir-format #: lib/graphql/resolvers/group.ex:249 msgid "You cannot join this group" msgstr "Vous ne pouvez pas rejoindre ce groupe" -#, elixir-format #: lib/graphql/resolvers/group.ex:97 msgid "You may not list groups unless moderator." msgstr "Vous ne pouvez pas lister les groupes sauf à être modérateur·ice." -#, elixir-format #: lib/graphql/resolvers/user.ex:387 msgid "You need to be logged-in to change your email" msgstr "Vous devez être connecté·e pour changer votre adresse e-mail" -#, elixir-format #: lib/graphql/resolvers/user.ex:345 msgid "You need to be logged-in to change your password" msgstr "Vous devez être connecté·e pour changer votre mot de passe" -#, elixir-format #: lib/graphql/resolvers/group.ex:210 msgid "You need to be logged-in to delete a group" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format #: lib/graphql/resolvers/user.ex:447 msgid "You need to be logged-in to delete your account" msgstr "Vous devez être connecté·e pour supprimer votre compte" -#, elixir-format #: lib/graphql/resolvers/group.ex:257 msgid "You need to be logged-in to join a group" msgstr "Vous devez être connecté·e pour rejoindre un groupe" -#, elixir-format #: lib/graphql/resolvers/group.ex:290 msgid "You need to be logged-in to leave a group" msgstr "Vous devez être connecté·e pour quitter un groupe" -#, elixir-format #: lib/graphql/resolvers/group.ex:175 msgid "You need to be logged-in to update a group" msgstr "Vous devez être connecté·e pour mettre à jour un groupe" -#, elixir-format #: lib/graphql/resolvers/user.ex:58 msgid "You need to have admin access to list users" msgstr "Vous devez avoir un accès administrateur pour lister les utilisateur·ices" -#, elixir-format #: lib/graphql/resolvers/user.ex:108 msgid "You need to have an existing token to get a refresh token" msgstr "Vous devez avoir un jeton existant pour obtenir un jeton de rafraîchissement" -#, elixir-format #: lib/graphql/resolvers/user.ex:198 lib/graphql/resolvers/user.ex:222 msgid "You requested again a confirmation email too soon" msgstr "Vous avez à nouveau demandé un email de confirmation trop vite" -#, elixir-format #: lib/graphql/resolvers/user.ex:128 msgid "Your email is not on the allowlist" msgstr "Votre adresse e-mail n'est pas sur la liste d'autorisations" -#, elixir-format #: lib/graphql/resolvers/actor.ex:64 lib/graphql/resolvers/actor.ex:94 msgid "Error while performing background task" msgstr "Erreur lors de l'exécution d'une tâche d'arrière-plan" -#, elixir-format #: lib/graphql/resolvers/actor.ex:27 msgid "No profile found with this ID" msgstr "Aucun profil trouvé avec cet ID" -#, elixir-format #: lib/graphql/resolvers/actor.ex:54 lib/graphql/resolvers/actor.ex:91 msgid "No remote profile found with this ID" msgstr "Aucun profil distant trouvé avec cet ID" -#, elixir-format #: lib/graphql/resolvers/actor.ex:69 msgid "Only moderators and administrators can suspend a profile" msgstr "Seul·es les modérateur·ice et les administrateur·ices peuvent suspendre un profil" -#, elixir-format #: lib/graphql/resolvers/actor.ex:99 msgid "Only moderators and administrators can unsuspend a profile" msgstr "Seul·es les modérateur·ice et les administrateur·ices peuvent annuler la suspension d'un profil" -#, elixir-format #: lib/graphql/resolvers/actor.ex:24 msgid "Only remote profiles may be refreshed" msgstr "Seuls les profils distants peuvent être rafraîchis" -#, elixir-format #: lib/graphql/resolvers/actor.ex:61 msgid "Profile already suspended" msgstr "Le profil est déjà suspendu" -#, elixir-format #: lib/graphql/resolvers/participant.ex:96 msgid "A valid email is required by your instance" msgstr "Une adresse e-mail valide est requise par votre instance" -#, elixir-format #: lib/graphql/resolvers/participant.ex:90 msgid "Anonymous participation is not enabled" msgstr "La participation anonyme n'est pas activée" -#, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "Impossible de supprimer le ou la dernier·ère administrateur·ice d'un groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "Impossible de supprimer le dernier profil d'un·e utilisateur·ice" -#, elixir-format #: lib/graphql/resolvers/comment.ex:95 msgid "Comment is already deleted" msgstr "Le commentaire est déjà supprimé" -#, elixir-format #: lib/graphql/resolvers/discussion.ex:61 msgid "Discussion not found" msgstr "Discussion non trouvée" -#, elixir-format #: lib/graphql/resolvers/report.ex:62 lib/graphql/resolvers/report.ex:87 msgid "Error while saving report" msgstr "Erreur lors de la sauvegarde du signalement" -#, elixir-format #: lib/graphql/resolvers/report.ex:113 msgid "Error while updating report" msgstr "Erreur lors de la mise à jour du signalement" -#, elixir-format #: lib/graphql/resolvers/participant.ex:131 msgid "Event id not found" msgstr "ID de l'événement non trouvé" -#, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 -#: lib/graphql/resolvers/event.ex:278 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "Événement non trouvé" -#, elixir-format -#: lib/graphql/resolvers/participant.ex:87 -#: lib/graphql/resolvers/participant.ex:128 lib/graphql/resolvers/participant.ex:160 +#: lib/graphql/resolvers/participant.ex:87 lib/graphql/resolvers/participant.ex:128 +#: lib/graphql/resolvers/participant.ex:160 msgid "Event with this ID %{id} doesn't exist" msgstr "L'événement avec cet ID %{id} n'existe pas" -#, elixir-format #: lib/graphql/resolvers/participant.ex:103 msgid "Internal Error" msgstr "Erreur interne" -#, elixir-format #: lib/graphql/resolvers/event.ex:100 lib/graphql/resolvers/participant.ex:234 msgid "Moderator profile is not owned by authenticated user" msgstr "Le profil créateur n'est pas possédé par l'utilisateur actuel" -#, elixir-format #: lib/graphql/resolvers/discussion.ex:181 msgid "No discussion with ID %{id}" msgstr "Aucune discussion avec l'ID %{id}" -#, elixir-format #: lib/graphql/resolvers/todos.ex:81 lib/graphql/resolvers/todos.ex:171 msgid "No profile found for user" msgstr "Aucun profil trouvé pour l'utilisateur modérateur" -#, elixir-format #: lib/graphql/resolvers/feed_token.ex:66 msgid "No such feed token" msgstr "Aucun jeton de flux correspondant" -#, elixir-format #: lib/graphql/resolvers/resource.ex:87 msgid "No such resource" msgstr "Aucune ressource correspondante" -#, elixir-format #: lib/graphql/resolvers/event.ex:202 msgid "Organizer profile is not owned by the user" msgstr "Le profil créateur n'est pas possédé par l'utilisateur actuel" -#, elixir-format #: lib/graphql/resolvers/participant.ex:244 msgid "Participant already has role %{role}" msgstr "Le ou la participant·e a déjà le rôle %{role}" -#, elixir-format -#: lib/graphql/resolvers/participant.ex:173 -#: lib/graphql/resolvers/participant.ex:202 lib/graphql/resolvers/participant.ex:237 -#: lib/graphql/resolvers/participant.ex:247 +#: lib/graphql/resolvers/participant.ex:173 lib/graphql/resolvers/participant.ex:202 +#: lib/graphql/resolvers/participant.ex:237 lib/graphql/resolvers/participant.ex:247 msgid "Participant not found" msgstr "Participant·e non trouvé·e" -#, elixir-format #: lib/graphql/resolvers/person.ex:31 msgid "Person with ID %{id} not found" msgstr "Groupe avec l'ID %{id} non trouvé" -#, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "Groupe avec le nom %{name} non trouvé" -#, elixir-format #: lib/graphql/resolvers/picture.ex:45 msgid "Picture with ID %{id} was not found" msgstr "Groupe avec l'ID %{id} non trouvé" -#, elixir-format #: lib/graphql/resolvers/post.ex:165 lib/graphql/resolvers/post.ex:198 msgid "Post ID is not a valid ID" msgstr "L'ID du billet n'est pas un ID valide" -#, elixir-format #: lib/graphql/resolvers/post.ex:168 lib/graphql/resolvers/post.ex:201 msgid "Post doesn't exist" msgstr "Le billet n'existe pas" -#, elixir-format #: lib/graphql/resolvers/member.ex:83 msgid "Profile invited doesn't exist" msgstr "Le profil invité n'existe pas" -#, elixir-format #: lib/graphql/resolvers/member.ex:92 msgid "Profile is already a member of this group" msgstr "Vous êtes déjà membre de ce groupe" -#, elixir-format -#: lib/graphql/resolvers/post.ex:131 lib/graphql/resolvers/post.ex:171 -#: lib/graphql/resolvers/post.ex:204 lib/graphql/resolvers/resource.ex:86 lib/graphql/resolvers/resource.ex:123 -#: lib/graphql/resolvers/resource.ex:152 lib/graphql/resolvers/resource.ex:181 lib/graphql/resolvers/todos.ex:60 -#: lib/graphql/resolvers/todos.ex:84 lib/graphql/resolvers/todos.ex:102 lib/graphql/resolvers/todos.ex:174 -#: lib/graphql/resolvers/todos.ex:197 lib/graphql/resolvers/todos.ex:225 +#: lib/graphql/resolvers/post.ex:131 lib/graphql/resolvers/post.ex:171 lib/graphql/resolvers/post.ex:204 +#: lib/graphql/resolvers/resource.ex:86 lib/graphql/resolvers/resource.ex:123 lib/graphql/resolvers/resource.ex:152 +#: lib/graphql/resolvers/resource.ex:181 lib/graphql/resolvers/todos.ex:60 lib/graphql/resolvers/todos.ex:84 +#: lib/graphql/resolvers/todos.ex:102 lib/graphql/resolvers/todos.ex:174 lib/graphql/resolvers/todos.ex:197 +#: lib/graphql/resolvers/todos.ex:225 msgid "Profile is not member of group" msgstr "Le profil n'est pas un·e membre du groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "Profile non trouvé" -#, elixir-format #: lib/graphql/resolvers/event.ex:104 lib/graphql/resolvers/participant.ex:241 msgid "Provided moderator profile doesn't have permission on this event" msgstr "Le profil modérateur fourni n'a pas de permissions sur cet événement" -#, elixir-format #: lib/graphql/resolvers/report.ex:38 msgid "Report not found" msgstr "Groupe non trouvé" -#, elixir-format #: lib/graphql/resolvers/resource.ex:149 lib/graphql/resolvers/resource.ex:178 msgid "Resource doesn't exist" msgstr "La ressource n'existe pas" -#, elixir-format #: lib/graphql/resolvers/participant.ex:124 msgid "The event has already reached its maximum capacity" msgstr "L'événement a déjà atteint sa capacité maximale" -#, elixir-format #: lib/graphql/resolvers/participant.ex:267 msgid "This token is invalid" msgstr "Ce jeton est invalide" -#, elixir-format #: lib/graphql/resolvers/todos.ex:168 lib/graphql/resolvers/todos.ex:222 msgid "Todo doesn't exist" msgstr "Ce todo n'existe pas" -#, elixir-format -#: lib/graphql/resolvers/todos.ex:78 lib/graphql/resolvers/todos.ex:194 -#: lib/graphql/resolvers/todos.ex:219 +#: lib/graphql/resolvers/todos.ex:78 lib/graphql/resolvers/todos.ex:194 lib/graphql/resolvers/todos.ex:219 msgid "Todo list doesn't exist" msgstr "Cette todo-liste n'existe pas" -#, elixir-format #: lib/graphql/resolvers/feed_token.ex:72 msgid "Token does not exist" msgstr "Ce jeton n'existe pas" -#, elixir-format #: lib/graphql/resolvers/feed_token.ex:69 msgid "Token is not a valid UUID" msgstr "Ce jeton n'est pas un UUID valide" -#, elixir-format #: lib/graphql/resolvers/event.ex:239 msgid "User doesn't own profile" msgstr "L'utilisateur·ice ne possède pas le profil" -#, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "Membre non trouvé" -#, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "Vous êtes déjà membre de ce groupe" -#, elixir-format #: lib/graphql/resolvers/participant.ex:134 msgid "You are already a participant of this event" msgstr "Vous êtes déjà membre de ce groupe" -#, elixir-format #: lib/graphql/resolvers/discussion.ex:185 msgid "You are not a member of the group the discussion belongs to" msgstr "Vous n'êtes pas un membre du groupe dans lequel se fait la discussion" -#, elixir-format #: lib/graphql/resolvers/member.ex:86 msgid "You are not a member of this group" msgstr "Vous êtes déjà membre de ce groupe" -#, elixir-format #: lib/graphql/resolvers/member.ex:137 msgid "You are not a moderator or admin for this group" msgstr "Vous n'êtes pas administrateur·ice ou modérateur·ice de ce groupe" -#, elixir-format #: lib/graphql/resolvers/comment.ex:41 msgid "You are not allowed to create a comment if not connected" msgstr "Vous n'êtes pas autorisé·e à créer un commentaire si non connecté·e" -#, elixir-format #: lib/graphql/resolvers/feed_token.ex:44 msgid "You are not allowed to create a feed token if not connected" msgstr "Vous n'êtes pas autorisé·e à créer un jeton de flux si non connecté·e" -#, elixir-format #: lib/graphql/resolvers/comment.ex:103 msgid "You are not allowed to delete a comment if not connected" msgstr "Vous n'êtes pas autorisé·e à supprimer un commentaire si non connecté·e" -#, elixir-format #: lib/graphql/resolvers/feed_token.ex:81 msgid "You are not allowed to delete a feed token if not connected" msgstr "Vous n'êtes pas autorisé·e à supprimer un jeton de flux si non connecté·e" -#, elixir-format #: lib/graphql/resolvers/comment.ex:63 msgid "You are not allowed to update a comment if not connected" msgstr "Vous n'êtes pas autorisé·e à mettre à jour un commentaire si non connecté·e" -#, elixir-format -#: lib/graphql/resolvers/participant.ex:167 -#: lib/graphql/resolvers/participant.ex:196 +#: lib/graphql/resolvers/participant.ex:167 lib/graphql/resolvers/participant.ex:196 msgid "You can't leave event because you're the only event creator participant" msgstr "Vous ne pouvez pas quitter cet événement car vous en êtes le ou la seule créateur·ice participant" -#, elixir-format #: lib/graphql/resolvers/member.ex:141 msgid "You can't set yourself to a lower member role for this group because you are the only administrator" msgstr "" "Vous ne pouvez pas vous définir avec un rôle de membre inférieur pour ce groupe car vous en êtes le ou la seul·e " "administrateur·ice" -#, elixir-format #: lib/graphql/resolvers/comment.ex:91 msgid "You cannot delete this comment" msgstr "Vous ne pouvez pas supprimer ce commentaire" -#, elixir-format #: lib/graphql/resolvers/event.ex:274 msgid "You cannot delete this event" msgstr "Vous ne pouvez pas supprimer cet événement" -#, elixir-format #: lib/graphql/resolvers/member.ex:89 msgid "You cannot invite to this group" msgstr "Vous ne pouvez pas rejoindre ce groupe" -#, elixir-format #: lib/graphql/resolvers/feed_token.ex:75 msgid "You don't have permission to delete this token" msgstr "Vous n'avez pas la permission de supprimer ce jeton" -#, elixir-format #: lib/graphql/resolvers/admin.ex:51 msgid "You need to be logged-in and a moderator to list action logs" msgstr "Vous devez être connecté·e pour rejoindre un groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "Vous devez être connecté·e pour rejoindre un groupe" - -#, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" msgstr "Vous devez être connecté·e pour rejoindre un groupe" -#, elixir-format #: lib/graphql/resolvers/report.ex:118 msgid "You need to be logged-in and a moderator to update a report" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format #: lib/graphql/resolvers/report.ex:43 msgid "You need to be logged-in and a moderator to view a report" msgstr "Vous devez être connecté·e pour rejoindre un groupe" -#, elixir-format #: lib/graphql/resolvers/admin.ex:194 msgid "You need to be logged-in and an administrator to access admin settings" msgstr "Vous devez être connecté·e et un·e administrateur·ice pour accéder aux paramètres administrateur" -#, elixir-format #: lib/graphql/resolvers/admin.ex:179 msgid "You need to be logged-in and an administrator to access dashboard statistics" msgstr "Vous devez être connecté·e et un·e administrateur·ice pour accéder aux panneau de statistiques" -#, elixir-format #: lib/graphql/resolvers/admin.ex:222 msgid "You need to be logged-in and an administrator to save admin settings" msgstr "Vous devez être connecté·e et un·e administrateur·ice pour sauvegarder les paramètres administrateur" -#, elixir-format #: lib/graphql/resolvers/discussion.ex:66 msgid "You need to be logged-in to access discussions" msgstr "Vous devez être connecté·e pour accéder aux discussions" -#, elixir-format #: lib/graphql/resolvers/resource.ex:92 msgid "You need to be logged-in to access resources" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "Vous devez être connecté·e pour changer votre adresse e-mail" - -#, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" msgstr "Vous devez être connecté·e pour créer des événements" -#, elixir-format #: lib/graphql/resolvers/post.ex:139 msgid "You need to be logged-in to create posts" msgstr "Vous devez être connecté·e pour quitter un groupe" -#, elixir-format #: lib/graphql/resolvers/report.ex:81 lib/graphql/resolvers/report.ex:92 msgid "You need to be logged-in to create reports" msgstr "Vous devez être connecté·e pour quitter un groupe" -#, elixir-format #: lib/graphql/resolvers/resource.ex:128 msgid "You need to be logged-in to create resources" msgstr "Vous devez être connecté·e pour quitter un groupe" -#, elixir-format #: lib/graphql/resolvers/event.ex:286 msgid "You need to be logged-in to delete an event" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "Vous devez être connecté·e pour supprimer un groupe" - -#, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format #: lib/graphql/resolvers/resource.ex:186 msgid "You need to be logged-in to delete resources" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format #: lib/graphql/resolvers/participant.ex:108 msgid "You need to be logged-in to join an event" msgstr "Vous devez être connecté·e pour rejoindre un groupe" -#, elixir-format #: lib/graphql/resolvers/participant.ex:207 msgid "You need to be logged-in to leave an event" msgstr "Vous devez être connecté·e pour quitter un groupe" -#, elixir-format #: lib/graphql/resolvers/event.ex:247 msgid "You need to be logged-in to update an event" msgstr "Vous devez être connecté·e pour mettre à jour un groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "Vous devez être connecté·e pour mettre à jour un groupe" - -#, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" msgstr "Vous devez être connecté·e pour mettre à jour un groupe" -#, elixir-format #: lib/graphql/resolvers/resource.ex:157 msgid "You need to be logged-in to update resources" msgstr "Vous devez être connecté·e pour mettre à jour un groupe" -#, elixir-format #: lib/graphql/resolvers/resource.ex:204 msgid "You need to be logged-in to view a resource preview" msgstr "Vous devez être connecté·e pour supprimer un groupe" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "Vous devez être connecté·e pour supprimer un groupe" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "Vous devez être connecté·e pour visionner votre liste d'identités" - -#, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" msgstr "Vous devez être connecté·e pour mettre à jour un groupe" -#, elixir-format #: lib/graphql/resolvers/report.ex:84 msgid "Reporter ID does not match the anonymous profile id" msgstr "L'ID du signalant ne correspond pas à l'ID du profil anonyme" -#, elixir-format #: lib/graphql/resolvers/report.ex:59 msgid "Reporter profile is not owned by authenticated user" msgstr "Le profil du signalant n'est pas possédé par l'utilisateur actuel" -#, elixir-format #: lib/graphql/resolvers/resource.ex:120 msgid "Parent resource doesn't belong to this group" msgstr "La ressource parente n'appartient pas à ce groupe" -#, elixir-format #: lib/graphql/resolvers/participant.ex:93 msgid "Profile ID provided is not the anonymous profile one" msgstr "L'ID du profil fourni ne correspond pas au profil anonyme" -#, elixir-format #: lib/mobilizon/users/user.ex:109 msgid "The chosen password is too short." msgstr "Le mot de passe choisi est trop court." -#, elixir-format #: lib/mobilizon/users/user.ex:138 msgid "The registration token is already in use, this looks like an issue on our side." msgstr "Le jeton d'inscription est déjà utilisé, cela ressemble à un problème de notre côté." -#, elixir-format #: lib/mobilizon/users/user.ex:104 msgid "This email is already used." msgstr "Cette adresse e-mail est déjà utilisée." -#, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "Billet non trouvé" + +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "Paramètres fournis invalides" + +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "Identifiants invalides" + +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "Réinitialiser votre mot de passe pour vous connecter" + +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "Ressource non trouvée" + +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "Quelque chose s'est mal passé" + +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "Ressource inconnue" + +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "Vous n'avez pas la permission de faire ceci" + +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "Vous devez être connecté·e" diff --git a/priv/gettext/it/LC_MESSAGES/errors.po b/priv/gettext/it/LC_MESSAGES/errors.po index 5ec466f32..9a2f1cb0b 100644 --- a/priv/gettext/it/LC_MESSAGES/errors.po +++ b/priv/gettext/it/LC_MESSAGES/errors.po @@ -156,7 +156,7 @@ msgid "No user to validate with this email was found" msgstr "Nessun utente da convalidare trovato con questa email" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "Nessun utente con questa email" @@ -165,9 +165,9 @@ msgstr "Nessun utente con questa email" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "L'utente autenticato non è propietario di questo profilo" @@ -354,12 +354,12 @@ msgid "Anonymous participation is not enabled" msgstr "La partecipazione anonima non è abilitata" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -389,7 +389,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "Evento non trovato" @@ -453,7 +453,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -492,7 +492,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "Profilo non trovato" @@ -548,12 +548,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "Utente non trovato" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -638,11 +638,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -683,11 +678,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -713,11 +703,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -743,11 +728,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -763,16 +743,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -814,6 +784,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "Segnalazione non trovata" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/ja/LC_MESSAGES/errors.po b/priv/gettext/ja/LC_MESSAGES/errors.po index 3d600b346..f9af2d017 100644 --- a/priv/gettext/ja/LC_MESSAGES/errors.po +++ b/priv/gettext/ja/LC_MESSAGES/errors.po @@ -143,7 +143,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -152,9 +152,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -341,12 +341,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -376,7 +376,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -440,7 +440,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -479,7 +479,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -535,12 +535,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -625,11 +625,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -670,11 +665,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -700,11 +690,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -730,11 +715,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -750,16 +730,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -801,6 +771,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/nl/LC_MESSAGES/errors.po b/priv/gettext/nl/LC_MESSAGES/errors.po index 0cf8a1d33..11dc2b5b4 100644 --- a/priv/gettext/nl/LC_MESSAGES/errors.po +++ b/priv/gettext/nl/LC_MESSAGES/errors.po @@ -149,7 +149,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -158,9 +158,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -347,12 +347,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -382,7 +382,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -446,7 +446,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -485,7 +485,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -541,12 +541,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -631,11 +631,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -676,11 +671,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -706,11 +696,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -736,11 +721,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -756,16 +736,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -807,6 +777,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/oc/LC_MESSAGES/errors.po b/priv/gettext/oc/LC_MESSAGES/errors.po index 9274b5d69..0fe0fb864 100644 --- a/priv/gettext/oc/LC_MESSAGES/errors.po +++ b/priv/gettext/oc/LC_MESSAGES/errors.po @@ -156,7 +156,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -165,9 +165,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -354,12 +354,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -389,7 +389,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -453,7 +453,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -492,7 +492,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -548,12 +548,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -638,11 +638,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -683,11 +678,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -713,11 +703,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -743,11 +728,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -763,16 +743,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -814,6 +784,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/pl/LC_MESSAGES/errors.po b/priv/gettext/pl/LC_MESSAGES/errors.po index 62578f38b..63cfb19ce 100644 --- a/priv/gettext/pl/LC_MESSAGES/errors.po +++ b/priv/gettext/pl/LC_MESSAGES/errors.po @@ -163,7 +163,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -172,9 +172,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -361,12 +361,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -396,7 +396,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -460,7 +460,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -499,7 +499,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -555,12 +555,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -645,11 +645,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -690,11 +685,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -720,11 +710,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -750,11 +735,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -770,16 +750,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -821,6 +791,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/pt/LC_MESSAGES/errors.po b/priv/gettext/pt/LC_MESSAGES/errors.po index 6ffe2c73f..a43137d1f 100644 --- a/priv/gettext/pt/LC_MESSAGES/errors.po +++ b/priv/gettext/pt/LC_MESSAGES/errors.po @@ -149,7 +149,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -158,9 +158,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -347,12 +347,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -382,7 +382,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -446,7 +446,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -485,7 +485,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -541,12 +541,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -631,11 +631,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -676,11 +671,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -706,11 +696,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -736,11 +721,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -756,16 +736,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -807,6 +777,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/pt_BR/LC_MESSAGES/errors.po b/priv/gettext/pt_BR/LC_MESSAGES/errors.po index 10bf6a703..e984b8c38 100644 --- a/priv/gettext/pt_BR/LC_MESSAGES/errors.po +++ b/priv/gettext/pt_BR/LC_MESSAGES/errors.po @@ -149,7 +149,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -158,9 +158,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -347,12 +347,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -382,7 +382,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -446,7 +446,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -485,7 +485,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -541,12 +541,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -631,11 +631,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -676,11 +671,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -706,11 +696,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -736,11 +721,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -756,16 +736,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -807,6 +777,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/ru/LC_MESSAGES/errors.po b/priv/gettext/ru/LC_MESSAGES/errors.po index 3f71a4b0a..658ec77ca 100644 --- a/priv/gettext/ru/LC_MESSAGES/errors.po +++ b/priv/gettext/ru/LC_MESSAGES/errors.po @@ -155,7 +155,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -164,9 +164,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -353,12 +353,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -388,7 +388,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -452,7 +452,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -491,7 +491,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -547,12 +547,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -637,11 +637,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -682,11 +677,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -712,11 +702,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -742,11 +727,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -762,16 +742,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -813,6 +783,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/priv/gettext/sv/LC_MESSAGES/errors.po b/priv/gettext/sv/LC_MESSAGES/errors.po index 89b54b730..ee4cea9c4 100644 --- a/priv/gettext/sv/LC_MESSAGES/errors.po +++ b/priv/gettext/sv/LC_MESSAGES/errors.po @@ -156,7 +156,7 @@ msgid "No user to validate with this email was found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:217 lib/graphql/resolvers/user.ex:76 +#: lib/graphql/resolvers/person.ex:232 lib/graphql/resolvers/user.ex:76 #: lib/graphql/resolvers/user.ex:219 msgid "No user with this email was found" msgstr "" @@ -165,9 +165,9 @@ msgstr "" #: lib/graphql/resolvers/comment.ex:36 lib/graphql/resolvers/comment.ex:98 #: lib/graphql/resolvers/event.ex:281 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/group.ex:243 #: lib/graphql/resolvers/member.ex:77 lib/graphql/resolvers/participant.ex:29 -#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:142 -#: lib/graphql/resolvers/person.ex:176 lib/graphql/resolvers/person.ex:241 lib/graphql/resolvers/person.ex:273 -#: lib/graphql/resolvers/person.ex:286 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 +#: lib/graphql/resolvers/participant.ex:163 lib/graphql/resolvers/participant.ex:192 lib/graphql/resolvers/person.ex:157 +#: lib/graphql/resolvers/person.ex:191 lib/graphql/resolvers/person.ex:256 lib/graphql/resolvers/person.ex:288 +#: lib/graphql/resolvers/person.ex:301 lib/graphql/resolvers/picture.ex:75 lib/graphql/resolvers/report.ex:110 #: lib/graphql/resolvers/todos.ex:57 msgid "Profile is not owned by authenticated user" msgstr "" @@ -354,12 +354,12 @@ msgid "Anonymous participation is not enabled" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:173 +#: lib/graphql/resolvers/person.ex:188 msgid "Cannot remove the last administrator of a group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:170 +#: lib/graphql/resolvers/person.ex:185 msgid "Cannot remove the last identity of a user" msgstr "" @@ -389,7 +389,7 @@ msgid "Event id not found" msgstr "" #, elixir-format -#: lib/graphql/error.ex:83 lib/graphql/resolvers/event.ex:236 +#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:236 #: lib/graphql/resolvers/event.ex:278 msgid "Event not found" msgstr "" @@ -453,7 +453,7 @@ msgid "Person with ID %{id} not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:46 +#: lib/graphql/resolvers/person.ex:52 msgid "Person with username %{username} not found" msgstr "" @@ -492,7 +492,7 @@ msgid "Profile is not member of group" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:139 lib/graphql/resolvers/person.ex:167 +#: lib/graphql/resolvers/person.ex:154 lib/graphql/resolvers/person.ex:182 msgid "Profile not found" msgstr "" @@ -548,12 +548,12 @@ msgid "User doesn't own profile" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:308 +#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:323 msgid "User not found" msgstr "" #, elixir-format -#: lib/graphql/resolvers/person.ex:220 +#: lib/graphql/resolvers/person.ex:235 msgid "You already have a profile for this user" msgstr "" @@ -638,11 +638,6 @@ msgstr "" msgid "You need to be logged-in and a moderator to list action logs" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:73 -msgid "You need to be logged-in and a moderator to list persons" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/report.ex:28 msgid "You need to be logged-in and a moderator to list reports" @@ -683,11 +678,6 @@ msgstr "" msgid "You need to be logged-in to access resources" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:118 -msgid "You need to be logged-in to create a new identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/event.ex:213 msgid "You need to be logged-in to create events" @@ -713,11 +703,6 @@ msgstr "" msgid "You need to be logged-in to delete an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:181 -msgid "You need to be logged-in to delete an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:209 msgid "You need to be logged-in to delete posts" @@ -743,11 +728,6 @@ msgstr "" msgid "You need to be logged-in to update an event" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:147 -msgid "You need to be logged-in to update an identity" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/post.ex:176 msgid "You need to be logged-in to update posts" @@ -763,16 +743,6 @@ msgstr "" msgid "You need to be logged-in to view a resource preview" msgstr "" -#, elixir-format -#: lib/graphql/resolvers/person.ex:84 -msgid "You need to be logged-in to view current person" -msgstr "" - -#, elixir-format -#: lib/graphql/resolvers/person.ex:95 -msgid "You need to be logged-in to view your list of identities" -msgstr "" - #, elixir-format #: lib/graphql/resolvers/picture.ex:83 msgid "You need to login to upload a picture" @@ -814,6 +784,46 @@ msgid "This email is already used." msgstr "" #, elixir-format -#: lib/graphql/error.ex:82 +#: lib/graphql/error.ex:88 msgid "Post not found" msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:75 +msgid "Invalid arguments passed" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:81 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:79 +msgid "Reset your password to login" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:86 +msgid "Resource not found" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:90 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/graphql/error.ex:74 +msgid "Unknown Resource" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:84 +msgid "You don't have permission to do this" +msgstr "" + +#, elixir-format, fuzzy +#: lib/graphql/error.ex:76 +msgid "You need to be logged in" +msgstr "" diff --git a/test/graphql/resolvers/person_test.exs b/test/graphql/resolvers/person_test.exs index 611f3ad4f..054d03fb0 100644 --- a/test/graphql/resolvers/person_test.exs +++ b/test/graphql/resolvers/person_test.exs @@ -14,42 +14,44 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do @non_existent_username "nonexistent" describe "Person Resolver" do + @get_person_query """ + query Person($id: ID!) { + person(id: $id) { + preferredUsername, + } + } + """ + + @fetch_person_query """ + query FetchPerson($preferredUsername: String!) { + fetchPerson(preferredUsername: $preferredUsername) { + preferredUsername, + } + } + """ + test "get_person/3 returns a person by its username", %{conn: conn} do user = insert(:user) actor = insert(:actor, user: user) - query = """ - { - person(id: "#{actor.id}") { - preferredUsername, - } - } - """ - res = conn |> auth_conn(user) - |> get("/api", AbsintheHelpers.query_skeleton(query, "person")) + |> AbsintheHelpers.graphql_query(query: @get_person_query, variables: %{id: actor.id}) - assert json_response(res, 200)["data"]["person"]["preferredUsername"] == + assert is_nil(res["errors"]) + + assert res["data"]["person"]["preferredUsername"] == actor.preferred_username - query = """ - { - person(id: "6895567") { - preferredUsername, - } - } - """ - res = conn |> auth_conn(user) - |> get("/api", AbsintheHelpers.query_skeleton(query, "person")) + |> AbsintheHelpers.graphql_query(query: @get_person_query, variables: %{id: "6895567"}) - assert json_response(res, 200)["data"]["person"] == nil + assert res["data"]["person"] == nil - assert hd(json_response(res, 200)["errors"])["message"] == + assert hd(res["errors"])["message"] == "Person with ID 6895567 not found" end @@ -57,38 +59,38 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do user = insert(:user) actor = insert(:actor, user: user) - query = """ - { - fetchPerson(preferredUsername: "#{actor.preferred_username}") { - preferredUsername, - } - } - """ + res = + context.conn + |> AbsintheHelpers.graphql_query( + query: @fetch_person_query, + variables: %{preferredUsername: actor.preferred_username} + ) + + assert hd(res["errors"])["message"] == "You need to be logged in" + assert hd(res["errors"])["status_code"] == 401 res = context.conn - |> get("/api", AbsintheHelpers.query_skeleton(query, "person")) + |> auth_conn(user) + |> AbsintheHelpers.graphql_query( + query: @fetch_person_query, + variables: %{preferredUsername: actor.preferred_username} + ) - assert json_response(res, 200)["errors"] == nil - - assert json_response(res, 200)["data"]["fetchPerson"]["preferredUsername"] == + assert res["data"]["fetchPerson"]["preferredUsername"] == actor.preferred_username - query = """ - { - fetchPerson(preferredUsername: "#{@non_existent_username}") { - preferredUsername, - } - } - """ - res = context.conn - |> get("/api", AbsintheHelpers.query_skeleton(query, "person")) + |> auth_conn(user) + |> AbsintheHelpers.graphql_query( + query: @fetch_person_query, + variables: %{preferredUsername: @non_existent_username} + ) - assert json_response(res, 200)["data"]["fetchPerson"] == nil + assert res["data"]["fetchPerson"] == nil - assert hd(json_response(res, 200)["errors"])["message"] == + assert hd(res["errors"])["message"] == "Person with username #{@non_existent_username} not found" end @@ -114,7 +116,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do assert json_response(res, 200)["data"]["loggedPerson"] == nil assert hd(json_response(res, 200)["errors"])["message"] == - "You need to be logged-in to view current person" + "You need to be logged in" res = context.conn @@ -151,7 +153,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do assert json_response(res, 200)["data"]["createPerson"] == nil assert hd(json_response(res, 200)["errors"])["message"] == - "You need to be logged-in to create a new identity" + "You need to be logged in" res = context.conn @@ -179,7 +181,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do assert json_response(res, 200)["data"]["identities"] == nil assert hd(json_response(res, 200)["errors"])["message"] == - "You need to be logged-in to view your list of identities" + "You need to be logged in" res = context.conn @@ -241,7 +243,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do assert json_response(res, 200)["data"]["createPerson"] == nil assert hd(json_response(res, 200)["errors"])["message"] == - "You need to be logged-in to create a new identity" + "You need to be logged in" res = context.conn @@ -312,7 +314,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PersonTest do assert json_response(res, 200)["data"]["updatePerson"] == nil assert hd(json_response(res, 200)["errors"])["message"] == - "You need to be logged-in to update an identity" + "You need to be logged in" res = context.conn