]> git.openstreetmap.org Git - rails.git/commitdiff
Enable I18n fallback for the embed page
authorTom Hughes <tom@compton.nu>
Mon, 20 Jan 2025 11:42:23 +0000 (11:42 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 20 Jan 2025 11:42:23 +0000 (11:42 +0000)
Fixes #5526.

app/assets/javascripts/embed.js.erb

index 66cd02b98b6e3199161b6baee64c24ef8a3a46e0..b9e9a2eaf41ee7607881ef681003080bd0456090 100644 (file)
@@ -11,6 +11,9 @@ if (navigator.languages) {
   I18n.locale = navigator.language;
 }
 
+I18n.default_locale = <%= I18n.default_locale.to_json %>;
+I18n.fallbacks = true;
+
 window.onload = function () {
   var query = (window.location.search || '?').slice(1),
       args  = {};