refactor: use Phoenix verified routes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-12-01 09:49:54 +01:00
parent 4f15535fa9
commit b315e1d7ff
83 changed files with 227 additions and 372 deletions

View File

@@ -3,9 +3,7 @@
<%= dgettext("activity", "%{profile} mentionned you in a comment under event %{event}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -14,9 +12,7 @@
<%= dgettext("activity", "%{profile} has posted an announcement under event %{event}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -26,9 +22,7 @@
<%= dgettext("activity", "%{profile} has posted a new reply under your event %{event}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}#comment-#{@activity.subject_params["comment_reply_to_uuid"]}-#{@activity.subject_params["comment_uuid"]}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}#comment-#{@activity.subject_params["comment_reply_to_uuid"]}-#{@activity.subject_params["comment_uuid"]}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -40,9 +34,7 @@
%{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}#comment-#{@activity.subject_params["comment_uuid"]}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}#comment-#{@activity.subject_params["comment_uuid"]}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
}

View File

@@ -4,22 +4,22 @@
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% :participation_event_comment -> %><%= dgettext("activity", "%{profile} has posted an announcement under event %{event}.",
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% :participation_event_comment -> %><%= dgettext("activity", "%{profile} has posted an announcement under event %{event}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% :event_new_comment -> %><%= if @activity.subject_params["comment_reply_to"] do %><%=dgettext("activity", "%{profile} has posted a new reply under your event %{event}.",
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% :event_new_comment -> %><%= if @activity.subject_params["comment_reply_to"] do %><%=dgettext("activity", "%{profile} has posted a new reply under your event %{event}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= "#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode()}#comment-#{@activity.subject_params["comment_reply_to_uuid"]}-#{@activity.subject_params["comment_uuid"]}" %><% else %><%= dgettext("activity", "%{profile} has posted a new comment under your event %{event}.",
<%= "#{url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode()}#comment-#{@activity.subject_params["comment_reply_to_uuid"]}-#{@activity.subject_params["comment_uuid"]}" %><% else %><%= dgettext("activity", "%{profile} has posted a new comment under your event %{event}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= "#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode()}#comment-#{@activity.subject_params["comment_uuid"]}"%><% end %><% end %>
<%= "#{url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode()}#comment-#{@activity.subject_params["comment_uuid"]}"%><% end %><% end %>

View File

@@ -3,18 +3,14 @@
<%= dgettext("activity", "%{profile} mentionned you in a %{conversation}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
conversation:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:conversation,
@activity.subject_params["conversation_participant_id"]) |> URI.decode()}\">conversation</a>"
"<a href=\"#{~p"/conversations/#{@activity.subject_params["conversation_participant_id"]}" |> url() |> URI.decode()}\">conversation</a>"
})
|> raw %>
<% :conversation_replied -> %>
<%= dgettext("activity", "%{profile} replied you in a %{conversation}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
conversation:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:conversation,
@activity.subject_params["conversation_participant_id"]) |> URI.decode()}\">conversation</a>"
"<a href=\"#{~p"/conversations/#{@activity.subject_params["conversation_participant_id"]}" |> url() |> URI.decode()}\">conversation</a>"
})
|> raw %>
<% end %>

View File

@@ -3,9 +3,9 @@
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :conversation, @activity.subject_params["conversation_participant_id"]) |> URI.decode() %><% :conversation_replied -> %><%= dgettext("activity", "%{profile} replied you in a conversation.",
<%= url(~p"/conversations/#{@activity.subject_params["conversation_participant_id"]}") |> URI.decode() %><% :conversation_replied -> %><%= dgettext("activity", "%{profile} replied you in a conversation.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :conversation, @activity.subject_params["conversation_participant_id"]) |> URI.decode() %><% end %>
<%= url(~p"/conversations/#{@activity.subject_params["conversation_participant_id"]}") |> URI.decode() %><% end %>

View File

@@ -3,7 +3,7 @@
<%= dgettext("activity", "%{profile} created the discussion %{discussion}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
discussion:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode()}\">
"<a href=\"#{~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["discussion_title"])}</a>"
})
|> raw %>
@@ -11,7 +11,7 @@
<%= dgettext("activity", "%{profile} replied to the discussion %{discussion}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
discussion:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode()}\">
"<a href=\"#{~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["discussion_title"])}</a>"
})
|> raw %>
@@ -19,7 +19,7 @@
<%= dgettext("activity", "%{profile} renamed the discussion %{discussion}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
discussion:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode()}\">
"<a href=\"#{~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["discussion_title"])}</a>"
})
|> raw %>
@@ -27,7 +27,7 @@
<%= dgettext("activity", "%{profile} archived the discussion %{discussion}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
discussion:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode()}\">
"<a href=\"#{~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["discussion_title"])}</a>"
})
|> raw %>

View File

@@ -4,25 +4,25 @@
discussion: @activity.subject_params["discussion_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode() %><% :discussion_replied -> %><%= dgettext("activity", "%{profile} replied to the discussion %{discussion}.",
<%= ~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode() %><% :discussion_replied -> %><%= dgettext("activity", "%{profile} replied to the discussion %{discussion}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
discussion: @activity.subject_params["discussion_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode() %><% :discussion_renamed -> %><%= dgettext("activity", "%{profile} renamed the discussion %{discussion}.",
<%= ~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode() %><% :discussion_renamed -> %><%= dgettext("activity", "%{profile} renamed the discussion %{discussion}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
discussion: @activity.subject_params["discussion_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode() %><% :discussion_archived -> %><%= dgettext("activity", "%{profile} archived the discussion %{discussion}.",
<%= ~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode() %><% :discussion_archived -> %><%= dgettext("activity", "%{profile} archived the discussion %{discussion}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
discussion: @activity.subject_params["discussion_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :discussion, Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group), @activity.subject_params["discussion_slug"]) |> URI.decode() %><% :discussion_deleted -> %><%= dgettext("activity", "%{profile} deleted the discussion %{discussion}.",
<%= ~p"/#{Mobilizon.Actors.Actor.preferred_username_and_domain(@activity.group)}/c/#{@activity.subject_params["discussion_slug"]}" |> url() |> URI.decode() %><% :discussion_deleted -> %><%= dgettext("activity", "%{profile} deleted the discussion %{discussion}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
discussion: @activity.subject_params["discussion_title"]

View File

@@ -3,9 +3,7 @@
<%= dgettext("activity", "The event %{event} was created by %{profile}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -14,9 +12,7 @@
<%= dgettext("activity", "The event %{event} was updated by %{profile}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -32,9 +28,7 @@
<%= dgettext("activity", "%{profile} replied to a comment on the event %{event}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -43,9 +37,7 @@
<%= dgettext("activity", "%{profile} posted a comment on the event %{event}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
})
@@ -55,9 +47,7 @@
<%= dgettext("activity", "%{profile} joined your event %{event}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">#{escape_html(@activity.subject_params["event_title"])}</a>"
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">#{escape_html(@activity.subject_params["event_title"])}</a>"
})
|> raw %>
<% end %>

View File

@@ -4,13 +4,13 @@
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% :event_updated -> %><%= dgettext("activity", "The event %{event} was updated by %{profile}.",
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% :event_updated -> %><%= dgettext("activity", "The event %{event} was updated by %{profile}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% :event_deleted -> %><%= dgettext("activity", "The event %{event} was deleted by %{profile}.",
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% :event_deleted -> %><%= dgettext("activity", "The event %{event} was deleted by %{profile}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
@@ -22,16 +22,16 @@
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} posted a comment on the event %{event}.",
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} posted a comment on the event %{event}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% end %><% :event_new_participation -> %><%= dgettext("activity", "%{profile} joined your event %{event}.",
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% end %><% :event_new_participation -> %><%= dgettext("activity", "%{profile} joined your event %{event}.",
%{
profile: display_name_and_username(@activity.author),
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %><% end %>
<%= url(~p"/events/#{@activity.subject_params["event_uuid"]}") |> URI.decode() %><% end %>

View File

@@ -3,9 +3,7 @@
<%= dgettext("activity", "%{profile} created the group %{group}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
group:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:actor,
@activity.subject_params["group_federated_username"]) |> URI.decode()}\">
"<a href=\"#{~p"/@#{@activity.subject_params["group_federated_username"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["group_name"])}
</a>"
})
@@ -14,9 +12,7 @@
<%= dgettext("activity", "%{profile} updated the group %{group}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
group:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:actor,
@activity.subject_params["group_federated_username"]) |> URI.decode()}\">
"<a href=\"#{~p"/@#{@activity.subject_params["group_federated_username"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["group_name"])}
</a>"
})

View File

@@ -4,10 +4,10 @@
group: @activity.subject_params["group_name"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :actor, @activity.subject_params["group_federated_username"]) |> URI.decode() %><% :group_updated -> %><%= dgettext("activity", "%{profile} updated the group %{group}.",
<%= ~p"/@#{@activity.subject_params["group_federated_username"]}" |> url() |> URI.decode() %><% :group_updated -> %><%= dgettext("activity", "%{profile} updated the group %{group}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
group: @activity.subject_params["group_name"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :actor, @activity.subject_params["group_federated_username"]) |> URI.decode() %><% end %>
<%= ~p"/@#{@activity.subject_params["group_federated_username"]}" |> url() |> URI.decode() %><% end %>

View File

@@ -3,9 +3,7 @@
<%= dgettext("activity", "The post %{post} was created by %{profile}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
post:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:post,
@activity.subject_params["post_slug"]) |> URI.decode()}\">
"<a href=\"#{~p"/p/#{@activity.subject_params["post_slug"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["post_title"])}
</a>"
})
@@ -14,9 +12,7 @@
<%= dgettext("activity", "The post %{post} was updated by %{profile}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
post:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:post,
@activity.subject_params["post_slug"]) |> URI.decode()}\">
"<a href=\"#{~p"/p/#{@activity.subject_params["post_slug"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["post_title"])}
</a>"
})

View File

@@ -4,13 +4,13 @@
post: @activity.subject_params["post_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :post, @activity.subject_params["post_slug"]) |> URI.decode() %><% :post_updated -> %><%= dgettext("activity", "The post %{post} was updated by %{profile}.",
<%= url(~p"/p/#{@activity.subject_params["post_slug"]}") |> URI.decode() %><% :post_updated -> %><%= dgettext("activity", "The post %{post} was updated by %{profile}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
post: @activity.subject_params["post_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :post, @activity.subject_params["post_slug"]) |> URI.decode() %><% :post_deleted -> %><%= dgettext("activity", "The post %{post} was deleted by %{profile}.",
<%= url(~p"/p/#{@activity.subject_params["post_slug"]}") |> URI.decode() %><% :post_deleted -> %><%= dgettext("activity", "The post %{post} was deleted by %{profile}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
post: @activity.subject_params["post_title"]

View File

@@ -4,9 +4,7 @@
<%= dgettext("activity", "%{profile} created the folder %{resource}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
resource:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:resource,
@activity.subject_params["resource_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/resource/#{@activity.subject_params["resource_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["resource_title"])}
</a>"
})
@@ -15,9 +13,7 @@
<%= dgettext("activity", "%{profile} created the resource %{resource}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
resource:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:resource,
@activity.subject_params["resource_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/resource/#{@activity.subject_params["resource_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["resource_title"])}
</a>"
})
@@ -31,9 +27,7 @@
%{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
resource:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:resource,
@activity.subject_params["resource_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/resource/#{@activity.subject_params["resource_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["resource_title"])}
</a>",
old_resource_title:
@@ -48,9 +42,7 @@
%{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
resource:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:resource,
@activity.subject_params["resource_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/resource/#{@activity.subject_params["resource_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["resource_title"])}
</a>",
old_resource_title:
@@ -64,9 +56,7 @@
<%= dgettext("activity", "%{profile} moved the folder %{resource}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
resource:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:resource,
@activity.subject_params["resource_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/resource/#{@activity.subject_params["resource_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["resource_title"])}
</a>"
})
@@ -75,9 +65,7 @@
<%= dgettext("activity", "%{profile} moved the resource %{resource}.", %{
profile: "<b>#{escaped_display_name_and_username(@activity.author)}</b>",
resource:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:resource,
@activity.subject_params["resource_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/resource/#{@activity.subject_params["resource_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["resource_title"])}
</a>"
})

