Skip to content

Commit

Permalink
SW-3938 link received errors to correct notification id (#1832)
Browse files Browse the repository at this point in the history
* link received errors to correct notification id
* Add hint to maintenance page
* bump iobeam version
  • Loading branch information
Josef-MrBeam authored Oct 24, 2023
1 parent 790457f commit 9d26b1d
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 37 deletions.
2 changes: 1 addition & 1 deletion octoprint_mrbeam/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
iobeam==1.3.0a1
iobeam==1.3.0
mrb-hw-info==1.0.0
mrbeam-ledstrips==1.0.0
mrbeamdoc==1.1.0
9 changes: 8 additions & 1 deletion octoprint_mrbeam/iobeam/iobeam_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,15 @@ def _handle_error_message(self, message):
MrBeamEvents.HARDWARE_MALFUNCTION,
dict(data=message),
)
if (
message.get("id")
and message.get("id") in HwMalfunctionHandler.KNOWN_MALFUNCTIONS
):
notification_id = message.get("id")
else:
notification_id = HwMalfunctionHandler.HARDWARE_MALFUNCTION_NON_I2C
notification = self._user_notification_system.get_notification(
notification_id=HwMalfunctionHandler.HARDWARE_MALFUNCTION_NON_I2C,
notification_id=notification_id,
err_code=malfunction.error_code,
replay=True,
)
Expand Down
21 changes: 11 additions & 10 deletions octoprint_mrbeam/templates/settings/maintenance_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div data-tooltip-image="/plugin/mrbeam/static/img/air_filter/af3-prefilter.png">
<h4>{{ _('Air Filter: Pre-filter') }}</h4>
<small class="maintenance-description">
{{ _('The pre filter filters all coarse particles from the exhaust air. Regular changing improves the air flow and preserves the main filter.*') }}
{{ _('The pre filter filters all coarse particles from the exhaust air. Regular changing improves the air flow and preserves the main filter.**') }}
</small>
</div>
<div class="maintenance-links" data-bind="visible: shopifyLink('prefilter', 0)">
Expand All @@ -28,7 +28,7 @@
</div>
</td>
<td class="maintenance-counter-column">
<h3><span data-bind="text: prefilterPercent() + ' %', style: {color: prefilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span></h3>
<h3><span data-bind="text: prefilterPercent() + ' %', style: {color: prefilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span><span class="muted">*</span></h3>
</td>
<td class="maintenance-reset-column">

