From 671829a4f13b6ad22e82e5ac0a70ef1b3646644f Mon Sep 17 00:00:00 2001
From: Billy Richardson
Date: Fri, 22 Apr 2022 10:31:30 -0700
Subject: [PATCH 01/14] :pencil2: Fix minor spelling issue (#4492)
---
.../softwareupdate/templates/softwareupdate_settings.jinja2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
index b8d8df41e..960bf2604 100644
--- a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
+++ b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
@@ -37,7 +37,7 @@
There is not enough free disk space available to run an update.
- To reduce the likelihood of running into update problems due to insuffient disk space, OctoPrint requires
+ To reduce the likelihood of running into update problems due to insufficient disk space, OctoPrint requires
a minimum of {{ min_free_storage }} free disk space in various locations:
{% endtrans %}
From 64c21ba8f051051ae3824ddcdd3fe60d5a5f587e Mon Sep 17 00:00:00 2001
From: Billy Richardson
Date: Sun, 24 Apr 2022 09:21:13 -0700
Subject: [PATCH 02/14] :pencil2: Documentation spelling fixes (#4497)
---
docs/api/datamodel.rst | 2 +-
docs/configuration/config_yaml.rst | 2 +-
docs/development/virtual_printer.rst | 2 +-
docs/features/accesscontrol.rst | 2 +-
docs/plugins/hooks.rst | 2 +-
docs/plugins/python3_migration.rst | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst
index 24a10f904..595c91d0d 100644
--- a/docs/api/datamodel.rst
+++ b/docs/api/datamodel.rst
@@ -649,7 +649,7 @@ Permission record
* - ``dangerous``
- 1
- boolean
- - Whether the permission should be considered dangerous due to a high reponsibility (true) or not (false).
+ - Whether the permission should be considered dangerous due to a high responsibility (true) or not (false).
* - ``default_groups``
- 1
- List of string
diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst
index c4dd73a5d..7ab77b0e2 100644
--- a/docs/configuration/config_yaml.rst
+++ b/docs/configuration/config_yaml.rst
@@ -452,7 +452,7 @@ Use the following settings to enable or disable OctoPrint features:
# whether G90/G91 also influence absolute/relative mode of extruders
g90InfluencesExtruder: false
- # Replace all special characters and spaces with text equivalent to make them univerally compatible.
+ # Replace all special characters and spaces with text equivalent to make them universally compatible.
# Most OS filesystems work fine with unicode characters, but just in case you can revert to the
# older behaviour by setting this to true.
enforceReallyUniversalFilenames: false
diff --git a/docs/development/virtual_printer.rst b/docs/development/virtual_printer.rst
index 5e7a31e4d..f0d96138f 100644
--- a/docs/development/virtual_printer.rst
+++ b/docs/development/virtual_printer.rst
@@ -216,7 +216,7 @@ There many configuration options via ``config.yaml`` for the virtual printer tha
# Enable virtual EEPROM
# If enabled, a file `eeprom.json` will be created in the plugin data folder
- # to enable settings persistence across connections. Enables M500/1/2/4 commmands
+ # to enable settings persistence across connections. Enables M500/1/2/4 commands
# And a selection of other settings commands. Responses modeled on Marlin 2.0
enable_eeprom: true
diff --git a/docs/features/accesscontrol.rst b/docs/features/accesscontrol.rst
index 1c3ee2583..218e3bb9c 100644
--- a/docs/features/accesscontrol.rst
+++ b/docs/features/accesscontrol.rst
@@ -133,7 +133,7 @@ Example: Your PC has an IP address of ``192.168.23.42`` and a subnet mask of
The easy way: Using the OctoPrint-AutoLoginConfig plugin
........................................................
-The easist way to configure AutoLogin is to install the
+The easiest way to configure AutoLogin is to install the
`OctoPrint-AutoLoginConfig plugin `_
via the plugin manager.
diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst
index f19a0fefe..43a4f562f 100644
--- a/docs/plugins/hooks.rst
+++ b/docs/plugins/hooks.rst
@@ -1939,7 +1939,7 @@ octoprint.timelapse.capture.post
Perform specific actions after capturing a timelapse frame.
``filename`` will be the path of the frame that should have been saved.
- ``sucesss`` indicates whether the capture was successful or not.
+ ``success`` indicates whether the capture was successful or not.
:param str filename: The path of the frame that should have been saved.
:param boolean success: Indicates whether the capture was successful or not.
diff --git a/docs/plugins/python3_migration.rst b/docs/plugins/python3_migration.rst
index 170e039e7..cbf9ccaf4 100644
--- a/docs/plugins/python3_migration.rst
+++ b/docs/plugins/python3_migration.rst
@@ -336,7 +336,7 @@ As a summary, follow this checklist to migrate your plugin to be compatible to b
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
- * Thorougly test your plugin under Python 3. Pay special attention to any kind of string handling issues, integer
+ * Thoroughly test your plugin under Python 3. Pay special attention to any kind of string handling issues, integer
division, relative imports from your plugin package and how the results of ``map``, ``filter`` and ``zip`` are
used in your code, as those have proven to be the biggest issues during past migrations.
* Once everything works under both Python versions and you've prepared a new release of your plugin (don't forget to
From 1a5de41a0ff2f1c5b6488ee9f7f4a6ef5a767dd3 Mon Sep 17 00:00:00 2001
From: Billy Richardson
Date: Mon, 2 May 2022 08:40:13 -0700
Subject: [PATCH 03/14] =?UTF-8?q?=F0=9F=90=9B=20Remove=20use=20of=20HTML?=
=?UTF-8?q?=20entity=20degree=20symbol=20in=20temperature=20title=20attrib?=
=?UTF-8?q?ute=20(#4490)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Use unicode degree symbol in title attribute
---
AUTHORS.md | 1 +
src/octoprint/static/js/app/helpers.js | 18 ++-
.../templates/tabs/temperature.jinja2 | 2 +-
tests/static/js/test-helpers.html | 13 +++
tests/static/js/test-helpers.js | 104 ++++++++++++++++++
5 files changed, 134 insertions(+), 4 deletions(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index 487a3838e..f09ba9bb7 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -165,6 +165,7 @@ date of first contribution):
* [Johan Verrept](https://github.com/JoveToo)
* [Nicu Surdu](https://github.com/surdu)
* [Zack Lewis](https://github.com/lima3w)
+ * [Billy Richardson](https://github.com/richardsondev)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
diff --git a/src/octoprint/static/js/app/helpers.js b/src/octoprint/static/js/app/helpers.js
index fcea464ef..fd0faecba 100644
--- a/src/octoprint/static/js/app/helpers.js
+++ b/src/octoprint/static/js/app/helpers.js
@@ -652,13 +652,25 @@ function cleanTemperature(temp, offThreshold) {
return temp;
}
-function formatTemperature(temp, showF, offThreshold) {
+function formatTemperature(temp, showF, offThreshold, returnUnicode) {
if (temp === undefined || !_.isNumber(temp)) return "-";
if (offThreshold !== undefined && temp < offThreshold) return gettext("off");
+
+ var degreeSymbol = "°";
+ if (returnUnicode !== undefined && returnUnicode) {
+ degreeSymbol = "\u00B0";
+ }
+
if (showF) {
- return _.sprintf("%.1f°C (%.1f°F)", temp, (temp * 9) / 5 + 32);
+ return _.sprintf(
+ "%.1f%sC (%.1f%sF)",
+ temp,
+ degreeSymbol,
+ (temp * 9) / 5 + 32,
+ degreeSymbol
+ );
} else {
- return _.sprintf("%.1f°C", temp);
+ return _.sprintf("%.1f%sC", temp, degreeSymbol);
}
}
diff --git a/src/octoprint/templates/tabs/temperature.jinja2 b/src/octoprint/templates/tabs/temperature.jinja2
index 57c21fb87..438ae097a 100644
--- a/src/octoprint/templates/tabs/temperature.jinja2
+++ b/src/octoprint/templates/tabs/temperature.jinja2
@@ -49,7 +49,7 @@
+
+
+
+