From bd4936330bdb74ac6b7c64140379265cde233835 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 11 Oct 2024 13:46:05 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Language=20?= =?UTF-8?q?import=20adjustments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_pt_br.h | 1 - buildroot/share/scripts/languageExport.py | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 3281b897d8..61a5c7348f 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -41,7 +41,6 @@ namespace LanguageNarrow_pt_br { LSTR MSG_MEDIA_ABORTING = _UxGT("Abortando..."); LSTR MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); LSTR MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); - LSTR MSG_MEDIA_RELEASED = _UxGT("Cartão liberado"); LSTR MSG_MEDIA_WAITING = _UxGT("Aguardando cartão"); LSTR MSG_MEDIA_READ_ERROR = _UxGT("Erro de leitura"); LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB removido"); diff --git a/buildroot/share/scripts/languageExport.py b/buildroot/share/scripts/languageExport.py index 46485aa124..ca1998c18e 100755 --- a/buildroot/share/scripts/languageExport.py +++ b/buildroot/share/scripts/languageExport.py @@ -1,20 +1,22 @@ #!/usr/bin/env python3 ''' -languageExport.py +languageExport.py [--single] Export LCD language strings to CSV files for easier translation. -Use importTranslations.py to import CSV into the language files. +Use languageImport.py to import CSV into the language files. +Use --single to export all languages to a single CSV file. ''' import re from pathlib import Path +from sys import argv from languageUtil import namebyid LANGHOME = "Marlin/src/lcd/language" # Write multiple sheets if true, otherwise write one giant sheet -MULTISHEET = True +MULTISHEET = '--single' not in argv[1:] OUTDIR = 'out-csv' # Check for the path to the language files @@ -28,7 +30,7 @@ LIMIT = 0 # A dictionary to contain strings for each language. # Init with 'en' so English will always be first. -language_strings = { 'en': 0 } +language_strings = { 'en': {} } # A dictionary to contain all distinct LCD string names names = {}