|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * Copyright 2021 Cloud Creativity Limited |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | + * you may not use this file except in compliance with the License. |
| 7 | + * You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +return [ |
| 19 | + |
| 20 | + /* |
| 21 | + |-------------------------------------------------------------------------- |
| 22 | + | Error Object Language Lines |
| 23 | + |-------------------------------------------------------------------------- |
| 24 | + | |
| 25 | + | The following language lines contain the default translatable members |
| 26 | + | of JSON API error objects. According to the JSON API spec, the |
| 27 | + | `title` and `detail` members can be localized. In addition the `code` |
| 28 | + | member is also read from this package if you want to give the error |
| 29 | + | a specific code. |
| 30 | + | |
| 31 | + | Set any value to an empty string if you do not want the member to be |
| 32 | + | included in the error object. |
| 33 | + | |
| 34 | + | @see http://jsonapi.org/format/#errors |
| 35 | + */ |
| 36 | + |
| 37 | + 'unauthorized' => [ |
| 38 | + 'title' => 'Non authentifié', |
| 39 | + 'detail' => '', |
| 40 | + 'code' => '', |
| 41 | + ], |
| 42 | + |
| 43 | + 'forbidden' => [ |
| 44 | + 'title' => 'Non autorisé', |
| 45 | + 'detail' => '', |
| 46 | + 'code' => '', |
| 47 | + ], |
| 48 | + |
| 49 | + 'token_mismatch' => [ |
| 50 | + 'title' => 'Jeton invalide', |
| 51 | + 'detail' => "Le jeton n'est pas valide.", |
| 52 | + 'code' => '', |
| 53 | + ], |
| 54 | + |
| 55 | + 'member_required' => [ |
| 56 | + 'title' => 'Document JSON API invalide', |
| 57 | + 'detail' => 'Le membre :member est obligatoire.', |
| 58 | + 'code' => '', |
| 59 | + ], |
| 60 | + |
| 61 | + 'member_object_expected' => [ |
| 62 | + 'title' => 'Document JSON API invalide', |
| 63 | + 'detail' => 'Le membre :member doit être un objet.', |
| 64 | + 'code' => '', |
| 65 | + ], |
| 66 | + |
| 67 | + 'member_identifier_expected' => [ |
| 68 | + 'title' => 'Document JSON API invalide', |
| 69 | + 'detail' => 'Le membre :member doit être un identifiant de ressource.', |
| 70 | + 'code' => '', |
| 71 | + ], |
| 72 | + |
| 73 | + 'member_string_expected' => [ |
| 74 | + 'title' => 'Document JSON API invalide', |
| 75 | + 'detail' => 'Le membre :member doit être une chaîne de caractères.', |
| 76 | + 'code' => '', |
| 77 | + ], |
| 78 | + |
| 79 | + 'member_empty' => [ |
| 80 | + 'title' => 'Document JSON API invalide', |
| 81 | + 'detail' => 'Le membre :member ne peut être vide.', |
| 82 | + 'code' => '', |
| 83 | + ], |
| 84 | + |
| 85 | + 'member_field_not_allowed' => [ |
| 86 | + 'title' => 'Document JSON API invalide', |
| 87 | + 'detail' => 'Le membre :member ne peut avoir de champ :field.', |
| 88 | + 'code' => '', |
| 89 | + ], |
| 90 | + |
| 91 | + 'resource_type_not_supported' => [ |
| 92 | + 'title' => 'Non supporté', |
| 93 | + 'detail' => "Le type de ressource :type n'est pas supporté par ce endpoint.", |
| 94 | + 'code' => '', |
| 95 | + ], |
| 96 | + |
| 97 | + 'resource_type_not_recognised' => [ |
| 98 | + 'title' => 'Non supporté', |
| 99 | + 'detail' => "Le type de ressource :type n'est pas reconnu.", |
| 100 | + 'code' => '', |
| 101 | + ], |
| 102 | + |
| 103 | + 'resource_id_not_supported' => [ |
| 104 | + 'title' => 'Non supporté', |
| 105 | + 'detail' => "L'identifiant de ressource :id n'est pas supporté par ce endpoint.", |
| 106 | + 'code' => '', |
| 107 | + ], |
| 108 | + |
| 109 | + 'resource_client_ids_not_supported' => [ |
| 110 | + 'title' => 'Non supporté', |
| 111 | + 'detail' => "Le type de ressource :type n'accepte pas les identifiants générés par le client.", |
| 112 | + 'code' => '', |
| 113 | + ], |
| 114 | + |
| 115 | + 'resource_exists' => [ |
| 116 | + 'title' => 'Conflit', |
| 117 | + 'detail' => 'La ressource :id existe déjà.', |
| 118 | + 'code' => '', |
| 119 | + ], |
| 120 | + |
| 121 | + 'resource_not_found' => [ |
| 122 | + 'title' => 'Introuvable', |
| 123 | + 'detail' => "La ressource spécifiée n'existe pas.", |
| 124 | + 'code' => '', |
| 125 | + ], |
| 126 | + |
| 127 | + 'resource_field_exists_in_attributes_and_relationships' => [ |
| 128 | + 'title' => "Document JSON API invalide", |
| 129 | + 'detail' => 'Le champ :field ne peut être à la fois un attribut et une relation.', |
| 130 | + 'code' => '', |
| 131 | + ], |
| 132 | + |
| 133 | + 'resource_invalid' => [ |
| 134 | + 'title' => 'Entité non traitable', |
| 135 | + 'detail' => 'Le document est correctement structuré mais contient des erreurs sémantiques.', |
| 136 | + 'code' => '', |
| 137 | + ], |
| 138 | + |
| 139 | + 'resource_cannot_be_deleted' => [ |
| 140 | + 'title' => 'Non supprimable', |
| 141 | + 'detail' => 'La ressource ne peut être supprimée.', |
| 142 | + 'code' => '', |
| 143 | + ], |
| 144 | + |
| 145 | + 'query_invalid' => [ |
| 146 | + 'title' => 'Paramètre de requête invalide', |
| 147 | + 'detail' => 'Les paramètres de la requête ne sont pas valides.', |
| 148 | + 'code' => '', |
| 149 | + ], |
| 150 | + |
| 151 | + 'failed_validator' => [ |
| 152 | + 'title' => 'Entité non traitable', |
| 153 | + 'detail' => 'Le document est correctement structuré mais contient des erreurs sémantiques.', |
| 154 | + 'code' => '', |
| 155 | + ], |
| 156 | +]; |
0 commit comments