Skip to content

Commit 032eaaa

Browse files
committed
In the "Tasks" module, I made the following changes:
I copied the "Get_Additional_Information" method from the "Write_On_Diary_Slim" class of the "Diary_Slim" module. Then, I pasted the method into the "Register" class of the "Tasks" module. I renamed the pasted method to "Ask_Questions" and removed functions that only Diary Slim uses. I also renamed the "Type_Task_Information" method to "Ask_For_Task_Information", to make the name more descriptive. Next, I cut the "Define_Item_Variables" and "Type_Task_Descriptions" methods from the "Write_On_Diary_Slim" class and pasted them into the "Register" class of the "Tasks" module. I merged these two methods into a single one, called "Ask_For_Task_Descriptions". Additionally, I added a function to define grammatical numbers for task texts, implemented in the "Ask_Questions" method. Now, each task can have texts in singular or plural, for example: "Python module" and "Python modules". I also updated the files for each task type, adding their respective question dictionaries, following the same pattern of the Diary Slim texts. Finally, I defined the "Stories" task type as "Module-only", allowing only other modules to register this type of task, and not the "Tasks" class itself.
1 parent ca1d313 commit 032eaaa

File tree

14 files changed

+731
-524
lines changed

14 files changed

+731
-524
lines changed

Module files/Diary_Slim/Texts.json

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"en": "Diary Slim",
44
"pt": "Diário Slim"
55
},
6+
"Diary_Slim.Write": {
7+
"en": "Diary_Slim.Write()",
8+
"pt": "Diário_Slim.Escrever()"
9+
},
610
"creating_a_diary_slim_for_the_current_day": {
711
"pt": "Criando um Diário Slim para o dia atual",
812
"en": "Creating a Diary Slim for the current day"
@@ -23,42 +27,6 @@
2327
"en": "\"testing\" is \"True\"",
2428
"pt": "\"testando\" é \"Verdadeiro\""
2529
},
26-
"python_module": {
27-
"en": "Python module",
28-
"pt": "módulo de Python"
29-
},
30-
"python_modules": {
31-
"en": "Python modules",
32-
"pt": "módulos de Python"
33-
},
34-
"php_website": {
35-
"en": "PHP website",
36-
"pt": "site em PHP"
37-
},
38-
"drawing": {
39-
"en": "drawing",
40-
"pt": "desenho"
41-
},
42-
"video": {
43-
"en": "video",
44-
"pt": "vídeo"
45-
},
46-
"type_the_name_of_the_module": {
47-
"en": "Type the name of the module",
48-
"pt": "Digite o nome do módulo"
49-
},
50-
"my_module": {
51-
"en": "my module",
52-
"pt": "o meu módulo"
53-
},
54-
"my_modules": {
55-
"en": "my modules",
56-
"pt": "os meus módulos"
57-
},
58-
"select_the_drawing_program": {
59-
"en": "Select the drawing program",
60-
"pt": "Selecione o programa de desenho"
61-
},
6230
"select_the_sibling": {
6331
"en": "Select the sibling",
6432
"pt": "Selecione o irmão"
@@ -67,18 +35,6 @@
6735
"en": "Type how much course classes you watched (1, one)",
6836
"pt": "Digite quantas aulas de curso você assistiu (1, uma)"
6937
},
70-
"say_what_you_did_on_the_{}": {
71-
"en": "Say what you did on the {}",
72-
"pt": "Diga o que você fez no {}"
73-
},
74-
"say_what_you_did_on_the_{}, plural": {
75-
"en": "Say what you did on the {}",
76-
"pt": "Diga o que você fez nos {}"
77-
},
78-
"say_what_you_did_on_the_{}_but_in_english": {
79-
"en": "Say what you did on the {}, but in English",
80-
"pt": "Diga o que você fez no {}, mas em Inglês"
81-
},
8238
"texts_to_write": {
8339
"en": "Texts to write",
8440
"pt": "Textos para escrever"
@@ -91,18 +47,6 @@
9147
"en": "You selected this option",
9248
"pt": "Você selecionou esta opção"
9349
},
94-
"use_text_file_to_write_description": {
95-
"en": "Use text file to write description",
96-
"pt": "Usar arquivo de texto para escrever descrição"
97-
},
98-
"press_enter_when_you_finish_writing_and_saving_the_description_in_{}": {
99-
"pt": "Pressione Enter quando você terminar de escrever e salvar a descrição em {}",
100-
"en": "Press Enter when you finish writing and saving the description in {}"
101-
},
102-
"opening_the_description_files_for_you_to_type_on_them, type: explanation": {
103-
"en": "Opening the description files for you to type on them.\nType on them, save and close them, and press Enter to continue.",
104-
"pt": "Abrindo os arquivos de descrições para você digitar neles.\nDigite neles, salve-os e feche-os, e pressione Enter para continuar."
105-
},
10650
"did_you_wrote_this_diary_slim_on_the_phone": {
10751
"en": "Did you wrote this Diary Slim on the phone",
10852
"pt": "Você escreveu este Diário Slim no celular"

Module files/Food_Time/Times.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"Will be hungry": 3
1111
},
1212
"Ate": {
13-
"Object": "2025-01-21 18:23:19-03:00",
13+
"Object": "2025-01-22 16:58:16-03:00",
1414
"Time": 0,
15-
"Time text": "18:23",
15+
"Time text": "16:58",
1616
"Unit": {
1717
"en": "hours",
1818
"pt": "horas"
@@ -23,9 +23,9 @@
2323
}
2424
},
2525
"Can drink water": {
26-
"Object": "2025-01-21 19:03:19-03:00",
26+
"Object": "2025-01-22 17:38:16-03:00",
2727
"Time": 40,
28-
"Time text": "19:03",
28+
"Time text": "17:38",
2929
"Unit": {
3030
"en": "minutes",
3131
"pt": "minutos"
@@ -36,9 +36,9 @@
3636
}
3737
},
3838
"Will be hungry": {
39-
"Object": "2025-01-21 21:23:19-03:00",
39+
"Object": "2025-01-22 19:58:16-03:00",
4040
"Time": 3,
41-
"Time text": "21:23",
41+
"Time text": "19:58",
4242
"Unit": {
4343
"en": "hours",
4444
"pt": "horas"

Module files/Tasks/Texts.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
"en": "Tasks",
1616
"pt": "Tarefas"
1717
},
18+
"Tasks.Register": {
19+
"en": "Tasks.Register()",
20+
"pt": "Tarefas.Registrar()"
21+
},
22+
"task_type": {
23+
"en": "Task type",
24+
"pt": "Tipo de tarefa"
25+
},
1826
"task_types": {
1927
"en": "Task types",
2028
"pt": "Tipos de tarefas"
@@ -94,5 +102,41 @@
94102
"productive_things_done_{}_until_{}": {
95103
"en": "productive things done since {} (until {})",
96104
"pt": "coisas produtivas feitas desde {} (até {})"
105+
},
106+
"say_what_you_did_on_the_{}_in_{}, singular": {
107+
"en": "Say what you did on the {} in {}",
108+
"pt": "Diga o que você fez no {} em {}"
109+
},
110+
"say_what_you_did_on_the_{}_in_{}, plural": {
111+
"en": "Say what you did on the {} in {}",
112+
"pt": "Diga o que você fez nos {} em {}"
113+
},
114+
"opening_the_task_description_files_for_you_to_type_on_them, type: explanation": {
115+
"en": "Opening the task description files for you to type on them.\nType the descriptions, save the files, close them, and press Enter to continue.",
116+
"pt": "Abrindo os arquivos de descrições de tarefas para você digitar neles.\nDigite as descrições, salve os arquivos, feche-os e pressione Enter para continuar."
117+
},
118+
"press_enter_when_you_finish_writing_and_saving_the_description_in_{}": {
119+
"pt": "Pressione Enter quando você terminar de escrever e salvar a descrição em {}",
120+
"en": "Press Enter when you finish writing and saving the description in {}"
121+
},
122+
"the_task_description_was_written_on_the_current_diary_slim": {
123+
"en": "The task description was written on the current Diary Slim",
124+
"pt": "A descrição da tarefa foi escrita no Diário Slim atual"
125+
},
126+
"select_the_drawing_program": {
127+
"en": "Select the drawing program",
128+
"pt": "Selecione o programa de desenho"
129+
},
130+
"type_the_name_of_the_{}_modules": {
131+
"en": "Type the name of the {} module(s)",
132+
"pt": "Digite o nome do(s) módulo(s) {}"
133+
},
134+
"programming_my_module": {
135+
"en": "programming my module",
136+
"pt": "programando o meu módulo"
137+
},
138+
"programming_my_modules": {
139+
"en": "programming my modules",
140+
"pt": "programando os meus módulos"
97141
}
98142
}

Module files/Utility/Language/Texts.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
"pt": "classe",
4747
"en": "class"
4848
},
49+
"class_being_executed": {
50+
"en": "Class being executed",
51+
"pt": "Classe sendo executada"
52+
},
4953
"folder": {
5054
"en": "folder",
5155
"pt": "pasta"
@@ -761,6 +765,14 @@
761765
"en": "Programming",
762766
"pt": "Programação"
763767
},
768+
"python_module": {
769+
"en": "Python module",
770+
"pt": "módulo Python"
771+
},
772+
"python_modules": {
773+
"en": "Python modules",
774+
"pt": "módulos Python"
775+
},
764776
"of, neutral": {
765777
"en": "of",
766778
"pt": "de"
@@ -1193,6 +1205,14 @@
11931205
"en": "Official website",
11941206
"pt": "Site oficial"
11951207
},
1208+
"php_website": {
1209+
"en": "PHP website",
1210+
"pt": "site em PHP"
1211+
},
1212+
"php_websites": {
1213+
"en": "PHP websites",
1214+
"pt": "sites em PHP"
1215+
},
11961216
"short": {
11971217
"en": "short",
11981218
"pt": "curta"
@@ -2257,6 +2277,10 @@
22572277
"en": "Visits of",
22582278
"pt": "Visitas de"
22592279
},
2280+
"in": {
2281+
"en": "in",
2282+
"pt": "em"
2283+
},
22602284
"genders, type: dict": {
22612285
"en": {
22622286
"masculine": {

Modules/Diary_Slim/Diary_Slim/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,11 @@ def Make_Diary_Slim_Dictionary(self, date, current_year = None):
660660

661661
# ---------- #
662662

663-
# Define the empty "Diary Slim" dictionary
663+
# Define the "Diary Slim" dictionary with the "Date" key
664664
# (Not the root module "Diary Slim" dictionary, the "Diary Slim" file dictionary)
665-
dictionary = {}
665+
dictionary = {
666+
"Date": date
667+
}
666668

667669
# ---------- #
668670

@@ -672,14 +674,9 @@ def Make_Diary_Slim_Dictionary(self, date, current_year = None):
672674
texts = datetime["Texts"]
673675
formats = datetime["Formats"]
674676

675-
# Define the "Month" dictionary with its keys
676-
dictionary["Month"] = {
677-
"Name": texts["Month name with number"][self.user_language]
678-
}
679-
680677
# ---------- #
681678

682-
# Define the "Day" dictionary
679+
# Define the "Day" key
683680
items = [
684681
self.Text.Add_Leading_Zeroes(units["Day"]),
685682
texts["Day name"][self.user_language],
@@ -690,6 +687,13 @@ def Make_Diary_Slim_Dictionary(self, date, current_year = None):
690687

691688
# ---------- #
692689

690+
# Define the "Month" dictionary with its keys
691+
dictionary["Month"] = {
692+
"Name": texts["Month name with number"][self.user_language]
693+
}
694+
695+
# ---------- #
696+
693697
# Define the "Folders" dictionary
694698
dictionary["Folders"] = {
695699
"Year": self.diary_slim["Folders"]["Years"][current_year["Number"]]
@@ -832,10 +836,6 @@ def Define_Diary_Slim_Texts(self):
832836
# Read the language text file and add its contents to the "Texts" dictionary
833837
dictionary["Texts"][language] = self.File.Contents(dictionary["Files"][language])["string"]
834838

835-
# Add "..." (three dots) if the "Item" key is present inside the "Data" dictionary
836-
if "Item" in dictionary:
837-
dictionary["Texts"][language] += "..."
838-
839839
# ----- #
840840

841841
if "Data" in dictionary["Files"]:

0 commit comments

Comments
 (0)