View File

@@ -5,39 +5,39 @@
resource: @activity.subject_params["resource_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :resource, @activity.subject_params["resource_uuid"]) |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} created the resource %{resource}.",
<%= url(~p"/resource/#{@activity.subject_params["resource_uuid"]}") |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} created the resource %{resource}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
resource: @activity.subject_params["resource_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :resource, @activity.subject_params["resource_uuid"]) |> URI.decode() %><% end %><% :resource_renamed -> %><%= if @activity.subject_params["is_folder"] do %><%= dgettext("activity", "%{profile} renamed the folder from %{old_resource_title} to %{resource}.",
<%= url(~p"/resource/#{@activity.subject_params["resource_uuid"]}") |> URI.decode() %><% end %><% :resource_renamed -> %><%= if @activity.subject_params["is_folder"] do %><%= dgettext("activity", "%{profile} renamed the folder from %{old_resource_title} to %{resource}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
resource: @activity.subject_params["resource_title"],
old_resource_title: @activity.subject_params["old_resource_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :resource, @activity.subject_params["resource_uuid"]) |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} renamed the resource from %{old_resource_title} to %{resource}.",
<%= url(~p"/resource/#{@activity.subject_params["resource_uuid"]}") |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} renamed the resource from %{old_resource_title} to %{resource}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
resource: @activity.subject_params["resource_title"],
old_resource_title: @activity.subject_params["old_resource_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :resource, @activity.subject_params["resource_uuid"]) |> URI.decode() %><% end %><% :resource_moved -> %><%= if @activity.subject_params["is_folder"] do %><%= dgettext("activity", "%{profile} moved the folder %{resource}.",
<%= url(~p"/resource/#{@activity.subject_params["resource_uuid"]}") |> URI.decode() %><% end %><% :resource_moved -> %><%= if @activity.subject_params["is_folder"] do %><%= dgettext("activity", "%{profile} moved the folder %{resource}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
resource: @activity.subject_params["resource_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :resource, @activity.subject_params["resource_uuid"]) |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} moved the resource %{resource}.",
<%= url(~p"/resource/#{@activity.subject_params["resource_uuid"]}") |> URI.decode() %><% else %><%= dgettext("activity", "%{profile} moved the resource %{resource}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
resource: @activity.subject_params["resource_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :resource, @activity.subject_params["resource_uuid"]) |> URI.decode() %><% end %><% :resource_deleted -> %><%= if @activity.subject_params["is_folder"] do %><%= dgettext("activity", "%{profile} deleted the folder %{resource}.",
<%= url(~p"/resource/#{@activity.subject_params["resource_uuid"]}") |> URI.decode() %><% end %><% :resource_deleted -> %><%= if @activity.subject_params["is_folder"] do %><%= dgettext("activity", "%{profile} deleted the folder %{resource}.",
%{
profile: Mobilizon.Actors.Actor.display_name_and_username(@activity.author),
resource: @activity.subject_params["resource_title"]

View File

@@ -63,7 +63,9 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :participation_email_confirmation, @participant.metadata.confirmation_token)}"
~p"/participation/email/confirm/#{@participant.metadata.confirmation_token}"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: 'Roboto', Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"

View File

@@ -2,5 +2,5 @@
==
<%= gettext "Hi there! You just registered to join this event: « %{title} ». Please confirm the e-mail address you provided:", title: @participant.event.title %>
<%= gettext "If you didn't trigger this email, you may safely ignore it." %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :participation_email_confirmation, @participant.metadata.confirmation_token) %>
<%= url(~p"/participation/email/confirm/#{@participant.metadata.confirmation_token}") %>
<%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", 1 %>

View File

@@ -58,9 +58,7 @@
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @participant.event.uuid)}"
}
href={~p"/events/#{@participant.event.uuid}" |> url() |> URI.decode()}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -2,5 +2,5 @@
==
<%= gettext "Get ready for %{title}", title: @participant.event.title %>
<%= gettext "Go to event page" %>
<%= gettext "View the event on: %{link}", link: Routes.page_url(Mobilizon.Web.Endpoint, :event, @participant.event.uuid) %>
<%= gettext "View the event on: %{link}", link: url(~p"/events/#{@participant.event.uuid}") %>
<%= gettext "If you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button." %>

View File

@@ -54,9 +54,7 @@
profile:
"<b>#{escape_html(display_name_and_username(@activity.author))}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["event_uuid"]) |> URI.decode()}\">
"<a href=\"#{~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode()}\">
#{escape_html(@activity.subject_params["event_title"])}
</a>"
}
@@ -77,8 +75,10 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"])}"
}
~p"/events/#{@activity.subject_params["event_uuid"]}"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>
@@ -111,9 +111,7 @@
profile:
"<b>#{escape_html(display_name_and_username(@activity.author))}</b>",
event:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint,
:event,
@activity.subject_params["conversation_event_uuid"]) |> URI.decode()}\">#{escape_html(@activity.subject_params["conversation_event_title"])}</a>"
"<a href=\"#{~p"/events/#{@activity.subject_params["conversation_event_uuid"]}" |> url() |> URI.decode()}\">#{escape_html(@activity.subject_params["conversation_event_title"])}</a>"
}
)
|> raw %>
@@ -174,8 +172,10 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["conversation_event_uuid"])}"
}
~p"/events/#{@activity.subject_params["conversation_event_uuid"]}"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -9,7 +9,7 @@
event: @activity.subject_params["event_title"]
}
) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["event_uuid"]) |> URI.decode() %>
<%= ~p"/events/#{@activity.subject_params["event_uuid"]}" |> url() |> URI.decode() %>
<% :conversation -> %>
<%= dgettext("activity", "%{profile} has posted a private announcement about event %{event}.",
%{
@@ -26,5 +26,5 @@
--
<%= dgettext("activity", "This information is sent privately to you as a person who registered for this event. Share the informations above with other people with caution.") %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @activity.subject_params["conversation_event_uuid"]) |> URI.decode() %>
<%= ~p"/events/#{@activity.subject_params["conversation_event_uuid"]}" |> url() |> URI.decode() %>
<% end %>

View File

@@ -61,9 +61,7 @@
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :user_email_validation, @token)}"
}
href={~p"/validate/email/#{@token}" |> url() |> URI.decode()}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -1,5 +1,5 @@
<%= gettext "Confirm new email" %>
==
<%= gettext "Hi there! It seems like you wanted to change the email address linked to your account on %{instance}. If you still wish to do so, please click the button below to confirm the change. You will then be able to log in to %{instance} with this new email address.", %{instance: @instance_name} %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :user_email_validation, @token) %>
<%= url(~p"/validate/email/#{@token}") %>
<%= gettext "If you didn't trigger the change yourself, please ignore this message." %>

View File

@@ -94,7 +94,9 @@
<td width="85">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)) |> URI.decode()}"
~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}"
|> url()
|> URI.decode()
}
target="_blank"
style="text-decoration: none;"
@@ -123,7 +125,9 @@
<td align="left">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)) |> URI.decode()}"
~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}"
|> url()
|> URI.decode()
}
target="_blank"
style="text-decoration: none;color: #474467;font-family: 'Roboto', Helvetica, Arial, sans-serif;font-size: 18px;font-weight: bold;line-height: 25px;"
@@ -138,7 +142,9 @@
<td align="left">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)) |> URI.decode()}"
~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}"
|> url()
|> URI.decode()
}
target="_blank"
style="text-decoration: none;display: block;color: #7a7a7a;font-family: 'Roboto', Helvetica, Arial, sans-serif;font-size: 16px;font-weight: 400;line-height: 25px;"
@@ -214,7 +220,9 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)) |> URI.decode()}/timeline"
~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}/timeline"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"

View File

@@ -21,7 +21,7 @@
<% end %>
<%= if length(group_activities) > 5 do %>
<%= dngettext "activity", "View one more activity", "View %{count} more activities", length(group_activities) - 5, %{count: length(group_activities) - 5} %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)) |> URI.decode() %>/timeline
<%= ~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(hd(group_activities).group)}" |> url() |> URI.decode() %>/timeline
<% end %>
<% end %>
<%= dgettext("activity", "Don't want to receive activity notifications? You may change frequency or disable them in your settings.") %>

