@@ -11,6 +11,7 @@ import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
1111import 'package:taskwarrior/app/modules/home/controllers/widget.controller.dart' ;
1212import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart' ;
1313import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart' ;
14+ import 'package:taskwarrior/app/utils/language/sentence_manager.dart' ;
1415import 'package:taskwarrior/app/utils/taskfunctions/taskparser.dart' ;
1516import 'package:taskwarrior/app/utils/theme/app_settings.dart' ;
1617
@@ -36,7 +37,10 @@ class AddTaskBottomSheet extends StatelessWidget {
3637 : TaskWarriorColors .kLightDialogBackGroundColor,
3738 title: Center (
3839 child: Text (
39- 'Add Task' ,
40+ SentenceManager (
41+ currentLanguage: homeController.selectedLanguage.value)
42+ .sentences
43+ .addTaskTitle,
4044 style: TextStyle (
4145 color: AppSettings .isDarkMode
4246 ? TaskWarriorColors .white
@@ -94,7 +98,11 @@ class AddTaskBottomSheet extends StatelessWidget {
9498 : TaskWarriorColors .black,
9599 ),
96100 decoration: InputDecoration (
97- hintText: 'Add tags' ,
101+ hintText: SentenceManager (
102+ currentLanguage:
103+ homeController.selectedLanguage.value)
104+ .sentences
105+ .addTaskAddTags,
98106 hintStyle: TextStyle (
99107 color: AppSettings .isDarkMode
100108 ? TaskWarriorColors .white
@@ -106,12 +114,11 @@ class AddTaskBottomSheet extends StatelessWidget {
106114 },
107115 ),
108116 ),
109- // Replace ElevatedButton with IconButton
110117 IconButton (
111118 onPressed: () {
112119 addTag (homeController.tagcontroller.text.trim ());
113120 },
114- icon: const Icon (Icons .add), // Plus icon
121+ icon: const Icon (Icons .add),
115122 ),
116123 ],
117124 ),
@@ -139,22 +146,31 @@ class AddTaskBottomSheet extends StatelessWidget {
139146 : TaskWarriorColors .black,
140147 ),
141148 decoration: InputDecoration (
142- hintText: 'Enter Task' ,
149+ hintText: SentenceManager (
150+ currentLanguage: homeController.selectedLanguage.value)
151+ .sentences
152+ .addTaskEnterTask,
143153 hintStyle: TextStyle (
144154 color: AppSettings .isDarkMode
145155 ? TaskWarriorColors .white
146156 : TaskWarriorColors .black,
147157 ),
148158 ),
149159 validator: (name) => name != null && name.isEmpty
150- ? 'You cannot leave this field empty!'
160+ ? SentenceManager (
161+ currentLanguage: homeController.selectedLanguage.value)
162+ .sentences
163+ .addTaskFieldCannotBeEmpty
151164 : null ,
152165 );
153166
154167 Widget buildDueDate (BuildContext context) => Row (
155168 children: [
156169 Text (
157- "Due : " ,
170+ SentenceManager (
171+ currentLanguage: homeController.selectedLanguage.value)
172+ .sentences
173+ .addTaskDue,
158174 style: GoogleFonts .poppins (
159175 color: AppSettings .isDarkMode
160176 ? TaskWarriorColors .white
@@ -178,7 +194,11 @@ class AddTaskBottomSheet extends StatelessWidget {
178194 controller:
179195 TextEditingController (text: homeController.dueString.value),
180196 decoration: InputDecoration (
181- hintText: 'Select due date' ,
197+ hintText: SentenceManager (
198+ currentLanguage:
199+ homeController.selectedLanguage.value)
200+ .sentences
201+ .addTaskTitle,
182202 hintStyle: homeController.inThePast.value
183203 ? TextStyle (color: TaskWarriorColors .red)
184204 : TextStyle (
@@ -291,7 +311,11 @@ class AddTaskBottomSheet extends StatelessWidget {
291311
292312 ScaffoldMessenger .of (context).showSnackBar (SnackBar (
293313 content: Text (
294- "The selected time is in the past." ,
314+ SentenceManager (
315+ currentLanguage:
316+ homeController.selectedLanguage.value)
317+ .sentences
318+ .addTaskTimeInPast,
295319 style: TextStyle (
296320 color: AppSettings .isDarkMode
297321 ? TaskWarriorColors .kprimaryTextColor
@@ -324,7 +348,10 @@ class AddTaskBottomSheet extends StatelessWidget {
324348 crossAxisAlignment: CrossAxisAlignment .center,
325349 children: [
326350 Text (
327- 'Priority : ' ,
351+ "${SentenceManager (
352+ currentLanguage : homeController .selectedLanguage .value )
353+ .sentences
354+ .addTaskPriority } :" ,
328355 style: GoogleFonts .poppins (
329356 fontWeight: TaskWarriorFonts .bold,
330357 color: AppSettings .isDarkMode
@@ -372,7 +399,10 @@ class AddTaskBottomSheet extends StatelessWidget {
372399 BuildContext context, HomeController homeController) =>
373400 TextButton (
374401 child: Text (
375- 'Cancel' ,
402+ SentenceManager (
403+ currentLanguage: homeController.selectedLanguage.value)
404+ .sentences
405+ .addTaskCancel,
376406 style: TextStyle (
377407 color: AppSettings .isDarkMode
378408 ? TaskWarriorColors .white
@@ -393,7 +423,10 @@ class AddTaskBottomSheet extends StatelessWidget {
393423 Widget buildAddButton (BuildContext context) {
394424 return TextButton (
395425 child: Text (
396- "Add" ,
426+ SentenceManager (
427+ currentLanguage: homeController.selectedLanguage.value)
428+ .sentences
429+ .addTaskAdd,
397430 style: TextStyle (
398431 color: AppSettings .isDarkMode
399432 ? TaskWarriorColors .white
@@ -437,7 +470,10 @@ class AddTaskBottomSheet extends StatelessWidget {
437470
438471 ScaffoldMessenger .of (context).showSnackBar (SnackBar (
439472 content: Text (
440- 'Task Added Successfully. Tap to Edit' ,
473+ SentenceManager (
474+ currentLanguage: homeController.selectedLanguage.value)
475+ .sentences
476+ .addTaskTaskAddedSuccessfully,
441477 style: TextStyle (
442478 color: AppSettings .isDarkMode
443479 ? TaskWarriorColors .kprimaryTextColor
0 commit comments