Skip to content

Commit d585ec1

Browse files
committed
Unify translations for ProFormA
1 parent 280d316 commit d585ec1

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

config/locales/de/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ de:
55
button:
66
abort: Abbrechen
77
approve: Annehmen
8-
available_versions: Verfügbare ProFormA Versionen
8+
available_versions: Verfügbare ProFormA-Versionen
99
back: Zurück
1010
cancel: Abbrechen
1111
close: Schließen

config/locales/de/models.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ de:
66
api_key: API-Schlüssel
77
check_uuid_url: URL zum Überprüfen der UUID
88
name: Name
9-
proforma_version: ProFormA Version
9+
proforma_version: ProFormA-Version
1010
push_url: Push-URL
1111
account_link_user:
1212
user: Benutzer:in
@@ -67,7 +67,7 @@ de:
6767
task/model_solutions/files:
6868
attachment: Anhang einer Datei in einer Musterlösung
6969
name: Name einer Datei in einer Musterlösung
70-
xml_id: XML_ID einer Datei in einer Musterlösung
70+
xml_id: XML-ID einer Datei in einer Musterlösung
7171
task/tests:
7272
title: Titel eines Tests
7373
xml_id: XML-ID eines Tests
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
de:
33
proforma_errors:
4-
import: Es ist ein Fehler beim Importieren der ProformaXML ZIP-Datei aufgetreten.
4+
import: Es ist ein Fehler beim Importieren der ProFormA-ZIP-Datei aufgetreten.
55
no task_xml found: Es konnte keine task.xml in der ZIP-Datei gefunden werden.
6-
version not supported: Die Version dieses ProformaXML Dokuments wird nicht unterstützt.
6+
version not supported: Die Version dieses ProFormA-Dokuments wird nicht unterstützt.

config/locales/de/views/home.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ de:
1313
Wenn Sie einen Account-Link haben, können Sie einfach Aufgaben zu den Autogradern exportieren, die für Sie verfügbar sind. <br/>
1414
Sie können Ihren eigenen Account-Link erstellen, wenn Sie die push_url eines Autograders haben, der OAuth2-POST-Anfragen verarbeiten kann.</br>
1515
</p>
16-
<h3>Sie möchten einen Autograder verbinden, der bereits OAuth2- und ProFormA-XML-Unterstützung hat:</h3>
16+
<h3>Sie möchten einen Autograder verbinden, der bereits OAuth2- und ProFormA-Unterstützung hat:</h3>
1717
<p>
18-
Wenn der Autograder Aufgaben, die über OAuth2-Anfragen im ProFormA-XML-Format gesendet werden, importieren kann, benötigen Sie folgende Konfigurationsparameter: <br/>
18+
Wenn der Autograder Aufgaben, die über OAuth2-Anfragen im ProFormA-Format gesendet werden, importieren kann, benötigen Sie folgende Konfigurationsparameter: <br/>
1919
1. Push-URL: Der Autograder benötigt eine URL, an die CodeHarbor die Aufgabe senden kann. <br/>
2020
2. OAuth2-Token: Der Autograder muss in der Lage sein, ein Token mit Ihrem Account zu verknüpfen, um Aufgaben zu autorisieren, die zum Autograder gesendet werden. <br/>
2121
Wenn Sie kein spezifisches Token benötigen, können Sie ein Token generieren, wenn Sie einen Account-Link auf der CodeHarbor-Seite erstellen, oder ein beliebiges Token verwenden, <br/>
@@ -27,10 +27,10 @@ de:
2727
<p>
2828
CodeHarbor verwendet das OAuth 2.0-Protokoll, um Aufgaben über eine POST-Anfrage zu senden. <a href="https://oauth.net/2/">https://oauth.net/2/</a><br/>
2929
CodeHarbor ist in diesem Fall der Client, Ihr Autograder der Ressourcenserver und Sie sind der Ressourcenbesitzer.
30-
Wenn Sie eine Aufgabe exportieren, generiert CodeHarbor zunächst eine XML-Datei, die dem ProFormA-XML-Standard für den Austausch von Aufgaben entspricht. <a href="https://github.com/ProFormA/taskxml">https://github.com/ProFormA/taskxml</a>
30+
Wenn Sie eine Aufgabe exportieren, generiert CodeHarbor zunächst eine XML-Datei, die dem ProFormA-Standard für den Austausch von Aufgaben entspricht. <a href="https://github.com/ProFormA/taskxml">https://github.com/ProFormA/taskxml</a>
3131
Anschließend wird eine POST-Anfrage an die von Ihnen gewählte push_url gesendet. Die XML-Datei befindet sich im Anfragekörper und der OAuth2-Token in den Anforderungsheadern ("request.headers['Authorization']"). <br/>
3232
In Ihrem Autograder müssen Sie sicherstellen, dass der OAuth2-Token validiert wird und der entsprechende Benutzer gefunden wird. Wir empfehlen, eine Schnittstelle hinzuzufügen, damit Benutzer:innen ein OAuth2-Token hinzufügen können. <br/>
33-
Die XML-Datei im Anfragekörper muss in die Datenbank geparst werden. Da wir das ProFormA-XML-Format verwenden, können Sie das XML mit XPath parsen. <br/>
33+
Die XML-Datei im Anfragekörper muss in die Datenbank geparst werden. Da wir das ProFormA-Format verwenden, können Sie das XML mit XPath parsen. <br/>
3434
Schließlich antworten Sie bitte mit einem Statuscode 200, wenn alles in Ordnung war, oder mit einem Statuscode 400, wenn dies nicht der Fall war. <br/>
3535
</p>
3636
index:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
en:
33
proforma_errors:
4-
import: An error occurred while importing your ProformaXML ZIP file.
4+
import: An error occurred while importing your ProFormA ZIP file.
55
no task_xml found: No task.xml could be found in the supplied ZIP file.
6-
version not supported: The version of this ProformaXML document is not supported.
6+
version not supported: The version of this ProFormA document is not supported.

