Open
Description
- Existing feature enhancement
Messages from server-side operations are not translated
For instance:
Feature enhancement details:
In order to not break the API, maybe introducing an extra field in the response to identify the string to display, and the field that triggers that response, and get the translation in the client, according to the language of the client.
For example , an extract from these lines
https://github.com/processing/p5.js-web-editor/blob/develop/server/controllers/user.controller.js#L102-L108
if (user) {
return res.json({
exists: true,
message: `This ${checkType} is already taken.`,
type: checkType
});
}
would be
if (user) {
return res.json({
exists: true,
message: `This ${checkType} is already taken.`,
messageKey: ServerTranslation.UserTaken,
type: checkType
});
}