Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete functions #105

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ If you're working on an Elixir/Phoenix project and need to manage translations,
- Elixir (tested on 1.14.0)
- Phoenix (tested on 1.7.0)
- Ecto SQL (tested on 3.6)
- Phoenix LiveView 0.18.0+
- PostgreSQL 15+ or SQLite 3.31.0+

## Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ defmodule KantaWeb.Translations.ApplicationSourceFormLive do
socket =
case Translations.update_application_source(application_source, attrs) do
{:ok, _application_source} ->
push_redirect(socket, to: dashboard_path(socket, "/application_sources"))
push_navigate(socket, to: dashboard_path(socket, "/application_sources"))

{:error, changeset} ->
assign(socket, :form, to_form(changeset))
Expand All @@ -67,7 +67,7 @@ defmodule KantaWeb.Translations.ApplicationSourceFormLive do
socket =
case Translations.create_application_source(attrs) do
{:ok, _application_source} ->
push_redirect(socket, to: dashboard_path(socket, "/application_sources"))
push_navigate(socket, to: dashboard_path(socket, "/application_sources"))

{:error, changeset} ->
assign(socket, :form, to_form(changeset))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule KantaWeb.Translations.ApplicationSourcesLive do
end

def handle_event("navigate", %{"to" => to}, socket) do
{:noreply, push_redirect(socket, to: "/kanta" <> to)}
{:noreply, push_navigate(socket, to: "/kanta" <> to)}
end

def handle_event("page_changed", %{"index" => page_number}, socket) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule KantaWeb.Translations.ContextsLive do
end

def handle_event("navigate", %{"to" => to}, socket) do
{:noreply, push_redirect(socket, to: dashboard_path(socket) <> to)}
{:noreply, push_navigate(socket, to: dashboard_path(socket) <> to)}
end

def handle_event("page_changed", %{"index" => page_number}, socket) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule KantaWeb.Translations.DomainsLive do
end

def handle_event("navigate", %{"to" => to}, socket) do
{:noreply, push_redirect(socket, to: dashboard_path(socket) <> to)}
{:noreply, push_navigate(socket, to: dashboard_path(socket) <> to)}
end

def handle_event("page_changed", %{"index" => page_number}, socket) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defmodule KantaWeb.Translations.PluralTranslationForm do
})

{:noreply,
push_redirect(socket,
push_navigate(socket,
to:
dashboard_path(socket, "/locales/#{locale.id}/translations" <> get_query(socket.assigns))
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule KantaWeb.Translations.SingularTranslationForm do
Translations.update_singular_translation(translation, %{"translated_text" => translated})

{:noreply,
push_redirect(socket,
push_navigate(socket,
to:
dashboard_path(socket, "/locales/#{locale.id}/translations" <> get_query(socket.assigns))
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ defmodule KantaWeb.Translations.TranslationsLive do
end

def handle_event("navigate", %{"to" => to}, socket) do
{:noreply, push_redirect(socket, to: dashboard_path(socket) <> to)}
{:noreply, push_navigate(socket, to: dashboard_path(socket) <> to)}
end

def handle_event("page_changed", %{"index" => page_number}, socket) do
Expand Down
Loading