Skip to content

Commit

Permalink
Merge pull request #62 from SADiLaR/feature/admin-internationalisation
Browse files Browse the repository at this point in the history
add internationalisation for admin
  • Loading branch information
OnaMosimege authored May 28, 2024
2 parents 4baf265 + 3de505e commit 2a010de
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from django.utils.translation import gettext_lazy as _

from . import views

admin.site.index_title = "SADiLaR Administration"
admin.site.site_title = "SADiLaR Site Admin Portal"
admin.site.index_title = _("SADiLaR Administration")
admin.site.site_title = _("SADiLaR Site Admin Portal")

urlpatterns = [
path("admin/", admin.site.urls),
Expand Down
2 changes: 2 additions & 0 deletions app/general/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _


class GeneralConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "general"
verbose_name = _("General")
2 changes: 1 addition & 1 deletion app/templates/admin/base_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{% block branding %}
<h1 class="header-title">
<a href="{% url 'home' %}">
<img src="{% static 'img/sadilar.png' %}" class="main-logo" alt="SADiLaR">
<img src="{% static 'img/sadilar.png' %}" class="main-logo" alt=_("SADiLaR")>
</a>
</h1>
{% if user.is_anonymous %}
Expand Down
2 changes: 2 additions & 0 deletions app/users/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _


class UsersConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "users"
verbose_name = _("Users")

0 comments on commit 2a010de

Please sign in to comment.