From 092b91825fed3081a8f27318a3c1c2934beac259 Mon Sep 17 00:00:00 2001 From: reverend Date: Fri, 2 Apr 2021 22:06:52 +0200 Subject: [PATCH] Following new naming https://is.gd/cRmcip --- .../lostplaces/templates/403.html | 4 ++-- .../lostplaces/templates/explorer/profile.html | 10 +++++----- .../lostplaces/templates/global.html | 18 +++++++++--------- .../lostplaces/templates/home.html | 4 ++-- .../lostplaces/templates/home_unauth.html | 6 +++--- .../templates/partials/form/submit.html | 4 ++-- .../templates/partials/nav/footer.html | 8 ++++---- .../templates/partials/nav/pagination.html | 16 ++++++++-------- .../lostplaces/templates/partials/tagging.html | 4 ++-- .../lostplaces/templates/partials/welcome.html | 12 ++++++------ .../photo_album/photo_album_create.html | 8 ++++---- .../templates/place/place_create.html | 6 +++--- .../templates/place/place_delete.html | 8 ++++---- .../templates/place/place_detail.html | 10 +++++----- .../lostplaces/templates/place/place_list.html | 4 ++-- .../templates/place/place_update.html | 6 +++--- .../place_image/place_image_create.html | 2 +- .../templates/registration/login.html | 8 ++++---- .../lostplaces/templates/signup.html | 6 +++--- .../lostplaces/templatetags/lostplaces.py | 2 +- 20 files changed, 73 insertions(+), 73 deletions(-) diff --git a/django_lostplaces/lostplaces/templates/403.html b/django_lostplaces/lostplaces/templates/403.html index ef4fbb8..566a9ab 100644 --- a/django_lostplaces/lostplaces/templates/403.html +++ b/django_lostplaces/lostplaces/templates/403.html @@ -1,7 +1,7 @@ {% extends 'global.html'%} {% load i18n %} -{% block title %}{% trans 'Forbidden' %}{% endblock %} +{% block title %}{% translate 'Forbidden' %}{% endblock %} {% block additional_head %} {% if request.META.HTTP_REFERER %} @@ -11,6 +11,6 @@ {% block maincontent %} {% if request.META.HTTP_REFERER %} -

{% trans 'You will be redirected in 5 seconds' %}

{% trans 'Go Back' %}

+

{% translate 'You will be redirected in 5 seconds' %}

{% translate 'Go Back' %}

{% endif %} {% endblock maincontent %} \ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/explorer/profile.html b/django_lostplaces/lostplaces/templates/explorer/profile.html index 68c0072..ef04c14 100644 --- a/django_lostplaces/lostplaces/templates/explorer/profile.html +++ b/django_lostplaces/lostplaces/templates/explorer/profile.html @@ -16,7 +16,7 @@
- {% trans 'Joined' %} + {% translate 'Joined' %} {{explorer.user.date_joined|date:'d.m.Y'}} @@ -24,7 +24,7 @@
- {% trans 'Places'%} + {% translate 'Places'%} {{place_count}} @@ -32,7 +32,7 @@
- {% trans 'Place Assets'%} + {% translate 'Place Assets'%} {{asset_count}} @@ -46,7 +46,7 @@
-

{% trans 'Places submitted by' %} {{explorer.user.username}}

+

{% translate 'Places submitted by' %} {{explorer.user.username}}

    {% for place in place_list %}
  • @@ -68,7 +68,7 @@
-

{% trans 'Photo albums submitted by' %} {{explorer.user.username}}

+

{% translate 'Photo albums submitted by' %} {{explorer.user.username}}

@@ -48,14 +48,14 @@ diff --git a/django_lostplaces/lostplaces/templates/home.html b/django_lostplaces/lostplaces/templates/home.html index 1694e93..b29a09f 100644 --- a/django_lostplaces/lostplaces/templates/home.html +++ b/django_lostplaces/lostplaces/templates/home.html @@ -7,7 +7,7 @@ {% endblock additional_head %} -# {% block title %}{% trans 'Home' %}{% endblock %} +# {% block title %}{% translate 'Home' %}{% endblock %} {% block maincontent %} @@ -17,7 +17,7 @@ {% include 'partials/osm_map.html' with config=mapping_config %}
-

{% trans 'Explore the latest places' %}

+

