From 0729199b6be6b23b38722f21488c6fb396004e80 Mon Sep 17 00:00:00 2001 From: takahashim Date: Sun, 14 Jul 2024 01:25:12 +0900 Subject: [PATCH] Fix `I18n.transliterate` --- config/initializers/decidim_override.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/initializers/decidim_override.rb b/config/initializers/decidim_override.rb index 04bc5687a..d2bcd8690 100644 --- a/config/initializers/decidim_override.rb +++ b/config/initializers/decidim_override.rb @@ -118,4 +118,10 @@ def map_element(html_options = {}) end end end + + # Fix I18n.transliterate() + I18n.config.backend.instance_eval do + @transliterators[:ja] = I18n::Backend::Transliterator.get( ->(string) { string } ) + @transliterators[:en] = I18n::Backend::Transliterator.get( ->(string) { string } ) + end end