ee cummings this shit
This commit is contained in:
@ -32,7 +32,7 @@ defmodule MemexWeb.ContextLive.FormComponent do
|
||||
{:ok, _context} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:info, "Context updated successfully")
|
||||
|> put_flash(:info, "context updated successfully")
|
||||
|> push_navigate(to: socket.assigns.return_to)}
|
||||
|
||||
{:error, %Ecto.Changeset{} = changeset} ->
|
||||
@ -45,7 +45,7 @@ defmodule MemexWeb.ContextLive.FormComponent do
|
||||
{:ok, _context} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:info, "Context created successfully")
|
||||
|> put_flash(:info, "context created successfully")
|
||||
|> push_navigate(to: socket.assigns.return_to)}
|
||||
|
||||
{:error, %Ecto.Changeset{} = changeset} ->
|
||||
|
@ -16,19 +16,19 @@ defmodule MemexWeb.ContextLive.Index do
|
||||
|
||||
defp apply_action(socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(:page_title, "Edit Context")
|
||||
|> assign(:page_title, "edit context")
|
||||
|> assign(:context, Contexts.get_context!(id))
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "New Context")
|
||||
|> assign(:page_title, "new context")
|
||||
|> assign(:context, %Context{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "Listing Contexts")
|
||||
|> assign(:page_title, "listing contexts")
|
||||
|> assign(:context, nil)
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1>Listing Contexts</h1>
|
||||
<h1>listing contexts</h1>
|
||||
|
||||
<%= if @live_action in [:new, :edit] do %>
|
||||
<.modal return_to={Routes.context_index_path(@socket, :index)}>
|
||||
@ -35,12 +35,12 @@
|
||||
<td>
|
||||
<span>
|
||||
<.link navigate={Routes.context_show_path(@socket, :show, context)}>
|
||||
<%= dgettext("actions", "Show") %>
|
||||
<%= dgettext("actions", "show") %>
|
||||
</.link>
|
||||
</span>
|
||||
<span>
|
||||
<.link patch={Routes.context_index_path(@socket, :edit, context)}>
|
||||
<%= dgettext("actions", "Edit") %>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
</.link>
|
||||
</span>
|
||||
<span>
|
||||
@ -48,9 +48,9 @@
|
||||
href="#"
|
||||
phx-click="delete"
|
||||
phx-value-id={context.id}
|
||||
data-confirm={dgettext("prompts", "Are you sure?")}
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
>
|
||||
<%= dgettext("actions", "Delete") %>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
</.link>
|
||||
</span>
|
||||
</td>
|
||||
@ -61,6 +61,6 @@
|
||||
|
||||
<span>
|
||||
<.link patch={Routes.context_index_path(@socket, :new)}>
|
||||
<%= dgettext("actions", "New Context") %>
|
||||
<%= dgettext("actions", "new context") %>
|
||||
</.link>
|
||||
</span>
|
||||
|
@ -16,6 +16,6 @@ defmodule MemexWeb.ContextLive.Show do
|
||||
|> assign(:context, Contexts.get_context!(id))}
|
||||
end
|
||||
|
||||
defp page_title(:show), do: "Show Context"
|
||||
defp page_title(:edit), do: "Edit Context"
|
||||
defp page_title(:show), do: "show context"
|
||||
defp page_title(:edit), do: "edit context"
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1>Show Context</h1>
|
||||
<h1>show context</h1>
|
||||
|
||||
<%= if @live_action in [:edit] do %>
|
||||
<.modal return_to={Routes.context_show_path(@socket, :show, @context)}>
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<span>
|
||||
<.link patch={Routes.context_show_path(@socket, :edit, @context)} class="button">
|
||||
<%= dgettext("actions", "Edit") %>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
</.link>
|
||||
</span>
|
||||
|
|
||||
|
@ -9,30 +9,30 @@
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("Notes:") %>
|
||||
<%= gettext("notes:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("Document notes about individual items or concepts") %>
|
||||
<%= gettext("document notes about individual items or concepts") %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("Contexts:") %>
|
||||
<%= gettext("contexts:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("Provide context around a single topic and hotlink to your notes") %>
|
||||
<%= gettext("provide context around a single topic and hotlink to your notes") %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("Pipelines:") %>
|
||||
<%= gettext("pipelines:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("Document your processes, attaching contexts to each step") %>
|
||||
<%= gettext("document your processes, attaching contexts to each step") %>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -41,36 +41,36 @@
|
||||
|
||||
<ul class="flex flex-col space-y-4 text-center">
|
||||
<h2 class="title text-primary-400 text-lg">
|
||||
<%= gettext("Features") %>
|
||||
<%= gettext("features") %>
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("Multi-user:") %>
|
||||
<%= gettext("multi-user:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("Built with sharing and collaboration in mind") %>
|
||||
<%= gettext("built with sharing and collaboration in mind") %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("Privacy:") %>
|
||||
<%= gettext("privacy:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("Privacy controls on a per-note, context or pipeline basis") %>
|
||||
<%= gettext("privacy controls on a per-note, context or pipeline basis") %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-col justify-center items-center
|
||||
space-y-2">
|
||||
<b class="whitespace-nowrap">
|
||||
<%= gettext("Convenient:") %>
|
||||
<%= gettext("convenient:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= gettext("Accessible from any internet-capable device") %>
|
||||
<%= gettext("accessible from any internet-capable device") %>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -79,12 +79,12 @@
|
||||
|
||||
<ul class="flex flex-col space-y-4 text-center">
|
||||
<h2 class="title text-primary-400 text-lg">
|
||||
<%= gettext("Instance Information") %>
|
||||
<%= gettext("instance information") %>
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center space-x-2">
|
||||
<b>
|
||||
<%= gettext("Admins:") %>
|
||||
<%= gettext("admins:") %>
|
||||
</b>
|
||||
<p>
|
||||
<%= if @admins |> Enum.empty?() do %>
|
||||
@ -92,7 +92,7 @@
|
||||
href={Routes.user_registration_path(MemexWeb.Endpoint, :new)}
|
||||
class="hover:underline"
|
||||
>
|
||||
<%= dgettext("prompts", "Register to setup %{name}", name: "memex") %>
|
||||
<%= dgettext("prompts", "register to setup %{name}", name: "memex") %>
|
||||
</.link>
|
||||
<% else %>
|
||||
<div class="flex flex-wrap justify-center space-x-2">
|
||||
@ -107,18 +107,18 @@
|
||||
</li>
|
||||
|
||||
<li class="flex flex-row justify-center space-x-2">
|
||||
<b>Registration:</b>
|
||||
<b><%= gettext("registration:") %></b>
|
||||
<p>
|
||||
<%= Application.get_env(:memex, MemexWeb.Endpoint)[:registration]
|
||||
|> case do
|
||||
"public" -> gettext("Public Signups")
|
||||
_ -> gettext("Invite Only")
|
||||
"public" -> gettext("public signups")
|
||||
_ -> gettext("invite only")
|
||||
end %>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="flex flex-row justify-center items-center space-x-2">
|
||||
<b>Version:</b>
|
||||
<b><%= gettext("version:") %></b>
|
||||
<.link
|
||||
href="https://gitea.bubbletea.dev/shibao/memex/src/branch/stable/CHANGELOG.md"
|
||||
class="flex flex-row justify-center items-center space-x-2 hover:underline"
|
||||
@ -135,7 +135,7 @@
|
||||
|
||||
<ul class="flex flex-col space-y-2 text-center justify-center">
|
||||
<h2 class="title text-primary-400 text-lg">
|
||||
<%= gettext("Get involved!") %>
|
||||
<%= gettext("get involved!") %>
|
||||
</h2>
|
||||
|
||||
<li class="flex flex-col justify-center space-x-2">
|
||||
@ -145,7 +145,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<p><%= gettext("View the source code") %></p>
|
||||
<p><%= gettext("view the source code") %></p>
|
||||
<i class="fas fa-md fa-code"></i>
|
||||
</.link>
|
||||
</li>
|
||||
@ -156,7 +156,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<p><%= gettext("Help translate") %></p>
|
||||
<p><%= gettext("help translate") %></p>
|
||||
<i class="fas fa-md fa-language"></i>
|
||||
</.link>
|
||||
</li>
|
||||
@ -167,7 +167,7 @@
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<p><%= gettext("Report bugs or request features") %></p>
|
||||
<p><%= gettext("report bugs or request features") %></p>
|
||||
<i class="fas fa-md fa-spider"></i>
|
||||
</.link>
|
||||
</li>
|
||||
|
@ -30,15 +30,15 @@ defmodule MemexWeb.InviteLive.Index do
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(page_title: gettext("Edit Invite"), invite: Invites.get_invite!(id, current_user))
|
||||
|> assign(page_title: gettext("edit invite"), invite: Invites.get_invite!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket |> assign(page_title: gettext("New Invite"), invite: %Invite{})
|
||||
socket |> assign(page_title: gettext("new invite"), invite: %Invite{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket |> assign(page_title: gettext("Invites"), invite: nil)
|
||||
socket |> assign(page_title: gettext("invites"), invite: nil)
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
@ -1,19 +1,19 @@
|
||||
<div class="w-full flex flex-col space-y-8 justify-center items-center">
|
||||
<h1 class="title text-2xl title-primary-500">
|
||||
<%= gettext("Invites") %>
|
||||
<%= gettext("invites") %>
|
||||
</h1>
|
||||
|
||||
<%= if @invites |> Enum.empty?() do %>
|
||||
<h1 class="title text-xl text-primary-400">
|
||||
<%= gettext("No invites 😔") %>
|
||||
<%= gettext("no invites 😔") %>
|
||||
</h1>
|
||||
|
||||
<.link patch={Routes.invite_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "Invite someone new!") %>
|
||||
<%= dgettext("actions", "invite someone new!") %>
|
||||
</.link>
|
||||
<% else %>
|
||||
<.link patch={Routes.invite_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "Create Invite") %>
|
||||
<%= dgettext("actions", "create invite") %>
|
||||
</.link>
|
||||
<% end %>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
phx-click="delete_invite"
|
||||
phx-value-id={invite.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete the invite for %{invite_name}?",
|
||||
dgettext("prompts", "are you sure you want to delete the invite for %{invite_name}?",
|
||||
invite_name: invite.name
|
||||
)
|
||||
}
|
||||
@ -56,11 +56,11 @@
|
||||
|
||||
<%= if invite.disabled_at |> is_nil() do %>
|
||||
<a href="#" class="btn btn-primary" phx-click="disable_invite" phx-value-id={invite.id}>
|
||||
<%= gettext("Disable") %>
|
||||
<%= gettext("disable") %>
|
||||
</a>
|
||||
<% else %>
|
||||
<a href="#" class="btn btn-primary" phx-click="enable_invite" phx-value-id={invite.id}>
|
||||
<%= gettext("Enable") %>
|
||||
<%= gettext("enable") %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
@ -71,12 +71,12 @@
|
||||
phx-click="set_unlimited"
|
||||
phx-value-id={invite.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to make %{invite_name} unlimited?",
|
||||
dgettext("prompts", "are you sure you want to make %{invite_name} unlimited?",
|
||||
invite_name: invite.name
|
||||
)
|
||||
}
|
||||
>
|
||||
<%= gettext("Set Unlimited") %>
|
||||
<%= gettext("set unlimited") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</.invite_card>
|
||||
@ -101,7 +101,7 @@
|
||||
data-confirm={
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to delete %{email}? This action is permanent!",
|
||||
"are you sure you want to delete %{email}? This action is permanent!",
|
||||
email: admin.email
|
||||
)
|
||||
}
|
||||
@ -117,7 +117,7 @@
|
||||
<hr class="hr" />
|
||||
|
||||
<h1 class="title text-2xl text-primary-400">
|
||||
<%= gettext("Users") %>
|
||||
<%= gettext("users") %>
|
||||
</h1>
|
||||
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-center">
|
||||
@ -131,7 +131,7 @@
|
||||
data-confirm={
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to delete %{email}? This action is permanent!",
|
||||
"are you sure you want to delete %{email}? This action is permanent!",
|
||||
email: user.email
|
||||
)
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ defmodule MemexWeb.NoteLive.FormComponent do
|
||||
{:ok, _note} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:info, "Note updated successfully")
|
||||
|> put_flash(:info, gettext("%{title} saved", title: title))
|
||||
|> push_navigate(to: socket.assigns.return_to)}
|
||||
|
||||
{:error, %Ecto.Changeset{} = changeset} ->
|
||||
@ -45,7 +45,7 @@ defmodule MemexWeb.NoteLive.FormComponent do
|
||||
{:ok, _note} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:info, "Note created successfully")
|
||||
|> put_flash(:info, gettext("%{title} created", title: title))
|
||||
|> push_navigate(to: socket.assigns.return_to)}
|
||||
|
||||
{:error, %Ecto.Changeset{} = changeset} ->
|
||||
|
@ -16,19 +16,19 @@ defmodule MemexWeb.NoteLive.Index do
|
||||
|
||||
defp apply_action(socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(:page_title, "Edit Note")
|
||||
|> assign(page_title: gettext("edit %{title}", title: title))
|
||||
|> assign(:note, Notes.get_note!(id))
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "New Note")
|
||||
|> assign(page_title: "new note")
|
||||
|> assign(:note, %Note{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "Listing Notes")
|
||||
|> assign(page_title: "notes")
|
||||
|> assign(:note, nil)
|
||||
end
|
||||
|
||||
@ -37,8 +37,7 @@ defmodule MemexWeb.NoteLive.Index do
|
||||
note = Notes.get_note!(id)
|
||||
{:ok, _} = Notes.delete_note(note)
|
||||
|
||||
{:noreply, assign(socket, :notes, list_notes())}
|
||||
end
|
||||
|> put_flash(:info, gettext("%{title} deleted", title: title))
|
||||
|
||||
defp list_notes do
|
||||
Notes.list_notes()
|
||||
|
@ -16,6 +16,6 @@ defmodule MemexWeb.NoteLive.Show do
|
||||
|> assign(:note, Notes.get_note!(id))}
|
||||
end
|
||||
|
||||
defp page_title(:show), do: "Show Note"
|
||||
defp page_title(:edit), do: "Edit Note"
|
||||
defp page_title(:show), do: "show note"
|
||||
defp page_title(:edit), do: "edit note"
|
||||
end
|
||||
|
@ -32,7 +32,7 @@ defmodule MemexWeb.PipelineLive.FormComponent do
|
||||
{:ok, _pipeline} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:info, "Pipeline updated successfully")
|
||||
|> put_flash(:info, "pipeline updated successfully")
|
||||
|> push_navigate(to: socket.assigns.return_to)}
|
||||
|
||||
{:error, %Ecto.Changeset{} = changeset} ->
|
||||
@ -45,7 +45,7 @@ defmodule MemexWeb.PipelineLive.FormComponent do
|
||||
{:ok, _pipeline} ->
|
||||
{:noreply,
|
||||
socket
|
||||
|> put_flash(:info, "Pipeline created successfully")
|
||||
|> put_flash(:info, "pipeline created successfully")
|
||||
|> push_navigate(to: socket.assigns.return_to)}
|
||||
|
||||
{:error, %Ecto.Changeset{} = changeset} ->
|
||||
|
@ -16,19 +16,19 @@ defmodule MemexWeb.PipelineLive.Index do
|
||||
|
||||
defp apply_action(socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(:page_title, "Edit Pipeline")
|
||||
|> assign(:page_title, "edit pipeline")
|
||||
|> assign(:pipeline, Pipelines.get_pipeline!(id))
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "New Pipeline")
|
||||
|> assign(:page_title, "new Pipeline")
|
||||
|> assign(:pipeline, %Pipeline{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(:page_title, "Listing Pipelines")
|
||||
|> assign(:page_title, "listing pipelines")
|
||||
|> assign(:pipeline, nil)
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1>Listing Pipelines</h1>
|
||||
<h1>listing pipelines</h1>
|
||||
|
||||
<%= if @live_action in [:new, :edit] do %>
|
||||
<.modal return_to={Routes.pipeline_index_path(@socket, :index)}>
|
||||
@ -33,12 +33,12 @@
|
||||
<td>
|
||||
<span>
|
||||
<.link navigate={Routes.pipeline_show_path(@socket, :show, pipeline)}>
|
||||
<%= dgettext("actions", "Show") %>
|
||||
<%= dgettext("actions", "show") %>
|
||||
</.link>
|
||||
</span>
|
||||
<span>
|
||||
<.link patch={Routes.pipeline_index_path(@socket, :edit, pipeline)}>
|
||||
<%= dgettext("actions", "Edit") %>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
</.link>
|
||||
</span>
|
||||
<span>
|
||||
@ -46,9 +46,9 @@
|
||||
href="#"
|
||||
phx-click="delete"
|
||||
phx-value-id={pipeline.id}
|
||||
data-confirm={dgettext("prompts", "Are you sure?")}
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
>
|
||||
<%= dgettext("actions", "Delete") %>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
</.link>
|
||||
</span>
|
||||
</td>
|
||||
@ -59,6 +59,6 @@
|
||||
|
||||
<span>
|
||||
<.link patch={Routes.pipeline_index_path(@socket, :new)}>
|
||||
<%= dgettext("actions", "New Pipeline") %>
|
||||
<%= dgettext("actions", "new pipeline") %>
|
||||
</.link>
|
||||
</span>
|
||||
|
@ -16,6 +16,6 @@ defmodule MemexWeb.PipelineLive.Show do
|
||||
|> assign(:pipeline, Pipelines.get_pipeline!(id))}
|
||||
end
|
||||
|
||||
defp page_title(:show), do: "Show Pipeline"
|
||||
defp page_title(:edit), do: "Edit Pipeline"
|
||||
defp page_title(:show), do: "show pipeline"
|
||||
defp page_title(:edit), do: "edit pipeline"
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1>Show Pipeline</h1>
|
||||
<h1>show pipeline</h1>
|
||||
|
||||
<%= if @live_action in [:edit] do %>
|
||||
<.modal return_to={Routes.pipeline_show_path(@socket, :show, @pipeline)}>
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<span>
|
||||
<.link patch={Routes.pipeline_show_path(@socket, :edit, @pipeline)} class="button">
|
||||
<%= dgettext("actions", "Edit") %>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
</.link>
|
||||
</span>
|
||||
|
|
||||
|
Reference in New Issue
Block a user