Skip to content

Commit

Permalink
🧑‍💻 Language import adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 11, 2024
1 parent 4bb33a0 commit bd49363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion Marlin/src/lcd/language/language_pt_br.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
10 changes: 6 additions & 4 deletions buildroot/share/scripts/languageExport.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -28,7 +30,7 @@

# 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 = {}
Expand Down

0 comments on commit bd49363

Please sign in to comment.