Add quiz translations + try to fix ios layout issues

This commit is contained in:
Fransolet Thomas 2023-03-03 16:50:28 +01:00
parent b2c0f4915c
commit efa6cfe3f1
3 changed files with 40 additions and 20 deletions

View File

@ -51,7 +51,7 @@ class _QuestionsListWidget extends State<QuestionsListWidget> {
/*return OrientationBuilder(
builder: (context, orientation) {*/
return SizedBox(
height: widget.isShowResponse ? widget.orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.825 : MediaQuery.of(context).size.height * 0.625 : MediaQuery.of(context).size.height,
height: widget.isShowResponse ? widget.orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.84 : MediaQuery.of(context).size.height * 0.625 : MediaQuery.of(context).size.height,
width: double.infinity,
//color: Colors.orange,
child: Stack(

View File

@ -189,14 +189,14 @@ class _QuizzPageState extends State<QuizzPage> {
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: resultButtons(size, orientation),
children: resultButtons(size, orientation, visitAppContext!),
),
if(orientation == Orientation.landscape)
// Buttons
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: resultButtons(size, orientation),
children: resultButtons(size, orientation, visitAppContext!),
),
],
),
@ -380,15 +380,15 @@ class _QuizzPageState extends State<QuizzPage> {
);
}
resultButtons(Size size, Orientation orientation) {
resultButtons(Size size, Orientation orientation, VisitAppContext visitAppContext) {
return [
Padding(
padding: const EdgeInsets.all(4),
child: SizedBox(
height: kIsWeb ? 50 : 50,
width: orientation == Orientation.portrait ? size.width * 0.6 : size.width * 0.3,
height: kIsWeb ? 50 : 40,
width: orientation == Orientation.portrait ? size.width * 0.6 : size.width * 0.35,
child: RoundedButton(
text: "Recommencer",
text: TranslationHelper.getFromLocale("restart", visitAppContext),
color: kBackgroundSecondGrey,
textColor: kBackgroundLight,
icon: Icons.undo,
@ -410,10 +410,10 @@ class _QuizzPageState extends State<QuizzPage> {
Padding(
padding: const EdgeInsets.all(4.0),
child: SizedBox(
height: kIsWeb ? 50 : 50,
width: orientation == Orientation.portrait ? size.width * 0.6 : size.width * 0.3,
height: kIsWeb ? 50 : 40,
width: orientation == Orientation.portrait ? size.width * 0.6 : size.width * 0.35,
child: RoundedButton(
text: "Voir lesponses",
text: TranslationHelper.getFromLocale("responses", visitAppContext),
color: kBackgroundSecondGrey,
textColor: kBackgroundLight,
icon: Icons.assignment_turned_in,

View File

@ -20,7 +20,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "La visite sélectionnée va être mise à jour. Ceci implique le téléchargement de contenu supplémentaire. La taille du téléchargement est de 28,9MB.",
"download": "Télécharger",
"downloadLanguage": "Sélectionner la langue de la visite",
"ok": "OK"
"ok": "OK",
"responses": "Réponses",
"restart": "Recommencer"
}),
Translation(language: "EN", data: {
"visitTitle": "List of tours",
@ -41,7 +43,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "The selected tour will be updated. This involves downloading additional content. The download size is 28.9MB.",
"download": "Download",
"downloadLanguage": "Select the tour language",
"ok": "OK"
"ok": "OK",
"responses": "Answers",
"restart": "Restart"
}),
Translation(language: "DE", data: {
"visitTitle": "Liste der Touren",
@ -62,7 +66,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "Die ausgewählte Tour wird aktualisiert. Dies beinhaltet das Herunterladen zusätzlicher Inhalte. Die Downloadgröße beträgt 28,9 MB.",
"download": "Herunterladen",
"downloadLanguage": "Wählen Sie die Sprache des Besuchs aus",
"ok": "OK"
"ok": "OK",
"responses": "Antworten",
"restart": "Neu starten"
}),
Translation(language: "NL", data: {
"visitTitle": "Lijst met rondleidingen",
@ -83,7 +89,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "De geselecteerde tour wordt bijgewerkt. Dit omvat het downloaden van extra inhoud. De downloadgrootte is 28,9 MB.",
"download": "Downloaden",
"downloadLanguage": "Selecteer de taal van de tour",
"ok": "OK"
"ok": "OK",
"responses": "Antwoorden",
"restart": "Herstarten"
}),
Translation(language: "IT", data: {
"visitTitle": "Elenco dei tour",
@ -104,7 +112,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "Il tour selezionato verrà aggiornato. Ciò comporta il download di contenuti aggiuntivi. La dimensione del download è di 28,9 MB.",
"download": "Scaricamento",
"downloadLanguage": "Seleziona la lingua del tour",
"ok": "OK"
"ok": "OK",
"responses": "Risposte",
"restart": "Ricomincia"
}),
Translation(language: "ES", data: {
"visitTitle": "Lista de recorridos",
@ -125,7 +135,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "El recorrido seleccionado se actualizará. Esto implica descargar contenido adicional. El tamaño de la descarga es de 28,9 MB.",
"download": "Descargar",
"downloadLanguage": "Selecciona el idioma del tour",
"ok": "Ok"
"ok": "Ok",
"responses": "Respuestas",
"restart": "Reanudar"
}),
Translation(language: "PL", data: {
"visitTitle": "Lista wycieczek",
@ -146,7 +158,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "El recorrido seleccionado se actualizará. Esto implica descargar contenido adicional. El tamaño de la descarga es de 28,9 MB.",
"download": "Descargar",
"downloadLanguage": "Wybierz język wycieczki",
"ok": "OK"
"ok": "OK",
"responses": "Odpowiedzi",
"restart": "Uruchom ponownie"
}),
Translation(language: "CN", data: {
"visitTitle": "旅游清单",
@ -167,7 +181,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "所选游览将被更新。 这涉及下载附加内容。 下载大小为 28.9MB。",
"download": "下载",
"downloadLanguage": "选择游览语言",
"ok": "好的"
"ok": "好的",
"responses": "答案",
"restart": "重新开始"
}),
Translation(language: "UK", data: {
"visitTitle": "Список турів",
@ -188,7 +204,9 @@ List<Translation> translations = [
"downloadPromptUpdate": "Вибраний тур буде оновлено. Це передбачає завантаження додаткового вмісту. Розмір завантаження становить 28,9 МБ.",
"download": "Завантажити",
"downloadLanguage": "Виберіть мову туру",
"ok": "В порядку"
"ok": "В порядку",
"responses": "Відповіді",
"restart": "Перезапустіть"
}),
Translation(language: "AR", data: {
"visitTitle": "قائمة الجولات",
@ -209,6 +227,8 @@ List<Translation> translations = [
"downloadPromptUpdate": "سيتم تحديث الجولة المختارة. هذا ينطوي على تنزيل محتوى إضافي. حجم التنزيل 28.9 ميجا بايت.",
"download": "تحميل",
"downloadLanguage": "حدد لغة الجولة",
"ok": "نعم"
"ok": "نعم",
"responses": "الإجابات",
"restart": "إعادة تشغيل"
}),
];