Skip to content

Conversation

@mauriciobridge
Copy link
Contributor

Add Spanish translation support for HDZero goggles

This PR adds complete Spanish translation support to the HDZero goggle firmware, including:

🌐 Spanish Translation

  • Added complete Spanish translation file (es_es.ini) with all UI strings
  • Includes special Spanish characters: ¡, ¿, Á, É, Í, Ó, Ú, Ñ, Ü, á, é, í, ó, ú, ñ, ü

🔤 Font Support

  • Updated all Montserrat LVGL fonts to include Spanish special characters
  • Modified font files: lv_font_montserrat_8.c through lv_font_montserrat_48.c
  • Preserves all existing character ranges while adding Spanish support

🛠️ Tooling

  • Added analyze_and_add_spanish_chars.py script to automate font modifications
  • Script processes all Montserrat font files in batch mode
  • Generates updated fonts with Spanish characters in /out directory
  • Based on existing generate_font_lib.py architecture
  • Maintains compatibility with LVGL font generation pipeline

⚙️ Technical Details

  • Uses lv_font_conv tool to regenerate fonts with expanded Unicode ranges
  • Adds Spanish Unicode points: 161, 191, 193, 201, 205, 209, 211, 218, 220, 225, 233, 237, 241, 243, 250, 252
  • Preserves original font identifiers to maintain backward compatibility
  • No breaking changes to existing functionality

📝 Usage

# Generate Spanish-enabled fonts
python3 analyze_and_add_spanish_chars.py

# Copy generated fonts to project
cp out/* ../../lib/lvgl/lvgl/src/font/

@ligenxxxx ligenxxxx merged commit 58d2221 into hd-zero:main May 26, 2025
1 check passed
@pitts-mo
Copy link
Contributor

pitts-mo commented Jun 6, 2025

@mauriciobridge Can you help with translations changes on the source page?

Are these usable?
Signal detected = "Sinal detectado"
No signal = "Sem sinal"
Analog input requires Expansion Module = "Entrada analógica requer módulo de expansão"

And can you offer a valid replacement for "ã" ?

Snapshot_2025-06-06_15-20-32

@mauriciobridge
Copy link
Contributor Author

Hi @pitts-mo!
Just wanted to clarify - those translations are in Portuguese. Here are the Spanish versions:

  • Signal detected = "Señal detectada"
  • No signal = "Sin señal"
  • Analog input requires Expansion Module = "Entrada análoga requiere Módulo de Expansión"

And no need to replace "ã" since we're using Spanish, and current fonts already have all the Spanish characters we need for Spanish (like ñ, á, é, í, ó, ú).

Let me know if you need any other Spanish translations!
Thanks!

@pitts-mo
Copy link
Contributor

pitts-mo commented Jun 7, 2025

Sorry @mauriciobridge ,
I have updated SumolX#65 and hope to test this to post screen shot later today.
Thank you for correcting me.
-p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants