-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Milestone
Description
%{
"app_build" => "1.0",
"app_version" => [1, 0],
"bundle_id" => "com.example.Debuggertest",
"i18n" => %{"time_zone" => "America/New_York"},
"l10n" => %{"locale" => "en_US"},
"os" => "iOS",
"os_version" => [18, 2],
"target" => "ios"
}
So if the i18n
and i10n
value changes a new event is pushed to the server "lvn:update_interface"
with the following params:
%{
"i18n" => %{"time_zone" => "Europe/Paris"}
"i10n" => %{"locale" => "fr_FR"}
}
this would then be handled by a provided event handler built into LVN:
def handle_event("lvn:update_interface", interface_updates, socket) do
{:noreply, assign(socket, %{"_interface" => Map.merge(socket.assigns._interface, interface_updates))}
end
the motivation is for template updates for certain values:
<Text :interface-i18n="America/New_York">New York!</Text>
In this example the SwiftUI server-side client is normalizing the %{"time_zone" => "Ameirca/New_York"}
to just the "America/New_York"
value.
Metadata
Metadata
Assignees
Labels
No labels