processing / processing/p5.js-web-editor
Translation for Server-Side Messages
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
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
});
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced branches in server/controllers/user.controller.js, especially the responses around lines 60-61, 102-108, 147, and 176. Determine how to expose translation keys without breaking the existing API, then verify that the client can select the corresponding translated message for its language while preserving the current response fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend-api-design, internationalization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100