django / djangoproject.com

Source code to djangoproject.com
https://www.djangoproject.com/
BSD 3-Clause "New" or "Revised" License
1.88k stars 947 forks source link

Proposal to add translation support for non-docs pages of djangoproject.com #1648

Open jacklinke opened 1 week ago

jacklinke commented 1 week ago

Proposal to add translation support for non-docs pages

While Django’s documentation is translated into several languages, the main entry-point to the framework — the djangoproject.com website itself — remains mostly untranslated. Ensuring djangoproject.com is accessible to non-English speakers is important for demonstrating Django’s inclusivity and supporting a broad user base.

This issue did not seem to be identified as a problem in the recent User research report (1496)

Discussion

It feels a bid odd to see that the docs are translated into a variety of languages, but the greater djangoproject.com site is only available to English speakers.

Django strongly promotes internationalization, with clear documentation on using trans and blocktrans tags, and even shows an example of using {% blocktrans %} and {% trans %} templatetags on the Start page, but the page itself is only available in English. (ref)

One issue that we will run into is the content of djangoproject.com is a mix of text in templates and text that comes from models. While the models-based text could be a problem for another day, there are concrete steps we could take today to work toward translation of the template-based text.

Questions

Proposed Work

See updated checklist in the comment below

Templates with at least some trans or blocktrans tags

Approximate percentage of tags present on each template in the repo compared to potential trans or blocktrans opportunities.

Template Completion
dashboard/templates/dashboard/index.html 100%
djangoproject/templates/members/corporate_members_join_thanks.html 100%
djangoproject/templates/members/corporatemember_form.html 100%
djangoproject/templates/members/individualmember_list.html 100%
djangoproject/templates/registration/password_reset_email.html 100%
docs/templates/docs/doc.html 100%
docs/templates/docs/genindex.html 100%
docs/templates/docs/py-modindex.html 100%
docs/templates/docs/search_results.html 100%
djangoproject/templates/includes/toggle_theme.html 75%
docs/templates/base_docs.html 75%
docs/templates/docs/search_form.html 50%
dashboard/templates/base_dashboard.html 33%
djangoproject/templates/members/corporatemember_list.html 22%

Templates with no trans or blocktrans tags

Note: Only those templates with text that can be translated but have no trans or blocktrans tags are included in the list below. All remaining templates whcih only load other templates or only load text content from models have been excluded.

jacklinke commented 1 week ago

Aha! I didn't see that there were previous attempts at this!

(The comment from that issue here really helped frame some of my thoughts, too. The flatpages are their own beast, and can be a future effort if desired.)

Even if we do not translate every piece of the site quickly, here is a lot of low-hanging fruit when it comes to at least getting the site to be more friendly to django folks who don't speak English or for whom it is not their first language. Djangoproject.com is the world's front door to Django! (or it should be)

To avoid the same fate as #1251, and based on the recommendations in that PR, I propose the following to move this idea forward. Each step would have a separate PR if needed. In this way, no single PR would be especially challenging or time-consuming to review and approve, and because none of them are truly dependent upon the others they can be accomplished in any order without causing degradation.

Further, while working through each of these, I would recommend pulling in the tagging/gettext work @marksweb has already done if the template/file hasn't changed in the meantime.


marksweb commented 1 week ago

@jacklinke yeah I think I basically did it all but in doing so it was overwhelming for anyone looking at it.

Last I looked there were plenty of conflicts in what I had done so not easy to pick up, but I'd suggest some discussion about what's going to need reviewing. That way there's some expectation from reviewers before they get to it.