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

Add support for localized Turbo Streams broadcasts #437

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Feb 26, 2023

  1. Add support for localized broadcasts with I18n

    This commit adds support for localized broadcasts in Turbo. The
    change includes a new configuration option to enable/disable the feature, updated helper and updated channel method to handle the localization.
    
    The main changes include:
    - Add `I18n` gem to the Gemfile
    - Implement a new method in `Turbo::Streams::Broadcasts` to handle broadcasting to multiple streams in different locales
    - Update the `turbo_stream_from` helper in `Turbo::StreamsHelper` to add the locale to the stream name when using localized broadcasts
    - Add a new config option to enable/disable localized broadcasts`
    - Added tests for the changes
    mrtnin committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    6e79c87 View commit details
    Browse the repository at this point in the history
  2. Add dependency

    mrtnin committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    99099ab View commit details
    Browse the repository at this point in the history