Skip to content

Commit

Permalink
Merge pull request #87 from 5axes/main
Browse files Browse the repository at this point in the history
Small modifications on _removeAutoTower
  • Loading branch information
kartchnb authored Aug 27, 2023
2 parents efe6548 + b689392 commit 5d6292f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
7 changes: 3 additions & 4 deletions AutoTowersGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def _generateAutoTower(self, controllerClass):

def _removeAutoTower(self, message = None)->None:
''' Removes the generated Auto Tower and post-processing callbacks '''

# Stop listening for callbacks
self._towerControllerPostProcessingCallback = None
Application.getInstance().getOutputDeviceManager().writeStarted.disconnect(self._postProcessCallback)
Expand Down Expand Up @@ -354,7 +354,7 @@ def _removeAutoTower(self, message = None)->None:
# Clean up after the AutoTower
if not self._currentTowerController is None:
restoredSettings = self._currentTowerController.cleanup()
if len(restoredSettings) > 0:
if len(restoredSettings) > 0 or not message is None :
restoredMessage = message + '\n' if not message is None else ''
restoredMessage += catalog.i18nc("@msg", "The following settings were restored :\n")
restoredMessage += '\n'.join([f'{catalog.i18nc("@msg", "Restored")} {entry[0]} {catalog.i18nc("@msg", "to")} {entry[1]}' for entry in restoredSettings])
Expand Down Expand Up @@ -495,8 +495,7 @@ def _importStl(self, controller, towerName, stlFilePath, postProcessingCallback)

def _onMachineChanged(self)->None:
''' Listen for machine changes made after an Auto Tower is generated
In this case, the Auto Tower needs to be removed and regenerated '''

In this case, the Auto Tower needs to be removed and regenerated '''
self._removeAutoTower(catalog.i18nc("@msg", "The Auto Tower was removed because the active machine was changed"))


Expand Down
8 changes: 4 additions & 4 deletions Resources/i18n/autotowers.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: AutoTowersGenerator\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-25 03:58+0000\n"
"POT-Creation-Date: 2023-08-25 07:55+0000\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 @@ -42,17 +42,17 @@ msgctxt "@msg"
msgid "The following setting changes are recommended :\n"
msgstr ""

#: AutoTowersGenerator.py:500
#: AutoTowersGenerator.py:499
msgctxt "@msg"
msgid "The Auto Tower was removed because the active machine was changed"
msgstr ""

#: AutoTowersGenerator.py:518
#: AutoTowersGenerator.py:517
msgctxt "@msg"
msgid "The Auto Tower was removed because the active extruder changed"
msgstr ""

#: AutoTowersGenerator.py:559
#: AutoTowersGenerator.py:558
msgctxt "@msg"
msgid "Removing the autotower because Cura is closing"
msgstr ""
Expand Down
15 changes: 15 additions & 0 deletions Resources/i18n/fr_FR/autotowers.po
Original file line number Diff line number Diff line change
Expand Up @@ -980,62 +980,77 @@ msgctxt "@text"
msgid "Remove the AutoTower Model"
msgstr "Retirer le modèle AutoTower"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "Found OpenScad version"
msgstr "Version d'OpenScad trouvée"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "at"
msgstr "dans"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "The OpenScad path"
msgstr "Le chemin OpenScad"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "is not valid"
msgstr "n'est pas valide"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "Changed"
msgstr "Modification"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "Restored"
msgstr "Restauré"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "to"
msgstr "en"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "from"
msgstr "de"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "The STL file"
msgstr "Le fichier STL"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "does not exist"
msgstr "n'existe pas"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "The Auto Tower was removed because the Cura setting"
msgstr "La tour auto a été supprimée parce que le paramètre Cura"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "has changed since the tower was generated"
msgstr "a changé depuis la création de la tour"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "Failed to generate"
msgstr "Échec de la génération"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "Command output was"
msgstr "La sortie de la commande était"

#: AutoTowersGenerator.py
msgctxt "@msg"
msgid "An exception occured during post-processing"
msgstr "Une exception s'est produite pendant le post-traitement"

0 comments on commit 5d6292f

Please sign in to comment.