View File

@@ -74,7 +74,7 @@
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}"}
href={~p"/events/#{@event.uuid}" |> url() |> URI.decode()}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -6,6 +6,6 @@
<%= gettext "Good news: one of the event organizers just approved your request. Update your calendar, because you're on the guest list now!" %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %>
<%= ~p"/events/#{@event.uuid}" |> url() |> URI.decode() %>
<%= gettext "Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button." %>

View File

@@ -74,7 +74,7 @@
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}"}
href={"#{url(~p"/events/#{@event.uuid}")}"}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -2,5 +2,5 @@
==
<%= gettext "You recently requested to attend %{title}.", title: @event.title %>
<%= gettext "You have confirmed your participation. Update your calendar, because you're on the guest list now!" %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %>
<%= url(~p"/events/#{@event.uuid}") %>
<%= gettext "Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button." %>

View File

@@ -148,7 +148,7 @@
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}"}
href={"#{url(~p"/events/#{@event.uuid}")}"}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -9,6 +9,6 @@
<%= gettext "New end date:" %> <%= render("date/event_tz_date.text", event: @event, date: @event.ends_on, timezone: @timezone, locale: @locale) %><% end %><%= if MapSet.member?(@changes, :physical_address) do %>
<%= gettext "New location:" %> <%= Mobilizon.Addresses.Address.representation(@event.physical_address) %><% end %>
<%= gettext "Visit the updated event page: %{link}", link: Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %>
<%= gettext "Visit the updated event page: %{link}", link: url(~p"/events/#{@event.uuid}") %>
<%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", 1 %>

View File

@@ -76,7 +76,7 @@
<tr>
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={"#{Routes.page_url(Mobilizon.Web.Endpoint, :my_groups)}"}
href={"#{url(~p"/groups/me")}"}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>

View File

@@ -3,4 +3,4 @@
<%= gettext "%{inviter} just invited you to join their group %{group}", group: @group.name, inviter: @inviter.name %>
<%= @group.url %>
<%= gettext "To accept this invitation, head over to your groups." %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :my_groups) %>
<%= url(~p"/groups/me") %>

