i18n: mark base template strings for translation#2494
Open
CodeVishal-17 wants to merge 2 commits intodjango:mainfrom
Open
i18n: mark base template strings for translation#2494CodeVishal-17 wants to merge 2 commits intodjango:mainfrom
CodeVishal-17 wants to merge 2 commits intodjango:mainfrom
Conversation
marksweb
suggested changes
Apr 6, 2026
| djangoproject/cache | ||
| djangoproject/static/css/*.map | ||
| djangoproject/static/css/*.css | ||
| venv/ |
Contributor
There was a problem hiding this comment.
If you need to exclude files such as those generated by an IDE, use
$GIT_DIR/info/exclude or the core.excludesFile configuration variable as described in https://git-scm.com/docs/gitignore
marksweb
suggested changes
Apr 6, 2026
| <meta property="og:title" content="{% block og_title %}Django{% endblock %}" /> | ||
| <meta property="og:description" content="{% block og_description %}{% spaceless %} | ||
| The web framework for perfectionists with deadlines. | ||
| {% trans "The web framework for perfectionists with deadlines." %} |
Contributor
There was a problem hiding this comment.
Suggested change
| {% trans "The web framework for perfectionists with deadlines." %} | |
| {% translate "The web framework for perfectionists with deadlines." %} |
|
|
||
| <title>{% block title %}The web framework for perfectionists with deadlines{% endblock %} | Django</title> | ||
| <title> | ||
| {% block title %}{% trans "The web framework for perfectionists with deadlines" %}{% endblock %} | Django |
Contributor
There was a problem hiding this comment.
Suggested change
| {% block title %}{% trans "The web framework for perfectionists with deadlines" %}{% endblock %} | Django | |
| {% block title %}{% translate "The web framework for perfectionists with deadlines" %}{% endblock %} | Django |
| {% block before_header %}{% endblock %} | ||
|
|
||
| <a href="#main-content" class="skip-link">Skip to main content</a> | ||
| <a href="#main-content" class="skip-link">{% trans "Skip to main content" %}</a> |
Contributor
There was a problem hiding this comment.
Suggested change
| <a href="#main-content" class="skip-link">{% trans "Skip to main content" %}</a> | |
| <a href="#main-content" class="skip-link">{% translate "Skip to main content" %}</a> |
| {% block content %}{% endblock %} | ||
| <a href="#top" class="backtotop"><i class="icon icon-chevron-up"></i> Back to Top</a> | ||
| <a href="#top" class="backtotop"> | ||
| <i class="icon icon-chevron-up"></i> {% trans "Back to Top" %} |
Contributor
There was a problem hiding this comment.
Suggested change
| <i class="icon icon-chevron-up"></i> {% trans "Back to Top" %} | |
| <i class="icon icon-chevron-up"></i> {% translate "Back to Top" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a template-level internationalization issue in the base site layout so existing translations can be rendered correctly.
Specifically:
Marks user-visible strings in base.html (e.g. tagline, accessibility links) with {% trans %} so they are picked up by Django’s i18n system.
Aligns base.html with other already-internationalized templates, ensuring consistent behavior across all non-English locales.
No translation content was added or modified; this change only ensures existing translations are used.
Related to: #2474