Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated robots.docs.txt for Django 5.0. #1445

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions djangoproject/static/robots.docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,52 @@
User-agent: *
Disallow: /el/5.0/faq
Disallow: /el/5.0/howto
Disallow: /el/5.0/internals
Disallow: /el/5.0/intro
Disallow: /el/5.0/ref
Disallow: /el/5.0/releases
Disallow: /el/5.0/topics
Disallow: /es/5.0/howto
Disallow: /es/5.0/internals
Disallow: /es/5.0/intro
Disallow: /es/5.0/misc
Disallow: /es/5.0/ref
Disallow: /es/5.0/releases
Disallow: /es/5.0/topics
Disallow: /fr/5.0/releases
Disallow: /id/5.0/internals
Disallow: /id/5.0/ref
Disallow: /id/5.0/releases
Disallow: /id/5.0/topics
Disallow: /it/5.0/internals
Disallow: /it/5.0/ref
Disallow: /it/5.0/releases
Disallow: /it/5.0/topics
Disallow: /ja/5.0/howto
Disallow: /ja/5.0/internals
Disallow: /ja/5.0/misc
Disallow: /ja/5.0/ref
Disallow: /ja/5.0/releases
Disallow: /ja/5.0/topics
Disallow: /ko/5.0/internals
Disallow: /ko/5.0/ref
Disallow: /ko/5.0/releases
Disallow: /ko/5.0/topics
Disallow: /pl/5.0/howto
Disallow: /pl/5.0/internals
Disallow: /pl/5.0/ref
Disallow: /pl/5.0/releases
Disallow: /pl/5.0/topics
Disallow: /pt-br/5.0/howto
Disallow: /pt-br/5.0/internals
Disallow: /pt-br/5.0/intro
Disallow: /pt-br/5.0/ref
Disallow: /pt-br/5.0/releases
Disallow: /pt-br/5.0/topics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting a different list when running $ python manage_translations.py robots_txt 🤔

User-agent: *
Disallow: /el/5.0/faq
Disallow: /el/5.0/howto
Disallow: /el/5.0/internals
Disallow: /el/5.0/intro
Disallow: /el/5.0/ref
Disallow: /el/5.0/releases
Disallow: /el/5.0/topics
Disallow: /es/5.0/howto
Disallow: /es/5.0/internals
Disallow: /es/5.0/intro
Disallow: /es/5.0/misc
Disallow: /es/5.0/ref
Disallow: /es/5.0/releases
Disallow: /es/5.0/topics
Disallow: /fr/5.0/releases
Disallow: /id/5.0/internals
Disallow: /id/5.0/ref
Disallow: /id/5.0/releases
Disallow: /id/5.0/topics
Disallow: /it/5.0/internals
Disallow: /it/5.0/ref
Disallow: /it/5.0/releases
Disallow: /it/5.0/topics
Disallow: /ja/5.0/howto
Disallow: /ja/5.0/internals
Disallow: /ja/5.0/misc
Disallow: /ja/5.0/ref
Disallow: /ja/5.0/releases
Disallow: /ja/5.0/topics
Disallow: /ko/5.0/internals
Disallow: /ko/5.0/ref
Disallow: /ko/5.0/releases
Disallow: /ko/5.0/topics
Disallow: /pl/5.0/howto
Disallow: /pl/5.0/internals
Disallow: /pl/5.0/ref
Disallow: /pl/5.0/releases
Disallow: /pl/5.0/topics
Disallow: /pt-br/5.0/howto
Disallow: /pt-br/5.0/internals
Disallow: /pt-br/5.0/intro
Disallow: /pt-br/5.0/ref
Disallow: /pt-br/5.0/releases
Disallow: /pt-br/5.0/topics
Disallow: /zh-hans/5.0/internals
Disallow: /zh-hans/5.0/ref
Disallow: /zh-hans/5.0/releases
Disallow: /zh-hans/5.0/topics

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird... I do need to run the command in the stable/5.0.x branch, right? See my output:

