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 @@
+
+
+
+