From 562b46ad820dab79fb3fee7da7c1fdc3bd6fef54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:15:03 +0000 Subject: [PATCH] Fix PR #1 failures: Add German translations and fix backend linting Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com> --- backend/app/core/permissions.py | 4 ++-- backend/app/schemas/github_backup.py | 4 ++-- backend/app/schemas/notification.py | 4 ++-- backend/app/schemas/notification_template.py | 4 ++-- backend/app/services/firmware_update.py | 4 ++-- frontend/src/i18n/locales/de.ts | 2 ++ 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/backend/app/core/permissions.py b/backend/app/core/permissions.py index 18b2b7735..a6c56d409 100644 --- a/backend/app/core/permissions.py +++ b/backend/app/core/permissions.py @@ -4,10 +4,10 @@ This module defines all permissions using a string enum with `resource:action` n Permissions are additive across groups - a user has all permissions from all their groups. """ -from enum import Enum +from enum import StrEnum -class Permission(str, Enum): +class Permission(StrEnum): """All available permissions in the system. Permissions follow the pattern: resource:action diff --git a/backend/app/schemas/github_backup.py b/backend/app/schemas/github_backup.py index 2fe8299b1..ca3cfe587 100644 --- a/backend/app/schemas/github_backup.py +++ b/backend/app/schemas/github_backup.py @@ -2,12 +2,12 @@ import re from datetime import datetime -from enum import Enum +from enum import StrEnum from pydantic import BaseModel, Field, field_validator -class ScheduleType(str, Enum): +class ScheduleType(StrEnum): """Backup schedule types.""" HOURLY = "hourly" diff --git a/backend/app/schemas/notification.py b/backend/app/schemas/notification.py index ca8ff5b41..785227f9e 100644 --- a/backend/app/schemas/notification.py +++ b/backend/app/schemas/notification.py @@ -1,13 +1,13 @@ """Pydantic schemas for notification providers.""" from datetime import datetime -from enum import Enum +from enum import StrEnum from typing import Any from pydantic import BaseModel, Field, field_validator -class ProviderType(str, Enum): +class ProviderType(StrEnum): """Supported notification provider types.""" CALLMEBOT = "callmebot" diff --git a/backend/app/schemas/notification_template.py b/backend/app/schemas/notification_template.py index 544a3c57e..c3f0467ef 100644 --- a/backend/app/schemas/notification_template.py +++ b/backend/app/schemas/notification_template.py @@ -1,12 +1,12 @@ """Pydantic schemas for notification templates.""" from datetime import datetime -from enum import Enum +from enum import StrEnum from pydantic import BaseModel, Field -class EventType(str, Enum): +class EventType(StrEnum): """Supported notification event types.""" PRINT_START = "print_start" diff --git a/backend/app/services/firmware_update.py b/backend/app/services/firmware_update.py index 7d395b0b5..fdf26760f 100644 --- a/backend/app/services/firmware_update.py +++ b/backend/app/services/firmware_update.py @@ -11,7 +11,7 @@ Orchestrates firmware updates for Bambu Lab printers: import asyncio import logging from dataclasses import dataclass -from enum import Enum +from enum import StrEnum from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession @@ -30,7 +30,7 @@ from backend.app.services.printer_manager import printer_manager logger = logging.getLogger(__name__) -class FirmwareUploadStatus(str, Enum): +class FirmwareUploadStatus(StrEnum): """Status of a firmware upload operation.""" IDLE = "idle" diff --git a/frontend/src/i18n/locales/de.ts b/frontend/src/i18n/locales/de.ts index 5e7637794..ee3104493 100644 --- a/frontend/src/i18n/locales/de.ts +++ b/frontend/src/i18n/locales/de.ts @@ -1837,6 +1837,8 @@ export default { zipMayContainStl: 'ZIP-Dateien können STL-Dateien enthalten. Vorschaubilder können während der Extraktion generiert werden.', thumbnailsCanBeGenerated: 'Vorschaubilder können für STL-Dateien generiert werden. Große Modelle benötigen möglicherweise mehr Zeit.', generateThumbnailsForStl: 'Vorschaubilder für STL-Dateien generieren', + threemfDetected: '3MF-Dateien erkannt', + threemfExtractionInfo: 'Druckermodell, Material, Farbe und Druckeinstellungen werden automatisch aus 3MF-Dateien extrahiert.', willBeExtracted: 'Wird extrahiert', filesExtracted: '{{count}} Dateien extrahiert', uploadComplete: 'Upload abgeschlossen: {{succeeded}} erfolgreich',