Skip to content

Commit 65690e3

Browse files
committed
In the "Stories" module, in its "Write" sub-class, I have made the following changes:
In its "Write" sub-class, I greatly improved it, making it more efficient and organized. I created a root dictionary with the chapters, chapter, steps, writing modes, and writing session dictionaries. The writing steps are the methods that are executed when writing a chapter. They are these: "Define writing modes", "Select a writing mode (write, revise, translate)", "Define chapter", and "Start writing". I created a new dictionary called "Writing modes", a more organized form of the old writing modes. Now each writing mode has its own dictionary, with its name and texts in verb tenses. These are the verb tenses: "Infinitive", "Infinitive action", "Action", "Item", "Done", and "Chapter". The chapter definition become much more organized, defining the chapter folders and files in a single method, the "Define_Chapter" method. Instead of these functions being separated into different methods. A source language is also defined for the chapter, now the chapters are written and revised in the user's language, and translated into English. The " (a new chapter)" text is added to the chapter title when the writing mode is "write". Previously, the "Obsidian" program was used to write story chapters, with its own methods. Now, the story website itself made in PHP is used to write the chapters. For this, the new "Open_Story_Website" method was created. To open the story website in the correct chapter, and in its source language, with the URL parameter "write". Now, how the writing session and writing time is registered has been changed, to be similar to the "GamePlayer" module. This way, the total writing time of a chapter can be registered correctly. The new "Update_Writing_Time" method is responsible for updating the writing time, whether its time units or text. And also reset the writing times dictionary to its default mode, when the user has finished writing the entire chapter. The "Register_Task" method has been drastically modified, improving its writing session text, and using a new text format. Now, the nomenclature for writing closure is different. When the user stops that writing session, they do not finish writing the chapter but stop writing it. And the sub-class asks if the user finished writing the entire chapter. If the user finished writing the chapter in completely. Then the sub-class will execute the "Finish_Writing" method. That is going to rename the chapter files if needed, and will register the writing task, be it the "Tasks", or just in the Diary Slim. And it will also reset the writing dictionary of the current writing mode.
1 parent 573243e commit 65690e3

File tree

15 files changed

+1087
-640
lines changed

15 files changed

