From 6a41b13446ea5772dfdfd5180e02332e9a67c89c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 23 Sep 2019 19:33:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Add=20fancy=20html=20emails?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Citharel --- js/public/img/mobilizon_logo.png | Bin 0 -> 7274 bytes lib/mobilizon/config.ex | 3 - lib/mobilizon_web/email/admin.ex | 19 +- lib/mobilizon_web/email/email.ex | 21 +- lib/mobilizon_web/email/user.ex | 36 ++-- .../templates/email/email.html.eex | 144 +++++++++++++- .../templates/email/password_reset.html.eex | 110 ++++++++++- .../templates/email/password_reset.text.eex | 11 -- .../email/registration_confirmation.html.eex | 78 +++++++- .../email/registration_confirmation.text.eex | 9 - .../templates/email/report.html.eex | 131 +++++++++++-- .../templates/email/report.text.eex | 19 -- mix.exs | 1 + mix.lock | 3 + priv/gettext/default.pot | 161 +++++++++------ priv/gettext/en/LC_MESSAGES/default.po | 173 ++++++++++------ priv/gettext/fr_FR/LC_MESSAGES/default.po | 185 ++++++++++-------- 17 files changed, 797 insertions(+), 307 deletions(-) create mode 100644 js/public/img/mobilizon_logo.png delete mode 100644 lib/mobilizon_web/templates/email/password_reset.text.eex delete mode 100644 lib/mobilizon_web/templates/email/registration_confirmation.text.eex delete mode 100644 lib/mobilizon_web/templates/email/report.text.eex diff --git a/js/public/img/mobilizon_logo.png b/js/public/img/mobilizon_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..3665d3082df77b021c58d28e097d159e977a46ae GIT binary patch literal 7274 zcmcgx^;cA1v>zIV?v(BtLP|;+2Bf=Na_ExoZb5+|q`M>r8ERl8q(Mp$VL+rqK?IaH z-~ZtK^4?u{oqNw+>%`u7f6n=w&ra3X)gT5k00961v6iN)Apn2@LBD(9fSXU?Io6N@0KoX5 zrK)5c3Oy|i3$(rt8XxkxQRB$GL3ZxjbY>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KT=hHRe9Z{LES+=`)Z4%jnPQT)Dv8b6;*WgrdW=SrmE|dWE50 z>w^w&p>fYB?aCIh4+;~X9tLTaHf3)G*qYvp_dWa|eCePMTHz@HBfcxzO~k~PE^1+e zd7tkH6PanXdid9&SkC0LWz91A?!36Id+4I>#!J)EeHvyy;MhK(1`Y_t(yJ#JMz?^^ zM)pc{V&%K*1Cl%7SqkN4k6^1=p>vrU2f4^-jgguRh=nrY!#Skj{HR(#)PgHHS8jca8t*-aJ)iQO99#7{Qwbk>^50MUB|Xo#;8iqr^#Opk zH;s{z$KPL}du`AGKPFVmzQsbHUNs%l4oS=H z?T6k^`Juz)(luPvR?#5Np$-01V)eem;gVA!?3zv|0UjWV*1XWVlpR<_PSy*VYK!;v zTo9q8JbP;lJ`uGZa>hib6*l$1#mN_(GA3PgP@_VxGCk1dsP*#-H4`D+GpoW{?*_ND zSB=+qTZOYK-pM6A3-Mh_mqP+Ws@=;{<)Lmpv(ftEkjBe>rZrE1Hp z1_v+&Yr|P1EEe9zJRi$>AmE9f{)i1OHGn-aF!^{pOHUj8gfAZC^`AP3)(FpcgGyJV zp@nqN73soN9N#4|Qkw6g$!m;gMc)~Ha!HVKhTc5JyXQhxB zc1Rs@)v_+u=<`UFTte8G(;IqOJ9ieom#Jf>L+1s2-%z%d3&!%;kHNOF^@dZ>dLvqQ z to(email) - |> subject(subject) - |> put_header("Reply-To", Config.instance_email_reply_to()) + Email.base_email(to: email, subject: subject) + |> assign(:locale, locale) + |> assign(:subject, subject) |> assign(:report, report) - |> assign(:instance, instance_url) - |> render(:report) + |> render("report.html") + |> Email.premail() end end diff --git a/lib/mobilizon_web/email/email.ex b/lib/mobilizon_web/email/email.ex index 7277f6f56..abc7bb40e 100644 --- a/lib/mobilizon_web/email/email.ex +++ b/lib/mobilizon_web/email/email.ex @@ -7,11 +7,24 @@ defmodule MobilizonWeb.Email do alias Mobilizon.Config - @spec base_email :: Bamboo.Email.t() - def base_email do - new_email() + @spec base_email(keyword()) :: Bamboo.Email.t() + def base_email(args) do + instance = Config.instance_config() + + new_email(args) |> from(Config.instance_email_from()) + |> put_header("Reply-To", Config.instance_email_reply_to()) + |> assign(:instance, instance) |> put_html_layout({MobilizonWeb.EmailView, "email.html"}) - |> put_text_layout({MobilizonWeb.EmailView, "email.text"}) + |> put_text_layout(false) + end + + def premail(email) do + html = Premailex.to_inline_css(email.html_body) + text = Premailex.to_text(email.html_body) + + email + |> html_body(html) + |> text_body(text) end end diff --git a/lib/mobilizon_web/email/user.ex b/lib/mobilizon_web/email/user.ex index c4895be2a..aaa888a44 100644 --- a/lib/mobilizon_web/email/user.ex +++ b/lib/mobilizon_web/email/user.ex @@ -5,7 +5,7 @@ defmodule MobilizonWeb.Email.User do use Bamboo.Phoenix, view: MobilizonWeb.EmailView - import Bamboo.{Email, Phoenix} + import Bamboo.Phoenix import MobilizonWeb.Gettext @@ -21,21 +21,18 @@ defmodule MobilizonWeb.Email.User do ) do Gettext.put_locale(locale) - instance_url = Config.instance_url() - subject = gettext( - "Mobilizon: Confirmation instructions for %{instance}", - instance: instance_url + "Instructions to confirm your Mobilizon account on %{instance}", + instance: Config.instance_name() ) - Email.base_email() - |> to(email) - |> subject(subject) - |> put_header("Reply-To", Config.instance_email_reply_to()) + Email.base_email(to: email, subject: subject) + |> assign(:locale, locale) |> assign(:token, confirmation_token) - |> assign(:instance, instance_url) - |> render(:registration_confirmation) + |> assign(:subject, subject) + |> render("registration_confirmation.html") + |> Email.premail() end @spec reset_password_email(User.t(), String.t()) :: Bamboo.Email.t() @@ -45,20 +42,17 @@ defmodule MobilizonWeb.Email.User do ) do Gettext.put_locale(locale) - instance_url = Config.instance_url() - subject = gettext( - "Mobilizon: Reset your password on %{instance} instructions", - instance: instance_url + "Instructions to reset your password on %{instance}", + instance: Config.instance_name() ) - Email.base_email() - |> to(email) - |> subject(subject) - |> put_header("Reply-To", Config.instance_email_reply_to()) + Email.base_email(to: email, subject: subject) + |> assign(:locale, locale) |> assign(:token, reset_password_token) - |> assign(:instance, instance_url) - |> render(:password_reset) + |> assign(:subject, subject) + |> render("password_reset.html") + |> Email.premail() end end diff --git a/lib/mobilizon_web/templates/email/email.html.eex b/lib/mobilizon_web/templates/email/email.html.eex index 241559de3..f63ec2aef 100644 --- a/lib/mobilizon_web/templates/email/email.html.eex +++ b/lib/mobilizon_web/templates/email/email.html.eex @@ -1,10 +1,138 @@ - - - "> - - - <%= render @view_module, @view_template, assigns %> + + + + + + +<%= @subject %> + + + + + + + + + + + + + + <%= render @view_module, @view_template, assigns %> + + + + + + + + +
+ + + + + +
+ + Logo" width="366" height="108" style="display: block; width: 366px; max-width: 366px; min-width: 366px; font-family: 'Lato', Helvetica, Arial, sans-serif; color: #ffffff; font-size: 18px;" border="0"> + +
+ +
+ + + + + + +
+

+ <%= gettext "Need some help? Something not working properly?" %> +

+

+ <%= gettext "Ask the community on Framacolibri" %> +

+
+ +
+ + + + + + + + +
+

+ <%= gettext "%{instance} is a Mobilizon server.", instance: @instance[:name] %> + <%= gettext "Learn more about Mobilizon." %> +

+
+ +
+ + diff --git a/lib/mobilizon_web/templates/email/password_reset.html.eex b/lib/mobilizon_web/templates/email/password_reset.html.eex index 18cd887fa..c683daba1 100644 --- a/lib/mobilizon_web/templates/email/password_reset.html.eex +++ b/lib/mobilizon_web/templates/email/password_reset.html.eex @@ -1,5 +1,105 @@ -

<%= gettext "Password reset" %>

-

<%= gettext "You requested a new password for your account on %{host}.", host: @instance %>

-

<%= gettext "If you didn't request this, please ignore this email. Your password won't change until you access the link below and create a new one." %>

- -

<%= link "Change password", to: MobilizonWeb.Endpoint.url() <> "/password-reset/#{@token}", target: "_blank" %>

+ + + + + + + + +
+

+ <%= gettext "Trouble signing in?" %> +

+
+ + + + + + + + + + + + + + + + + + + +
+

+ <%= gettext "You requested a new password for your account on %{server}.", server: @instance[:name] %> +

+

+ <%= gettext "Resetting your password is easy. Just press the button below and follow the instructions. We'll have you up and running in no time." %> +

+
+

+ <%= gettext "If you didn't request this, please ignore this email. Your password won't change until you access the link below and create a new one." %> +

+
+ + + + +
+ + + + +
" target="_blank" style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #424056; display: inline-block;"> + <%= gettext "Reset Password" %> +
+
+
+ + + + + + + + + + + + +
+

+ <%= gettext "Need some help? Something not working properly?" %> +

+

+ <%= gettext "Ask the community on Framacolibri" %> +

+
+ + + \ No newline at end of file diff --git a/lib/mobilizon_web/templates/email/password_reset.text.eex b/lib/mobilizon_web/templates/email/password_reset.text.eex deleted file mode 100644 index 2cb528141..000000000 --- a/lib/mobilizon_web/templates/email/password_reset.text.eex +++ /dev/null @@ -1,11 +0,0 @@ -<%= gettext "Password reset" %> - -== - -<%= gettext "You requested a new password for your account on %{host}.", host: @instance %> - -<%= gettext "If you didn't request this, please ignore this email. Your password won't change until you access the link below and create a new one." %> - -<%= MobilizonWeb.Endpoint.url() <> "/password-reset/#{@token}" %> - - diff --git a/lib/mobilizon_web/templates/email/registration_confirmation.html.eex b/lib/mobilizon_web/templates/email/registration_confirmation.html.eex index 25d187eec..c60426e5a 100644 --- a/lib/mobilizon_web/templates/email/registration_confirmation.html.eex +++ b/lib/mobilizon_web/templates/email/registration_confirmation.html.eex @@ -1,4 +1,74 @@ -

<%= gettext "Confirm the email address" %>

-

<%= gettext "You created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email.", host: @instance %>

- -

<%= link "Confirm your email address", to: MobilizonWeb.Endpoint.url() <> "/validate/#{@token}", target: "_blank" %>

+ + + + + + + + +
+

+ <%= gettext "Nearly here!" %> +

+
+ + + + + + + + + + + + + + + + + + + +
+

+ <%= gettext "You created an account on %{host} with this email address. You are one click away from activating it.", host: @instance[:name] %> +

+
+

+ <%= gettext "If you didn't request this, please ignore this email." %> +

+
+ + + + +
+ + + + +
" target="_blank" style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #424056; display: inline-block;"> + <%= gettext "Activate my account" %> +
+
+
+ + + \ No newline at end of file diff --git a/lib/mobilizon_web/templates/email/registration_confirmation.text.eex b/lib/mobilizon_web/templates/email/registration_confirmation.text.eex deleted file mode 100644 index aec29b2cc..000000000 --- a/lib/mobilizon_web/templates/email/registration_confirmation.text.eex +++ /dev/null @@ -1,9 +0,0 @@ -<%= gettext "Confirm the email address" %> - -== - -<%= gettext "You created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email.", host: @instance %> - -<%= MobilizonWeb.Endpoint.url() <> "/validate/#{@token}" %> - - diff --git a/lib/mobilizon_web/templates/email/report.html.eex b/lib/mobilizon_web/templates/email/report.html.eex index 870122bbc..6e15092f0 100644 --- a/lib/mobilizon_web/templates/email/report.html.eex +++ b/lib/mobilizon_web/templates/email/report.html.eex @@ -1,15 +1,116 @@ -

<%= gettext "New report from %{reporter} on %{instance}", reporter: @report.reporter.preferred_username, instance: @instance %>

- -<% if @report.event do %> -

<%= gettext "Event: %{event}", event: @report.event.title %>

-<% end %> - -<%= for comment <- @report.comments do %> -

<%= gettext "Comment: %{comment}", comment: comment %>

-<% end %> - -<% if @report.content do %> -

<%= gettext "Reason: %{content}", event: @report.content %>

-<% end %> - -

<%= link "View the report", to: moderation_report_url(MobilizonWeb.Endpoint, :index, @report.id), target: "_blank" %>

\ No newline at end of file + + + + + + + + +
+

+ <%= gettext "New report on %{instance}", instance: @instance[:name] %> +

+
+ + + + + + + + + + + + + <%= if Map.has_key?(@report, :event) do %> + + + + <% end %> + <%= if Map.has_key?(@report, :comments) && length(@report.comments) > 0 do %> + + + + <% end %> + <%= if Map.has_key?(@report, :content) do %> + + + + <% end %> + + + + +
+

+ <%= gettext "%{reporter_name} (%{reporter_username}) reported the following content.", reporter_name: @report.reporter.name, reporter_username: Mobilizon.Actors.Actor.preferred_username_and_domain(@report.reporter) %> +

+
+

+

<%= gettext "Event" %>

+ " target="_blank"> + <%= gettext "%{title} by %{creator}", title: @report.event.title, creator: Mobilizon.Actors.Actor.preferred_username_and_domain(@report.reported) %> + +

+ + + + +
+
+

<%= gettext "Comments" %>

+ <%= for comment <- @report.comments do %> +

+ <%= comment.text %> +

+ <% end %> + + + + +
+
+

+

<%= gettext "Reason" %>

+ <%= @report.content %> +

+ + + + +
+
+ + + + +
+ + + + +
+ <%= gettext "View the report" %> +
+
+
+ + + \ No newline at end of file diff --git a/lib/mobilizon_web/templates/email/report.text.eex b/lib/mobilizon_web/templates/email/report.text.eex deleted file mode 100644 index ddd066e34..000000000 --- a/lib/mobilizon_web/templates/email/report.text.eex +++ /dev/null @@ -1,19 +0,0 @@ -<%= gettext "New report from %{reporter} on %{instance}", reporter: @report.reporter.preferred_username, instance: @instance %> - --- - -<% if @report.event do %> - <%= gettext "Event: %{event}", event: @report.event.title %> -<% end %> - -<%= for comment <- @report.comments do %> -<%= gettext "Comment: %{comment}", comment: comment.text %> -<% end %> - -<% if @report.content do %> -<%= gettext "Reason: %{content}", event: @report.content %> -<% end %> - -View the report: <%= moderation_report_url(MobilizonWeb.Endpoint, :index, @report.id) %> - - diff --git a/mix.exs b/mix.exs index 68a3a619d..52aaf4eb4 100644 --- a/mix.exs +++ b/mix.exs @@ -90,6 +90,7 @@ defmodule Mobilizon.Mixfile do {:earmark, "~> 1.3.1"}, {:geohax, "~> 0.3.0"}, {:mogrify, "~> 0.7.2"}, + {:premailex, "~> 0.3.0"}, {:auto_linker, git: "https://git.pleroma.social/pleroma/auto_linker.git", ref: "95e8188490e97505c56636c1379ffdf036c1fdde"}, diff --git a/mix.lock b/mix.lock index 7bfc696ec..41e529ccd 100644 --- a/mix.lock +++ b/mix.lock @@ -47,6 +47,7 @@ "exvcr": {:hex, :exvcr, "0.10.3", "1ae3b97560430acfa88ebc737c85b2b7a9dbacd8a2b26789a19718b51ae3522c", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.1", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "~> 4.4", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm"}, "feeder": {:hex, :feeder, "2.2.4", "56ec535cf2f79719bc53b5c2abe5f6cf481fc01e5ae6229ab7cc829644f039ec", [:make], [], "hexpm"}, "file_system": {:hex, :file_system, "0.2.7", "e6f7f155970975789f26e77b8b8d8ab084c59844d8ecfaf58cbda31c494d14aa", [:mix], [], "hexpm"}, + "floki": {:hex, :floki, "0.23.0", "956ab6dba828c96e732454809fb0bd8d43ce0979b75f34de6322e73d4c917829", [:mix], [{:html_entities, "~> 0.4.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm"}, "gen_smtp": {:hex, :gen_smtp, "0.14.0", "39846a03522456077c6429b4badfd1d55e5e7d0fdfb65e935b7c5e38549d9202", [:rebar3], [], "hexpm"}, "geo": {:hex, :geo, "3.1.0", "727e005262430d037e870ff364e65d80ca5ca21d5ac8eddd57a1ada72c3f83b0", [:mix], [], "hexpm"}, "geo_postgis": {:hex, :geo_postgis, "3.1.0", "d06c8fa5fd140a52a5c9dab4ad6623a696dd7d99dd791bb361d3f94942442ff9", [:mix], [{:geo, "~> 3.1", [hex: :geo, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0 or ~> 4.0", [hex: :poison, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.14", [hex: :postgrex, repo: "hexpm", optional: false]}], "hexpm"}, @@ -56,6 +57,7 @@ "guardian": {:hex, :guardian, "1.2.1", "bdc8dd3dbf0fb7216cb6f91c11831faa1a64d39cdaed9a611e37f2413e584983", [:mix], [{:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.3", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm"}, "guardian_db": {:hex, :guardian_db, "2.0.1", "e62e383197e957cb9c6683926d45056ab814eb0362e3de7f65d4619ae19544e8", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.1.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:guardian, "~> 1.0", [hex: :guardian, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm"}, "hackney": {:hex, :hackney, "1.15.1", "9f8f471c844b8ce395f7b6d8398139e26ddca9ebc171a8b91342ee15a19963f4", [:rebar3], [{:certifi, "2.5.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.4", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, + "html_entities": {:hex, :html_entities, "0.4.0", "f2fee876858cf6aaa9db608820a3209e45a087c5177332799592142b50e89a6b", [:mix], [], "hexpm"}, "html_sanitize_ex": {:hex, :html_sanitize_ex, "1.3.0", "f005ad692b717691203f940c686208aa3d8ffd9dd4bb3699240096a51fa9564e", [:mix], [{:mochiweb, "~> 2.15", [hex: :mochiweb, repo: "hexpm", optional: false]}], "hexpm"}, "http_sign": {:hex, :http_sign, "0.1.1", "b16edb83aa282892f3271f9a048c155e772bf36e15700ab93901484c55f8dd10", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "http_signatures": {:git, "https://git.pleroma.social/pleroma/http_signatures.git", "293d77bb6f4a67ac8bde1428735c3b42f22cbb30", [ref: "293d77bb6f4a67ac8bde1428735c3b42f22cbb30"]}, @@ -91,6 +93,7 @@ "poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm"}, "postgrex": {:hex, :postgrex, "0.15.0", "dd5349161019caeea93efa42f9b22f9d79995c3a86bdffb796427b4c9863b0f0", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, + "premailex": {:hex, :premailex, "0.3.8", "708f7e56d4753d0cbd3fce32e475fc5a00e6da44bf41b630684dbd35beb5263b", [:mix], [{:certifi, ">= 0.0.0", [hex: :certifi, repo: "hexpm", optional: true]}, {:floki, ">= 0.19.0 or < 0.21.0", [hex: :floki, repo: "hexpm", optional: false]}, {:meeseeks, ">= 0.9.0 or < 0.11.0", [hex: :meeseeks, repo: "hexpm", optional: true]}, {:ssl_verify_fun, ">= 0.0.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: true]}], "hexpm"}, "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm"}, "rdf": {:hex, :rdf, "0.6.1", "e5464a7c0d91719bef6870eafe7efb3786c5622e4de592c84b8a32308de66c89", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm"}, "rsa_ex": {:hex, :rsa_ex, "0.4.0", "e28dd7dc5236e156df434af0e4aa822384c8866c928e17b785d4edb7c253b558", [:mix], [], "hexpm"}, diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 045b6c403..6f2a4f07e 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -1,79 +1,126 @@ #, elixir-format -#: lib/mobilizon_web/templates/email/email.html.eex:8 #: lib/mobilizon_web/templates/email/email.text.eex:3 msgid "An email sent by Mobilizon on %{instance}." msgstr "" #, elixir-format -#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:1 -#: lib/mobilizon_web/templates/email/registration_confirmation.text.eex:1 -msgid "Confirm the email address" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:3 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:7 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:48 msgid "If you didn't request this, please ignore this email. Your password won't change until you access the link below and create a new one." msgstr "" -#, elixir-format -#: lib/mobilizon/email/user.ex:19 -msgid "Mobilizon: Confirmation instructions for %{instance}" -msgstr "" - -#, elixir-format -#: lib/mobilizon/email/user.ex:34 -msgid "Mobilizon: Reset your password on %{instance} instructions" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:1 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:1 -msgid "Password reset" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:2 -#: lib/mobilizon_web/templates/email/registration_confirmation.text.eex:5 -msgid "You created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email." -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:2 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:5 -msgid "You requested a new password for your account on %{host}." -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:8 -#: lib/mobilizon_web/templates/email/report.text.eex:10 -msgid "Comment: %{comment}" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:4 -#: lib/mobilizon_web/templates/email/report.text.eex:6 -msgid "Event: %{event}" -msgstr "" - #, elixir-format #: lib/service/export/feed.ex:161 msgid "Feed for %{email} on Mobilizon" msgstr "" #, elixir-format -#: lib/mobilizon/email/admin.ex:19 -msgid "Mobilizon: New report on instance %{instance}" +#: lib/mobilizon_web/templates/email/email.html.eex:122 +msgid "%{instance} is a Mobilizon server." msgstr "" #, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:1 -#: lib/mobilizon_web/templates/email/report.text.eex:1 -msgid "New report from %{reporter} on %{instance}" +#: lib/mobilizon_web/templates/email/report.html.eex:38 +msgid "%{reporter_name} (%{reporter_username}) reported the following content." msgstr "" #, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:12 -#: lib/mobilizon_web/templates/email/report.text.eex:14 -msgid "Reason: %{content}" +#: lib/mobilizon_web/templates/email/report.html.eex:48 +msgid "%{title} by %{creator}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:58 +msgid "Activate my account" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:91 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:94 +msgid "Ask the community on Framacolibri" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:62 +msgid "Comments" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:46 +msgid "Event" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:45 +msgid "If you didn't request this, please ignore this email." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/email/user.ex:46 +msgid "Instructions to reset your password on %{instance}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:123 +msgid "Learn more about Mobilizon." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:13 +msgid "Nearly here!" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:88 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:91 +msgid "Need some help? Something not working properly?" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:13 +msgid "New report on %{instance}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:80 +msgid "Reason" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:61 +msgid "Reset Password" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:41 +msgid "Resetting your password is easy. Just press the button below and follow the instructions. We'll have you up and running in no time." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:13 +msgid "Trouble signing in?" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:100 +msgid "View the report" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:38 +msgid "You created an account on %{host} with this email address. You are one click away from activating it." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:38 +msgid "You requested a new password for your account on %{server}." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/email/user.ex:25 +msgid "Instructions to confirm your Mobilizon account on %{instance}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/email/admin.ex:23 +msgid "New report on Mobilizon instance %{instance}" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index b9d87a3bb..71cf7c912 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -12,81 +12,128 @@ msgstr "" "Plural-Forms: nplurals=2\n" #, elixir-format -#: lib/mobilizon_web/templates/email/email.html.eex:8 #: lib/mobilizon_web/templates/email/email.text.eex:3 msgid "An email sent by Mobilizon on %{instance}." msgstr "" #, elixir-format -#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:1 -#: lib/mobilizon_web/templates/email/registration_confirmation.text.eex:1 -msgid "Confirm the email address" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:3 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:7 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:48 msgid "If you didn't request this, please ignore this email. Your password won't change until you access the link below and create a new one." msgstr "" -#, elixir-format -#: lib/mobilizon/email/user.ex:19 -msgid "Mobilizon: Confirmation instructions for %{instance}" -msgstr "" - -#, elixir-format -#: lib/mobilizon/email/user.ex:34 -msgid "Mobilizon: Reset your password on %{instance} instructions" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:1 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:1 -msgid "Password reset" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:2 -#: lib/mobilizon_web/templates/email/registration_confirmation.text.eex:5 -msgid "You created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email." -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:2 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:5 -msgid "You requested a new password for your account on %{host}." -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:8 -#: lib/mobilizon_web/templates/email/report.text.eex:10 -msgid "Comment: %{comment}" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:4 -#: lib/mobilizon_web/templates/email/report.text.eex:6 -msgid "Event: %{event}" -msgstr "" - #, elixir-format #: lib/service/export/feed.ex:161 msgid "Feed for %{email} on Mobilizon" msgstr "" +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:122 +msgid "%{instance} is a Mobilizon server." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:38 +msgid "%{reporter_name} (%{reporter_username}) reported the following content." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:48 +msgid "%{title} by %{creator}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:58 +msgid "Activate my account" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:91 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:94 +msgid "Ask the community on Framacolibri" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:62 +msgid "Comments" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:46 +msgid "Event" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:45 +msgid "If you didn't request this, please ignore this email." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/email/user.ex:46 +msgid "Instructions to reset your password on %{instance}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:123 +msgid "Learn more about Mobilizon." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:13 +msgid "Nearly here!" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/email.html.eex:88 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:91 +msgid "Need some help? Something not working properly?" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:13 +msgid "New report on %{instance}" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:80 +msgid "Reason" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:61 +msgid "Reset Password" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:41 +msgid "Resetting your password is easy. Just press the button below and follow the instructions. We'll have you up and running in no time." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:13 +msgid "Trouble signing in?" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/report.html.eex:100 +msgid "View the report" +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:38 +msgid "You created an account on %{host} with this email address. You are one click away from activating it." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/templates/email/password_reset.html.eex:38 +msgid "You requested a new password for your account on %{server}." +msgstr "" + +#, elixir-format +#: lib/mobilizon_web/email/user.ex:25 +msgid "Instructions to confirm your Mobilizon account on %{instance}" +msgstr "" + #, elixir-format, fuzzy -#: lib/mobilizon/email/admin.ex:19 -msgid "Mobilizon: New report on instance %{instance}" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:1 -#: lib/mobilizon_web/templates/email/report.text.eex:1 -msgid "New report from %{reporter} on %{instance}" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:12 -#: lib/mobilizon_web/templates/email/report.text.eex:14 -msgid "Reason: %{content}" +#: lib/mobilizon_web/email/admin.ex:23 +msgid "New report on Mobilizon instance %{instance}" msgstr "" diff --git a/priv/gettext/fr_FR/LC_MESSAGES/default.po b/priv/gettext/fr_FR/LC_MESSAGES/default.po index c264fd3f6..b94921690 100644 --- a/priv/gettext/fr_FR/LC_MESSAGES/default.po +++ b/priv/gettext/fr_FR/LC_MESSAGES/default.po @@ -1,92 +1,123 @@ -## `msgid`s in this file come from POT (.pot) files. -## -## Do not add, change, or remove `msgid`s manually here as -## they're tied to the ones in the corresponding POT file -## (with the same domain). -## -## Use `mix gettext.extract --merge` or `mix gettext.merge` -## to merge POT files into PO files. +# # `msgid`s in this file come from POT (.pot) files. +# # +# # Do not add, change, or remove `msgid`s manually here as +# # they're tied to the ones in the corresponding POT file +# # (with the same domain). +# # +# # Use `mix gettext.extract --merge` or `mix gettext.merge` +# # to merge POT files into PO files. msgid "" msgstr "" "Language: fr_FR\n" -"Plural-Forms: nplurals=2\n" +"Plural-Forms: nplurals=2;\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.3\n" -#, elixir-format -#: lib/mobilizon_web/templates/email/email.html.eex:8 #: lib/mobilizon_web/templates/email/email.text.eex:3 msgid "An email sent by Mobilizon on %{instance}." msgstr "" -#, elixir-format -#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:1 -#: lib/mobilizon_web/templates/email/registration_confirmation.text.eex:1 -msgid "Confirm the email address" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:3 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:7 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:48 msgid "If you didn't request this, please ignore this email. Your password won't change until you access the link below and create a new one." -msgstr "" +msgstr "Si vous n'avez pas demandé ceci, vous pouvez ignorer cet email. Votre mot de passe ne changera pas tant que vous n'accédez pas au lien ci-dessous et que vous en définissiez un nouveau." -#, elixir-format -#: lib/mobilizon/email/user.ex:19 -msgid "Mobilizon: Confirmation instructions for %{instance}" -msgstr "" - -#, elixir-format -#: lib/mobilizon/email/user.ex:34 -msgid "Mobilizon: Reset your password on %{instance} instructions" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:1 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:1 -msgid "Password reset" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:2 -#: lib/mobilizon_web/templates/email/registration_confirmation.text.eex:5 -msgid "You created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email." -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/password_reset.html.eex:2 -#: lib/mobilizon_web/templates/email/password_reset.text.eex:5 -msgid "You requested a new password for your account on %{host}." -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:8 -#: lib/mobilizon_web/templates/email/report.text.eex:10 -msgid "Comment: %{comment}" -msgstr "" - -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:4 -#: lib/mobilizon_web/templates/email/report.text.eex:6 -msgid "Event: %{event}" -msgstr "" - -#, elixir-format #: lib/service/export/feed.ex:161 msgid "Feed for %{email} on Mobilizon" -msgstr "" +msgstr "Flux pour %{email} sur Mobilizon" -#, elixir-format, fuzzy -#: lib/mobilizon/email/admin.ex:19 -msgid "Mobilizon: New report on instance %{instance}" -msgstr "" +#: lib/mobilizon_web/templates/email/email.html.eex:122 +msgid "%{instance} is a Mobilizon server." +msgstr "%{instance} est une instance Mobilizon." -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:1 -#: lib/mobilizon_web/templates/email/report.text.eex:1 -msgid "New report from %{reporter} on %{instance}" -msgstr "" +#: lib/mobilizon_web/templates/email/report.html.eex:38 +msgid "%{reporter_name} (%{reporter_username}) reported the following content." +msgstr "%{reporter_name} (%{reporter_username}) a signalé le contenu suivant." -#, elixir-format -#: lib/mobilizon_web/templates/email/report.html.eex:12 -#: lib/mobilizon_web/templates/email/report.text.eex:14 -msgid "Reason: %{content}" -msgstr "" +#: lib/mobilizon_web/templates/email/report.html.eex:48 +msgid "%{title} by %{creator}" +msgstr "%{title} par %{creator}" + +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:58 +msgid "Activate my account" +msgstr "Activer mon compte" + +#: lib/mobilizon_web/templates/email/email.html.eex:91 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:94 +msgid "Ask the community on Framacolibri" +msgstr "Demander à la communauté sur Framacolibri" + +#: lib/mobilizon_web/templates/email/report.html.eex:62 +msgid "Comments" +msgstr "Commentaires" + +#: lib/mobilizon_web/templates/email/report.html.eex:46 +msgid "Event" +msgstr "Événement" + +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:45 +msgid "If you didn't request this, please ignore this email." +msgstr "Si vous n'avez pas demandé ceci, merci d'ignorer cet email." + +#: lib/mobilizon_web/email/user.ex:46 +msgid "Instructions to reset your password on %{instance}" +msgstr "Instructions pour réinitialiser votre mot de passe sur %{instance}" + +#: lib/mobilizon_web/templates/email/email.html.eex:123 +msgid "Learn more about Mobilizon." +msgstr "En apprendre plus à propos de Mobilizon." + +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:13 +msgid "Nearly here!" +msgstr "Vous y êtes presque !" + +#: lib/mobilizon_web/templates/email/email.html.eex:88 +#: lib/mobilizon_web/templates/email/password_reset.html.eex:91 +msgid "Need some help? Something not working properly?" +msgstr "Besoin d'aide ? Quelque chose ne fonctionne pas correctement ?" + +#: lib/mobilizon_web/templates/email/report.html.eex:13 +msgid "New report on %{instance}" +msgstr "Nouveau signalement sur %{instance}" + +#: lib/mobilizon_web/templates/email/report.html.eex:80 +msgid "Reason" +msgstr "Raison" + +#: lib/mobilizon_web/templates/email/password_reset.html.eex:61 +msgid "Reset Password" +msgstr "Réinitialiser mon mot de passe" + +#: lib/mobilizon_web/templates/email/password_reset.html.eex:41 +msgid "Resetting your password is easy. Just press the button below and follow the instructions. We'll have you up and running in no time." +msgstr "Réinitialiser votre mot de passe est facile. Cliquez simplement sur le bouton et suivez les inscriptions. Vous serez opérationnel en un rien de temps." + +#: lib/mobilizon_web/templates/email/password_reset.html.eex:13 +msgid "Trouble signing in?" +msgstr "Des problèmes à vous connecter ?" + +#: lib/mobilizon_web/templates/email/report.html.eex:100 +msgid "View the report" +msgstr "Voir le signalement" + +#: lib/mobilizon_web/templates/email/registration_confirmation.html.eex:38 +msgid "You created an account on %{host} with this email address. You are one click away from activating it." +msgstr "Vous avez créé un compte sur %{host} avec cette adresse email. Vous êtes à un clic de l'activer." + +#: lib/mobilizon_web/templates/email/password_reset.html.eex:38 +msgid "You requested a new password for your account on %{server}." +msgstr "Vous avez demandé un nouveau mot de passe pour votre compte sur %{server}" + +#: lib/mobilizon_web/email/user.ex:25 +msgid "Instructions to confirm your Mobilizon account on %{instance}" +msgstr "Instructions pour confirmer votre compte Mobilizon sur %{instance}" + +#: lib/mobilizon_web/email/admin.ex:23 +msgid "New report on Mobilizon instance %{instance}" +msgstr "Nouveau signalement sur l'instance Mobilizon %{instance}"