Skip to content

Missing lots of error translations for the message argument given to custom JSON functions #10860

Description

@HachemJ

Describe the bug
A clear and concise description of what the bug is

I noticed a huge amount of missing translations for error messages which fix basically consists in translating the message argument passed to these custom LORIS\Http\Response\JSON\whatever functions.

After quick exchange with Dave, it would be preferable if one PR per module was opened to fix these.
They are not all likely to make it into LORIS 29.0.0 because of the important amount and the tight deadlines.

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

e.g. #10849
I couldn't all trigger them but one way to spot the non translated errors is going through these commands:

git grep -n "BadRequest"
git grep -n "NotFound"
etc.

to find the missing ones for a specific module.

Here's a script to put in the tools/ directory that runs all of the relevant git grep -n commands for a given module passed as the first argument of the script:

#!/usr/bin/env bash

module="$1"

# Missing Accepted, Create, NoContent, NotModified, SeeOther
for i in \
    BadRequest \
    Conflict \
    Forbidden \
    InternalServerError \
    MethodNotAllowed \
    NotFound \
    NotImplemented \
    OK \
    Unauthorized \
    UnsupportedMediaType
do
    git grep -n "$i" "../modules/$module"
done

What did you expect to happen?
A clear and concise description of what you expected to happen.

Per module, every error popup to be translated for the user to be able to understand why the error was triggered.

Here's the list of modules affected:

Metadata

Metadata

Assignees

Labels

29.0.0 - BugsIssues found during the release testing for 29.0.0MultilingualAny tasks related to making LORIS multilingualphpPull requests that update php code

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions