ZumitoTeam / zumito-framework

Framework for creating a bot for discord
https://framework.zumito.dev
7 stars 1 forks source link

feat: Add translation files watcher #37

Closed fernandomema closed 1 month ago

fernandomema commented 6 months ago

Added watcher to translations files.

github-actions[bot] commented 6 months ago

Beta tag version created: 1.1.80. You can install it with npm install zumito-framework@1.1.80.

reviewpad[bot] commented 6 months ago

AI-Generated Summary: This pull request introduces a file watcher for translation files, specifically for a debug environment. It includes the creation of three new methods: onTranslationCreated, onTranslationChanged, and onErrorLoadingTranslation. These methods respectively handle the creation, updates, and errors with the translation files. Additionally, an update has also been made to the 'loadTranslationFile' function: it now appends a timestamp-based query string to the file URL to ensure the latest file version is always fetched. The pull request also includes slightly amended comments to clarify that changes in both commands and translations should not happen in the production environment. Overall, this update enhances the module's ability to dynamically handle changes in translation files during the development process.

WilliamAcosta1 commented 6 months ago

While testing the translation update, in Windows I can see that when saving the file a serious error occurs that stops the application immediately, I attach a screenshot.

image

fernandomema commented 1 month ago

done in another branch