summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2023-11-21 05:52:20 -0500
committerGitHub <noreply@github.com>2023-11-21 10:52:20 +0000
commit6d51ac246b1902feea59d35a7c7f534724d59d20 (patch)
tree624f6220e4d6b18b17e7ccea9dc467e238a2227f
parent3c3e0c25ef01cb3b752ad9b9d2e6791b30688f1f (diff)
Update partials for the `AdminMailer.new_trends` mailer (#28011)
-rw-r--r--app/views/admin_mailer/_new_trending_links.text.erb2
-rw-r--r--app/views/admin_mailer/_new_trending_statuses.text.erb2
-rw-r--r--app/views/admin_mailer/_new_trending_tags.text.erb8
-rw-r--r--app/views/admin_mailer/new_trends.text.erb12
-rw-r--r--config/locales/an.yml2
-rw-r--r--config/locales/ar.yml2
-rw-r--r--config/locales/be.yml2
-rw-r--r--config/locales/bg.yml2
-rw-r--r--config/locales/ca.yml2
-rw-r--r--config/locales/cs.yml2
-rw-r--r--config/locales/cy.yml2
-rw-r--r--config/locales/da.yml2
-rw-r--r--config/locales/de.yml2
-rw-r--r--config/locales/el.yml2
-rw-r--r--config/locales/en-GB.yml2
-rw-r--r--config/locales/en.yml2
-rw-r--r--config/locales/eo.yml2
-rw-r--r--config/locales/es-AR.yml2
-rw-r--r--config/locales/es-MX.yml2
-rw-r--r--config/locales/es.yml2
-rw-r--r--config/locales/et.yml2
-rw-r--r--config/locales/eu.yml2
-rw-r--r--config/locales/fa.yml1
-rw-r--r--config/locales/fi.yml2
-rw-r--r--config/locales/fo.yml2
-rw-r--r--config/locales/fr-QC.yml2
-rw-r--r--config/locales/fr.yml2
-rw-r--r--config/locales/fy.yml2
-rw-r--r--config/locales/gd.yml2
-rw-r--r--config/locales/gl.yml2
-rw-r--r--config/locales/he.yml2
-rw-r--r--config/locales/hu.yml2
-rw-r--r--config/locales/id.yml2
-rw-r--r--config/locales/io.yml2
-rw-r--r--config/locales/is.yml2
-rw-r--r--config/locales/it.yml2
-rw-r--r--config/locales/ja.yml2
-rw-r--r--config/locales/ko.yml2
-rw-r--r--config/locales/ku.yml2
-rw-r--r--config/locales/lv.yml2
-rw-r--r--config/locales/ms.yml2
-rw-r--r--config/locales/my.yml2
-rw-r--r--config/locales/nl.yml2
-rw-r--r--config/locales/nn.yml2
-rw-r--r--config/locales/no.yml2
-rw-r--r--config/locales/pl.yml2
-rw-r--r--config/locales/pt-BR.yml2
-rw-r--r--config/locales/pt-PT.yml2
-rw-r--r--config/locales/ru.yml2
-rw-r--r--config/locales/sco.yml2
-rw-r--r--config/locales/si.yml2
-rw-r--r--config/locales/sl.yml2
-rw-r--r--config/locales/sq.yml1
-rw-r--r--config/locales/sr-Latn.yml2
-rw-r--r--config/locales/sr.yml2
-rw-r--r--config/locales/sv.yml2
-rw-r--r--config/locales/th.yml2
-rw-r--r--config/locales/tr.yml2
-rw-r--r--config/locales/uk.yml2
-rw-r--r--config/locales/vi.yml2
-rw-r--r--config/locales/zh-CN.yml2
-rw-r--r--config/locales/zh-HK.yml2
-rw-r--r--config/locales/zh-TW.yml2
-rw-r--r--spec/mailers/admin_mailer_spec.rb13
64 files changed, 15 insertions, 138 deletions
diff --git a/app/views/admin_mailer/_new_trending_links.text.erb b/app/views/admin_mailer/_new_trending_links.text.erb
index 85f3f8039d5..0e2a6a20a6d 100644
--- a/app/views/admin_mailer/_new_trending_links.text.erb
+++ b/app/views/admin_mailer/_new_trending_links.text.erb
@@ -1,6 +1,6 @@
<%= raw t('admin_mailer.new_trends.new_trending_links.title') %>
-<% @links.each do |link| %>
+<% new_trending_links.each do |link| %>
- <%= link.title %> · <%= link.url %>
<%= standard_locale_name(link.language) %> · <%= raw t('admin.trends.links.usage_comparison', today: link.history.get(Time.now.utc).accounts, yesterday: link.history.get(Time.now.utc - 1.day).accounts) %> · <%= t('admin.trends.tags.current_score', score: link.trend.score.round(2)) %>
<% end %>
diff --git a/app/views/admin_mailer/_new_trending_statuses.text.erb b/app/views/admin_mailer/_new_trending_statuses.text.erb
index eedbfff9d91..05bb9733fc9 100644
--- a/app/views/admin_mailer/_new_trending_statuses.text.erb
+++ b/app/views/admin_mailer/_new_trending_statuses.text.erb
@@ -1,6 +1,6 @@
<%= raw t('admin_mailer.new_trends.new_trending_statuses.title') %>
-<% @statuses.each do |status| %>
+<% new_trending_statuses.each do |status| %>
- <%= ActivityPub::TagManager.instance.url_for(status) %>
<%= standard_locale_name(status.language) %> · <%= raw t('admin.trends.tags.current_score', score: status.trend.score.round(2)) %>
<% end %>
diff --git a/app/views/admin_mailer/_new_trending_tags.text.erb b/app/views/admin_mailer/_new_trending_tags.text.erb
index d528ab8eb7c..f738caaf3db 100644
--- a/app/views/admin_mailer/_new_trending_tags.text.erb
+++ b/app/views/admin_mailer/_new_trending_tags.text.erb
@@ -1,14 +1,8 @@
<%= raw t('admin_mailer.new_trends.new_trending_tags.title') %>
-<% @tags.each do |tag| %>
+<% new_trending_tags.each do |tag| %>
- #<%= tag.display_name %>
<%= raw t('admin.trends.tags.usage_comparison', today: tag.history.get(Time.now.utc).accounts, yesterday: tag.history.get(Time.now.utc - 1.day).accounts) %> · <%= t('admin.trends.tags.current_score', score: Trends.tags.score(tag.id).round(2)) %>
<% end %>
-<% if @lowest_trending_tag %>
-<%= raw t('admin_mailer.new_trends.new_trending_tags.requirements', lowest_tag_name: @lowest_trending_tag.display_name, lowest_tag_score: Trends.tags.score(@lowest_trending_tag.id).round(2), rank: Trends.tags.options[:review_threshold]) %>
-<% else %>
-<%= raw t('admin_mailer.new_trends.new_trending_tags.no_approved_tags') %>
-<% end %>
-
<%= raw t('application_mailer.view')%> <%= admin_trends_tags_url(status: 'pending_review') %>
diff --git a/app/views/admin_mailer/new_trends.text.erb b/app/views/admin_mailer/new_trends.text.erb
index 13b2968461e..10b10e60453 100644
--- a/app/views/admin_mailer/new_trends.text.erb
+++ b/app/views/admin_mailer/new_trends.text.erb
@@ -2,12 +2,6 @@
<%= raw t('admin_mailer.new_trends.body') %>
-<% unless @links.empty? %>
-<%= render 'new_trending_links' %>
-<% end %>
-<% unless @tags.empty? %>
-<%= render 'new_trending_tags' unless @tags.empty? %>
-<% end %>
-<% unless @statuses.empty? %>
-<%= render 'new_trending_statuses' unless @statuses.empty? %>
-<% end %>
+<%= render partial: 'new_trending_links', object: @links unless @links.empty? %>
+<%= render partial: 'new_trending_tags', object: @tags unless @tags.empty? %>
+<%= render partial: 'new_trending_statuses', object: @statuses unless @statuses.empty? %>
diff --git a/config/locales/an.yml b/config/locales/an.yml
index 7922ccf5852..de791679b6b 100644
--- a/config/locales/an.yml
+++ b/config/locales/an.yml
@@ -900,8 +900,6 @@ an:
new_trending_statuses:
title: Publicacions en tendencia
new_trending_tags:
- no_approved_tags: Actualment no i hai garra etiqueta en tendencia aprebada.
- requirements: 'Qualsequiera d''estes candidatos podría superar lo hashtag en tendencia aprebau per #%{rank}, que actualment ye #%{lowest_tag_name} con una puntuación de %{lowest_tag_score}.'
title: Etiquetas en tendencia
subject: Nuevas tendencias asperando estar revisadas en %{instance}
aliases:
diff --git a/config/locales/ar.yml b/config/locales/ar.yml
index f43d1ad2a67..c1b2677dcc9 100644
--- a/config/locales/ar.yml
+++ b/config/locales/ar.yml
@@ -1068,8 +1068,6 @@ ar:
new_trending_statuses:
title: المنشورات الشائعة
new_trending_tags:
- no_approved_tags: لا توجد حاليًا وسوم شائعة موافق عليها.
- requirements: 'يمكن لأي من هؤلاء المرشحين أن يتجاوز علامة #%{rank} من الوسوم الموافق عليها، وهي حاليا #%{lowest_tag_name} مع نتيجة %{lowest_tag_score}.'
title: الوسوم المتداولة
subject: تداولات جديدة في انتظار المراجعة على %{instance}
aliases:
diff --git a/config/locales/be.yml b/config/locales/be.yml
index fa43373f6d5..d8703b7992e 100644
--- a/config/locales/be.yml
+++ b/config/locales/be.yml
@@ -1033,8 +1033,6 @@ be:
new_trending_statuses:
title: Папулярныя допісы
new_trending_tags:
- no_approved_tags: Зараз няма зацверджаных папулярных хэштэгаў.
- requirements: 'Кожны з гэтых кандыдатаў можа перавысіць #%{rank} зацверджаных папулярных хэштэгаў. Зараз гэта #%{lowest_tag_name} з лікам %{lowest_tag_score}.'
title: Папулярныя хэштэгі
subject: Новае ў папулярным для разгляду %{instance}
aliases:
diff --git a/config/locales/bg.yml b/config/locales/bg.yml
index 4c2bf0fa35c..b06c5404c75 100644
--- a/config/locales/bg.yml
+++ b/config/locales/bg.yml
@@ -997,8 +997,6 @@ bg:
new_trending_statuses:
title: Налагащи се публикации
new_trending_tags:
- no_approved_tags: Сега няма одобрени налагащи се хаштагове.
- requirements: 'Всеки от тези кандидати може да надмине #%{rank} одобрен актуален хаштаг, който в момента е #%{lowest_tag_name} с резултат %{lowest_tag_score}.'
title: Налагащи се хаштагове
subject: Нови нашумели, готови за преглед в %{instance}
aliases:
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
index 03b3ff3c237..4dc3202a013 100644
--- a/config/locales/ca.yml
+++ b/config/locales/ca.yml
@@ -995,8 +995,6 @@ ca:
new_trending_statuses:
title: Tuts en tendència
new_trending_tags:
- no_approved_tags: Actualment no hi ha etiquetes en tendència aprovades.
- requirements: 'Qualsevol d''aquests candidats podria superar el #%{rank} de la etiqueta en tendència aprovada, que actualment és "%{lowest_tag_name}" amb una puntuació de %{lowest_tag_score}.'
title: Etiquetes en tendència
subject: Noves tendències pendents de revisar a %{instance}
aliases:
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index a04682a4417..e3e804172ab 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -1029,8 +1029,6 @@ cs:
new_trending_statuses:
title: Populární příspěvky
new_trending_tags:
- no_approved_tags: Momentálně nejsou žádné schválené populární hashtagy.
- requirements: 'Kterýkoliv z těchto kandidátů by mohl předehnat schválený populární hashtag #%{rank}, kterým je momentálně #%{lowest_tag_name} se skóre %{lowest_tag_score}.'
title: Populární hashtagy
subject: Nové trendy k posouzení na %{instance}
aliases:
diff --git a/config/locales/cy.yml b/config/locales/cy.yml
index c9d5b88284c..7f60e934221 100644
--- a/config/locales/cy.yml
+++ b/config/locales/cy.yml
@@ -1068,8 +1068,6 @@ cy:
new_trending_statuses:
title: Postiadau sy'n trendio
new_trending_tags:
- no_approved_tags: Ar hyn o bryd nid oes unrhyw hashnodau trendio cymeradwy.
- requirements: 'Gallai unrhyw un o''r ymgeiswyr hyn ragori ar yr hashnod trendio cymeradwy #%{rank}, sef #%{lowest_tag_name} gyda sgôr o %{lowest_tag_score} ar hyn o bryd.'
title: Hashnodau sy'n trendio
subject: Trendiau newydd i'w hadolygu ar %{instance}
aliases:
diff --git a/config/locales/da.yml b/config/locales/da.yml
index 7344d789ff2..6403ac1ccb6 100644
--- a/config/locales/da.yml
+++ b/config/locales/da.yml
@@ -997,8 +997,6 @@ da:
new_trending_statuses:
title: Populære opslag
new_trending_tags:
- no_approved_tags: Der er pt. ingen godkendte populære hashtags.
- requirements: 'Enhver af disse kandidater vil kunne overgå #%{rank} godkendte populære hastag, der med en score på #%{lowest_tag_score} pt. er %{lowest_tag_name}.'
title: Populære hashtags
subject: Nye tendenser klar til revision på %{instance}
aliases:
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 0d9cf8c0329..e084fdf7021 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -997,8 +997,6 @@ de:
new_trending_statuses:
title: Angesagte Beiträge
new_trending_tags:
- no_approved_tags: Es gibt keine genehmigten Hashtags, die gerade im Trend liegen.
- requirements: 'Jeder dieser Kandidaten könnte den #%{rank} genehmigten angesagten Hashtag übertreffen, der derzeit #%{lowest_tag_name} mit einer Punktzahl von %{lowest_tag_score} ist.'
title: Angesagte Hashtags
subject: Neue Trends zur Überprüfung auf %{instance}
aliases:
diff --git a/config/locales/el.yml b/config/locales/el.yml
index c4c3d393976..4c58bfda0a0 100644
--- a/config/locales/el.yml
+++ b/config/locales/el.yml
@@ -938,8 +938,6 @@ el:
new_trending_statuses:
title: Αναρτήσεις σε τάση
new_trending_tags:
- no_approved_tags: Προς το παρόν δεν υπάρχουν εγκεκριμένες ετικέτεςσε τάση.
- requirements: 'Οποιοσδήποτε από αυτούς τους υποψηφίους θα μπορούσε να ξεπεράσει την #%{rank} εγκεκριμένη ετικέτα σε τάση, που επί του παρόντος είναι #%{lowest_tag_name} με βαθμολογία %{lowest_tag_score}.'
title: Ετικέτες σε τάση
subject: Νέες τάσεις προς αξιολόγηση στο %{instance}
aliases:
diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml
index 98a40c45cff..987788a7ade 100644
--- a/config/locales/en-GB.yml
+++ b/config/locales/en-GB.yml
@@ -995,8 +995,6 @@ en-GB:
new_trending_statuses:
title: Trending posts
new_trending_tags:
- no_approved_tags: There are currently no approved trending hashtags.
- requirements: 'Any of these candidates could surpass the #%{rank} approved trending hashtag, which is currently #%{lowest_tag_name} with a score of %{lowest_tag_score}.'
title: Trending hashtags
subject: New trends up for review on %{instance}
aliases:
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 057f7a5841f..15d682d1739 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -997,8 +997,6 @@ en:
new_trending_statuses:
title: Trending posts
new_trending_tags:
- no_approved_tags: There are currently no approved trending hashtags.
- requirements: 'Any of these candidates could surpass the #%{rank} approved trending hashtag, which is currently #%{lowest_tag_name} with a score of %{lowest_tag_score}.'
title: Trending hashtags
subject: New trends up for review on %{instance}
aliases:
diff --git a/config/locales/eo.yml b/config/locales/eo.yml
index 30c1e0d4efb..9ae59539439 100644
--- a/config/locales/eo.yml
+++ b/config/locales/eo.yml
@@ -952,8 +952,6 @@ eo:
new_trending_statuses:
title: Popularaĝaj mesaĝoj
new_trending_tags:
- no_approved_tags: Nun ne havas aprobitajn popularajn kradvortojn.
- requirements: Ajn ĉi tiu eroj povas superi la %{rank}an kradvorton kiu estas %{lowest_tag_name} kun %{lowest_tag_score} puentoj.
title: Tendencantaj kradvortoj
subject: Novaj popularaĵoj bezonas kontrolitis ĉe %{instance}
aliases:
diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml
index 88248d09862..0000c297ad2 100644
--- a/config/locales/es-AR.yml
+++ b/config/locales/es-AR.yml
@@ -997,8 +997,6 @@ es-AR:
new_trending_statuses:
title: Mensajes en tendencia
new_trending_tags:
- no_approved_tags: Actualmente no hay etiquetas en tendencia aprobadas.
- requirements: 'Cualquiera de estos candidatos podría superar la etiqueta en tendencia aprobada de #%{rank}, que actualmente es #%{lowest_tag_name} con una puntuación de %{lowest_tag_score}.'
title: Etiquetas en tendencia
subject: Nuevas tendencias para revisar en %{instance}
aliases:
diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml
index 4ecb666b07b..424262ca198 100644
--- a/config/locales/es-MX.yml
+++ b/config/locales/es-MX.yml
@@ -997,8 +997,6 @@ es-MX:
new_trending_statuses:
title