Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplified translations #1479

Draft
wants to merge 5 commits into
base: v5.0.x
Choose a base branch
from

Conversation

swurzinger
Copy link
Contributor

@swurzinger swurzinger commented May 9, 2023

Based on the work in #1321 this now targets v5 and changes the approach such that the language files are not generated during build time anymore, but dynamically on request and then cached.

As of now this PR implements the basic functionality and works, but some things are still missing.

  • improve translation extraction tool to detect translation strings more reliably
  • provide endpoint to generate combined lang file for core and modules
  • cache lang file
  • clear cache when enabling/disabling a module
  • cleanup/remove translation symlink functionality for modules
  • provide artisan command to clear lang cache
  • improve translation helper for modules
  • restrict locales to configured known ones

@what-the-diff
Copy link

what-the-diff bot commented May 9, 2023

PR Summary

  • Language files moved to new directory
    The language files are now stored in the storage/lang folder for improved organization.

  • New controller for handling localization
    A LocalizationController has been created to manage localization requests and cache them for better performance.

  • Updated routes with locale pattern
    The routes have been updated to support locale patterns, allowing usage of valid ISO 639-1 and regional codes like en_US or fr_FR.

  • Windows systems now use hardlinks
    Symbolic links are no longer used on Windows systems due to compatibility issues. Hardlinks are now utilized for better performance and compatibility.

  • New route for localization file loading
    A new route has been added to load the localization file as necessary.

  • Removed unnecessary webpack configuration
    The webpack configuration has been removed as it's no longer needed.

@swurzinger
Copy link
Contributor Author

@Blair2004 waiting for your comments on this before I continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant