Make tag feed translatable
authorTusooa Zhu <tusooa@kazv.moe>
Mon, 28 Feb 2022 06:13:39 +0000 (01:13 -0500)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Jun 2022 19:44:16 +0000 (20:44 +0100)
lib/pleroma/web/feed/feed_view.ex
lib/pleroma/web/templates/feed/feed/tag.atom.eex
lib/pleroma/web/templates/feed/feed/tag.rss.eex
priv/gettext/static_pages.pot

index c0fb35e01ac89cb326c9427e4d05f3b1a242c5bc..d674bc26fe74b21bcc6c91af420e6805544533b3 100644 (file)
@@ -10,6 +10,7 @@ defmodule Pleroma.Web.Feed.FeedView do
   alias Pleroma.Object
   alias Pleroma.User
   alias Pleroma.Web.MediaProxy
+  alias Pleroma.Web.Gettext
 
   require Pleroma.Constants
 
index de07310856bb9b2b05b21c5f98a97e415baf5da7..2d860f12be5246dff2851e57e691a3e5c0d26002 100644 (file)
@@ -12,7 +12,7 @@
     <id><%= '#{Routes.tag_feed_url(@conn, :feed, @tag)}.rss' %></id>
     <title>#<%= @tag %></title>
 
-    <subtitle>These are public toots tagged with #<%= @tag %>. You can interact with them if you have an account anywhere in the fediverse.</subtitle>
+    <subtitle><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></subtitle>
     <logo><%= feed_logo() %></logo>
     <updated><%= most_recent_update(@activities) %></updated>
     <link rel="self" href="<%= '#{Routes.tag_feed_url(@conn, :feed, @tag)}.atom'  %>" type="application/atom+xml"/>
index 9c3613febcc9e9ea9e9c7355cf70fe67a54739c2..edcc3e436d069f1b60b6a60b44d258beb368dc7e 100644 (file)
@@ -4,7 +4,7 @@
 
 
     <title>#<%= @tag %></title>
-    <description>These are public toots tagged with #<%= @tag %>. You can interact with them if you have an account anywhere in the fediverse.</description>
+    <description><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></description>
     <link><%= '#{Routes.tag_feed_url(@conn, :feed, @tag)}.rss' %></link>
     <webfeeds:logo><%= feed_logo() %></webfeeds:logo>
     <webfeeds:accentColor>2b90d9</webfeeds:accentColor>
index 8b56ad7b4255130d47e41bf9b8916c7b1a663b50..b230fbaa7ac77a7ee3098aec0961152414d955af 100644 (file)
@@ -153,3 +153,10 @@ msgstr ""
 msgctxt "password reset successful message"
 msgid "Password changed!"
 msgstr ""
+
+#, elixir-format
+#: lib/pleroma/web/templates/feed/feed/tag.atom.eex:15
+#: lib/pleroma/web/templates/feed/feed/tag.rss.eex:7
+msgctxt "tag feed description"
+msgid "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse."
+msgstr ""