config/locales/en/views/home.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ en:
1313
If you have an account link you can simply export exercises available to you into the auto-grader. <br/>
1414
You can create your own account link if you have the push_url of an auto-grader that can handle OAuth2 post requests.</br>
1515
</p>
16-
<h3>You want to connect an auto-grader that already has OAuth2 and ProFormA-XML support:</h3>
16+
<h3>You want to connect an auto-grader that already has OAuth2 and ProFormA support:</h3>
1717
<p>
18-
If the auto-grader can import exercises sent via OAuth2 request in the ProFormA-XML format you will need the following things: <br/>
18+
If the auto-grader can import exercises sent via OAuth2 request in the ProFormA format you will need the following things: <br/>
1919
1. Push-url: The auto-grader needs to have a URL CodeHarbor can post the exercise to. <br/>
2020
2. OAuth2-token: The auto-grader must be able to link a token to your account to authorize exercises that will be pushed there. <br/>
2121
If you do not need a specific token you can generate a token when creating an account link on CodeHarbor side or use whatever you want <br/>
@@ -27,10 +27,10 @@ en:
2727
<p>
2828
CodeHarbor uses the OAuth 2.0 protocol to send exercises via a post request. <a href="https://oauth.net/2/">https://oauth.net/2/</a><br/>
2929
CodeHarbor is the client in this case, your auto-grader the resource server and you are the resource owner.
30-
When you are exporting an exercise, CodeHarbor first generates an XML-file complying with the ProFormA-XML standard for exchanging exercises. <a href="https://github.com/ProFormA/taskxml">https://github.com/ProFormA/taskxml</a>
30+
When you are exporting an exercise, CodeHarbor first generates an XML-file complying with the ProFormA standard for exchanging exercises. <a href="https://github.com/ProFormA/taskxml">https://github.com/ProFormA/taskxml</a>
3131
Then it will make a post request to the URL you chose as the push_url. The XML-file will be in the request body and the OAuth2 token in the request headers ("request.headers['Authorization']"). <br/>
3232
In your auto-grader you need to make sure that the OAuth2 token is validated and the corresponding user found. We recommend to add an interface for users to add an OAuth2-token. <br/>
33-
The XML-file in the request-body needs to be parsed into the database. Since we are using the ProFormA-XML format you can parse the xml using xpath. <br/>
33+
The XML-file in the request-body needs to be parsed into the database. Since we are using the ProFormA format you can parse the xml using xpath. <br/>
3434
Finally, please respond with a 200 status code if everything went okay or a 400 if it did not. <br/>
3535
</p>
3636
index:

spec/controllers/tasks_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@
804804

805805
it 'renders correct JSON' do
806806
post_request
807-
expect(JSON.parse(response.body, symbolize_names: true)).to eql({status: 'failure', message: 'Import of task could not be started. <br> Error: An error occurred while importing your ProformaXML ZIP file.<br>The version of this ProformaXML document is not supported.', actions: ''})
807+
expect(JSON.parse(response.body, symbolize_names: true)).to eql({status: 'failure', message: 'Import of task could not be started. <br> Error: An error occurred while importing your ProFormA ZIP file.<br>The version of this ProFormA document is not supported.', actions: ''})
808808
end
809809
end
810810

0 commit comments

Comments
 (0)