From 185d8598da618292c373fe155486f1d00f28280a Mon Sep 17 00:00:00 2001 From: shibao Date: Tue, 8 Feb 2022 23:25:09 -0500 Subject: [PATCH] gettext homelive --- CONTRIBUTING.md | 2 + lib/cannery_web/live/home_live.ex | 60 +++++++++++++++------------- priv/gettext/default.pot | 65 +++++++++++++++++++++++++++++++ priv/gettext/prompts.pot | 16 ++++++++ 4 files changed, 117 insertions(+), 26 deletions(-) create mode 100644 priv/gettext/prompts.pot diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9635718f..9875b2e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,8 @@ If you're multilingual, this project can use your translations! Visit - When adding text, please use `gettext` macros to enable things to be translated in the future. After adding `gettext` macros, run `mix format` in order to add your new text strings to the files in `priv/gettext`. + - Existing domains: `"default"` (for anything general), `"prompts"`, + `"emails"`, and `"errors"` - Before submitting a PR, please make sure all tests are passing using `mix test`. And as always, thank you! diff --git a/lib/cannery_web/live/home_live.ex b/lib/cannery_web/live/home_live.ex index a31e39f8..f2ffe4c0 100644 --- a/lib/cannery_web/live/home_live.ex +++ b/lib/cannery_web/live/home_live.ex @@ -36,54 +36,62 @@ defmodule CanneryWeb.HomeLive do ~H"""

- Welcome to Cannery + <%= gettext("Welcome to %{name}", name: "Cannery") %>

-

- The Self-hosted Ammo Tracker Website +

+ <%= gettext("The self-hosted firearm tracker website") %>


-
+