Merge pull request #3152 from bookwyrm-social/fixes-typo-in-move-notice

Fixes incorrect translation and display of moved user page
This commit is contained in:
Mouse Reeve 2023-12-12 14:59:00 -08:00 committed by GitHub
commit 000e5e6145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 20 deletions

View file

@ -19,20 +19,7 @@
</h1>
</header>
{% if user.moved_to %}
<div class="container my-6">
<div class="notification is-info has-text-centered">
<p>
{% trans "You have have moved to" %}
<a href="{{user.moved_to}}">{% id_to_username user.moved_to %}</a>
</p>
<p> {% trans "You can undo this move to restore full functionality, but some followers may have already unfollowed this account." %}</p>
<form name="remove-alias" action="{% url 'prefs-unmove' %}" method="post">
{% csrf_token %}
<input type="hidden" name="remote_id" id="remote_id" value="{{user.moved_to}}">
<button type="submit" class="button is-small">{% trans "Undo move" %}</button>
</form>
</div>
</div>
{% include "snippets/moved_user_notice.html" with user=user %}
{% else %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>

View file

@ -0,0 +1,12 @@
{% load i18n %}
{% load utilities %}
<div class="container my-6">
<div class="notification is-info has-text-centered">
<p>
{% id_to_username user.moved_to as moved_to_name %}
{% blocktrans trimmed with user=user|username moved_to_link=user.moved_to %}
<em>{{ user }}</em> has moved to <a href="{{ moved_to_link }}">{{ moved_to_name }}</a>
{% endblocktrans %}
</p>
</div>
</div>

View file

@ -45,12 +45,7 @@
</div>
<div>
{% if user.moved_to %}
<div class="container my-6">
<div class="notification is-info has-text-centered">
<p><em>{{ user.localname }}</em> {% trans "has moved to" %} <a href="{{user.moved_to}}">{% id_to_username user.moved_to %}</a></p>
</div>
</div>
{% include "snippets/moved_user_notice.html" with user=user %}
{% else %}
{% if not is_self and request.user.is_authenticated %}
{% include 'snippets/follow_button.html' with user=user %}