Skip to content
Snippets Groups Projects
Commit 568c7ff3 authored by Benjamin Ledel's avatar Benjamin Ledel
Browse files

* i18n support bugfixing

parent 173bcd82
Branches
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ The following example contains a schema with a single group of xAPI Verbs. Each
"description":"default",
"showVerbDetails":true,
"purposeOfCollection":"Lorem Ipsum",
"isDefault": false,
"verbs":[
{
"id":"http://moodle.example.com/expapi/verbs/completed",
......@@ -64,6 +65,7 @@ Now, let's delve deeper into the group configuration options. A group serves as
"description":"default",
"showVerbDetails":true,
"purposeOfCollection":"Lorem Ipsum",
"isDefault": false,
"verbs":[
...
]
......@@ -202,6 +204,44 @@ In a later stage of development, we introduced comprehensive internationalizatio
You have the option to retain the existing schema, translate specific properties, or fully translate the entire schema. All of these variants are feasible and supported within the system's configuration. This flexibility ensures that you can adapt the schema to your language and localization requirements, providing a tailored experience for your users.
You can define the i18n fields using the suffix "-i18n". For example:
```json
{
"id": "moodle-0",
"name": "Moodle", # default value
"name-i18n": {
"enUS": "Python Programming Course",
"frFr": "Cours de programmation Python"
},
"description": "Open-source learning management system", # default value
"description-i18n": {
"enUS": "Python Programming Course"
},
"groups": [
{
"id": "default_group",
"label": "Default group", # default value
"label-i18n": {
"enUS": "Python Programming Course"
},
"description": "default", # default value
"description-i18n": {
"enUS": "Python Programming Course"
},
"showVerbDetails": true,
"purposeOfCollection": "Lorem Ipsum", # default value
"purposeOfCollection-i18n": {
"enUS": "Python Programming Course"
},
"verbs": [
...
]
}
]
}
```
## Useful online tools
- JSON Formatter: https://jsonformatter.curiousconcept.com/
......
......@@ -104,6 +104,7 @@ export class ProviderComponent implements OnInit {
reset() {
this.fileName = $localize`:@@selectProviderSchema:Please select a JSON file.`
this.uploadProgress = null
this.selectedFile = undefined
this.uploadSub = null
window.scroll(0, 0)
}
......
......@@ -47,7 +47,7 @@ export class HttpRequestInterceptor implements HttpInterceptor {
this._authService.logout()
} else
this._toasterService.error(
err.error?.message ?? err.statusText,
err.error?.message ?? err.statusText + " " + err.error?.errors,
`${err.status}`
)
this._loading.setLoading(false, request.url)
......
......@@ -34,7 +34,7 @@
routerLink="/provider"
routerLinkActive="mat-accent"
*ngIf="loggedIn?.isProvider"
>Provider</a
>Systeme</a
>
<a
mat-button
......
......@@ -472,6 +472,7 @@
</trans-unit>
<trans-unit id="createProviderSchema" datatype="html">
<source>Create/Update Provider Schema</source>
<target>Provider-Schema Erstellen/Aktualsieren</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/consent-management/provider/provider.component.html</context>
<context context-type="linenumber">58</context>
......@@ -496,6 +497,7 @@
</trans-unit>
<trans-unit id="selectProviderSchema" datatype="html">
<source>Please select a JSON file.</source>
<target>Bitte ein Provider Schema auswählen</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/consent-management/provider/provider.component.ts</context>
<context context-type="linenumber">24</context>
......
{
"id": "moodle-0",
"name": "Moodle",
"name-i18n": {
"enUS": "Python Programming Course",
"frFr": "Cours de programmation Python"
},
"description": "Open-source learning management system",
"description-i18n": {
"enUS": "Python Programming Course"
},
"groups": [
{
"id": "default_group",
"label": "Default group",
"label-i18n": {
"enUS": "Python Programming Course"
},
"description": "default",
"description-i18n": {
"enUS": "Python Programming Course"
},
"showVerbDetails": true,
"purposeOfCollection": "Lorem Ipsum",
"purposeOfCollection-i18n": {
"enUS": "Python Programming Course"
},
"verbs": [
{
"id": "http://moodle.example.com/expapi/verbs/completed",
"label": "Completed",
"label-i18n": {
"enUS": "Python Programming Course"
},
"description": "Completed",
"description-i18n": {
"enUS": "Python Programming Course"
},
"defaultConsent": true,
"objects": [
{
"id": "http://moodle.example.com/expapi/activity/programming-course-python",
"label": "Python Programming Course",
"label-i18n": {
"enUS": "Python Programming Course"
},
"defaultConsent": true,
"matching": "definitionType",
"definition": {
"type": "http://moodle.example.com/expapi/activity/programming-course-python",
"name": {
"enUS": "Python Programming Course"
}
}
}
]
}
]
}
],
"essentialVerbs": []
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment