Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

`Development`: Move translation keys for error messages into error.json

Open Strohgelaender opened this issue 2 years ago • 1 comments

Checklist

General

Client

  • [x] I followed the coding and design guidelines and ensured that the layout is responsive.
  • [x] I translated all newly inserted strings into English and German.

Motivation and Context

I noticed that there are two different locations in the current codebase where translations for error messages were stored. One was error.json, the other global.json.

Description

We should only have one general location for error messages. Therefore I moved all strings from global.json to error.json.

This PR additionally fixes a small bug with programming exercises and auxiliary repositories. The description was not sent to the server and therefore did not get saved.

Steps for Testing

Try to invoke some server errors and check that the resulting alert shows correct strings in both German and English.

Additionally, test the saving of descriptions for auxiliary repositories:

Create and / or edit a programming exercise:

  1. Add a new auxiliary repository to the exercise and set values for all fields.
  2. Save the exercise and check that all values got saved.
  3. Change the description to a long text (> 500 chars)
  4. Make sure that a translated error message is shown. This message should also contain the maximum length of 500 chars.

Review Progress

Code Review

  • [ ] Review 1
  • [ ] Review 2

Manual Tests

  • [ ] Test 1
  • [ ] Test 2

Strohgelaender avatar Jun 26 '22 20:06 Strohgelaender

image These words don't get translated. (But not really part of the PR)

SimonPaul02 avatar Jul 20 '22 18:07 SimonPaul02

LGTM. @Strohgelaender can you resolve the merge conflict? I would merge this today.

jpbernius avatar Aug 25 '22 07:08 jpbernius

Ping @jpbernius

ge65cer avatar Aug 30 '22 11:08 ge65cer