Merge branch 'Ultimaker:main' into main

This commit is contained in:
goofoo3d 2022-06-24 15:47:55 +08:00 committed by GitHub
commit 536afd1c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 13 deletions

View File

@ -22,7 +22,6 @@ class Marketplace(Extension, QObject):
QObject.__init__(self, parent) QObject.__init__(self, parent)
Extension.__init__(self) Extension.__init__(self)
self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here. self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here.
self._plugin_registry: Optional[PluginRegistry] = None
self._package_manager = CuraApplication.getInstance().getPackageManager() self._package_manager = CuraApplication.getInstance().getPackageManager()
self._material_package_list: Optional[RemotePackageList] = None self._material_package_list: Optional[RemotePackageList] = None
@ -81,9 +80,9 @@ class Marketplace(Extension, QObject):
If the window hadn't been loaded yet into Qt, it will be created lazily. If the window hadn't been loaded yet into Qt, it will be created lazily.
""" """
if self._window is None: if self._window is None:
self._plugin_registry = PluginRegistry.getInstance() plugin_registry = PluginRegistry.getInstance()
self._plugin_registry.pluginsEnabledOrDisabledChanged.connect(self.checkIfRestartNeeded) plugin_registry.pluginsEnabledOrDisabledChanged.connect(self.checkIfRestartNeeded)
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) plugin_path = plugin_registry.getPluginPath(self.getPluginId())
if plugin_path is None: if plugin_path is None:
plugin_path = os.path.dirname(__file__) plugin_path = os.path.dirname(__file__)
path = os.path.join(plugin_path, "resources", "qml", "Marketplace.qml") path = os.path.join(plugin_path, "resources", "qml", "Marketplace.qml")
@ -108,7 +107,7 @@ class Marketplace(Extension, QObject):
return return
if self._package_manager.hasPackagesToRemoveOrInstall or \ if self._package_manager.hasPackagesToRemoveOrInstall or \
cast(PluginRegistry, self._plugin_registry).getCurrentSessionActivationChangedPlugins(): PluginRegistry.getInstance().getCurrentSessionActivationChangedPlugins():
self._restart_needed = True self._restart_needed = True
else: else:
self._restart_needed = False self._restart_needed = False
@ -116,7 +115,7 @@ class Marketplace(Extension, QObject):
showRestartNotificationChanged = pyqtSignal() showRestartNotificationChanged = pyqtSignal()
@pyqtProperty(bool, notify=showRestartNotificationChanged) @pyqtProperty(bool, notify = showRestartNotificationChanged)
def showRestartNotification(self) -> bool: def showRestartNotification(self) -> bool:
return self._restart_needed return self._restart_needed

View File

@ -3457,7 +3457,7 @@ msgid ""
"- Back-up and sync your material profiles and plug-ins\n" "- Back-up and sync your material profiles and plug-ins\n"
"- Share ideas and get help from 48,000+ users in the Ultimaker community" "- Share ideas and get help from 48,000+ users in the Ultimaker community"
msgstr "" msgstr ""
"- Voeg materiaalprofielen en plug-ins toe uit de Marktplaats\n" "- Voeg materiaalprofielen en plug-ins toe uit de Marketplace\n"
"- Maak back-ups van uw materiaalprofielen en plug-ins en synchroniseer deze\n" "- Maak back-ups van uw materiaalprofielen en plug-ins en synchroniseer deze\n"
"- Deel ideeën met 48.000+ gebruikers in de Ultimaker-community of vraag hen om ondersteuning" "- Deel ideeën met 48.000+ gebruikers in de Ultimaker-community of vraag hen om ondersteuning"
@ -4288,7 +4288,7 @@ msgstr "Weet u zeker dat u een nieuw project wilt starten? Hiermee wordt het pla
#: /home/trin/Gedeeld/Projects/Cura/resources/qml/MainWindow/MainWindowHeader.qml:135 #: /home/trin/Gedeeld/Projects/Cura/resources/qml/MainWindow/MainWindowHeader.qml:135
msgctxt "@action:button" msgctxt "@action:button"
msgid "Marketplace" msgid "Marketplace"
msgstr "Marktplaats" msgstr "Marketplace"
#: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml:18 #: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/AutoConfiguration.qml:18
msgctxt "@header" msgctxt "@header"
@ -4303,7 +4303,7 @@ msgstr "Deze configuratie is niet beschikbaar omdat %1 niet wordt herkend. Ga na
#: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml:138 #: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml:138
msgctxt "@label" msgctxt "@label"
msgid "Marketplace" msgid "Marketplace"
msgstr "Marktplaats" msgstr "Marketplace"
#: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml:52 #: /home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml:52
msgctxt "@label" msgctxt "@label"
@ -5995,7 +5995,7 @@ msgstr "Release notes"
#: /home/trin/Gedeeld/Projects/Cura/resources/qml/WelcomePages/CloudContent.qml:123 #: /home/trin/Gedeeld/Projects/Cura/resources/qml/WelcomePages/CloudContent.qml:123
msgctxt "@text" msgctxt "@text"
msgid "Add material settings and plugins from the Marketplace" msgid "Add material settings and plugins from the Marketplace"
msgstr "Voeg materiaalinstellingen en plugins uit de Marktplaats toe" msgstr "Voeg materiaalinstellingen en plugins uit de Marketplace toe"
#: /home/trin/Gedeeld/Projects/Cura/resources/qml/WelcomePages/CloudContent.qml:149 #: /home/trin/Gedeeld/Projects/Cura/resources/qml/WelcomePages/CloudContent.qml:149
msgctxt "@text" msgctxt "@text"
@ -6297,7 +6297,7 @@ msgstr "Beheert extensies voor de toepassing en staat browsingextensies toe van
#: Marketplace/plugin.json #: Marketplace/plugin.json
msgctxt "name" msgctxt "name"
msgid "Marketplace" msgid "Marketplace"
msgstr "Marktplaats" msgstr "Marketplace"
#: MonitorStage/plugin.json #: MonitorStage/plugin.json
msgctxt "description" msgctxt "description"
@ -6777,7 +6777,7 @@ msgstr "Röntgenweergave"
#~ msgctxt "@title" #~ msgctxt "@title"
#~ msgid "Marketplace" #~ msgid "Marketplace"
#~ msgstr "Marktplaats" #~ msgstr "Marketplace"
#~ msgctxt "@info" #~ msgctxt "@info"
#~ msgid "You will need to restart Cura before changes in packages have effect." #~ msgid "You will need to restart Cura before changes in packages have effect."
@ -7055,7 +7055,7 @@ msgstr "Röntgenweergave"
#~ msgctxt "@action:menu" #~ msgctxt "@action:menu"
#~ msgid "&Marketplace" #~ msgid "&Marketplace"
#~ msgstr "&Marktplaats" #~ msgstr "&Marketplace"
#~ msgctxt "description" #~ msgctxt "description"
#~ msgid "Find, manage and install new Cura packages." #~ msgid "Find, manage and install new Cura packages."