From 22727f9a7346d503ff2c753e7ea2b56ee388c867 Mon Sep 17 00:00:00 2001
From: Bruno Casali <brunoocasali@gmail.com>
Date: Sun, 8 Nov 2020 14:32:49 -0300
Subject: [PATCH] Add a way to keep locale querystring when click on search

---
 app/views/layouts/_search.html.haml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml
index 95de084d..c401e7da 100644
--- a/app/views/layouts/_search.html.haml
+++ b/app/views/layouts/_search.html.haml
@@ -4,6 +4,7 @@
   = form_tag restrooms_path, class: "search-restrooms-form", method: :get do
     = hidden_field_tag :lat, ""
     = hidden_field_tag :long, ""
+    = hidden_field_tag :locale, params[:locale] || I18n.default_locale
     .input-group
       = text_field_tag :search, params[:search], class: "form-control search-bar", aria: {label: t("search_bar.enter_location")}
       .input-group-btn