View File

@@ -48,7 +48,7 @@
"Your membership request for group %{link_start}<b>%{group}</b>%{link_end} has been approved.",
group: escape_html(display_name(@group)),
link_start:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, preferred_username_and_domain(@group)) |> URI.decode()}\">",
"<a href=\"#{~p"/@#{preferred_username_and_domain(@group)}" |> url() |> URI.decode()}\">",
link_end: "</a>"
)
|> raw %>
@@ -66,7 +66,9 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(@group)) |> URI.decode()}"
~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(@group)}"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"

View File

@@ -2,4 +2,4 @@
==
<%= gettext "Your membership request for group %{group} has been approved.", group: Mobilizon.Actors.Actor.display_name(@group) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(@group)) |> URI.decode() %>
<%= ~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(@group)}" |> url() |> URI.decode() %>

View File

@@ -48,7 +48,7 @@
"Your membership request for group %{link_start}<b>%{group}</b>%{link_end} has been rejected.",
group: escape_html(display_name(@group)),
link_start:
"<a href=\"#{Routes.page_url(Mobilizon.Web.Endpoint, :actor, preferred_username_and_domain(@group)) |> URI.decode()}\">",
"<a href=\"#{~p"/@#{preferred_username_and_domain(@group)}" |> url() |> URI.decode()}\">",
link_end: "</a>"
)
|> raw %>

View File

@@ -2,4 +2,4 @@
==
<%= gettext "Your membership request for group %{group} has been rejected.", group: Mobilizon.Actors.Actor.display_name(@group) %>
<%= Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(@group)) |> URI.decode() %>
<%= ~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(@group)}" |> url() |> URI.decode() %>

