This commit introduces several improvements to the translation handling and source detection:
Escape special characters in translation text to prevent issues with display or input of translations containing newlines, tabs, etc.
Expand the default translation source pattern to include all JSON files under the locales directory, allowing for more flexible organization of translation files.
Add return type annotations to several functions for better documentation and type checking.
These changes should improve the overall usability and reliability of the translation handling in the application.
This commit introduces several improvements to the translation handling and source detection:
Escape special characters in translation text to prevent issues with display or input of translations containing newlines, tabs, etc.
Expand the default translation source pattern to include all JSON files under the locales directory, allowing for more flexible organization of translation files.
Add return type annotations to several functions for better documentation and type checking.
These changes should improve the overall usability and reliability of the translation handling in the application.