fix: proper menu translation

This commit is contained in:
2026-05-03 19:31:26 +02:00
parent dbb93a66f6
commit 4bee8cf1db
7 changed files with 347 additions and 56 deletions

View File

@@ -161,8 +161,9 @@ defmodule BDS.Desktop.ShellLive do
|> assign(:sidebar_filter_panels, %{})
|> assign(:chat_editor_request_refs, %{})
|> assign(:shell_overlay, nil)
|> assign(:output_entries, [])
|> reload_shell(workbench)}
|> assign(:output_entries, [])
|> reload_shell(workbench)
|> tap(&sync_menu_bar_locale/1)}
end
@impl true
@@ -682,6 +683,7 @@ defmodule BDS.Desktop.ShellLive do
socket
|> assign(:page_language, normalized)
|> reload_shell(socket.assigns.workbench)
|> tap(&sync_menu_bar_locale/1)
end
end
@@ -861,4 +863,13 @@ defmodule BDS.Desktop.ShellLive do
apply_shell_command_result: &apply_shell_command_result/2
}
defp sync_menu_bar_locale(socket) do
locale = socket.assigns.page_language
case Process.whereis(BDS.Desktop.MenuBar) do
nil -> :ok
pid -> send(pid, {:set_ui_locale, locale})
end
end
end