nabekou29 / js-i18n.nvim

A Neovim plugin for the JavaScript library i18next
MIT License
20 stars 6 forks source link

feat: Improve translation handling and source detection #9

Closed nabekou29 closed 3 months ago

nabekou29 commented 3 months ago

This commit introduces several improvements to the translation handling and source detection:

  1. Escape special characters in translation text to prevent issues with display or input of translations containing newlines, tabs, etc.

  2. Expand the default translation source pattern to include all JSON files under the locales directory, allowing for more flexible organization of translation files.

  3. 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.