feat(frontend): Vertalingen aan frontend toegevoegd
This commit is contained in:
		
							parent
							
								
									7c55c3a081
								
							
						
					
					
						commit
						858f4c3694
					
				
					 7 changed files with 1306 additions and 496 deletions
				
			
		|  | @ -48,5 +48,8 @@ | ||||||
|     "enterSearchTerm": "Lernpfade suchen", |     "enterSearchTerm": "Lernpfade suchen", | ||||||
|     "enterSearchTermDescription": "Bitte geben Sie einen Suchbegriff ein.", |     "enterSearchTermDescription": "Bitte geben Sie einen Suchbegriff ein.", | ||||||
|     "noLearningPathsFound": "Nichts gefunden!", |     "noLearningPathsFound": "Nichts gefunden!", | ||||||
|     "noLearningPathsFoundDescription": "Es gibt keine Lernpfade, die zu Ihrem Suchbegriff passen." |     "noLearningPathsFoundDescription": "Es gibt keine Lernpfade, die zu Ihrem Suchbegriff passen.", | ||||||
|  |     "legendNotCompletedYet": "Noch nicht fertig", | ||||||
|  |     "legendCompleted": "Fertig", | ||||||
|  |     "legendTeacherExclusive": "Information für Lehrkräfte" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -15,6 +15,9 @@ | ||||||
|     "enterSearchTermDescription": "Please enter a search term.", |     "enterSearchTermDescription": "Please enter a search term.", | ||||||
|     "noLearningPathsFound": "Nothing found!", |     "noLearningPathsFound": "Nothing found!", | ||||||
|     "noLearningPathsFoundDescription": "There are no learning paths matching your search term.", |     "noLearningPathsFoundDescription": "There are no learning paths matching your search term.", | ||||||
|  |     "legendNotCompletedYet": "Not completed yet", | ||||||
|  |     "legendCompleted": "Completed", | ||||||
|  |     "legendTeacherExclusive": "Information for teachers", | ||||||
|     "cancel": "cancel", |     "cancel": "cancel", | ||||||
|     "logoutVerification": "Are you sure you want to log out?", |     "logoutVerification": "Are you sure you want to log out?", | ||||||
|     "homeTitle": "Our strengths", |     "homeTitle": "Our strengths", | ||||||
|  |  | ||||||
|  | @ -8,7 +8,10 @@ | ||||||
|     "enterSearchTerm": "Rechercher des parcours d'apprentissage", |     "enterSearchTerm": "Rechercher des parcours d'apprentissage", | ||||||
|     "enterSearchTermDescription": "Saisissez un terme de recherche pour commencer.", |     "enterSearchTermDescription": "Saisissez un terme de recherche pour commencer.", | ||||||
|     "noLearningPathsFound": "Rien trouvé !", |     "noLearningPathsFound": "Rien trouvé !", | ||||||
|     "noLearningPathsFoundDescription": "Aucun parcours d'apprentissage ne correspond à votre recherche." |     "noLearningPathsFoundDescription": "Aucun parcours d'apprentissage ne correspond à votre recherche.", | ||||||
|  |     "legendNotCompletedYet": "Pas encore achevé", | ||||||
|  |     "legendCompleted": "Achevé", | ||||||
|  |     "legendTeacherExclusive": "Informations pour les enseignants", | ||||||
|     "student": "élève", |     "student": "élève", | ||||||
|     "teacher": "enseignant", |     "teacher": "enseignant", | ||||||
|     "assignments": "Travails", |     "assignments": "Travails", | ||||||
|  |  | ||||||
|  | @ -15,6 +15,9 @@ | ||||||
|     "enterSearchTermDescription": "Gelieve een zoekterm in te voeren.", |     "enterSearchTermDescription": "Gelieve een zoekterm in te voeren.", | ||||||
|     "noLearningPathsFound": "Niets gevonden!", |     "noLearningPathsFound": "Niets gevonden!", | ||||||
|     "noLearningPathsFoundDescription": "Er zijn geen leerpaden die overeenkomen met je zoekterm.", |     "noLearningPathsFoundDescription": "Er zijn geen leerpaden die overeenkomen met je zoekterm.", | ||||||
|  |     "legendNotCompletedYet": "Nog niet afgewerkt", | ||||||
|  |     "legendCompleted": "Afgewerkt", | ||||||
|  |     "legendTeacherExclusive": "Informatie voor leerkrachten", | ||||||
|     "cancel": "annuleren", |     "cancel": "annuleren", | ||||||
|     "logoutVerification": "Bent u zeker dat u wilt uitloggen?", |     "logoutVerification": "Bent u zeker dat u wilt uitloggen?", | ||||||
|     "homeTitle": "Onze sterke punten", |     "homeTitle": "Onze sterke punten", | ||||||
|  |  | ||||||
|  | @ -85,6 +85,7 @@ | ||||||
| 
 | 
 | ||||||