[~/fellowship/django-docs-translations stable/5.0.x|✔ ]$ git pull
Enter passphrase for key '***': 
Already up to date.
[~/fellowship/django-docs-translations stable/5.0.x|✔ ]$ python manage_translations.py robots_txt
User-agent: *
Disallow: /el/5.0/faq
Disallow: /el/5.0/howto
Disallow: /el/5.0/internals
Disallow: /el/5.0/intro
Disallow: /el/5.0/ref
Disallow: /el/5.0/releases
Disallow: /el/5.0/topics
Disallow: /es/5.0/howto
Disallow: /es/5.0/internals
Disallow: /es/5.0/intro
Disallow: /es/5.0/misc
Disallow: /es/5.0/ref
Disallow: /es/5.0/releases
Disallow: /es/5.0/topics
Disallow: /fr/5.0/releases
Disallow: /id/5.0/internals
Disallow: /id/5.0/ref
Disallow: /id/5.0/releases
Disallow: /id/5.0/topics
Disallow: /it/5.0/internals
Disallow: /it/5.0/ref
Disallow: /it/5.0/releases
Disallow: /it/5.0/topics
Disallow: /ja/5.0/howto
Disallow: /ja/5.0/internals
Disallow: /ja/5.0/misc
Disallow: /ja/5.0/ref
Disallow: /ja/5.0/releases
Disallow: /ja/5.0/topics
Disallow: /ko/5.0/internals
Disallow: /ko/5.0/ref
Disallow: /ko/5.0/releases
Disallow: /ko/5.0/topics
Disallow: /pl/5.0/howto
Disallow: /pl/5.0/internals
Disallow: /pl/5.0/ref
Disallow: /pl/5.0/releases
Disallow: /pl/5.0/topics
Disallow: /pt-br/5.0/howto
Disallow: /pt-br/5.0/internals
Disallow: /pt-br/5.0/intro
Disallow: /pt-br/5.0/ref
Disallow: /pt-br/5.0/releases
Disallow: /pt-br/5.0/topics

Do I need to create a specific virtualenv? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why you don't get zh-hans 🤔 These resources are translated in less than 90%

  • /zh-hans/5.0/internals - 44%
  • /zh-hans/5.0/ref - 81%
  • /zh-hans/5.0/releases - 26%
  • /zh-hans/5.0/topics - 84%

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll debug a bit and report back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixxm I added debug statements and noticed that zh-hans reports 100% translated for all resources (which is clearly incorrect). I'm using msgfmt (GNU gettext-tools) 0.22.3, I'll debug some more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm out of ideas. I've been googling about this issue with no positive matches. Most posts on stackoverflow agree that msgfmt --statistics should return the amount of translated and untranslated strings. When I run that in both stable/4.2.x and stable/5.0.x, I get the same (no untranslated strings):

$ msgfmt --statistics -cv -o /dev/null translations/zh_Hans/LC_MESSAGES/releases.po
translations/zh_Hans/LC_MESSAGES/releases.po: 7454 translated messages.

What msgfmt version are you running?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What msgfmt version are you running?

0.21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running with an older msgfmt, I get the same list as you:

~/fellowship/django-docs-translations$ python3.11 manage_translations.py robots_txt
User-agent: *
Disallow: /el/5.0/faq
Disallow: /el/5.0/howto
Disallow: /el/5.0/internals
Disallow: /el/5.0/intro
Disallow: /el/5.0/ref
Disallow: /el/5.0/releases
Disallow: /el/5.0/topics
Disallow: /es/5.0/howto
Disallow: /es/5.0/internals
Disallow: /es/5.0/intro
Disallow: /es/5.0/misc
Disallow: /es/5.0/ref
Disallow: /es/5.0/releases
Disallow: /es/5.0/topics
Disallow: /fr/5.0/releases
Disallow: /id/5.0/internals
Disallow: /id/5.0/ref
Disallow: /id/5.0/releases
Disallow: /id/5.0/topics
Disallow: /it/5.0/internals
Disallow: /it/5.0/ref
Disallow: /it/5.0/releases
Disallow: /it/5.0/topics
Disallow: /ja/5.0/howto
Disallow: /ja/5.0/internals
Disallow: /ja/5.0/misc
Disallow: /ja/5.0/ref
Disallow: /ja/5.0/releases
Disallow: /ja/5.0/topics
Disallow: /ko/5.0/internals
Disallow: /ko/5.0/ref
Disallow: /ko/5.0/releases
Disallow: /ko/5.0/topics
Disallow: /pl/5.0/howto
Disallow: /pl/5.0/internals
Disallow: /pl/5.0/ref
Disallow: /pl/5.0/releases
Disallow: /pl/5.0/topics
Disallow: /pt-br/5.0/howto
Disallow: /pt-br/5.0/internals
Disallow: /pt-br/5.0/intro
Disallow: /pt-br/5.0/ref
Disallow: /pt-br/5.0/releases
Disallow: /pt-br/5.0/topics
Disallow: /zh-hans/5.0/internals
Disallow: /zh-hans/5.0/ref
Disallow: /zh-hans/5.0/releases
Disallow: /zh-hans/5.0/topics

~/fellowship/django-docs-translations$ msgfmt -V
msgfmt (GNU gettext-tools) 0.19.8.1
Copyright (C) 1995-1998, 2000-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.

I'll update the patch and see if I can file a question or issue in the upstream project.

Disallow: /zh-hans/5.0/internals
Disallow: /zh-hans/5.0/ref
Disallow: /zh-hans/5.0/releases
Disallow: /zh-hans/5.0/topics
Disallow: /el/4.2/faq
Disallow: /el/4.2/howto
Disallow: /el/4.2/internals
Expand Down
Loading