+1087
-640
lines changed

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": "2024-05-02 00:32:08-03:00",
13+
"Object": "2024-05-04 21:10:47-03:00",
1414
"Time": 0,
15-
"Time text": "00:32",
15+
"Time text": "21:10",
1616
"Unit": {
1717
"en": "hours",
1818
"pt": "horas"
@@ -23,9 +23,9 @@
2323
}
2424
},
2525
"Can drink water": {
26-
"Object": "2024-05-02 01:12:08-03:00",
26+
"Object": "2024-05-04 21:50:47-03:00",
2727
"Time": 40,
28-
"Time text": "01:12",
28+
"Time text": "21:50",
2929
"Unit": {
3030
"en": "minutes",
3131
"pt": "minutos"
@@ -36,9 +36,9 @@
3636
}
3737
},
3838
"Will be hungry": {
39-
"Object": "2024-05-02 03:32:08-03:00",
39+
"Object": "2024-05-05 00:10:47-03:00",
4040
"Time": 3,
41-
"Time text": "03:32",
41+
"Time text": "00:10",
4242
"Unit": {
4343
"en": "hours",
4444
"pt": "horas"

Module Files/Stories/Texts.json

Lines changed: 119 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
"en": "Story title in",
44
"pt": "Título da história em"
55
},
6-
"chapter, title()": {
7-
"en": "Chapter",
8-
"pt": "Capítulo"
9-
},
10-
"chapters, title()": {
11-
"en": "Chapters",
12-
"pt": "Capítulos"
13-
},
146
"chapter_title": {
157
"en": "Chapter title",
168
"pt": "Título do capítulo"
@@ -19,6 +11,14 @@
1911
"en": "Chapter number",
2012
"pt": "Número do capítulo"
2113
},
14+
"the_chapter_with_the_title": {
15+
"en": "The chapter with the title",
16+
"pt": "O capítulo com o título"
17+
},
18+
"a_new_chapter": {
19+
"en": "a new chapter",
20+
"pt": "um novo capítulo"
21+
},
2222
"select_a_story": {
2323
"en": "Select a story",
2424
"pt": "Selecione uma história"
@@ -119,78 +119,6 @@
119119
"en": "Story synopsis in",
120120
"pt": "Sinopse da história em"
121121
},
122-
"writing_modes, type: list": {
123-
"en": [
124-
"Write",
125-
"Revise",
126-
"Translate"
127-
],
128-
"pt": [
129-
"Escrever",
130-
"Revisar",
131-
"Traduzir"
132-
]
133-
},
134-
"writing_modes_present_action, type: list": {
135-
"en": [
136-
"Writing",
137-
"Revising",
138-
"Translating"
139-
],
140-
"pt": [
141-
"Escrevendo",
142-
"Revisando",
143-
"Traduzindo"
144-
]
145-
},
146-
"writing_modes_action, type: list": {
147-
"en": [
148-
"Writing",
149-
"Revising",
150-
"Translating"
151-
],
152-
"pt": [
153-
"Escrever",
154-
"Revisar",
155-
"Traduzir"
156-
]
157-
},
158-
"writing_modes_past_action, type: list": {
159-
"en": [
160-
"Writing",
161-
"Revising",
162-
"Translating"
163-
],
164-
"pt": [
165-
"Escrita",
166-
"Revisão",
167-
"Tradução"
168-
]
169-
},
170-
"writing_modes_past, type: list": {
171-
"en": [
172-
"Wrote",
173-
"Revised",
174-
"Translated"
175-
],
176-
"pt": [
177-
"Escrevi",
178-
"Revisei",
179-
"Traduzi"
180-
]
181-
},
182-
"writing_modes_chapter, type: list": {
183-
"en": [
184-
"written",
185-
"revised",
186-
"translated"
187-
],
188-
"pt": [
189-
"escrito",
190-
"revisado",
191-
"traduzido"
192-
]
193-
},
194122
"writing_modes": {
195123
"en": "Writing modes",
196124
"pt": "Modos de escrita"
@@ -199,66 +127,128 @@
199127
"en": "Select a writing mode",
200128
"pt": "Selecione um modo de escrita"
201129
},
202-
"write, title()": {
203-
"en": "Write",
204-
"pt": "Escrever"
205-
},
206-
"writing, title()": {
207-
"en": "Writing",
208-
"pt": "Escrevendo"
209-
},
210-
"revise, title()": {
211-
"en": "Revise",
212-
"pt": "Revisar"
213-
},
214-
"translate, title()": {
215-
"en": "Translate",
216-
"pt": "Traduzir"
217-
},
218-
"press_enter_to_start_counting_{}_time": {
219-
"en": "Press Enter to start counting {} time",
220-
"pt": "Pressione Enter para começar a contar o tempo de {}"
221-
},
222-
"press_enter_when_you_finish_{}_the_chapter": {
223-
"en": "Press Enter when you finish {} the chapter",
224-
"pt": "Pressione Enter quando você terminar de {} o capítulo"
225-
},
226-
"did_you_finished_{}_the_chapter": {
227-
"en": "Did you finished {} the chapter",
228-
"pt": "Você terminou de {} o capítulo"
229-
},
230-
"you_finished_{}_this_chapter": {
231-
"en": "You finished {} this chapter",
232-
"pt": "Você terminou de {} este capítulo"
233-
},
234-
"{}_this_chapter": {
235-
"en": "{} this chapter",
236-
"pt": "{} este capítulo"
237-
},
238-
"type_or_paste_the_chapter_title_in_{}": {
239-
"en": "Type or paste the chapter title in {}",
240-
"pt": "Digite ou cole o título do capítulo em {}"
130+
"write, type: dictionary": {
131+
"Infinitive": {
132+
"en": "write",
133+
"pt": "escrever"
134+
},
135+
"Infinitive action": {
136+
"en": "writing",
137+
"pt": "escrever"
138+
},
139+
"Action": {
140+
"en": "writing",
141+
"pt": "escrevendo"
142+
},
143+
"Item": {
144+
"en": "writing",
145+
"pt": "escrita"
146+
},
147+
"Done": {
148+
"en": "wrote",
149+
"pt": "escrevi"
150+
},
151+
"Chapter": {
152+
"en": "written",
153+
"pt": "escrito"
154+
}
155+
},
156+
"revise, type: dictionary": {
157+
"Infinitive": {
158+
"en": "revise",
159+
"pt": "revisar"
160+
},
161+
"Infinitive action": {
162+
"en": "revising",
163+
"pt": "revisar"
164+
},
165+
"Action": {
166+
"en": "revising",
167+
"pt": "revisando"
168+
},
169+
"Item": {
170+
"en": "revision",
171+
"pt": "revisão"
172+
},
173+
"Done": {
174+
"en": "revised",
175+
"pt": "revisei"
176+
},
177+
"Chapter": {
178+
"en": "revised",
179+
"pt": "revisado"
180+
}
181+
},
182+
"translate, type: dictionary": {
183+
"Infinitive": {
184+
"en": "translate",
185+
"pt": "traduzir"
186+
},
187+
"Infinitive action": {
188+
"en": "translating",
189+
"pt": "traduzir"
190+
},
191+
"Action": {
192+
"en": "translating",
193+
"pt": "traduzindo"
194+
},
195+
"Item": {
196+
"en": "translation",
197+
"pt": "tradução"
198+
},
199+
"Done": {
200+
"en": "translated",
201+
"pt": "traduzi"
202+
},
203+
"Chapter": {
204+
"en": "translated",
205+
"pt": "traduzido"
206+
}
207+
},
208+
"press_enter_to_start_counting_the_time_of": {
209+
"en": "Press Enter to start counting the time of",
210+
"pt": "Pressione Enter para começar a contar o tempo de"
211+
},
212+
"press_enter_when_you_stop": {
213+
"en": "Press Enter when you stop",
214+
"pt": "Pressione Enter quando você parar de"
215+
},
216+
"did_you_finished_{}_the_whole_chapter": {
217+
"en": "Did you finished {} the whole chapter",
218+
"pt": "Você terminou de {} o capítulo inteiro"
219+
},
220+
"this_chapter": {
221+
"en": "this chapter",
222+
"pt": "este capítulo"
223+
},
224+
"type_the_chapter_title_in_{}": {
225+
"en": "Type the chapter title in {}",
226+
"pt": "Digite o título do capítulo em {}"
241227
},
242228
"i_started_{}_the_chapter_{}_of_my_story_{}": {
243229
"en": "I started {} the chapter {} of my story \"{}\"",
244230
"pt": "Eu comecei a {} o capítulo {} da minha história \"{}\""
245231
},
246-
"i_{}_the_chapter_{}_of_my_story_{}": {
247-
"en": "I {} the chapter {} of my story \"{}\"",
248-
"pt": "Eu {} o capítulo {} da minha história \"{}\""
232+
"i_have_been_{}_the_chapter_{}_of_my_story_{}_until_now": {
233+
"en": "I have been {} the chapter {} of my story \"{}\" until now",
234+
"pt": "Eu estive {} o capítulo {} da minha história \"{}\" até agora"
249235
},
250-
"i_still_did_not_finished_{}_the_chapter": {
251-
"en": "I still did not finished {} the chapter",
252-
"pt": "Eu ainda não terminei de {} o capítulo"
236+
"i_finished_{}_the_chapter_{}_of_my_story_{}": {
237+
"en": "I finished {} the chapter {} of my story \"{}\"",
238+
"pt": "Eu terminei de {} o capítulo {} da minha história \"{}\""
239+
},
240+
"i_started_at_{}_and_stopped_at_{}": {
241+
"en": "I started at {}, and stopped at {}",
242+
"pt": "Eu comecei às {}, e parei às {}"
243+
},
244+
"i_{}_for": {
245+
"en": "I {} for",
246+
"pt": "Eu {} por"
253247
},
254248
"post": {
255249
"en": "post",
256250
"pt": "postar"
257251
},
258-
"post, title()": {
259-
"en": "Post",
260-
"pt": "Postar"
261-
},
262252
"select_{}_to_{}": {
263253
"en": "Select {} to {}",
264254
"pt": "Selecione {} para {}"

Module Files/Utility/Language/Texts.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@
144144
"en": "Items",
145145
"pt": "Itens"
146146
},
147+
"from_{}_to_{}": {
148+
"en": "from {} to {}",
149+
"pt": "do {} para o {}"
150+
},
147151
"select_an_item_from_the_list": {
148152
"en": "Select an item from the list",
149153
"pt": "Selecionar um item da lista"
@@ -551,6 +555,18 @@
551555
"en": "{} times",
552556
"pt": "{} vezes"
553557
},
558+
"duration_of": {
559+
"en": "Duration of",
560+
"pt": "Duração de"
561+
},
562+
"total_duration_of": {
563+
"en": "Total duration of",
564+
"pt": "Duração total de"
565+
},
566+
"totaling, title()": {
567+
"en": "Totaling",
568+
"pt": "Totalizando"
569+
},
554570
"{}_information": {
555571
"pt": "Informações de {}",
556572
"en": "{} information"
@@ -1866,6 +1882,14 @@
18661882
"en": "Writing",
18671883
"pt": "Escrevendo"
18681884
},
1885+
"revise, title()": {
1886+
"en": "Revise",
1887+
"pt": "Revisar"
1888+
},
1889+
"translate, title()": {
1890+
"en": "Translate",
1891+
"pt": "Traduzir"
1892+
},
18691893
"post, title()": {
18701894
"en": "Post",
18711895
"pt": "Postar"

0 commit comments

Comments
 (0)