|     const navigationDrawerShown = ref(true); |     const navigationDrawerShown = ref(true); | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|     function isLearningObjectCompleted(learningObject: LearningObject): boolean { |     function isLearningObjectCompleted(learningObject: LearningObject): boolean { | ||||||
|         if (learningPathResource.state.type === "success") { |         if (learningPathResource.state.type === "success") { | ||||||
|             return learningPathResource.state.data.nodesAsList.filter(it => |             return learningPathResource.state.data.nodesAsList.filter(it => | ||||||
|  | @ -95,13 +96,28 @@ | ||||||
|         } |         } | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     function getStatusIconForLearningObject(learningObject: LearningObject): {icon: string, color?: "success" | "info" | "warning" | "error"} { | 
 | ||||||
|  |     type NavItemState = "teacherExclusive" | "completed" | "notCompleted"; | ||||||
|  | 
 | ||||||
|  |     const ICONS: {[key: NavItemState]: string} = { | ||||||
|  |         teacherExclusive: "mdi-information", | ||||||
|  |         completed: "mdi-checkbox-marked-circle-outline", | ||||||
|  |         notCompleted: "mdi-checkbox-blank-circle-outline" | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     const COLORS: {[key: NavItemState]: string | undefined}  = { | ||||||
|  |         teacherExclusive: "info", | ||||||
|  |         completed: "success", | ||||||
|  |         notCompleted: undefined | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     function getNavItemState(learningObject: LearningObject): NavItemState { | ||||||
|         if (learningObject.teacherExclusive) { |         if (learningObject.teacherExclusive) { | ||||||
|             return {icon: "mdi-information", color: "info"}; |             return "teacherExclusive"; | ||||||
|         } else if (isLearningObjectCompleted(learningObject)) { |         } else if (isLearningObjectCompleted(learningObject)) { | ||||||
|             return {icon: "mdi-checkbox-marked-circle-outline", color: "success"}; |             return "completed"; | ||||||
|         } else { |         } else { | ||||||
|             return {icon: "mdi-checkbox-blank-circle-outline"}; |             return "notCompleted"; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| </script> | </script> | ||||||
|  | @ -116,6 +132,13 @@ | ||||||
|                 :title="learningPath.data.title" |                 :title="learningPath.data.title" | ||||||
|                 :subtitle="learningPath.data.description" |                 :subtitle="learningPath.data.description" | ||||||
|             ></v-list-item> |             ></v-list-item> | ||||||
|  |             <v-list-item> | ||||||
|  |                 <template v-slot:subtitle> | ||||||
|  |                     <p><v-icon :color="COLORS.notCompleted" :icon="ICONS.notCompleted"></v-icon> {{ t("legendNotCompletedYet") }}</p> | ||||||
|  |                     <p><v-icon :color="COLORS.completed" :icon="ICONS.completed"></v-icon> {{ t("legendCompleted") }}</p> | ||||||
|  |                     <p><v-icon :color="COLORS.teacherExclusive" :icon="ICONS.teacherExclusive"></v-icon> {{ t("legendTeacherExclusive") }}</p> | ||||||
|  |                 </template> | ||||||
|  |             </v-list-item> | ||||||
|             <v-divider></v-divider> |             <v-divider></v-divider> | ||||||
| 
 | 
 | ||||||
|             <div v-if="props.learningObjectHruid"> |             <div v-if="props.learningObjectHruid"> | ||||||
|  | @ -132,8 +155,8 @@ | ||||||
|                     > |                     > | ||||||
|                         <template v-slot:prepend> |                         <template v-slot:prepend> | ||||||
|                             <v-icon |                             <v-icon | ||||||
|                                 :color="getStatusIconForLearningObject(node).color" |                                 :color="COLORS[getNavItemState(node)]" | ||||||
|                                 :icon="getStatusIconForLearningObject(node).icon"></v-icon> |                                 :icon="ICONS[getNavItemState(node)]"></v-icon> | ||||||
|                         </template> |                         </template> | ||||||
|                         <template v-slot:append> |                         <template v-slot:append> | ||||||
|                             {{ node.estimatedTime }}' |                             {{ node.estimatedTime }}' | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ | ||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|     <div class="search-field-container"> |     <div class="search-field-container"> | ||||||
|         <learning-path-search-field></learning-path-search-field> |         <learning-path-search-field class="search-field"></learning-path-search-field> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <using-remote-resource :resource="searchResultsResource" v-slot="{ data }: {data: LearningPath[]}"> |     <using-remote-resource :resource="searchResultsResource" v-slot="{ data }: {data: LearningPath[]}"> | ||||||
|  | @ -33,7 +33,7 @@ | ||||||
|             <v-card |             <v-card | ||||||
|                 class="learning-path-card" |                 class="learning-path-card" | ||||||
|                 link |                 link | ||||||
|                 :to="`${learningPath.hruid}/${learningPath.language}`" |                 :to="`${learningPath.hruid}/${learningPath.language}/${learningPath.startNode.learningobjectHruid}`" | ||||||
|                 v-for="learningPath in data" |                 v-for="learningPath in data" | ||||||
|             > |             > | ||||||
|                 <v-img |                 <v-img | ||||||
|  |  | ||||||
							
								
								
									
										1747
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										1747
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger