chore(frontend): QandA i18n
This commit is contained in:
		
							parent
							
								
									e6706d1750
								
							
						
					
					
						commit
						fe397c54e3
					
				
					 5 changed files with 16 additions and 8 deletions
				
			
		|  | @ -1,6 +1,9 @@ | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
|     import type { QuestionDTO } from "@dwengo-1/common/interfaces/question"; |     import type { QuestionDTO } from "@dwengo-1/common/interfaces/question"; | ||||||
|     import SingleQuestion from "./SingleQuestion.vue"; |     import SingleQuestion from "./SingleQuestion.vue"; | ||||||
|  |     import { useI18n } from 'vue-i18n'; | ||||||
|  | 
 | ||||||
|  |     const { t } = useI18n(); | ||||||
| 
 | 
 | ||||||
|     defineProps<{ |     defineProps<{ | ||||||
|         questions: QuestionDTO[]; |         questions: QuestionDTO[]; | ||||||
|  | @ -8,16 +11,17 @@ | ||||||
| </script> | </script> | ||||||
| <template> | <template> | ||||||
|     <div class="space-y-4"> |     <div class="space-y-4"> | ||||||
|         <div |         <div v-if="questions.length != 0"> | ||||||
|             v-if="questions.length !=0" |             <div | ||||||
|             v-for="question in questions" |                 v-for="question in questions" | ||||||
|             :key="(question.sequenceNumber, question.content)" |                 :key="(question.sequenceNumber, question.content)" | ||||||
|             class="border rounded-2xl p-4 shadow-sm bg-white" |                 class="border rounded-2xl p-4 shadow-sm bg-white" | ||||||
|         > |             > | ||||||
|             <SingleQuestion :question="question"></SingleQuestion> |                 <SingleQuestion :question="question"></SingleQuestion> | ||||||
|  |             </div> | ||||||
|         </div> |         </div> | ||||||
|         <div v-else> |         <div v-else> | ||||||
|             <p class="no-questions">No questions asked yet</p> |             <p class="no-questions">{{t("no-questions")}}</p> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
|  | @ -128,5 +128,6 @@ | ||||||
|     "answer-input-placeholder": "Antwort...", |     "answer-input-placeholder": "Antwort...", | ||||||
|     "answers-toggle-hide": "Antworten verstecken", |     "answers-toggle-hide": "Antworten verstecken", | ||||||
|     "answers-toggle-show": "Antworten anzeigen", |     "answers-toggle-show": "Antworten anzeigen", | ||||||
|  |     "no-questions": "Keine Fragen", | ||||||
|     "no-discussion-tip": "Wählen Sie ein Lernobjekt aus, um dessen Fragen anzuzeigen" |     "no-discussion-tip": "Wählen Sie ein Lernobjekt aus, um dessen Fragen anzuzeigen" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -128,6 +128,7 @@ | ||||||
|     "answer-input-placeholder": "answer...", |     "answer-input-placeholder": "answer...", | ||||||
|     "answers-toggle-hide": "Hide answers", |     "answers-toggle-hide": "Hide answers", | ||||||
|     "answers-toggle-show": "Show answers", |     "answers-toggle-show": "Show answers", | ||||||
|  |     "no-questions": "No questions asked yet", | ||||||
|     "no-discussion-tip": "Choose a learning object to view its questions" |     "no-discussion-tip": "Choose a learning object to view its questions" | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -128,5 +128,6 @@ | ||||||
|     "answer-input-placeholder": "réponse...", |     "answer-input-placeholder": "réponse...", | ||||||
|     "answers-toggle-hide": "Masquer réponses", |     "answers-toggle-hide": "Masquer réponses", | ||||||
|     "answers-toggle-show": "Afficher réponse", |     "answers-toggle-show": "Afficher réponse", | ||||||
|  |     "no-questions": "Aucune question trouvée", | ||||||
|     "no-discussion-tip": "Sélectionnez un objet d'apprentissage pour afficher les questions qui s'y rapportent" |     "no-discussion-tip": "Sélectionnez un objet d'apprentissage pour afficher les questions qui s'y rapportent" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -128,5 +128,6 @@ | ||||||
|     "answer-input-placeholder": "antwoord...", |     "answer-input-placeholder": "antwoord...", | ||||||
|     "answers-toggle-hide": "Verberg antwoorden", |     "answers-toggle-hide": "Verberg antwoorden", | ||||||
|     "answers-toggle-show": "Toon antwoorden", |     "answers-toggle-show": "Toon antwoorden", | ||||||
|  |     "no-questions": "Nog geen vragen gesteld", | ||||||
|     "no-discussion-tip": "Kies een leerobject om zijn vragen te bekijken" |     "no-discussion-tip": "Kies een leerobject om zijn vragen te bekijken" | ||||||
| } | } | ||||||
|  |  | ||||||
		Reference in a new issue