View File

@@ -3,9 +3,9 @@
<%= ngettext "You have one event this week:", "You have %{total} events this week:", @total, total: @total %>
<%= if @total > 1 do %>
<%= for participation <- @participations do %>
- <%= render("date/event_tz_date.text", event: participation.event, date: participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= participation.event.title %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, participation.event.uuid) %>
- <%= render("date/event_tz_date.text", event: participation.event, date: participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= participation.event.title %> <%= url(~p"/events/#{participation.event.uuid}") %>
<% end %>
<% else %>
<%= render("date/event_tz_date.text", event: @participation.event, date: @participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= @participation.event.title %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @participation.event.uuid) %>
<%= render("date/event_tz_date.text", event: @participation.event, date: @participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= @participation.event.title %> <%= url(~p"/events/#{@participation.event.uuid}") %>
<% end %>
<%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", @total %>

View File

@@ -3,9 +3,9 @@
<%= ngettext "You have one event today:", "You have %{total} events today:", @total, total: @total %>
<%= if @total > 1 do %>
<%= for participation <- @participations do %>
- <%= render("date/event_tz_date.text", event: participation.event, date: participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= participation.event.title %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, participation.event.uuid) %>
- <%= render("date/event_tz_date.text", event: participation.event, date: participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= participation.event.title %> <%= url(~p"/events/#{participation.event.uuid}") %>
<% end %>
<% else %>
<%= render("date/event_tz_date.text", event: @participation.event, date: @participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= @participation.event.title %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @participation.event.uuid) %>
<%= render("date/event_tz_date.text", event: @participation.event, date: @participation.event.begins_on, timezone: @timezone, locale: @locale) %> - <%= @participation.event.title %> <%= url(~p"/events/#{@participation.event.uuid}") %>
<% end %>
<%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", @total %>

View File

@@ -7,7 +7,7 @@
align="left"
>
<a
href={Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}
href={url(~p"/events/#{@event.uuid}")}
style="color: rgb(87,100,108); font-family: Helvetica,Arial,sans-serif; font-weight: normal; text-align: left; line-height: 1.3; text-decoration: none; vertical-align: baseline; margin: 0; padding: 0; border: 0;"
target="_blank"
>

View File

@@ -7,7 +7,7 @@
align="left"
>
<a
href={Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}
href={url(~p"/events/#{@event.uuid}")}
style="color: rgb(66,81,90); font-family: Helvetica,Arial,sans-serif; font-weight: 700; text-align: left; line-height: 1.4; text-decoration: none; vertical-align: baseline; font-size: 22px; letter-spacing: 0.2px; margin: 0 0 30px; padding: 0; border: 0;"
target="_blank"
>
@@ -35,12 +35,11 @@
<%= if @event.attributed_to do %>
<a
href={
Routes.page_url(
Mobilizon.Web.Endpoint,
:actor,
Mobilizon.Actors.Actor.preferred_username_and_domain(@event.attributed_to)
URI.decode(
url(
~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(@event.attributed_to)}"
)
)
|> URI.decode()
}
style="color: rgb(254,56,89); font-family: Helvetica,Arial,sans-serif; font-weight: normal; text-align: left; line-height: 1.3; text-decoration: none; vertical-align: baseline; margin: 0; padding: 0; border: 0;"
target="_blank"

View File

@@ -1,3 +1,3 @@
<%= gettext("Title: %{title}", title: @event.title) %>
<%= if @event.attributed_to do %><%= gettext("Organizer: %{organizer}", organizer: @event.attributed_to.name || @event.attributed_to.preferred_username) %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :actor, Mobilizon.Actors.Actor.preferred_username_and_domain(@event.attributed_to)) |> URI.decode() %><% else %><%= gettext("Organizer: %{organizer}", organizer: @event.organizer_actor.name || @event.organizer_actor.preferred_username) %><% end %>
<%= if @event.attributed_to do %><%= gettext("Organizer: %{organizer}", organizer: @event.attributed_to.name || @event.attributed_to.preferred_username) %> <%= ~p"/@#{Mobilizon.Actors.Actor.preferred_username_and_domain(@event.attributed_to)}" |> url() |> URI.decode() %><% else %><%= gettext("Organizer: %{organizer}", organizer: @event.organizer_actor.name || @event.organizer_actor.preferred_username) %><% end %>

View File

@@ -40,7 +40,7 @@
align="center"
>
<a
href={Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}
href={url(~p"/events/#{@event.uuid}")}
style="color: rgb(255,255,255); font-family: Helvetica,Arial,sans-serif; text-align: left; line-height: 14px; text-decoration: none; vertical-align: baseline; font-size: 20px; display: inline-block; border: 1px solid #3C376E; border-radius: 15px; white-space: nowrap; margin: 0; padding: 15px 25px; border: none;"
target="_blank"
>
@@ -84,7 +84,7 @@
align="center"
>
<a
href={Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}
href={url(~p"/events/#{@event.uuid}")}
style="color: rgb(255,255,255); font-family: Helvetica,Arial,sans-serif; text-align: left; line-height: 14px; text-decoration: none; vertical-align: baseline; font-size: 20px; display: inline-block; border: 1px solid #3C376E; border-radius: 15px; white-space: nowrap; margin: 0; padding: 15px 25px; border: none;"
target="_blank"
>
@@ -125,7 +125,7 @@
align="left"
>
<a
href={Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)}
href={url(~p"/events/#{@event.uuid}")}
style="color: rgb(254,56,89); font-family: Helvetica,Arial,sans-serif; font-weight: 400; text-align: left; line-height: 1.5; text-decoration: none; vertical-align: baseline; font-size: 16px; margin: 0; padding: 0; border: 0;"
target="_blank"
>

View File

@@ -2,8 +2,8 @@
<%= render("participation/card/_metadata.text", event: @event, timezone: @timezone, locale: @locale, action: @action) %>
<%= case @action do %><% "participation" -> %><%= gettext("Manage your participation:") %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %><% "event" -> %><%= gettext("Participate:") %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) %><% nil -> %><% end %>
<%= case @action do %><% "participation" -> %><%= gettext("Manage your participation:") %> <%= url(~p"/events/#{@event.uuid}") %><% "event" -> %><%= gettext("Participate:") %> <%= url(~p"/events/#{@event.uuid}") %><% nil -> %><% end %>
<%= if @event.description do %><%= gettext("Details:") %>
<%= process_description(@event.description) %>
<%= if String.length(@event.description) > 200 do %><%= gettext("Read more: %{url}", url: Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid)) %><% end %><% end %>
<%= if String.length(@event.description) > 200 do %><%= gettext("Read more: %{url}", url: url(~p"/events/#{@event.uuid}")) %><% end %><% end %>

