ee cummings this shit
This commit is contained in:
		| @@ -18,11 +18,11 @@ defmodule MemexWeb.Components.InviteCard do | ||||
|       <%= if @invite.disabled_at |> is_nil() do %> | ||||
|         <h2 class="title text-md"> | ||||
|           <%= gettext("Uses Left:") %> | ||||
|           <%= @invite.uses_left || "Unlimited" %> | ||||
|           <%= @invite.uses_left || gettext("unlimited") %> | ||||
|         </h2> | ||||
|       <% else %> | ||||
|         <h2 class="title text-md"> | ||||
|           <%= gettext("Invite Disabled") %> | ||||
|           <%= gettext("invite disabled") %> | ||||
|         </h2> | ||||
|       <% end %> | ||||
|  | ||||
|   | ||||
| @@ -41,7 +41,7 @@ defmodule MemexWeb.Components.Topbar do | ||||
|                 navigate={Routes.note_index_path(Endpoint, :index)} | ||||
|                 class="text-primary-400 text-primary-400 hover:underline truncate" | ||||
|               > | ||||
|                 <%= gettext("Notes") %> | ||||
|                 <%= gettext("notes") %> | ||||
|               </.link> | ||||
|             </li> | ||||
|  | ||||
| @@ -50,7 +50,7 @@ defmodule MemexWeb.Components.Topbar do | ||||
|                 navigate={Routes.context_index_path(Endpoint, :index)} | ||||
|                 class="text-primary-400 text-primary-400 hover:underline truncate" | ||||
|               > | ||||
|                 <%= gettext("Contexts") %> | ||||
|                 <%= gettext("contexts") %> | ||||
|               </.link> | ||||
|             </li> | ||||
|  | ||||
| @@ -59,11 +59,11 @@ defmodule MemexWeb.Components.Topbar do | ||||
|                 navigate={Routes.pipeline_index_path(Endpoint, :index)} | ||||
|                 class="text-primary-400 text-primary-400 hover:underline truncate" | ||||
|               > | ||||
|                 <%= gettext("Pipelines") %> | ||||
|                 <%= gettext("pipelines") %> | ||||
|               </.link> | ||||
|             </li> | ||||
|  | ||||
|             <li class="mx-2 my-1 border-left border border-primary-400"></li> | ||||
|             <li class="mx-2 my-1 border-left border border-primary-700"></li> | ||||
|  | ||||
|             <%= if @current_user.role == :admin do %> | ||||
|               <li class="mx-2 my-1"> | ||||
| @@ -71,7 +71,7 @@ defmodule MemexWeb.Components.Topbar do | ||||
|                   navigate={Routes.invite_index_path(Endpoint, :index)} | ||||
|                   class="text-primary-400 text-primary-400 hover:underline" | ||||
|                 > | ||||
|                   <%= gettext("Invites") %> | ||||
|                   <%= gettext("invites") %> | ||||
|                 </.link> | ||||
|               </li> | ||||
|             <% end %> | ||||
| @@ -89,7 +89,7 @@ defmodule MemexWeb.Components.Topbar do | ||||
|               <.link | ||||
|                 href={Routes.user_session_path(Endpoint, :delete)} | ||||
|                 method="delete" | ||||
|                 data-confirm={dgettext("prompts", "Are you sure you want to log out?")} | ||||
|                 data-confirm={dgettext("prompts", "are you sure you want to log out?")} | ||||
|               > | ||||
|                 <i class="fas fa-sign-out-alt"></i> | ||||
|               </.link> | ||||
| @@ -112,7 +112,7 @@ defmodule MemexWeb.Components.Topbar do | ||||
|                   navigate={Routes.user_registration_path(Endpoint, :new)} | ||||
|                   class="text-primary-400 text-primary-400 hover:underline truncate" | ||||
|                 > | ||||
|                   <%= dgettext("actions", "Register") %> | ||||
|                   <%= dgettext("actions", "register") %> | ||||
|                 </.link> | ||||
|               </li> | ||||
|             <% end %> | ||||
| @@ -122,7 +122,7 @@ defmodule MemexWeb.Components.Topbar do | ||||
|                 navigate={Routes.user_session_path(Endpoint, :new)} | ||||
|                 class="text-primary-400 text-primary-400 hover:underline truncate" | ||||
|               > | ||||
|                 <%= dgettext("actions", "Log in") %> | ||||
|                 <%= dgettext("actions", "log in") %> | ||||
|               </.link> | ||||
|             </li> | ||||
|           <% end %> | ||||
|   | ||||
| @@ -20,9 +20,12 @@ defmodule MemexWeb.Components.UserCard do | ||||
|       <h3 class="px-4 py-2 rounded-lg title text-lg"> | ||||
|         <p> | ||||
|           <%= if @user.confirmed_at |> is_nil() do %> | ||||
|             Email unconfirmed | ||||
|             <%= gettext("email unconfirmed") %> | ||||
|           <% else %> | ||||
|             User was confirmed at <%= @user.confirmed_at |> display_datetime() %> | ||||
|             <%= gettext( | ||||
|               "user was confirmed at %{relative_datetime}", | ||||
|               relative_datetime: @user.confirmed_at |> display_datetime() | ||||
|             ) %> | ||||
|           <% end %> | ||||
|         </p> | ||||
|  | ||||
|   | ||||
| @@ -32,7 +32,7 @@ defmodule MemexWeb.UserRegistrationController do | ||||
|     render(conn, "new.html", | ||||
|       changeset: Accounts.change_user_registration(%User{}), | ||||
|       invite: invite, | ||||
|       page_title: gettext("Register") | ||||
|       page_title: gettext("register") | ||||
|     ) | ||||
|   end | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ defmodule MemexWeb.UserSessionController do | ||||
|   alias MemexWeb.UserAuth | ||||
|  | ||||
|   def new(conn, _params) do | ||||
|     render(conn, "new.html", error_message: nil, page_title: gettext("Log in")) | ||||
|     render(conn, "new.html", error_message: nil, page_title: gettext("log in")) | ||||
|   end | ||||
|  | ||||
|   def create(conn, %{"user" => user_params}) do | ||||
|   | ||||
| @@ -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> | ||||
| | | ||||
|   | ||||
| @@ -22,11 +22,11 @@ | ||||
|   <div class="flex flex-row justify-center items-center space-x-4"> | ||||
|     <%= if Accounts.allow_registration?() do %> | ||||
|       <.link href={Routes.user_registration_path(@conn, :new)} class="btn btn-primary"> | ||||
|         <%= dgettext("actions", "Register") %> | ||||
|         <%= dgettext("actions", "register") %> | ||||
|       </.link> | ||||
|     <% end %> | ||||
|     <.link href={Routes.user_session_path(@conn, :new)} class="btn btn-primary"> | ||||
|       <%= dgettext("actions", "Log in") %> | ||||
|       <%= dgettext("actions", "log in") %> | ||||
|     </.link> | ||||
|   </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4"> | ||||
|   <h1 class="title text-primary-400 text-xl"> | ||||
|     <%= dgettext("actions", "Register") %> | ||||
|     <%= dgettext("actions", "register") %> | ||||
|   </h1> | ||||
|  | ||||
|   <.form | ||||
| @@ -38,14 +38,14 @@ | ||||
|     ) %> | ||||
|     <%= error_tag(f, :locale) %> | ||||
|  | ||||
|     <%= submit(dgettext("actions", "Register"), class: "mx-auto btn btn-primary col-span-3") %> | ||||
|     <%= submit(dgettext("actions", "register"), class: "mx-auto btn btn-primary col-span-3") %> | ||||
|   </.form> | ||||
|  | ||||
|   <hr class="hr" /> | ||||
|  | ||||
|   <div class="flex flex-row justify-center items-center space-x-4"> | ||||
|     <.link href={Routes.user_session_path(@conn, :new)} class="btn btn-primary"> | ||||
|       <%= dgettext("actions", "Log in") %> | ||||
|       <%= dgettext("actions", "log in") %> | ||||
|     </.link> | ||||
|     <.link href={Routes.user_reset_password_path(@conn, :new)} class="btn btn-primary"> | ||||
|       <%= dgettext("actions", "Forgot your password?") %> | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
|       </div> | ||||
|     <% end %> | ||||
|  | ||||
|     <%= label(f, :password, "New password", class: "title text-lg text-primary-400") %> | ||||
|     <%= label(f, :password, "new password", class: "title text-lg text-primary-400") %> | ||||
|     <%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %> | ||||
|     <%= error_tag(f, :password, "col-span-3") %> | ||||
|  | ||||
| @@ -40,11 +40,11 @@ | ||||
|   <div class="flex flex-row justify-center items-center space-x-4"> | ||||
|     <%= if Accounts.allow_registration?() do %> | ||||
|       <.link href={Routes.user_registration_path(@conn, :new)} class="btn btn-primary"> | ||||
|         <%= dgettext("actions", "Register") %> | ||||
|         <%= dgettext("actions", "register") %> | ||||
|       </.link> | ||||
|     <% end %> | ||||
|     <.link href={Routes.user_session_path(@conn, :new)} class="btn btn-primary"> | ||||
|       <%= dgettext("actions", "Log in") %> | ||||
|       <%= dgettext("actions", "log in") %> | ||||
|     </.link> | ||||
|   </div> | ||||
| </div> | ||||
|   | ||||
| @@ -22,11 +22,11 @@ | ||||
|   <div class="flex flex-row justify-center items-center space-x-4"> | ||||
|     <%= if Accounts.allow_registration?() do %> | ||||
|       <.link href={Routes.user_registration_path(@conn, :new)} class="btn btn-primary"> | ||||
|         <%= dgettext("actions", "Register") %> | ||||
|         <%= dgettext("actions", "register") %> | ||||
|       </.link> | ||||
|     <% end %> | ||||
|     <.link href={Routes.user_session_path(@conn, :new)} class="btn btn-primary"> | ||||
|       <%= dgettext("actions", "Log in") %> | ||||
|       <%= dgettext("actions", "log in") %> | ||||
|     </.link> | ||||
|   </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4"> | ||||
|   <h1 class="title text-primary-400 text-xl"> | ||||
|     <%= dgettext("actions", "Log in") %> | ||||
|     <%= dgettext("actions", "log in") %> | ||||
|   </h1> | ||||
|  | ||||
|   <.form | ||||
| @@ -29,7 +29,7 @@ | ||||
|     ) %> | ||||
|     <%= checkbox(f, :remember_me, class: "checkbox col-span-2") %> | ||||
|  | ||||
|     <%= submit(dgettext("actions", "Log in"), class: "mx-auto btn btn-primary col-span-3") %> | ||||
|     <%= submit(dgettext("actions", "log in"), class: "mx-auto btn btn-primary col-span-3") %> | ||||
|   </.form> | ||||
|  | ||||
|   <hr class="hr" /> | ||||
| @@ -37,7 +37,7 @@ | ||||
|   <div class="flex flex-row justify-center items-center space-x-4"> | ||||
|     <%= if Accounts.allow_registration?() do %> | ||||
|       <.link href={Routes.user_registration_path(@conn, :new)} class="btn btn-primary"> | ||||
|         <%= dgettext("actions", "Register") %> | ||||
|         <%= dgettext("actions", "register") %> | ||||
|       </.link> | ||||
|     <% end %> | ||||
|     <.link href={Routes.user_reset_password_path(@conn, :new)} class="btn btn-primary"> | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center text-center space-y-4"> | ||||
|   <h1 class="pb-4 title text-primary-400 text-xl"> | ||||
|     <%= gettext("Settings") %> | ||||
|     <%= gettext("settings") %> | ||||
|   </h1> | ||||
|  | ||||
|   <hr class="hr" /> | ||||
| @@ -12,24 +12,24 @@ | ||||
|     class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" | ||||
|   > | ||||
|     <h3 class="title text-primary-400 text-lg col-span-3"> | ||||
|       <%= dgettext("actions", "Change email") %> | ||||
|       <%= dgettext("actions", "change email") %> | ||||
|     </h3> | ||||
|  | ||||
|     <%= if @email_changeset.action && not @email_changeset.valid? do %> | ||||
|       <div class="alert alert-danger col-span-3"> | ||||
|         <p> | ||||
|           <%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %> | ||||
|           <%= dgettext("errors", "oops, something went wrong! Please check the errors below") %> | ||||
|         </p> | ||||
|       </div> | ||||
|     <% end %> | ||||
|  | ||||
|     <%= hidden_input(f, :action, name: "action", value: "update_email") %> | ||||
|  | ||||
|     <%= label(f, :email, class: "title text-lg text-primary-400") %> | ||||
|     <%= label(f, :email, gettext("email"), class: "title text-lg text-primary-400") %> | ||||
|     <%= email_input(f, :email, required: true, class: "mx-2 my-1 input input-primary col-span-2") %> | ||||
|     <%= error_tag(f, :email, "col-span-3") %> | ||||
|  | ||||
|     <%= label(f, :current_password, gettext("Current password"), | ||||
|     <%= label(f, :current_password, gettext("current password"), | ||||
|       for: "current_password_for_email", | ||||
|       class: "mx-2 my-1 title text-lg text-primary-400" | ||||
|     ) %> | ||||
| @@ -41,7 +41,7 @@ | ||||
|     ) %> | ||||
|     <%= error_tag(f, :current_password, "col-span-3") %> | ||||
|  | ||||
|     <%= submit(dgettext("actions", "Change email"), | ||||
|     <%= submit(dgettext("actions", "change email"), | ||||
|       class: "mx-auto btn btn-primary col-span-3" | ||||
|     ) %> | ||||
|   </.form> | ||||
| @@ -55,7 +55,7 @@ | ||||
|     class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" | ||||
|   > | ||||
|     <h3 class="title text-primary-400 text-lg col-span-3"> | ||||
|       <%= dgettext("actions", "Change password") %> | ||||
|       <%= dgettext("actions", "change password") %> | ||||
|     </h3> | ||||
|  | ||||
|     <%= if @password_changeset.action && not @password_changeset.valid? do %> | ||||
| @@ -68,14 +68,14 @@ | ||||
|  | ||||
|     <%= hidden_input(f, :action, name: "action", value: "update_password") %> | ||||
|  | ||||
|     <%= label(f, :password, gettext("New password"), class: "title text-lg text-primary-400") %> | ||||
|     <%= label(f, :password, gettext("new password"), class: "title text-lg text-primary-400") %> | ||||
|     <%= password_input(f, :password, | ||||
|       required: true, | ||||
|       class: "mx-2 my-1 input input-primary col-span-2" | ||||
|     ) %> | ||||
|     <%= error_tag(f, :password, "col-span-3") %> | ||||
|  | ||||
|     <%= label(f, :password_confirmation, gettext("Confirm new password"), | ||||
|     <%= label(f, :password_confirmation, gettext("confirm new password"), | ||||
|       class: "title text-lg text-primary-400" | ||||
|     ) %> | ||||
|     <%= password_input(f, :password_confirmation, | ||||
| @@ -84,7 +84,7 @@ | ||||
|     ) %> | ||||
|     <%= error_tag(f, :password_confirmation, "col-span-3") %> | ||||
|  | ||||
|     <%= label(f, :current_password, gettext("Current password"), | ||||
|     <%= label(f, :current_password, gettext("current password"), | ||||
|       for: "current_password_for_password", | ||||
|       class: "title text-lg text-primary-400" | ||||
|     ) %> | ||||
| @@ -96,7 +96,7 @@ | ||||
|     ) %> | ||||
|     <%= error_tag(f, :current_password, "col-span-3") %> | ||||
|  | ||||
|     <%= submit(dgettext("actions", "Change password"), | ||||
|     <%= submit(dgettext("actions", "change password"), | ||||
|       class: "mx-auto btn btn-primary col-span-3" | ||||
|     ) %> | ||||
|   </.form> | ||||
| @@ -110,27 +110,27 @@ | ||||
|     class="flex flex-col space-y-4 justify-center items-center" | ||||
|   > | ||||
|     <h3 class="title text-primary-400 text-lg"> | ||||
|       <%= dgettext("actions", "Change Language") %> | ||||
|       <%= dgettext("actions", "change language") %> | ||||
|     </h3> | ||||
|  | ||||
|     <%= if @locale_changeset.action && not @locale_changeset.valid? do %> | ||||
|       <div class="alert alert-danger"> | ||||
|         <p> | ||||
|           <%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %> | ||||
|           <%= dgettext("errors", "oops, something went wrong! Please check the errors below") %> | ||||
|         </p> | ||||
|       </div> | ||||
|     <% end %> | ||||
|  | ||||
|     <%= hidden_input(f, :action, name: "action", value: "update_locale") %> | ||||
|  | ||||
|     <%= select(f, :locale, [{gettext("English"), "en_US"}, {"Spanish", "es"}], | ||||
|     <%= select(f, :locale, [{gettext("english"), "en_US"}, {"spanish", "es"}], | ||||
|       class: "mx-2 my-1 min-w-md input input-primary" | ||||
|     ) %> | ||||
|     <%= error_tag(f, :locale) %> | ||||
|  | ||||
|     <%= submit(dgettext("actions", "Change language"), | ||||
|     <%= submit(dgettext("actions", "change language"), | ||||
|       class: "whitespace-nowrap mx-auto btn btn-primary", | ||||
|       data: [qa: dgettext("prompts", "Are you sure you want to change your language?")] | ||||
|       data: [qa: dgettext("prompts", "are you sure you want to change your language?")] | ||||
|     ) %> | ||||
|   </.form> | ||||
|  | ||||
| @@ -140,8 +140,8 @@ | ||||
|     href={Routes.user_settings_path(@conn, :delete, @current_user)} | ||||
|     method={:delete} | ||||
|     class="btn btn-alert" | ||||
|     data-confirm={dgettext("prompts", "Are you sure you want to delete your account?")} | ||||
|     data-confirm={dgettext("prompts", "are you sure you want to delete your account?")} | ||||
|   > | ||||
|     <%= dgettext("actions", "Delete User") %> | ||||
|     <%= dgettext("actions", "delete user") %> | ||||
|   </.link> | ||||
| </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user