i18n: add missing header, menu, subfooter, footer and search strings …#2502
i18n: add missing header, menu, subfooter, footer and search strings …#2502kehach07 wants to merge 7 commits intodjango:mainfrom
Conversation
codingjoe
left a comment
There was a problem hiding this comment.
Hi there @kehach07,
Excellent suggestion to make this community more open to non-English speakers! Love it 💚
One point, please consider using translate not trans as found in the official documentation.
Besides that, there's a big mix of sentence case, title case, and more.
I usually like to keep translation strings agnostic and add the appropriate filter. E.G {% translate "get help"|title %}
Furthermore, if the word is ambiguous, use a context marker, like: {% translate "contact"|title context "verb" %}as the verbto contactmight have a different translation than the nouncontact`.
Cheers!
Joe
| <li><a href="{% url 'diversity' %}">Diversity Statement</a></li> | ||
| <li><a href="{% url 'start' %}">{% trans "Getting Started with Django" %}</a></li> | ||
| <li><a href="{% url 'members:teams' %}">{% trans "Team Organization" %}</a></li> | ||
| <li><a href="{% url 'homepage' %}foundation/">{% trans "Django Software Foundation" %}</a></li> |
There was a problem hiding this comment.
Off topic: Lots of hardcoded URLs in here.
| <li><a href="https://github.com/django">{% trans "GitHub" %}</a></li> | ||
| <li><a href="https://x.com/djangoproject">{% trans "X" %}</a></li> | ||
| <li><a href="https://fosstodon.org/@django" rel="me">{% trans "Fediverse (Mastodon)" %}</a></li> | ||
| <li><a href="https://bsky.app/profile/djangoproject.com">{% trans "Bluesky" %}</a></li> | ||
| <li><a href="https://www.linkedin.com/company/django-software-foundation">{% trans "LinkedIn" %}</a></li> |
There was a problem hiding this comment.
Since those are brand names, I don't believe they need a translation.
| <li><a href="https://www.linkedin.com/company/django-software-foundation">LinkedIn</a></li> | ||
| <li><a href="{% url 'weblog-feed' %}">News RSS</a></li> | ||
| <li><a href="https://github.com/django">{% trans "GitHub" %}</a></li> | ||
| <li><a href="https://x.com/djangoproject">{% trans "X" %}</a></li> |
There was a problem hiding this comment.
Off Topic: Do we still do X? Doesn't that inherently violate the CoC? 😏
There was a problem hiding this comment.
Off Topic: Do we still do X? Doesn't that inherently violate the CoC? 😏
Thanks for the note! I’m working on the other suggested changes. Regarding X, my understanding is that it refers to the current name for Twitter. I’ve kept the existing link as-is for now, but I’m happy to update or remove it if the maintainers prefer a different approach.
There was a problem hiding this comment.
No worries, this was a joke. Since X formerly Twitter, largely abandoned content moderation. Whereas this community stands much firmer on its values.
| </li> | ||
| <li><a href="https://chat.djangoproject.com" target="_blank">Django Discord</a></li> | ||
| <li><a href="https://forum.djangoproject.com/" target="_blank">Official Django Forum</a></li> | ||
| <li><a href="https://chat.djangoproject.com" target="_blank">{% trans "Django Discord" %}</a></li> |
There was a problem hiding this comment.
While we're at it:
| <li><a href="https://chat.djangoproject.com" target="_blank">{% trans "Django Discord" %}</a></li> | |
| <li><a href="https://chat.djangoproject.com" target="_blank">{% trans "Django's Discord Server" %}</a></li> |
| <h3>{% trans "Get Help" %}</h3> | ||
| <ul> | ||
| <li><a href="{% url 'document-detail' lang='en' version='stable' url='faq' host 'docs' %}">Getting Help FAQ</a> | ||
| <li><a href="{% url 'document-detail' lang='en' version='stable' url='faq' host 'docs' %}">{% trans "Getting Help FAQ" %}</a> |
There was a problem hiding this comment.
| <li><a href="{% url 'document-detail' lang='en' version='stable' url='faq' host 'docs' %}">{% trans "Getting Help FAQ" %}</a> | |
| <li><a href="{% url 'document-detail' lang='en' version='stable' url='faq' host 'docs' %}">{% trans "Getting Help & FAQ" %}</a> |
Thank you for the review and the helpful suggestions! I appreciate the guidance and will start working on the improvements to better align with the existing structure and design. |
for more information, see https://pre-commit.ci
|
@codingjoe , Thank you for the helpful suggestions, Joe. I’ve addressed the requested changes and pushed the updates. Could you please take a look and let me know if anything still needs improvement? |
|
Hi @kehach07, Excellent! 🎉 You will need a review of a website working group member. Sadly, I can't mention them... I need to clarify this, but off-topic. I see most of my comments resolved except for the title filters. Things like Cheers! |
Hi Joe, Thanks for the clarification! Just to confirm, should the navigation labels be updated using lowercase strings with translation context and the title filter (e.g., Happy to update it accordingly. |
As far as I am aware, what I proposed is the shortest syntax available. So: {% translate "code"|title context "noun" %}It is valid syntax, even though it might look a little unfamiliar at first. It will create the following gettext message: #: djangoproject/templates/includes/header.html:30
msgctxt "noun"
msgid "code"
msgstr ""Now any person translating it will know what to do. Of course, you can add more context depending on the situation. |
Adds missing translation markers for header, menu, subfooter, footer and search form.
Updates the English message catalog to expose the strings to Transifex.
Refs #2500