View File

@@ -81,7 +81,7 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) <> "/participations"}"
"#{url(~p"/events/#{@event.uuid}") <> "/participations"}"
}
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 #3C376E; display: inline-block;"

View File

@@ -5,6 +5,6 @@
<%= render("participation/event_card.text", event: @event, timezone: @timezone, locale: @locale, action: nil) %>
<%= gettext "Manage pending requests" %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :event, @event.uuid) <> "/participations" %>
<%= gettext "Manage pending requests" %> <%= url(~p"/events/#{@event.uuid}") <> "/participations" %>
<%= gettext "You are receiving this email because you chose to get notifications for pending attendance requests to your events. You can disable or change your notification settings in your user account settings under « Notifications »." %>s

View File

@@ -227,7 +227,7 @@
<td align="center" style="border-radius: 3px;" bgcolor="#3C376E">
<a
href={
"#{Routes.page_url(Mobilizon.Web.Endpoint, :moderation_report, @report.id)}"
"#{url(~p"/moderation/report/#{@report.id}")}"
}
target="_blank"
style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"

View File

@@ -23,4 +23,4 @@
<%= gettext "Reason" %>
<%= @report.content %>
<% end %>
<%= gettext "View report:" %> <%= Routes.page_url(Mobilizon.Web.Endpoint, :moderation_report, @report.id) %>
<%= gettext "View report:" %> <%= url(~p"/moderation/report/#{@report.id}") %>