Skip to content

Add Ukrainian language - #636

Open
gerab wants to merge 4 commits into
hd-zero:mainfrom
gerab:agent/claude/ukrainian-translation
Open

gerab wants to merge 4 commits into
hd-zero:mainfrom
gerab:agent/claude/ukrainian-translation

Conversation

@gerab

@gerab gerab commented Oct 21, 2026

Copy link
Copy Markdown

Ukrainian language

Adds a Ukrainian translation (uk_ua) alongside the existing languages.

What it adds

  • mkapp/app/language/uk_ua.ini: every string the UI looks up with _() / _lang(), plus the legacy keys the other language files carry.
  • LANG_UKRAINIAN in src/lang/language.h, and the uk_ua entry plus UKR.TXT selector file in src/lang/language.c, the same way German was added.
  • The UI fonts already include the full Cyrillic block (the Montserrat fonts are generated with --range 1024-1279), so Ukrainian-specific letters (і ї є ґ) render without font changes.

Small fixes found while checking the result in the emulator

Each one is a separate commit so it can be reviewed on its own, and none changes behaviour for English:

  1. Status text cut off: state2string() built the signal status into a 32-byte buffer together with the recolor markup. Two-byte UTF-8 letters overflowed it, so "No signal" showed as "Немає сигнал". Buffer is now 64 bytes.
  2. "Panel" was never translated: "Panel" and "Panel Auto Off" were hard-coded English strings in the image settings page and in the video-mode image panel. They now go through _lang().
  3. Garbage on the Firmware page when /mnt/app/version is missing (as in the emulator): generate_current_version() returned early and the page printed uninitialised stack memory after "Current Version". The string is now cleared first.

Testing

  • Built the emulator (-DEMULATOR_BUILD=ON -DHDZ_GOGGLE=ON) and opened every menu page with UKR.TXT present; checked the sidebar, OSD, Source, Image, Power, Fans, Record, Autoscan, ELRS, WiFi, Head Tracker, Storage, Firmware, Focus, Clock, Input and Sleep screens, and the OSD element editor, for clipped or overlapping text, and shortened the labels that did not fit.
  • Not tested on goggle hardware, and I did not build the ARM firmware.
  • Note: with GCC 15 the emulator needs -DCMAKE_C_FLAGS=-std=gnu17 because the bundled lib/log uses ATOMIC_VAR_INIT, which C23 removes. This is unrelated to this PR and I did not change it.

🤖 Generated with Claude Code

Claude and others added 4 commits October 21, 2026 22:43
Add uk_ua.ini translation (all keys used by the UI, plus the legacy keys
other language files carry) and register LANG_UKRAINIAN with the UKR.TXT
selector file on the SD card.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The signal status string is built into a 32-byte buffer together with the
recolor markup. Two-byte UTF-8 letters overflowed it, so Ukrainian showed
"Немає сигнал" instead of "Немає сигналу". Use a 64-byte buffer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
"Panel" and "Panel Auto Off" were hard-coded English strings in the image
settings page and in the video-mode image panel, so they stayed untranslated
while the rest of the page followed the selected language.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
generate_current_version() returned early without touching the output when
/mnt/app/version could not be opened, so the Firmware page printed whatever
was on the stack after "Current Version" (seen in the emulator). Clear the
string first so it stays empty.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@iambluka4

Copy link
Copy Markdown

Awesome, thank you! I've been waiting for the Ukrainian translation for a long time. Will test it today!

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