Improve GraphQL documentation and cleanup API

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-19 17:06:28 +01:00
parent e8a3b6aa94
commit 3eacbb2ca3
87 changed files with 6542 additions and 6314 deletions

View File

@@ -102,17 +102,12 @@ msgid "Cannot refresh the token"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:137
msgid "Creator profile is not owned by the current user"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:201
#: lib/graphql/resolvers/group.ex:198
msgid "Current profile is not a member of this group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:205
#: lib/graphql/resolvers/group.ex:202
msgid "Current profile is not an administrator of the selected group"
msgstr ""
@@ -122,8 +117,8 @@ msgid "Error while saving user settings"
msgstr ""
#, elixir-format
#: lib/graphql/error.ex:90 lib/graphql/resolvers/group.ex:198
#: lib/graphql/resolvers/group.ex:229 lib/graphql/resolvers/group.ex:264 lib/graphql/resolvers/member.ex:83
#: lib/graphql/error.ex:90 lib/graphql/resolvers/group.ex:195
#: lib/graphql/resolvers/group.ex:226 lib/graphql/resolvers/group.ex:261 lib/graphql/resolvers/member.ex:80
msgid "Group not found"
msgstr ""
@@ -138,7 +133,7 @@ msgid "Impossible to authenticate, either your email or password are invalid."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:261
#: lib/graphql/resolvers/group.ex:258
msgid "Member not found"
msgstr ""
@@ -154,18 +149,15 @@ msgid "No user to validate with this email was found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:231 lib/graphql/resolvers/user.ex:76
#: lib/graphql/resolvers/person.ex:229 lib/graphql/resolvers/user.ex:76
#: lib/graphql/resolvers/user.ex:219
msgid "No user with this email was found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/comment.ex:50 lib/graphql/resolvers/comment.ex:112
#: lib/graphql/resolvers/event.ex:286 lib/graphql/resolvers/feed_token.ex:28 lib/graphql/resolvers/member.ex:80
#: lib/graphql/resolvers/participant.ex:29 lib/graphql/resolvers/participant.ex:160
#: lib/graphql/resolvers/participant.ex:189 lib/graphql/resolvers/person.ex:155 lib/graphql/resolvers/person.ex:189
#: lib/graphql/resolvers/person.ex:255 lib/graphql/resolvers/person.ex:284 lib/graphql/resolvers/person.ex:297
#: lib/graphql/resolvers/picture.ex:72 lib/graphql/resolvers/report.ex:107 lib/graphql/resolvers/todos.ex:57
#: lib/graphql/resolvers/feed_token.ex:28
#: lib/graphql/resolvers/participant.ex:29 lib/graphql/resolvers/person.ex:153 lib/graphql/resolvers/person.ex:187
#: lib/graphql/resolvers/person.ex:253 lib/graphql/resolvers/person.ex:282 lib/graphql/resolvers/person.ex:295
msgid "Profile is not owned by authenticated user"
msgstr ""
@@ -231,17 +223,17 @@ msgid "User requested is not logged-in"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:235
#: lib/graphql/resolvers/group.ex:232
msgid "You are already a member of this group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:268
#: lib/graphql/resolvers/group.ex:265
msgid "You can't leave this group because you are the only administrator"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:232
#: lib/graphql/resolvers/group.ex:229
msgid "You cannot join this group"
msgstr ""
@@ -261,7 +253,7 @@ msgid "You need to be logged-in to change your password"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:210
#: lib/graphql/resolvers/group.ex:207
msgid "You need to be logged-in to delete a group"
msgstr ""
@@ -271,17 +263,17 @@ msgid "You need to be logged-in to delete your account"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:240
#: lib/graphql/resolvers/group.ex:237
msgid "You need to be logged-in to join a group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:273
#: lib/graphql/resolvers/group.ex:270
msgid "You need to be logged-in to leave a group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:175
#: lib/graphql/resolvers/group.ex:172
msgid "You need to be logged-in to update a group"
msgstr ""
@@ -341,27 +333,27 @@ msgid "Profile already suspended"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:93
#: lib/graphql/resolvers/participant.ex:88
msgid "A valid email is required by your instance"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:87
#: lib/graphql/resolvers/participant.ex:85
msgid "Anonymous participation is not enabled"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:186
#: lib/graphql/resolvers/person.ex:184
msgid "Cannot remove the last administrator of a group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:183
#: lib/graphql/resolvers/person.ex:181
msgid "Cannot remove the last identity of a user"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/comment.ex:109
#: lib/graphql/resolvers/comment.ex:104
msgid "Comment is already deleted"
msgstr ""
@@ -371,49 +363,44 @@ msgid "Discussion not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:62 lib/graphql/resolvers/report.ex:84
#: lib/graphql/resolvers/report.ex:58 lib/graphql/resolvers/report.ex:77
msgid "Error while saving report"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:110
#: lib/graphql/resolvers/report.ex:96
msgid "Error while updating report"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:128
#: lib/graphql/resolvers/participant.ex:123
msgid "Event id not found"
msgstr ""
#, elixir-format
#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:238
#: lib/graphql/resolvers/event.ex:283
#: lib/graphql/error.ex:89 lib/graphql/resolvers/event.ex:232
#: lib/graphql/resolvers/event.ex:276
msgid "Event not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:84
#: lib/graphql/resolvers/participant.ex:125 lib/graphql/resolvers/participant.ex:157
#: lib/graphql/resolvers/participant.ex:82
#: lib/graphql/resolvers/participant.ex:120 lib/graphql/resolvers/participant.ex:152
msgid "Event with this ID %{id} doesn't exist"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:100
#: lib/graphql/resolvers/participant.ex:95
msgid "Internal Error"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:100 lib/graphql/resolvers/participant.ex:231
msgid "Moderator profile is not owned by authenticated user"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/discussion.ex:184
#: lib/graphql/resolvers/discussion.ex:193
msgid "No discussion with ID %{id}"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/todos.ex:81 lib/graphql/resolvers/todos.ex:171
#: lib/graphql/resolvers/todos.ex:78 lib/graphql/resolvers/todos.ex:168
msgid "No profile found for user"
msgstr ""
@@ -423,34 +410,29 @@ msgid "No such feed token"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:202
msgid "Organizer profile is not owned by the user"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:241
#: lib/graphql/resolvers/participant.ex:227
msgid "Participant already has role %{role}"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:170
#: lib/graphql/resolvers/participant.ex:199 lib/graphql/resolvers/participant.ex:234
#: lib/graphql/resolvers/participant.ex:244
#: lib/graphql/resolvers/participant.ex:162
#: lib/graphql/resolvers/participant.ex:188 lib/graphql/resolvers/participant.ex:220
#: lib/graphql/resolvers/participant.ex:230
msgid "Participant not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:31
#: lib/graphql/resolvers/person.ex:29
msgid "Person with ID %{id} not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:52
#: lib/graphql/resolvers/person.ex:50
msgid "Person with username %{username} not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/picture.ex:42
#: lib/graphql/resolvers/picture.ex:41
msgid "Picture with ID %{id} was not found"
msgstr ""
@@ -465,36 +447,36 @@ msgid "Post doesn't exist"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:86
#: lib/graphql/resolvers/member.ex:83
msgid "Profile invited doesn't exist"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:95 lib/graphql/resolvers/member.ex:99
#: lib/graphql/resolvers/member.ex:92 lib/graphql/resolvers/member.ex:96
msgid "Profile is already a member of this group"
msgstr ""
#, 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:87 lib/graphql/resolvers/resource.ex:124
#: lib/graphql/resolvers/resource.ex:153 lib/graphql/resolvers/resource.ex:182 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/resource.ex:153 lib/graphql/resolvers/resource.ex:182 lib/graphql/resolvers/todos.ex:57
#: lib/graphql/resolvers/todos.ex:81 lib/graphql/resolvers/todos.ex:99 lib/graphql/resolvers/todos.ex:171
#: lib/graphql/resolvers/todos.ex:194 lib/graphql/resolvers/todos.ex:222
msgid "Profile is not member of group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:152 lib/graphql/resolvers/person.ex:180
#: lib/graphql/resolvers/person.ex:150 lib/graphql/resolvers/person.ex:178
msgid "Profile not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:104 lib/graphql/resolvers/participant.ex:238
#: lib/graphql/resolvers/event.ex:101 lib/graphql/resolvers/participant.ex:224
msgid "Provided moderator profile doesn't have permission on this event"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:38
#: lib/graphql/resolvers/report.ex:36
msgid "Report not found"
msgstr ""
@@ -504,23 +486,23 @@ msgid "Resource doesn't exist"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:121
#: lib/graphql/resolvers/participant.ex:116
msgid "The event has already reached its maximum capacity"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:264
#: lib/graphql/resolvers/participant.ex:250
msgid "This token is invalid"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/todos.ex:168 lib/graphql/resolvers/todos.ex:222
#: lib/graphql/resolvers/todos.ex:165 lib/graphql/resolvers/todos.ex:219
msgid "Todo doesn't exist"
msgstr ""
#, 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:75 lib/graphql/resolvers/todos.ex:191
#: lib/graphql/resolvers/todos.ex:216
msgid "Todo list doesn't exist"
msgstr ""
@@ -535,37 +517,37 @@ msgid "Token is not a valid UUID"
msgstr ""
#, elixir-format
#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:319
#: lib/graphql/error.ex:87 lib/graphql/resolvers/person.ex:317
msgid "User not found"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/person.ex:234
#: lib/graphql/resolvers/person.ex:232
msgid "You already have a profile for this user"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:131
#: lib/graphql/resolvers/participant.ex:126
msgid "You are already a participant of this event"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/discussion.ex:188
#: lib/graphql/resolvers/discussion.ex:197
msgid "You are not a member of the group the discussion belongs to"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:89
#: lib/graphql/resolvers/member.ex:86
msgid "You are not a member of this group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:154
#: lib/graphql/resolvers/member.ex:151
msgid "You are not a moderator or admin for this group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/comment.ex:55
#: lib/graphql/resolvers/comment.ex:50
msgid "You are not allowed to create a comment if not connected"
msgstr ""
@@ -575,7 +557,7 @@ msgid "You are not allowed to create a feed token if not connected"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/comment.ex:117
#: lib/graphql/resolvers/comment.ex:109
msgid "You are not allowed to delete a comment if not connected"
msgstr ""
@@ -585,33 +567,33 @@ msgid "You are not allowed to delete a feed token if not connected"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/comment.ex:77
#: lib/graphql/resolvers/comment.ex:72
msgid "You are not allowed to update a comment if not connected"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:164
#: lib/graphql/resolvers/participant.ex:193
#: lib/graphql/resolvers/participant.ex:156
#: lib/graphql/resolvers/participant.ex:182
msgid "You can't leave event because you're the only event creator participant"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:158
#: lib/graphql/resolvers/member.ex:155
msgid "You can't set yourself to a lower member role for this group because you are the only administrator"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/comment.ex:105
#: lib/graphql/resolvers/comment.ex:100
msgid "You cannot delete this comment"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:279
#: lib/graphql/resolvers/event.ex:272
msgid "You cannot delete this event"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:92
#: lib/graphql/resolvers/member.ex:89
msgid "You cannot invite to this group"
msgstr ""
@@ -626,17 +608,17 @@ msgid "You need to be logged-in and a moderator to list action logs"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:28
#: lib/graphql/resolvers/report.ex:26
msgid "You need to be logged-in and a moderator to list reports"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:115
#: lib/graphql/resolvers/report.ex:101
msgid "You need to be logged-in and a moderator to update a report"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:43
#: lib/graphql/resolvers/report.ex:41
msgid "You need to be logged-in and a moderator to view a report"
msgstr ""
@@ -656,7 +638,7 @@ msgid "You need to be logged-in and an administrator to save admin settings"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/discussion.ex:66
#: lib/graphql/resolvers/discussion.ex:75
msgid "You need to be logged-in to access discussions"
msgstr ""
@@ -666,7 +648,7 @@ msgid "You need to be logged-in to access resources"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:213
#: lib/graphql/resolvers/event.ex:207
msgid "You need to be logged-in to create events"
msgstr ""
@@ -676,7 +658,7 @@ msgid "You need to be logged-in to create posts"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:78 lib/graphql/resolvers/report.ex:89
#: lib/graphql/resolvers/report.ex:74
msgid "You need to be logged-in to create reports"
msgstr ""
@@ -686,7 +668,7 @@ msgid "You need to be logged-in to create resources"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:291
#: lib/graphql/resolvers/event.ex:281
msgid "You need to be logged-in to delete an event"
msgstr ""
@@ -701,17 +683,17 @@ msgid "You need to be logged-in to delete resources"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:105
#: lib/graphql/resolvers/participant.ex:100
msgid "You need to be logged-in to join an event"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:204
#: lib/graphql/resolvers/participant.ex:193
msgid "You need to be logged-in to leave an event"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:252
#: lib/graphql/resolvers/event.ex:246
msgid "You need to be logged-in to update an event"
msgstr ""
@@ -731,30 +713,15 @@ msgid "You need to be logged-in to view a resource preview"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/picture.ex:83
#: lib/graphql/resolvers/picture.ex:79
msgid "You need to login to upload a picture"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:81
msgid "Reporter ID does not match the anonymous profile id"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/report.ex:59
msgid "Reporter profile is not owned by authenticated user"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/resource.ex:121
msgid "Parent resource doesn't belong to this group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/participant.ex:90
msgid "Profile ID provided is not the anonymous profile one"
msgstr ""
#, elixir-format
#: lib/mobilizon/users/user.ex:109
msgid "The chosen password is too short."
@@ -816,47 +783,47 @@ msgid "You need to be logged in"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:119
#: lib/graphql/resolvers/member.ex:116
msgid "You can't accept this invitation with this profile."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:137
#: lib/graphql/resolvers/member.ex:134
msgid "You can't reject this invitation with this profile."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/picture.ex:75
#: lib/graphql/resolvers/picture.ex:71
msgid "File doesn't have an allowed MIME type."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/group.ex:170
#: lib/graphql/resolvers/group.ex:167
msgid "Profile is not administrator for the group"
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:241
#: lib/graphql/resolvers/event.ex:235
msgid "You can't edit this event."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/event.ex:244
#: lib/graphql/resolvers/event.ex:238
msgid "You can't attribute this event to this profile."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:140
#: lib/graphql/resolvers/member.ex:137
msgid "This invitation doesn't exist."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:182
#: lib/graphql/resolvers/member.ex:179
msgid "This member already has been rejected."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/member.ex:189
#: lib/graphql/resolvers/member.ex:186
msgid "You don't have the right to remove this member."
msgstr ""
@@ -864,3 +831,8 @@ msgstr ""
#: lib/mobilizon/actors/actor.ex:344
msgid "This username is already taken."
msgstr ""
#, elixir-format
#: lib/graphql/resolvers/discussion.ex:72
msgid "You must provide either an ID or a slug to access a discussion"
msgstr ""