Expand All @@ -40,7 +40,7 @@
<div data-tooltip-image="/plugin/mrbeam/static/img/air_filter/af3-mainfilter.png">
<h4>{{ _('Air Filter: Main filter') }}</h4>
<small class="maintenance-description">
{{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.*') }}
{{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.**') }}
</small>
</div>
<div class="maintenance-links" data-bind="visible: shopifyLink('carbonfilter', 0)">
Expand All @@ -57,7 +57,7 @@
</div>
</td>
<td class="maintenance-counter-column">
<h3><span data-bind="text: carbonFilterPercent() + ' %', style: {color: carbonFilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span></h3>
<h3><span data-bind="text: carbonFilterPercent() + ' %', style: {color: carbonFilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span><span class="muted">*</span></h3>
</td>
<td class="maintenance-reset-column">
</td>
Expand Down Expand Up @@ -116,7 +116,7 @@
</div>
</td>
<td class="maintenance-counter-column">
<h3><span data-bind="text: prefilterPercent() + ' %', style: {color: prefilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span></h3>
<h3><span data-bind="text: prefilterPercent() + ' %', style: {color: prefilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span><span class="muted small">*</span></h3>
</td>
<td class="maintenance-reset-column">
<button class="btn maintenance-reset-btn" data-test="maintenance-reset-button-pre-filter" data-bind="click: resetPrefilterUsage">{{ _('Reset') }}</button>
Expand All @@ -127,7 +127,7 @@
<td class="maintenance-description-column">
<h4>{{ _('Air Filter: Main filter') }}</h4>
<small class="maintenance-description">
{{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.*') }}
{{ _('The main filter is a combined hepa and activated carbon filter. It filters both tiny particles and odours from the exhaust air.**') }}
</small>
<div class="maintenance-links" data-bind="visible: shopifyLink('carbonfilter', 0)">
<a data-bind="attr: {href: shopifyLink('carbonfilter', 0)}"
Expand All @@ -143,7 +143,7 @@
</div>
</td>
<td class="maintenance-counter-column">
<h3><span data-bind="text: carbonFilterPercent() + ' %', style: {color: carbonFilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span></h3>
<h3><span data-bind="text: carbonFilterPercent() + ' %', style: {color: carbonFilterShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span><span class="muted">*</span></h3>
</td>
<td class="maintenance-reset-column">
<button class="btn maintenance-reset-btn" data-test="maintenance-reset-button-carbon-filter" data-bind="click: resetCarbonFilterUsage">{{ _('Reset') }}</button>
Expand Down Expand Up @@ -176,7 +176,7 @@
</div>
</td>
<td class="maintenance-counter-column">
<h3><span data-bind="text: laserHeadPercent() + ' %', style: {color: laserHeadShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span></h3>
<h3><span data-bind="text: laserHeadPercent() + ' %', style: {color: laserHeadShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span><span class="muted">*</span></h3>
</td>
<td class="maintenance-reset-column">
<button class="btn maintenance-reset-btn" data-test="maintenance-reset-button-laser-head" data-bind="click: resetLaserHeadUsage">{{ _('Reset') }}</button>
Expand All @@ -203,14 +203,15 @@
</div>
</td>
<td class="maintenance-counter-column">
<h3><span data-bind="text: gantryPercent() + ' %', style: {color: gantryShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span></h3>
<h3><span data-bind="text: gantryPercent() + ' %', style: {color: gantryShowWarning()? '#e25303' : ''}"></span> <span>{{ _('used') }}</span><span class="muted">*</span></h3>
</td>
<td class="maintenance-reset-column">
<button class="btn maintenance-reset-btn" data-test="maintenance-reset-button-gantry" data-bind="click: resetGantryUsage">{{ _('Reset') }}</button>
</td>
</tr>
</table>
<small class="muted">{{ _('*Users without a Mr Beam Air Filter System can safely ignore and reset this counter.') }}</small>
<small class="muted">{{ _('* Please beware that these values only represent average values. Check your filters regularly to make sure they are not yet full.') }}</small><br>
<small class="muted">{{ _('** If you use the Mr Beam Single without the Air Filter System, you can ignore this counter and reset it at any time. Please clean the fan of the exhaust air hose regularly.') }}</small>
</div>

<div id="reset_counter_are_you_sure" class="modal hide fade">
Expand Down
Binary file modified octoprint_mrbeam/translations/de/LC_MESSAGES/messages.mo
Binary file not shown.
47 changes: 32 additions & 15 deletions octoprint_mrbeam/translations/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Mr_Beam 0.1.61\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-10-19 12:12+0200\n"
"PO-Revision-Date: 2023-10-19 12:13+0200\n"
"POT-Creation-Date: 2023-10-24 13:37+0200\n"
"PO-Revision-Date: 2023-10-24 13:38+0200\n"
"Last-Translator: Andy Werner <[email protected]>\n"
"Language-Team: \n"
"Language: de\n"
Expand Down Expand Up @@ -123,7 +123,7 @@ msgid "...and more!"
msgstr "...und mehr!"

# don’t change the link
#: octoprint_mrbeam/iobeam/airfilter.py:652
#: octoprint_mrbeam/iobeam/airfilter.py:654
msgid "https://www.mr-beam.org/en/"
msgstr "https://www.mr-beam.org/"

Expand Down Expand Up @@ -390,7 +390,7 @@ msgid "Do you still want to cancel?"
msgstr "Willst du immer noch abbrechen?"

#: octoprint_mrbeam/static/js/app/view-models/mother.js:64
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:225
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:226
msgid "No"
msgstr "Nein"

Expand All @@ -400,7 +400,7 @@ msgstr "Nein"
#: octoprint_mrbeam/templates/calibration/watterott/tab_camera_alignment.jinja2:42
#: octoprint_mrbeam/templates/calibration/watterott/tab_corner_calibration.jinja2:71
#: octoprint_mrbeam/templates/calibration/watterott/tab_lens_calibration.jinja2:110
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:226
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:227
msgid "Yes"
msgstr "Ja"

Expand Down Expand Up @@ -5969,10 +5969,10 @@ msgstr "Air Filter: Vorfilter"
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:14
msgid ""
"The pre filter filters all coarse particles from the exhaust air. Regular "
"changing improves the air flow and preserves the main filter.*"
"changing improves the air flow and preserves the main filter.**"
msgstr ""
"Der Vorfilter filtert alle groben Partikel aus der Abluft. Ein regelmäßiger "
"Wechsel verbessert den Luftdurchsatz und schont den Hauptfilter. *"
"Wechsel verbessert den Luftdurchsatz und schont den Hauptfilter. **"

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:21
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:50
Expand Down Expand Up @@ -6001,10 +6001,10 @@ msgstr "Air Filter: Hauptfilter"
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:130
msgid ""
"The main filter is a combined hepa and activated carbon filter. It filters "
"both tiny particles and odours from the exhaust air.*"
"both tiny particles and odours from the exhaust air.**"
msgstr ""
"Der Hauptfilter ist ein kombinierter Hepa- und Aktivkohlefilter. Er filtert "
"sowohl winzig kleine Partikel, als auch die Gerüche aus der Abluft. *"
"sowohl winzig kleine Partikel, als auch die Gerüche aus der Abluft. **"

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:70
msgid ""
Expand Down Expand Up @@ -6082,13 +6082,23 @@ msgstr "Pflege der mechanischen Teile"

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:213
msgid ""
"*Users without a Mr Beam Air Filter System can safely ignore and reset this "
"counter."
"* Please beware that these values only represent average values. Check your "
"filters regularly to make sure they are not yet full."
msgstr ""
"* Bitte beachte, dass diese Werte nur Durchschnittswerte darstellen. Prüfe "
"deine Filter regelmäßig, um sicherzustellen, dass sie noch nicht voll sind."

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:214
msgid ""
"** If you use the Mr Beam Single without the Air Filter System, you can "
"ignore this counter and reset it at any time. Please clean the fan of the "
"exhaust air hose regularly."
msgstr ""
"* Benutzer ohne Mr. Beam Air Filter System können diesen Zähler ignorieren "
"und zurücksetzen."
"** Wenn du den Mr Beam Single ohne das Air Filter System verwendest, kannst "
"du diesen Zähler ignorieren und jederzeit zurücksetzen. Bitte reinige den "
"Lüfter des Abluftschlauchs regelmäßig."

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:221
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:222
#, python-format
msgid ""
"The hour counter for the following component will now be reset: "
Expand All @@ -6097,7 +6107,7 @@ msgstr ""
"Der Stundenzähler für folgende Komponente wird zurückgesetzt: "
"%(component_to_reset)s."

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:222
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:223
msgid "Please notice that there is no way to undo this operation"
msgstr "Dies kann nicht rückgängig gemacht werden"

Expand Down Expand Up @@ -6672,6 +6682,13 @@ msgstr ""
msgid "We hope you enjoy this new experience!"
msgstr "Wir hoffen, dass Du viel Freude mit diesem Update hast!"

#~ msgid ""
#~ "*Users without a Mr Beam Air Filter System can safely ignore and reset "
#~ "this counter."
#~ msgstr ""
#~ "* Benutzer ohne Mr. Beam Air Filter System können diesen Zähler "
#~ "ignorieren und zurücksetzen."

#, python-format
#~ msgid "/%(lifespan)s hrs"
#~ msgstr "/%(lifespan)s h"
Expand Down
27 changes: 17 additions & 10 deletions translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-10-19 12:12+0200\n"
"POT-Creation-Date: 2023-10-24 13:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -120,7 +120,7 @@ msgstr ""
msgid "...and more!"
msgstr ""

#: octoprint_mrbeam/iobeam/airfilter.py:652
#: octoprint_mrbeam/iobeam/airfilter.py:654
msgid "https://www.mr-beam.org/en/"
msgstr ""

Expand Down Expand Up @@ -344,7 +344,7 @@ msgid "Do you still want to cancel?"
msgstr ""

#: octoprint_mrbeam/static/js/app/view-models/mother.js:64
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:225
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:226
msgid "No"
msgstr ""

Expand All @@ -354,7 +354,7 @@ msgstr ""
#: octoprint_mrbeam/templates/calibration/watterott/tab_camera_alignment.jinja2:42
#: octoprint_mrbeam/templates/calibration/watterott/tab_corner_calibration.jinja2:71
#: octoprint_mrbeam/templates/calibration/watterott/tab_lens_calibration.jinja2:110
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:226
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:227
msgid "Yes"
msgstr ""

Expand Down Expand Up @@ -5074,7 +5074,7 @@ msgstr ""
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:14
msgid ""
"The pre filter filters all coarse particles from the exhaust air. Regular"
" changing improves the air flow and preserves the main filter.*"
" changing improves the air flow and preserves the main filter.**"
msgstr ""

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:21
Expand Down Expand Up @@ -5104,7 +5104,7 @@ msgstr ""
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:130
msgid ""
"The main filter is a combined hepa and activated carbon filter. It "
"filters both tiny particles and odours from the exhaust air.*"
"filters both tiny particles and odours from the exhaust air.**"
msgstr ""

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:70
Expand Down Expand Up @@ -5169,18 +5169,25 @@ msgstr ""

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:213
msgid ""
"*Users without a Mr Beam Air Filter System can safely ignore and reset "
"this counter."
"* Please beware that these values only represent average values. Check "
"your filters regularly to make sure they are not yet full."
msgstr ""

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:221
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:214
msgid ""
"** If you use the Mr Beam Single without the Air Filter System, you can "
"ignore this counter and reset it at any time. Please clean the fan of the"
" exhaust air hose regularly."
msgstr ""

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:222
#, python-format
msgid ""
"The hour counter for the following component will now be reset: "
"%(component_to_reset)s."
msgstr ""

#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:222
#: octoprint_mrbeam/templates/settings/maintenance_settings.jinja2:223
msgid "Please notice that there is no way to undo this operation"
msgstr ""

Expand Down

0 comments on commit 9d26b1d

Please sign in to comment.