Skip to content

Commit

Permalink
fix: Add more german translation
Browse files Browse the repository at this point in the history
  • Loading branch information
nstrelow committed Aug 29, 2021
1 parent 0bf28d7 commit 5680d32
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 12 deletions.
13 changes: 13 additions & 0 deletions app/lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@
"no_interventions_available": "Keine Interventionen verfügbar.",
"loading_interventions": "Interventionen laden",

"intervention_phase_duration": "Länge der Interventionphasen",
"days": "Tage",
"study_length": "Studienlänge",
"study_publisher": "Studienherausgeber",

"tasks_daily": "Aufgaben:",
"baseline": "Die Baseline ist eine Phase innerhalb einer Studie, in der der Ausgangszustand gemessen wird, um spätere Vergleiche zu ermöglichen. Während der Baseline-Phase sollen Sie sich wie gewohnt verhalten, studienspezifische Maßnahmen werden noch keine durchgeführt.",
"days_left": "Tage übrig",

"today_tasks": "Aufgaben heute",
"intervention_current": "Aktuelle Maßnahme",
Expand Down Expand Up @@ -85,6 +91,8 @@
"faq": "FAQ",
"faq_full": "Häufig Gestellte Fragen",

"start_study": "Starte Studie",

"could_not_save_results": "Ergebnisse konnten nicht gespeichert werden.",

"language": "Sprache",
Expand All @@ -111,6 +119,11 @@
"privacy_agree": "Ich habe die Datenschutzbestimmung gelesen und bin damit einverstanden",
"imprint_read": "Impressum lesen",

"invite_code_button": "Einladungscode verwenden",
"private_study_invite_code": "Privater Studien Einladungscode",
"invite_code": "Einladungscode",
"invalid_invite_code": "Dies ist kein valider Einladungscode",

"save_pdf": "Als PDF speichern",
"was_saved_to": "Die Datei wurde gespeichert unter ",
"save_not_supported": "Fehler",
Expand Down
13 changes: 13 additions & 0 deletions app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@
"no_interventions_available": "No interventions available.",
"loading_interventions": "Loading interventions",

"intervention_phase_duration": "Intervention phase duration",
"days": "days",
"study_length": "Study length",
"study_publisher": "Study Publisher",

"tasks_daily": "Tasks:",
"baseline": "The baseline is a phase within a study in which the initial state is measured to allow later comparisons. During the baseline phase you should behave as usual, no study-specific interventions are carried out yet.",
"days_left": "days left",

"today_tasks": "Today's tasks",
"intervention_current": "Current intervention",
Expand Down Expand Up @@ -83,6 +89,8 @@
"faq_full": "Frequently Asked Questions",
"faq": "FAQ",

"start_study": "Start Study",

"could_not_save_results": "Could not save results",

"language": "Language",
Expand All @@ -109,6 +117,11 @@
"privacy_agree": "I have read and agree to the privacy policy",
"imprint_read": "Read Imprint",

"invite_code_button": "Use invite code",
"private_study_invite_code": "Private study invite code",
"invite_code": "Invite code",
"invalid_invite_code": "Not a valid invite code",

"save_pdf": "Save as PDF",
"was_saved_to": "The file was saved to ",
"save_not_supported": "Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class _TaskOverviewState extends State<TaskOverview> {
Text(AppLocalizations.of(context).intervention_current, style: theme.textTheme.headline6),
Spacer(),
Text(
'${widget.subject.daysLeftForPhase(widget.subject.getInterventionIndexForDate(DateTime.now()))} days left',
'${widget.subject.daysLeftForPhase(widget.subject.getInterventionIndexForDate(DateTime.now()))} ${AppLocalizations.of(context).days_left}',
style: TextStyle(color: primaryColor))
],
),
Expand Down
3 changes: 2 additions & 1 deletion app/lib/screens/study/onboarding/kickoff.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class _KickoffScreen extends State<KickoffScreen> {
style: Theme.of(context).textTheme.headline6,
),
SizedBox(height: 16),
OutlinedButton(onPressed: () => _storeUserStudy(context), child: Text('Start Study')),
OutlinedButton(
onPressed: () => _storeUserStudy(context), child: Text(AppLocalizations.of(context).start_study)),
],
),
),
Expand Down
10 changes: 5 additions & 5 deletions app/lib/screens/study/onboarding/study_overview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ class StudyDetailsView extends StatelessWidget {
return Column(
children: [
ListTile(
title: Text('Intervention phase duration'),
subtitle: Text('${study.schedule.phaseDuration} days'),
title: Text(AppLocalizations.of(context).intervention_phase_duration),
subtitle: Text('${study.schedule.phaseDuration} ${AppLocalizations.of(context).days}'),
leading: Icon(MdiIcons.clock, color: theme.primaryColor, size: iconSize),
),
ListTile(
title: Text('Minimum study length'),
subtitle: Text('$studyLength days'),
title: Text(AppLocalizations.of(context).study_length),
subtitle: Text('$studyLength ${AppLocalizations.of(context).days}'),
leading: Icon(MdiIcons.calendar, color: theme.primaryColor, size: iconSize),
),
SizedBox(height: 16),
ContactWidget(
contact: study.contact,
title: 'Study Publisher',
title: AppLocalizations.of(context).study_publisher,
color: theme.colorScheme.secondary,
),
],
Expand Down
10 changes: 5 additions & 5 deletions app/lib/screens/study/onboarding/study_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class StudySelectionScreen extends StatelessWidget {
onPressed: () async {
await showDialog(context: context, builder: (_) => InviteCodeDialog());
},
label: Text('I have an invite code')),
label: Text(AppLocalizations.of(context).invite_code_button)),
),
],
),
Expand Down Expand Up @@ -117,17 +117,17 @@ class _InviteCodeDialogState extends State<InviteCodeDialog> {

@override
Widget build(BuildContext context) => AlertDialog(
title: Text('Private study invite code'),
title: Text(AppLocalizations.of(context).private_study_invite_code),
content: TextFormField(
controller: _controller,
validator: (_) => _errorMessage,
autovalidateMode: AutovalidateMode.always,
decoration: InputDecoration(labelText: 'Invite code'),
decoration: InputDecoration(labelText: AppLocalizations.of(context).invite_code),
),
actions: [
OutlinedButton.icon(
icon: Icon(Icons.arrow_forward),
label: Text('Next'),
label: Text(AppLocalizations.of(context).next),
onPressed: () async {
final res = await Supabase.instance.client
.rpc('get_study_from_invite', params: {'invite_code': _controller.text})
Expand All @@ -140,7 +140,7 @@ class _InviteCodeDialogState extends State<InviteCodeDialog> {
});
} else if (res.data == null) {
setState(() {
_errorMessage = 'Not a valid invite code';
_errorMessage = AppLocalizations.of(context).invalid_invite_code;
});
} else {
setState(() {
Expand Down

0 comments on commit 5680d32

Please sign in to comment.