Skip to content

Commit

Permalink
Rewrite auto translation script in python and make it handle edits to…
Browse files Browse the repository at this point in the history
… existing entries
  • Loading branch information
AdrianGarside committed Jan 20, 2025
1 parent dc2dbd9 commit 015e328
Show file tree
Hide file tree
Showing 18 changed files with 693 additions and 765 deletions.
4 changes: 2 additions & 2 deletions custom_components/bambu_lab/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ async def async_step_user(

if self.email != '':
modes = [
SelectOptionDict(value=self.email, label=self.email),
SelectOptionDict(value="bambu", label=""),
SelectOptionDict(value=self.email, label=self.email),
SelectOptionDict(value="lan", label="")
]
else:
Expand Down Expand Up @@ -474,8 +474,8 @@ async def async_step_init(self, user_input: None = None) -> FlowResult:
if self.email != '':
default_option = self.email
modes = [
SelectOptionDict(value=self.email, label=self.email),
SelectOptionDict(value="bambu", label=""),
SelectOptionDict(value=self.email, label=self.email),
SelectOptionDict(value="lan", label="")
]
else:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/bambu_lab/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
"st": "urn:bambulab-com:device:3dprinter:1"
}
],
"version": "2.0.40"
"version": "2.0.41"
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "La configuració mitjançant Bambu Cloud és més senzilla. Opcionalment, podeu configurar manualment l'accés només local, però perd algunes funcions; això és necessari per a les impressores configurades en mode Només LAN.\n\rSi existeixen i funcionen, també podeu reutilitzar les credencials d'autenticació existents d'altres impressores configurades.\n \rTingueu en compte que els comptes de xarxes socials sense contrasenya no són compatibles amb la configuració del núvol.",
"description": "La configuració mitjançant Bambu Cloud és la més senzilla i ràpida. Els comptes de xarxes socials sense contrasenya no són compatibles.\n\rTambé podeu reutilitzar les credencials d'autenticació que funcionen d'altres impressores. En cas de trobar-los, es mostraran a l'adreça de correu electrònic.\n\rO podeu connectar-vos proporcionant manualment els detalls de connexió local de la impressora. Això és necessari per a una impressora en mode Lan.",
"data": {
"printer_mode": "Mode de configuració de la impressora:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Núvol Bambu",
"lan": "Connexió local"
"lan": "Mode Lan"
}
}
}
}
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "Konfiguration via Bambu Cloud er den enkleste metode. Du kan vælge at konfigurere manuelt til kun lokal adgang, men det medfører tab af visse funktioner - dette kræves for printere indstillet til Kun Lan Mode.\n\rHvis de allerede eksisterer og fungerer, kan du også genbruge eksisterende autentifikationsoplysninger fra andre konfigurerede printere.\n\rBemærk, at sociale mediekonti uden en adgangskode ikke understøttes til cloud-konfiguration.",
"description": "Konfiguration via Bambu Cloud er enklest og hurtigst. Konti på sociale medier uden adgangskode understøttes ikke.\n\rDu kan også genbruge fungerende godkendelsesoplysninger fra andre printere. Hvis de findes, vil disse blive angivet af e-mailadressen.\n\rEller du kan oprette forbindelse ved manuelt at angive printerens lokale forbindelsesoplysninger. Dette er påkrævet for en printer i Lan-tilstand.",
"data": {
"printer_mode": "Printerkonfigurationsmetode:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Bambu Cloud",
"lan": "Lokal forbindelse"
"lan": "Lan-tilstand"
}
}
}
}
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "Am einfachsten ist die Konfiguration über Bambu Cloud. Sie können den Zugriff optional manuell nur für den lokalen Zugriff konfigurieren, dabei gehen jedoch einige Funktionen verloren – dies ist für Drucker erforderlich, die auf den Nur-LAN-Modus eingestellt sind.\n\rWenn sie vorhanden sind und funktionieren, können Sie auch vorhandene Authentifizierungsdaten von anderen konfigurierten Druckern wiederverwenden.\n \rBeachten Sie, dass Social-Media-Konten ohne Passwort die Cloud-Konfiguration nicht unterstützen.",
"description": "Die Konfiguration über Bambu Cloud ist am einfachsten und schnellsten. Social-Media-Konten ohne Passwort werden nicht unterstützt.\n\rSie können auch funktionierende Authentifizierungsdaten von anderen Druckern wiederverwenden. Wenn diese gefunden werden, werden sie nach der E-Mail-Adresse aufgelistet.\n\rAlternativ können Sie eine Verbindung herstellen, indem Sie die lokalen Verbindungsdetails des Druckers manuell angeben. Dies ist für einen Drucker im Lan-Modus erforderlich.",
"data": {
"printer_mode": "Drucker-Konfigurationsmodus:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Bambuswolke",
"lan": "Lokale Verbindung"
"lan": "Lan-Modus"
}
}
}
}
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "Η διαμόρφωση μέσω του Bambu Cloud είναι απλούστερη. Μπορείτε προαιρετικά να διαμορφώσετε με μη αυτόματο τρόπο μόνο για τοπική πρόσβαση, αλλά χάνετε ορισμένες δυνατότητες - αυτό απαιτείται για εκτυπωτές που έχουν οριστεί σε Λειτουργία μόνο δικτύου.\n\rΕάν υπάρχουν και λειτουργούν, μπορείτε επίσης να χρησιμοποιήσετε ξανά υπάρχοντα διαπιστευτήρια ελέγχου ταυτότητας από άλλους διαμορφωμένους εκτυπωτές.\n \rΛάβετε υπόψη ότι οι λογαριασμοί μέσων κοινωνικής δικτύωσης χωρίς κωδικό πρόσβασης δεν υποστηρίζονται για διαμόρφωση cloud.",
"description": "Η διαμόρφωση μέσω του Bambu Cloud είναι απλούστερη και ταχύτερη. Οι λογαριασμοί μέσων κοινωνικής δικτύωσης χωρίς κωδικό πρόσβασης δεν υποστηρίζονται.\n\rΜπορείτε επίσης να χρησιμοποιήσετε ξανά διαπιστευτήρια ελέγχου ταυτότητας εργασίας από άλλους εκτυπωτές. Εάν βρεθούν, θα εμφανιστούν στη λίστα με τη διεύθυνση email.\n\rΉ μπορείτε να συνδεθείτε παρέχοντας με μη αυτόματο τρόπο τις λεπτομέρειες τοπικής σύνδεσης του εκτυπωτή. Αυτό απαιτείται για έναν εκτυπωτή σε Lan Mode.",
"data": {
"printer_mode": "Τρόπος ρύθμισης εκτυπωτή:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Σύννεφο Bambu",
"lan": "Τοπική Σύνδεση"
"lan": "Lan Mode"
}
}
}
}
}
4 changes: 2 additions & 2 deletions custom_components/bambu_lab/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "Configuration via Bambu Cloud is simplest. You can optionally manually configure for local only access but you lose some features - this is required for printers set to Lan Only Mode.\n\rIf they exist and are working, you may also reuse existing authentication credentials from other configured printers.\n\rNote that social media accounts without a password are not support for cloud configuration.",
"description": "Configuration via Bambu Cloud is simplest and fastest. Social media accounts without a password are not supported.\n\rYou can also reuse working authentication credentials from other printers. If found these will be listed by the email address.\n\rOr you can connect by manually providing the printer local connection details. This is required for a printer in Lan Mode.",
"data": {
"printer_mode": "Printer configuration mode:"
}
Expand Down Expand Up @@ -595,7 +595,7 @@
"configuration_type": {
"options": {
"bambu": "Bambu Cloud",
"lan": "Local Connection"
"lan": "Lan Mode"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "La configuración a través de Bambu Cloud es la más sencilla. Opcionalmente, puede configurar manualmente el acceso solo local, pero perderá algunas funciones; esto es necesario para las impresoras configuradas en modo solo Lan.\n\rSi existen y funcionan, también puede reutilizar las credenciales de autenticación existentes de otras impresoras configuradas.\n \rTenga en cuenta que las cuentas de redes sociales sin contraseña no son compatibles con la configuración en la nube.",
"description": "La configuración a través de Bambu Cloud es la más sencilla y rápida. No se admiten cuentas de redes sociales sin contraseña.\n\rTambién puede reutilizar las credenciales de autenticación que funcionan de otras impresoras. Si los encuentra, se enumerarán junto a la dirección de correo electrónico.\n\rO puede conectarse proporcionando manualmente los detalles de conexión local de la impresora. Esto es necesario para una impresora en modo Lan.",
"data": {
"printer_mode": "Modo de configuración de la impresora:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Nube de bambú",
"lan": "Conexión local"
"lan": "Modo LAN"
}
}
}
}
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "La configuration via Bambu Cloud est la plus simple. Vous pouvez éventuellement configurer manuellement l'accès local uniquement, mais vous perdez certaines fonctionnalités. Ceci est requis pour les imprimantes définies en mode LAN uniquement.\n\rS'ils existent et fonctionnent, vous pouvez également réutiliser les informations d'authentification existantes d'autres imprimantes configurées.\n \rNotez que les comptes de réseaux sociaux sans mot de passe ne sont pas pris en charge pour la configuration cloud.",
"description": "La configuration via Bambu Cloud est la plus simple et la plus rapide. Les comptes de réseaux sociaux sans mot de passe ne sont pas pris en charge.\n\rVous pouvez également réutiliser les informations d'authentification fonctionnelles d'autres imprimantes. S'ils sont trouvés, ils seront répertoriés par adresse e-mail.\n\rVous pouvez également vous connecter en fournissant manuellement les détails de connexion locale de l'imprimante. Ceci est requis pour une imprimante en mode Lan.",
"data": {
"printer_mode": "Mode de configuration de l’imprimante :"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Nuage de bambou",
"lan": "Connexion locale"
"lan": "Mode réseau"
}
}
}
}
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "La configurazione tramite Bambu Cloud è la più semplice. Facoltativamente, puoi configurare manualmente l'accesso solo locale, ma perderai alcune funzionalità: è necessario per le stampanti impostate sulla modalità Solo Lan.\n\rSe esistono e funzionano, puoi anche riutilizzare le credenziali di autenticazione esistenti da altre stampanti configurate.\n \rTieni presente che gli account di social media senza password non supportano la configurazione cloud.",
"description": "La configurazione tramite Bambu Cloud è la più semplice e veloce. Gli account di social media senza password non sono supportati.\n\rÈ inoltre possibile riutilizzare le credenziali di autenticazione funzionanti di altre stampanti. Se trovati, verranno elencati in base all'indirizzo e-mail.\n\rOppure è possibile connettersi fornendo manualmente i dettagli della connessione locale della stampante. Ciò è necessario per una stampante in modalità Lan.",
"data": {
"printer_mode": "Modalità di configurazione della stampante:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "Nuvola di bambù",
"lan": "Connessione locale"
"lan": "Modalità Lan"
}
}
}
}
}
6 changes: 3 additions & 3 deletions custom_components/bambu_lab/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"step": {
"user": {
"description": "Bambu Cloud를 통한 구성이 가장 간단합니다. 선택적으로 로컬 전용 액세스를 수동으로 구성할 수 있지만 일부 기능은 손실됩니다. 이는 LAN 전용 모드로 설정된 프린터에 필요합니다.\n\r이 기능이 존재하고 작동하는 경우 구성된 다른 프린터의 기존 인증 자격 증명을 재사용할 수도 있습니다.\n \r비밀번호가 없는 소셜 미디어 계정은 클라우드 구성을 지원하지 않습니다.",
"description": "Bambu Cloud를 통한 구성은 가장 간단하고 빠릅니다. 비밀번호가 없는 소셜 미디어 계정은 지원되지 않습니다.\n\r다른 프린터에서 작동하는 인증 자격 증명을 재사용할 수도 있습니다. 발견되면 이메일 주소로 나열됩니다.\n\r또는 프린터 로컬 연결 세부 정보를 수동으로 제공하여 연결할 수 있습니다. 이는 LAN 모드의 프린터에 필요합니다.",
"data": {
"printer_mode": "프린터 구성 모드:"
}
Expand Down Expand Up @@ -595,8 +595,8 @@
"configuration_type": {
"options": {
"bambu": "밤부 클라우드",
"lan": "로컬 연결"
"lan": "랜 모드"
}
}
}
}
}
Loading

0 comments on commit 015e328

Please sign in to comment.