Skip to content

Commit

Permalink
chore(#43) : add more translations
Browse files Browse the repository at this point in the history
  • Loading branch information
JordyHers committed Jul 8, 2023
1 parent bff0e55 commit 494891e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
18 changes: 11 additions & 7 deletions lib/app/pages/child_details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'package:times_up_flutter/common_widgets/show_alert_dialog.dart';
import 'package:times_up_flutter/common_widgets/show_bottom_sheet.dart';
import 'package:times_up_flutter/common_widgets/show_exeption_alert.dart';
import 'package:times_up_flutter/common_widgets/show_logger.dart';
import 'package:times_up_flutter/l10n/l10n.dart';
import 'package:times_up_flutter/models/child_model/child_model.dart';
import 'package:times_up_flutter/models/notification_model/notification_model.dart';
import 'package:times_up_flutter/services/database.dart';
Expand Down Expand Up @@ -60,7 +61,7 @@ class _ChildDetailsPageState extends State<ChildDetailsPage> {
} on FirebaseException catch (e) {
await showExceptionAlertDialog(
context,
title: 'Operation failed',
title: AppLocalizations.of(context).operationFailed,
exception: e,
);
}
Expand Down Expand Up @@ -120,9 +121,11 @@ class _ChildDetailsPageState extends State<ChildDetailsPage> {
slivers: <Widget>[
SliverList(
delegate: SliverChildListDelegate([
const HeaderWidget(
title: "Enter this code on the child's device",
subtitle: 'Long press to copy or double tap to share ',
HeaderWidget(
title: AppLocalizations.of(context)
.enterThisCodeOnTheChildDevice,
subtitle: AppLocalizations.of(context)
.longPressToCopyOrDoubleTapToShare,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand All @@ -142,7 +145,7 @@ class _ChildDetailsPageState extends State<ChildDetailsPage> {
},
onDoubleTap: () async {
await Share.share(
"Enter this code on child's device:\n${model.id}",
"${AppLocalizations.of(context).enterThisCodeOnChildDevice} \n${model.id}",
);
},
child: JHDisplayText(
Expand Down Expand Up @@ -179,8 +182,9 @@ class _ChildDetailsPageState extends State<ChildDetailsPage> {
],
),
const SizedBox(height: 18),
const HeaderWidget(
title: "Send notifications to your Child's device",
HeaderWidget(
title: AppLocalizations.of(context)
.sendNotificationToYourChildDevice,
subtitle: 'Push the button ',
).p8,
GestureDetector(
Expand Down
8 changes: 6 additions & 2 deletions lib/l10n/arb/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"@@locale": "de",
"welcome": "Wilkommen",
"changeTheSettingsHere": "Ändern Sie hier die Einstellungen",
"addNewChildHere": "Fügen Sie hier ein neues Kind hinzu"

"addNewChildHere": "Fügen Sie hier ein neues Kind hinzu",
"operationFailed": "Operation failed",
"enterThisCodeOnTheChildDevice": "Enter this code on the child's device",
"longPressToCopyOrDoubleTapToShare": "Long press to copy or double tap to share",
"enterThisCodeOnChildDevice": "Enter this code on child's device: ",
"sendNotificationToYourChildDevice": "Send notifications to your Child's device"
}
8 changes: 6 additions & 2 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"@@locale": "en",
"welcome": "Welcome",
"changeTheSettingsHere": "change the settings here",
"addNewChildHere": "Add a new child here "

"addNewChildHere": "Add a new child here ",
"operationFailed": "Operation failed",
"enterThisCodeOnTheChildDevice": "Enter this code on the child's device",
"longPressToCopyOrDoubleTapToShare": "Long press to copy or double tap to share",
"enterThisCodeOnChildDevice": "Enter this code on child's device: ",
"sendNotificationToYourChildDevice": "Send notifications to your Child's device"
}
7 changes: 6 additions & 1 deletion lib/l10n/arb/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"@@locale": "es",
"welcome": "Hola !",
"changeTheSettingsHere": "Cambiar la configuración aquí",
"addNewChildHere": "Añadir un nuevo niño[a] aquí"
"addNewChildHere": "Añadir un nuevo niño[a] aquí",
"operationFailed": "Operation failed",
"enterThisCodeOnTheChildDevice": "Enter this code on the child's device",
"longPressToCopyOrDoubleTapToShare": "Long press to copy or double tap to share",
"enterThisCodeOnChildDevice": "Enter this code on child's device: ",
"sendNotificationToYourChildDevice": "Send notifications to your Child's device"


}
8 changes: 6 additions & 2 deletions lib/l10n/arb/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"@@locale": "fr",
"welcome": "Bienvenue",
"changeTheSettingsHere": "Modifier les paramètres ici",
"addNewChildHere": "Ajoute un enfant ici"

"addNewChildHere": "Ajoute un enfant ici",
"operationFailed": "Operation failed",
"enterThisCodeOnTheChildDevice": "Enter this code on the child's device",
"longPressToCopyOrDoubleTapToShare": "Long press to copy or double tap to share",
"enterThisCodeOnChildDevice": "Enter this code on child's device: ",
"sendNotificationToYourChildDevice": "Send notifications to your Child's device"
}
7 changes: 6 additions & 1 deletion lib/l10n/arb/app_tr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"@@locale": "tr",
"welcome": "Hoş Geldiniz",
"changeTheSettingsHere": "Buradaki ayarları değiştir",
"addNewChildHere": "Buraya yeni bir çocuk ekleyin"
"addNewChildHere": "Buraya yeni bir çocuk ekleyin",
"operationFailed": "Operation failed",
"enterThisCodeOnTheChildDevice": "Enter this code on the child's device",
"longPressToCopyOrDoubleTapToShare": "Long press to copy or double tap to share",
"enterThisCodeOnChildDevice": "Enter this code on child's device: ",
"sendNotificationToYourChildDevice": "Send notifications to your Child's device"

}

0 comments on commit 494891e

Please sign in to comment.