From 0a2f2a347d672868a620943d79973410f9d9c921 Mon Sep 17 00:00:00 2001 From: Adam Taylor Date: Wed, 22 May 2024 16:54:49 -0600 Subject: [PATCH] When identifying a macOS or Windows platform, do not include the version --- user_sessions/templatetags/user_sessions.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/user_sessions/templatetags/user_sessions.py b/user_sessions/templatetags/user_sessions.py index ead560e..5011f3b 100644 --- a/user_sessions/templatetags/user_sessions.py +++ b/user_sessions/templatetags/user_sessions.py @@ -21,20 +21,8 @@ (re.compile('Linux'), _('Linux')), (re.compile('iPhone'), _('iPhone')), (re.compile('iPad'), _('iPad')), - (re.compile('Mac OS X 10[._]9'), _('OS X Mavericks')), - (re.compile('Mac OS X 10[._]10'), _('OS X Yosemite')), - (re.compile('Mac OS X 10[._]11'), _('OS X El Capitan')), - (re.compile('Mac OS X 10[._]12'), _('macOS Sierra')), - (re.compile('Mac OS X 10[._]13'), _('macOS High Sierra')), - (re.compile('Mac OS X 10[._]14'), _('macOS Mojave')), - (re.compile('Mac OS X 10[._]15'), _('macOS Catalina')), (re.compile('Mac OS X'), _('macOS')), - (re.compile('NT 5.1'), _('Windows XP')), - (re.compile('NT 6.0'), _('Windows Vista')), - (re.compile('NT 6.1'), _('Windows 7')), - (re.compile('NT 6.2'), _('Windows 8')), - (re.compile('NT 6.3'), _('Windows 8.1')), - (re.compile('NT 10.0'), _('Windows 10')), + (re.compile(r'NT \d+\.\d'), _('Windows')), (re.compile('Windows'), _('Windows')), )