{% translate 'Explore the latest places' %}

    {% for place in place_list %}
  • diff --git a/django_lostplaces/lostplaces/templates/home_unauth.html b/django_lostplaces/lostplaces/templates/home_unauth.html index 6e6ed28..f447b6d 100644 --- a/django_lostplaces/lostplaces/templates/home_unauth.html +++ b/django_lostplaces/lostplaces/templates/home_unauth.html @@ -8,16 +8,16 @@ {% include 'partials/welcome.html' %}

    - {% blocktrans %}You can create, view and share your lost places with other members of this site. You can upload photos, place links to your web galleries and contribute your knowledge by tagging other places or commenting on them. You will find detailed information on where these locations are, how to get there and what to expect from them. This might even include detailed information on the surroundings or the history of a lost place.{% endblocktrans %} + {% blocktranslate %}You can create, view and share your lost places with other members of this site. You can upload photos, place links to your web galleries and contribute your knowledge by tagging other places or commenting on them. You will find detailed information on where these locations are, how to get there and what to expect from them. This might even include detailed information on the surroundings or the history of a lost place.{% endblocktranslate %}

    {% url 'signup' as signup_url %}

    - {% blocktrans %}Since vandalism is a growing problem these days, no sensitive information is available to the public. You have to sign up with a voucher code as an invitation to join this community. Only admins can create these codes. Usually you are given a code when we know you in real life in person and when we trust you. A request from an unknown person will most probably be denied.{% endblocktrans %} + {% blocktranslate %}Since vandalism is a growing problem these days, no sensitive information is available to the public. You have to sign up with a voucher code as an invitation to join this community. Only admins can create these codes. Usually you are given a code when we know you in real life in person and when we trust you. A request from an unknown person will most probably be denied.{% endblocktranslate %}

    -

    {% trans 'Explore the latest places' %}

    +

    {% translate 'Explore the latest places' %}

      {% for place in place_list %}
    • diff --git a/django_lostplaces/lostplaces/templates/partials/form/submit.html b/django_lostplaces/lostplaces/templates/partials/form/submit.html index 4d1572a..708a8ac 100644 --- a/django_lostplaces/lostplaces/templates/partials/form/submit.html +++ b/django_lostplaces/lostplaces/templates/partials/form/submit.html @@ -1,9 +1,9 @@ {% load i18n %}
      - +
      diff --git a/django_lostplaces/lostplaces/templates/partials/nav/footer.html b/django_lostplaces/lostplaces/templates/partials/nav/footer.html index 1e82c6e..f671679 100644 --- a/django_lostplaces/lostplaces/templates/partials/nav/footer.html +++ b/django_lostplaces/lostplaces/templates/partials/nav/footer.html @@ -61,13 +61,13 @@ diff --git a/django_lostplaces/lostplaces/templates/partials/nav/pagination.html b/django_lostplaces/lostplaces/templates/partials/nav/pagination.html index f7f4130..1c98eae 100644 --- a/django_lostplaces/lostplaces/templates/partials/nav/pagination.html +++ b/django_lostplaces/lostplaces/templates/partials/nav/pagination.html @@ -8,26 +8,26 @@
    • - {% trans 'First' %} + {% translate 'First' %}
    • - {% trans 'Previous' %} + {% translate 'Previous' %}
    • {% else %}
    • - {% trans 'First' %} + {% translate 'First' %}
    • - {% trans 'Previous' %} + {% translate 'Previous' %}
    • {% endif %} @@ -47,25 +47,25 @@ {% if page_obj.has_next %}
    • - {% trans 'Next' %} + {% translate 'Next' %}
    • - {% trans 'Last' %} + {% translate 'Last' %}
    • {% else %}
    • - {% trans 'Next' %} + {% translate 'Next' %}
    • - {% trans 'Last' %} + {% translate 'Last' %}
    • diff --git a/django_lostplaces/lostplaces/templates/partials/tagging.html b/django_lostplaces/lostplaces/templates/partials/tagging.html index 2b44cf3..66775fd 100644 --- a/django_lostplaces/lostplaces/templates/partials/tagging.html +++ b/django_lostplaces/lostplaces/templates/partials/tagging.html @@ -27,11 +27,11 @@
      - {% trans 'Add tags' %} + {% translate 'Add tags' %} {% csrf_token %}
      - +
      {% include 'partials/form/inputField.html' with field=config.submit_form.tag_list classes="LP-Input--tagging" %} diff --git a/django_lostplaces/lostplaces/templates/partials/welcome.html b/django_lostplaces/lostplaces/templates/partials/welcome.html index e4e9f31..03ad33b 100644 --- a/django_lostplaces/lostplaces/templates/partials/welcome.html +++ b/django_lostplaces/lostplaces/templates/partials/welcome.html @@ -1,21 +1,21 @@ {% load i18n %}
      -

      {% trans 'Start' %}

      +

      {% translate 'Start' %}

      -

      {% trans 'Welcome to our Urban Exploration community catalogue,' %} +

      {% translate 'Welcome to our Urban Exploration community catalogue,' %} {% if user.is_authenticated %} {{ user.username }} {% else %} - {% trans 'explorer' %} + {% translate 'explorer' %} {% endif %} !

      - {% trans 'We strictly follow our' %} - {% trans 'UrBex codex' %} - {% trans 'and expect you to do so, too.' %}' + {% translate 'We strictly follow our' %} + {% translate 'UrBex codex' %} + {% translate 'and expect you to do so, too.' %}'

      diff --git a/django_lostplaces/lostplaces/templates/photo_album/photo_album_create.html b/django_lostplaces/lostplaces/templates/photo_album/photo_album_create.html index 3406437..ac13bdb 100644 --- a/django_lostplaces/lostplaces/templates/photo_album/photo_album_create.html +++ b/django_lostplaces/lostplaces/templates/photo_album/photo_album_create.html @@ -1,19 +1,19 @@ {% extends 'global.html'%} {% load i18n %} -{% block title %}{% trans 'Submit a photo album' %}{% endblock %} +{% block title %}{% translate 'Submit a photo album' %}{% endblock %} {% block additional_menu_items %}
    • {% trans 'Edit place' %}
    • + class="LP-Link__Text">{% translate 'Edit place' %}
    • {% trans 'Delete place' %}
    • + class="LP-Link__Text">{% translate 'Delete place' %} {% endblock additional_menu_items %} {% block maincontent %}
      - {% trans 'Submit a photo album for' %} {{place.name}} + {% translate 'Submit a photo album for' %} {{place.name}} {% csrf_token %}
      diff --git a/django_lostplaces/lostplaces/templates/place/place_create.html b/django_lostplaces/lostplaces/templates/place/place_create.html index b9a9e18..1201202 100644 --- a/django_lostplaces/lostplaces/templates/place/place_create.html +++ b/django_lostplaces/lostplaces/templates/place/place_create.html @@ -2,12 +2,12 @@ {% load static %} {% load i18n %} -# {% block title %}{% trans 'Create place' %}{% endblock %} +# {% block title %}{% translate 'Create place' %}{% endblock %} {% block maincontent %}
      - {% trans 'Create place' %} + {% translate 'Create place' %} {% csrf_token %}
      @@ -39,7 +39,7 @@
      - {% trans 'Create' as action %} + {% translate 'Create' as action %}
      {% include 'partials/form/submit.html' with referrer=request.META.HTTP_REFERER action=action %}
      diff --git a/django_lostplaces/lostplaces/templates/place/place_delete.html b/django_lostplaces/lostplaces/templates/place/place_delete.html index 0517288..94b49a1 100644 --- a/django_lostplaces/lostplaces/templates/place/place_delete.html +++ b/django_lostplaces/lostplaces/templates/place/place_delete.html @@ -2,21 +2,21 @@ {% load static %} {% load i18n %} -{% block title %}{% trans 'Delete lost place' %}{% endblock %} +{% block title %}{% translate 'Delete lost place' %}{% endblock %} {% block maincontent %}
      - {% trans 'Delete place' %} + {% translate 'Delete place' %} {% csrf_token %}
      -

      {% blocktrans with place_name=place.name%}Are you sure you want to delete {{place_name}}?{% endblocktrans %}

      +

      {% blocktranslate with place_name=place.name%}Are you sure you want to delete {{place_name}}?{% endblocktranslate %}

      - {% trans 'Delete' as action %} + {% translate 'Delete' as action %}
      {% include 'partials/form/submit.html' with referer=request.META.HTTP_REFERER action=action %}
      diff --git a/django_lostplaces/lostplaces/templates/place/place_detail.html b/django_lostplaces/lostplaces/templates/place/place_detail.html index 20788c6..b814f87 100644 --- a/django_lostplaces/lostplaces/templates/place/place_detail.html +++ b/django_lostplaces/lostplaces/templates/place/place_detail.html @@ -16,8 +16,8 @@ {% block title %}{{place.name}}{% endblock %} {% block additional_menu_items %} -
    • {% trans 'Edit place' %}
    • -
    • {% trans 'Delete place' %}
    • +
    • {% translate 'Edit place' %}
    • +
    • {% translate 'Delete place' %}
    • {% endblock additional_menu_items %} {% block maincontent %} @@ -48,7 +48,7 @@
