@@ -45,7 +45,11 @@ class AddTaskBottomSheet extends StatelessWidget {
4545 onPressed: () {
4646 Get .back ();
4747 },
48- child: const Text ("Cancel" ),
48+ child: Text (SentenceManager (
49+ currentLanguage:
50+ homeController.selectedLanguage.value)
51+ .sentences
52+ .cancel),
4953 ),
5054 Text (
5155 SentenceManager (
@@ -66,7 +70,11 @@ class AddTaskBottomSheet extends StatelessWidget {
6670 onSaveButtonClicked (context);
6771 }
6872 },
69- child: const Text ("Save" ),
73+ child: Text (SentenceManager (
74+ currentLanguage:
75+ homeController.selectedLanguage.value)
76+ .sentences
77+ .save),
7078 ),
7179 ],
7280 ),
@@ -80,10 +88,18 @@ class AddTaskBottomSheet extends StatelessWidget {
8088 child: TextFormField (
8189 controller: homeController.namecontroller,
8290 validator: (value) => value! .isEmpty
83- ? "Description cannot be empty"
91+ ? SentenceManager (
92+ currentLanguage:
93+ homeController.selectedLanguage.value)
94+ .sentences
95+ .descriprtionCannotBeEmpty
8496 : null ,
85- decoration: const InputDecoration (
86- labelText: 'Enter Task Description' ,
97+ decoration: InputDecoration (
98+ labelText: SentenceManager (
99+ currentLanguage:
100+ homeController.selectedLanguage.value)
101+ .sentences
102+ .enterTaskDescription,
87103 border: OutlineInputBorder (),
88104 ),
89105 ),
@@ -168,15 +184,21 @@ class AddTaskBottomSheet extends StatelessWidget {
168184 (context, textEditingController, focusNode, onFieldSubmitted) =>
169185 TextFormField (
170186 controller: textEditingController,
171- decoration: const InputDecoration (
172- labelText: 'Project' ,
187+ decoration: InputDecoration (
188+ labelText: SentenceManager (
189+ currentLanguage: homeController.selectedLanguage.value)
190+ .sentences
191+ .enterProject,
173192 border: OutlineInputBorder (),
174193 ),
175194 onChanged: (value) => homeController.projectcontroller.text = value,
176195 focusNode: focusNode,
177196 validator: (value) {
178197 if (value != null && value.contains (" " )) {
179- return "Can not have Whitespace" ;
198+ return SentenceManager (
199+ currentLanguage: homeController.selectedLanguage.value)
200+ .sentences
201+ .canNotHaveWhiteSpace;
180202 }
181203 return null ;
182204 },
@@ -208,7 +230,10 @@ class AddTaskBottomSheet extends StatelessWidget {
208230 .priority.value), // Display the selected priority
209231 ),
210232 decoration: InputDecoration (
211- labelText: 'Priority' ,
233+ labelText: SentenceManager (
234+ currentLanguage: homeController.selectedLanguage.value)
235+ .sentences
236+ .priority,
212237 border: const OutlineInputBorder (),
213238 suffixIcon: Padding (
214239 padding: const EdgeInsets .only (right: 8.0 ),
@@ -304,7 +329,10 @@ class AddTaskBottomSheet extends StatelessWidget {
304329 homeController.projectcontroller.text = '' ;
305330 ScaffoldMessenger .of (context).showSnackBar (SnackBar (
306331 content: Text (
307- 'Task Added Successfully!' ,
332+ SentenceManager (
333+ currentLanguage: homeController.selectedLanguage.value)
334+ .sentences
335+ .addTaskTaskAddedSuccessfully,
308336 style: TextStyle (
309337 color: AppSettings .isDarkMode
310338 ? TaskWarriorColors .kprimaryTextColor
0 commit comments