From 7a67b19f1f8b0fe698bdb4ad3c5d81c74553dbad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Fri, 30 Jul 2021 00:05:48 +0200 Subject: [PATCH] s/Mac OS X/macOS/ The database on python.org is already updated. --- docs/source/administration.rst | 2 +- downloads/models.py | 2 +- downloads/tests/base.py | 2 +- downloads/tests/test_models.py | 2 +- fixtures/boxes.json | 6 +++--- fixtures/sitetree_menus.json | 4 ++-- pydotorg/urls.py | 2 +- static/js/script.js | 2 +- static/sass/_layout.scss | 2 +- static/sass/mq.css | 2 +- static/sass/no-mq.css | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/source/administration.rst b/docs/source/administration.rst index 6a7ee08bf..aa4f33718 100644 --- a/docs/source/administration.rst +++ b/docs/source/administration.rst @@ -22,7 +22,7 @@ Here is an example of what that looks like on the site. .. image:: _images/supernav-example.png :alt: Example Supernav image -The sub-nav items on the left are simply nested :ref:`navigation` links in SiteTree relative to the 'Download' item in the tree. The larger *Download for Mac OSX* box however is what we refer to as the *supernav*. +The sub-nav items on the left are simply nested :ref:`navigation` links in SiteTree relative to the 'Download' item in the tree. The larger *Download for macOS* box however is what we refer to as the *supernav*. Most supernavs are updated automatically based on the underlying Django application content using signals. By convention the application will have a template named ``supernav.html``. For example, upon saving any published :ref:`Release ` a Django signal is fired to update the ``supernav-python-downloads`` box with the most current Python2 and Python3 releases. In this case the markup is structured in a way to allow for the automatic OS detection Javascript to show the user the appropriate download links for the OS they are browsing with. diff --git a/downloads/models.py b/downloads/models.py index be6144e78..748ed3218 100644 --- a/downloads/models.py +++ b/downloads/models.py @@ -252,7 +252,7 @@ def purge_fastly_download_pages(sender, instance, **kwargs): purge_url('/downloads/') purge_url('/downloads/latest/python2/') purge_url('/downloads/latest/python3/') - purge_url('/downloads/mac-osx/') + purge_url('/downloads/macos/') purge_url('/downloads/source/') purge_url('/downloads/windows/') if instance.get_version() is not None: diff --git a/downloads/tests/base.py b/downloads/tests/base.py index d32c92751..e19ffe03a 100644 --- a/downloads/tests/base.py +++ b/downloads/tests/base.py @@ -13,7 +13,7 @@ class DownloadMixin: def setUpClass(cls): super().setUpClass() cls.windows, _ = OS.objects.get_or_create(name='Windows') - cls.osx, _ = OS.objects.get_or_create(name='Mac OSX') + cls.osx, _ = OS.objects.get_or_create(name='macOS') cls.linux, _ = OS.objects.get_or_create(name='Linux') diff --git a/downloads/tests/test_models.py b/downloads/tests/test_models.py index d9185b79f..c2d93d68b 100644 --- a/downloads/tests/test_models.py +++ b/downloads/tests/test_models.py @@ -5,7 +5,7 @@ class DownloadModelTests(BaseDownloadTests): def test_stringification(self): - self.assertEqual(str(self.osx), 'Mac OSX') + self.assertEqual(str(self.osx), 'macOS') self.assertEqual(str(self.release_275), 'Python 2.7.5') def test_published(self): diff --git a/fixtures/boxes.json b/fixtures/boxes.json index 28bf8cc1a..1ce25bede 100644 --- a/fixtures/boxes.json +++ b/fixtures/boxes.json @@ -332,14 +332,14 @@ { "fields": { "label": "download-banner", - "content": "

Looking for Python with a different OS? Python for Windows, Linux/UNIX, Mac OS X, Other

\r\n

Want to help test development versions of Python? Pre-releases

\r\n

Looking for Python 2.7? See below for specific releases

", + "content": "

Looking for Python with a different OS? Python for Windows, Linux/UNIX, macOS, Other

\r\n

Want to help test development versions of Python? Pre-releases

\r\n

Looking for Python 2.7? See below for specific releases

", "content_markup_type": "html" } }, { "fields": { "label": "download-dev", - "content": "

Information about specific ports, and developer info

\r\n\r\n", + "content": "

Information about specific ports, and developer info

\r\n\r\n", "content_markup_type": "html" } }, @@ -374,7 +374,7 @@ { "fields": { "label": "supernav-python-downloads", - "content": "\n
  • \n \n
    \n \n

    Download for Mac OS X

    \n \n

    \n Python 3.5.2\n Python 2.7.12\n

    \n \n

    Not the OS you are looking for? Python can be used on many operating systems and environments. View the full list of downloads.

    \n
    \n \n
    \n \n

    Python Source

    \n \n

    \n Python 3.5.2\n Python 2.7.12\n

    \n \n

    Not the OS you are looking for? Python can be used on many operating systems and environments. View the full list of downloads.

    \n
    \n \n
    \n \n

    Download for Windows

    \n \n

    \n Python 3.5.2\n Python 2.7.12\n

    \n

    Note that Python 3.5+ cannot be used on Windows XP or earlier.

    \n

    Not the OS you are looking for? Python can be used on many operating systems and environments. View the full list of downloads.

    \n
    \n \n
    \n

    Download Python for Any OS

    \n

    Python can be used on many operating systems and environments.

    \n

    \n View the full list of downloads\n

    \n
    \n
  • \n", + "content": "\n
  • \n \n
    \n \n

    Download for macOS

    \n \n

    \n Python 3.5.2\n Python 2.7.12\n

    \n \n

    Not the OS you are looking for? Python can be used on many operating systems and environments. View the full list of downloads.

    \n
    \n \n
    \n \n

    Python Source

    \n \n

    \n Python 3.5.2\n Python 2.7.12\n

    \n \n

    Not the OS you are looking for? Python can be used on many operating systems and environments. View the full list of downloads.

    \n
    \n \n
    \n \n

    Download for Windows

    \n \n

    \n Python 3.5.2\n Python 2.7.12\n

    \n

    Note that Python 3.5+ cannot be used on Windows XP or earlier.

    \n

    Not the OS you are looking for? Python can be used on many operating systems and environments. View the full list of downloads.

    \n
    \n \n
    \n

    Download Python for Any OS

    \n

    Python can be used on many operating systems and environments.

    \n

    \n View the full list of downloads\n

    \n
    \n
  • \n", "content_markup_type": "html" } }, diff --git a/fixtures/sitetree_menus.json b/fixtures/sitetree_menus.json index 837996855..c01933cdd 100644 --- a/fixtures/sitetree_menus.json +++ b/fixtures/sitetree_menus.json @@ -419,9 +419,9 @@ "model": "sitetree.treeitem", "pk": 20, "fields": { - "title": "Mac OS X", + "title": "macOS", "hint": "", - "url": "/downloads/mac-osx/", + "url": "/downloads/macos/", "urlaspattern": false, "tree": 1, "hidden": false, diff --git a/pydotorg/urls.py b/pydotorg/urls.py index 77193eb6b..dd1dee391 100644 --- a/pydotorg/urls.py +++ b/pydotorg/urls.py @@ -27,7 +27,7 @@ # Redirect old download links to new downloads pages url(r'^download/$', RedirectView.as_view(url='https://www.python.org/downloads/', permanent=True)), url(r'^download/source/$', RedirectView.as_view(url='https://www.python.org/downloads/source/', permanent=True)), - url(r'^download/mac/$', RedirectView.as_view(url='https://www.python.org/downloads/mac-osx/', permanent=True)), + url(r'^download/mac/$', RedirectView.as_view(url='https://www.python.org/downloads/macos/', permanent=True)), url(r'^download/windows/$', RedirectView.as_view(url='https://www.python.org/downloads/windows/', permanent=True)), # duplicated downloads to getit to bypass China's firewall. See diff --git a/static/js/script.js b/static/js/script.js index 48d1a1852..a50b5be71 100644 --- a/static/js/script.js +++ b/static/js/script.js @@ -89,7 +89,7 @@ function on_resize_orientationchange() { } if (navigator.appVersion.indexOf("Mac")!=-1) { $('.download-unknown').hide(); - $('.download-os-mac-osx').show(); + $('.download-os-macos').show(); } if (navigator.appVersion.indexOf("X11")!=-1) { $('.download-unknown').hide(); diff --git a/static/sass/_layout.scss b/static/sass/_layout.scss index 7e7bf5fab..884a0e9bc 100644 --- a/static/sass/_layout.scss +++ b/static/sass/_layout.scss @@ -937,7 +937,7 @@