rojects/workspace/history/2026/07-July/06-Monday/Structural Update.txt

23 lines
1.3 KiB
Plaintext
Raw Normal View History

[ Structural Update ]
The app needs to slowly (step by step) use locales, commands and the undo manager.
We also need to update the outline.
[ Locales ]
All strings in the application need to be replaced by localized strings (not now, but on the long run).
We already started to implement it, but we're still not using it.
The idea is the following: The locales are stored in "locales" with "locales/en" being the English source
of the application and are then generated. Each directory will be also a directory and has its own class that will be put into
"src/locales/generated". So a "locales/en/commands" will be created as "src/locales/generated/commands/Commands.ts" and will
contain all files of the source directory "locales/en/commands" as members.
[ Commands ]
We need to move all actions that can be done in the application to Commands which should be used from now on
for most file/data changing operations. Commands only have one execute function. When needed they will create
an undoable function inside the execute method. However, not all commands will have a need for undo/redo.
[ Undo Manager ]
When possible ever file editor should take care of an undo/redo. When an undo/redo is needed the
UndoManager "src/library-ts/browser/undo/UndoManager.ts" should be used. It can work with asynchronous UndoActions
and can compress multiple actions to one.