laravel-lang-files-translator icon indicating copy to clipboard operation
laravel-lang-files-translator copied to clipboard

Update TranslateService.php

Open itashia opened this issue 6 months ago • 1 comments

refactor(TranslateService): enhance readability, flexibility & error handling

  • Renamed variables to more descriptive names (e.g., translate_fromsourceLanguage)
  • Added caching mechanism for repeated translations
  • Introduced dry-run mode to allow testing without saving
  • Added option to disable parameter preservation
  • Improved error messages for better debugging
  • Added strict type hints for better static analysis
  • Split large methods into smaller single-responsibility methods
  • Validated source and target languages for correctness

Thank you so much for your thoughtful feedback and contributions — you've made this service cleaner, smarter, and easier to maintain. 🙏

itashia avatar Jun 06 '25 16:06 itashia