Skip to content

fix: added missing translations #464

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/app/modules/about/views/about_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ class AboutPageBody extends StatelessWidget {
text: TextSpan(
children: <TextSpan>[
TextSpan(
text: 'Version: ',
text: SentenceManager(
currentLanguage: aboutController
.selectedLanguage.value)
.sentences
.version,
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
Expand Down Expand Up @@ -110,7 +114,11 @@ class AboutPageBody extends StatelessWidget {
text: TextSpan(
children: <TextSpan>[
TextSpan(
text: 'Package: ',
text: SentenceManager(
currentLanguage: aboutController
.selectedLanguage.value)
.sentences
.package,
style: TextStyle(
fontFamily: FontFamily.poppins,
fontWeight: TaskWarriorFonts.bold,
Expand Down
14 changes: 11 additions & 3 deletions lib/app/modules/detailRoute/views/dateTimePicker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:intl/intl.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';

class DateTimeWidget extends StatelessWidget {
const DateTimeWidget({
Expand Down Expand Up @@ -60,7 +61,10 @@ class DateTimeWidget extends StatelessWidget {
),
),
TextSpan(
text: value ?? "not selected",
text: value ??
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences.notSelected,
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
Expand Down Expand Up @@ -168,7 +172,9 @@ class DateTimeWidget extends StatelessWidget {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
"Can't set times in the past",
SentenceManager(
currentLanguage: AppSettings.selectedLanguage,
).sentences.cantSetTimeinPast,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.kprimaryTextColor
Expand Down Expand Up @@ -242,7 +248,9 @@ class StartWidget extends StatelessWidget {
),
),
TextSpan(
text: value ?? "not selected",
text: value ?? SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences.notSelected,
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
Expand Down
41 changes: 33 additions & 8 deletions lib/app/modules/detailRoute/views/description_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';

class DescriptionWidget extends StatelessWidget {
const DescriptionWidget(
Expand Down Expand Up @@ -54,7 +55,11 @@ class DescriptionWidget extends StatelessWidget {
),
),
TextSpan(
text: value ?? "not selected",
text: value ??
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.notSelected,
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
Expand Down Expand Up @@ -84,7 +89,9 @@ class DescriptionWidget extends StatelessWidget {
builder: (context) => Utils.showAlertDialog(
scrollable: true,
title: Text(
'Edit description',
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.editDescription,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -108,7 +115,10 @@ class DescriptionWidget extends StatelessWidget {
Get.back();
},
child: Text(
'Cancel',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.cancel,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -127,7 +137,10 @@ class DescriptionWidget extends StatelessWidget {
}
},
child: Text(
'Submit',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.submit,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.black
Expand Down Expand Up @@ -191,7 +204,11 @@ class ProjectWidget extends StatelessWidget {
),
),
TextSpan(
text: value ?? "not selected",
text: value ??
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.notSelected,
// style: GoogleFonts.poppins(
// fontSize: TaskWarriorFonts.fontSizeMedium,
// color: AppSettings.isDarkMode
Expand Down Expand Up @@ -221,7 +238,9 @@ class ProjectWidget extends StatelessWidget {
builder: (context) => Utils.showAlertDialog(
scrollable: true,
title: Text(
'Edit project',
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.editProject,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -245,7 +264,10 @@ class ProjectWidget extends StatelessWidget {
Get.back();
},
child: Text(
'Cancel',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.cancel,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -265,7 +287,10 @@ class ProjectWidget extends StatelessWidget {
}
},
child: Text(
'Submit',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.submit,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.black
Expand Down
45 changes: 34 additions & 11 deletions lib/app/modules/detailRoute/views/detail_route_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class DetailRouteView extends GetView<DetailRouteController> {
? TaskWarriorColors.kdialogBackGroundColor
: TaskWarriorColors.kLightDialogBackGroundColor,
title: Text(
'Do you want to save changes?',
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.saveChangesConfirmation,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -55,7 +57,10 @@ class DetailRouteView extends GetView<DetailRouteController> {
Get.back();
},
child: Text(
'Yes',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.yes,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -70,7 +75,10 @@ class DetailRouteView extends GetView<DetailRouteController> {
Get.back();
},
child: Text(
'No',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.no,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -83,7 +91,10 @@ class DetailRouteView extends GetView<DetailRouteController> {
Get.back();
},
child: Text(
'Cancel',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.cancel,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down Expand Up @@ -165,7 +176,7 @@ class DetailRouteView extends GetView<DetailRouteController> {
return AlertDialog(
scrollable: true,
title: Text(
'Review changes:',
'${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.reviewChanges}:',
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -177,8 +188,8 @@ class DetailRouteView extends GetView<DetailRouteController> {
child: Text(
controller.modify.changes.entries
.map((entry) => '${entry.key}:\n'
' old: ${entry.value['old']}\n'
' new: ${entry.value['new']}')
' ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.oldChanges}: ${entry.value['old']}\n'
' ${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.newChanges}: ${entry.value['new']}')
.toList()
.join('\n'),
style: TextStyle(
Expand All @@ -194,7 +205,11 @@ class DetailRouteView extends GetView<DetailRouteController> {
Get.back();
},
child: Text(
'Cancel',
SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.cancel,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -207,7 +222,11 @@ class DetailRouteView extends GetView<DetailRouteController> {
controller.saveChanges();
},
child: Text(
'Submit',
SentenceManager(
currentLanguage:
AppSettings.selectedLanguage)
.sentences
.submit,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.black
Expand Down Expand Up @@ -333,7 +352,11 @@ class AttributeWidget extends StatelessWidget {
),
),
Text(
localValue?.toString() ?? "not selected",
localValue?.toString() ??
SentenceManager(
currentLanguage: AppSettings.selectedLanguage)
.sentences
.notSelected,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down Expand Up @@ -396,7 +419,7 @@ class TagsWidget extends StatelessWidget {
),
TextSpan(
text:
'${(value as ListBuilder?)?.build() ?? 'not selected'}',
'${(value as ListBuilder?)?.build() ?? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.notSelected}',
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down
3 changes: 2 additions & 1 deletion lib/app/modules/detailRoute/views/status_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';


class StatusWidget extends StatelessWidget {
Expand Down Expand Up @@ -46,7 +47,7 @@ class StatusWidget extends StatelessWidget {
),
),
TextSpan(
text: value ?? "not selected",
text: value ?? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.notSelected,
style: GoogleFonts.poppins(
fontSize: TaskWarriorFonts.fontSizeMedium,
color: AppSettings.isDarkMode
Expand Down
21 changes: 16 additions & 5 deletions lib/app/modules/detailRoute/views/tags_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';

import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/taskfunctions/validate.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

Expand Down Expand Up @@ -120,7 +121,9 @@ class TagsRouteState extends State<TagsRoute> {
appBar: AppBar(
backgroundColor: TaskWarriorColors.kprimaryBackgroundColor,
title: Text(
'Tags',
SentenceManager(currentLanguage: AppSettings.selectedLanguage)
.sentences
.tags,
style: GoogleFonts.poppins(color: TaskWarriorColors.white),
),
leading: BackButton(
Expand Down Expand Up @@ -153,7 +156,9 @@ class TagsRouteState extends State<TagsRoute> {
Padding(
padding: const EdgeInsets.fromLTRB(15, 18, 0, 10),
child: Text(
'Added tags will appear here',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage,
).sentences.addedTagsWillAppearHere,
style: GoogleFonts.poppins(
fontStyle: FontStyle.italic,
color: AppSettings.isDarkMode
Expand Down Expand Up @@ -200,7 +205,9 @@ class TagsRouteState extends State<TagsRoute> {
builder: (context) => Utils.showAlertDialog(
scrollable: true,
title: Text(
'Add tag',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage,
).sentences.addTag,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand Down Expand Up @@ -234,7 +241,9 @@ class TagsRouteState extends State<TagsRoute> {
Get.back();
},
child: Text(
'Cancel',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage,
).sentences.cancel,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
Expand All @@ -256,7 +265,9 @@ class TagsRouteState extends State<TagsRoute> {
}
},
child: Text(
'Submit',
SentenceManager(
currentLanguage: AppSettings.selectedLanguage,
).sentences.submit,
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.black
Expand Down
Loading
Loading