-

{% trans 'Map links' %}

+

{% translate 'Map links' %}

{% partial osm_map config=mapping_config %}
-

{% trans 'Photo albums' %}

+

{% translate 'Photo albums' %}

diff --git a/django_lostplaces/lostplaces/templates/place/place_list.html b/django_lostplaces/lostplaces/templates/place/place_list.html index 058bee1..c5d2071 100644 --- a/django_lostplaces/lostplaces/templates/place/place_list.html +++ b/django_lostplaces/lostplaces/templates/place/place_list.html @@ -7,13 +7,13 @@ {% endblock additional_head %} -{% block title %}{% trans 'All Places' %}{% endblock %} +{% block title %}{% translate 'All Places' %}{% endblock %} {% block maincontent %} {% include 'partials/osm_map.html' with config=mapping_config %}
-

{% trans 'Our lost places' %}

+

{% translate 'Our lost places' %}

    {% for place in place_list %}
  • diff --git a/django_lostplaces/lostplaces/templates/place/place_update.html b/django_lostplaces/lostplaces/templates/place/place_update.html index 5a508a9..0299b50 100644 --- a/django_lostplaces/lostplaces/templates/place/place_update.html +++ b/django_lostplaces/lostplaces/templates/place/place_update.html @@ -2,12 +2,12 @@ {% load static %} {% load i18n %} -# {% block title %}{% trans 'Edit place' %}{% endblock %} +# {% block title %}{% translate 'Edit place' %}{% endblock %} {% block maincontent %}
    - {% trans 'Edit place' %} + {% translate 'Edit place' %} {% csrf_token %}
    @@ -39,7 +39,7 @@
    - {% trans 'Update' as action %} + {% translate 'Update' as action %}
    {% include 'partials/form/submit.html' with referrer=request.META.HTTP_REFERER action=action %}
    diff --git a/django_lostplaces/lostplaces/templates/place_image/place_image_create.html b/django_lostplaces/lostplaces/templates/place_image/place_image_create.html index 455d9ef..3a0ad87 100644 --- a/django_lostplaces/lostplaces/templates/place_image/place_image_create.html +++ b/django_lostplaces/lostplaces/templates/place_image/place_image_create.html @@ -4,7 +4,7 @@ {% block maincontent %}
    - {% trans 'Submit images to a place' %} + {% translate 'Submit images to a place' %} {% csrf_token %}
    diff --git a/django_lostplaces/lostplaces/templates/registration/login.html b/django_lostplaces/lostplaces/templates/registration/login.html index a9a0a66..33db2ab 100644 --- a/django_lostplaces/lostplaces/templates/registration/login.html +++ b/django_lostplaces/lostplaces/templates/registration/login.html @@ -1,13 +1,13 @@ {% extends 'global.html'%} {% load static %} {% load i18n %} -# {% block title %}{% trans 'Login' %}{% endblock %} +# {% block title %}{% translate 'Login' %}{% endblock %} {% block maincontent %}
    - {% trans 'Login' %} + {% translate 'Login' %} {% csrf_token %}
    @@ -20,12 +20,12 @@
    - +
    -

    {% trans 'No account, yet?' %} {% trans 'Sign up' %}

    +

    {% translate 'No account, yet?' %} {% translate 'Sign up' %}

    {% endblock maincontent %} \ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/signup.html b/django_lostplaces/lostplaces/templates/signup.html index c3a3949..5ecae2b 100644 --- a/django_lostplaces/lostplaces/templates/signup.html +++ b/django_lostplaces/lostplaces/templates/signup.html @@ -3,13 +3,13 @@ {% load i18n %} {% load widget_tweaks %} -# {% block title %}{% trans 'Sign up' %}{% endblock %} +# {% block title %}{% translate 'Sign up' %}{% endblock %} {% block maincontent %}
    - {% trans 'Sign up' %} + {% translate 'Sign up' %} {% csrf_token %}
    @@ -38,7 +38,7 @@
    - +
    diff --git a/django_lostplaces/lostplaces/templatetags/lostplaces.py b/django_lostplaces/lostplaces/templatetags/lostplaces.py index 1fe3649..7c05677 100644 --- a/django_lostplaces/lostplaces/templatetags/lostplaces.py +++ b/django_lostplaces/lostplaces/templatetags/lostplaces.py @@ -45,7 +45,7 @@ class VariableNode(template.Node): self.name = name def render(self, context): - if type(self.content) is template.NodeList: + if type(self.content) is not str: self.content = self.content.render(context) self.content = remove_formatting(self.content)