Change error map to handle templated error messages from backend - #6483
Conversation
bastianjoel
left a comment
There was a problem hiding this comment.
I really don't like extending this.
We already have https://ngx-translate.org/getting-started/translating-your-components/#with-parameters available in feature/vote via 4a32f08#diff-27642ca8b5c52c5d46eb8ea14c441a142374e0f4a41f12bcace2c4b6a1561756.
Also #6120 which could be used to parse more generic error strings is already implemented at pipe level there.
Please check if those things would help. Maybe together with a new action error response format (e.g. something like [{ error: 'format_error', params: { field: 'is_active' }}]).
If it helps I can cherry pick those things to main and if needed add a service for #6120.
There was a problem hiding this comment.
I am adding a waiting label because we need to add https://github.com/OpenSlides/openslides-client/pull/6153/files#diff-27642ca8b5c52c5d46eb8ea14c441a142374e0f4a41f12bcace2c4b6a1561756 and https://github.com/OpenSlides/openslides-client/pull/6153/files#diff-10241f66631c8b0097464f0f3dd2b398244b57ac6251e1c7c19b7cfc7aae18d2 to main before merging.
…ssages-translatable
…ssages-translatable
|
Necessary changes added to main and merged into this PR. |
|
waiting until backend is ready to be merged/merged |
|
This PR should be mergable without breaking anything else |
Result of OpenSlides/openslides-backend#3674
Needs OpenSlides/openslides-backend#3705 to work
This probably won't work until what @bastianjoel wrote in #6483 (review) is done