lrelease(1)

πŸ“¦
version 5.15.19 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

✨ lrelease β€” the glow-up your translations deserve ✨

okay bestie, so this is the manual page for lrelease, from the lrelease(1) family of General Commands Manuals. she's the Qt Linguist Release tool for the Qt GUI toolkit and she is iconic πŸ’–


πŸ’… NAME πŸ’…

lrelease β€” generate Qt message files from Qt Linguist translation files πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

lrelease [ options ] project-file
lrelease [ options ] ts-files [ -qm qm-file ]

🌸 DESCRIPTION 🌸

so basically this page documents the Qt Linguist Release tool for the Qt GUI toolkit. no cap.

lrelease reads a qmake/tmake project file (that's your .pro file, iykyk) and converts the translation files (TS files) that are specified in it into Qt message files (QM files) β€” the ones your app actually uses to translate. πŸ’«

and the QM file format? it's a compact binary format that gives you extremely fast lookups for translations, and Qt uses it. periodt. it's giving efficiency. πŸ”₯


✨ OPTIONS ✨

  • -help β€” shows you the usage and then dips out. bye! πŸ‘‹
  • -compress β€” squishes the QM files down. compression era πŸ’…
  • -nounfinished β€” leaves unfinished translations OUT. no half-done vibes allowed πŸ™ˆ
  • -removeidentical β€” if the translated text is literally the same as the source text, the message just doesn't get included. why repeat yourself bestie πŸ’€
  • -silent β€” does the thing without explaining what it's doing. mysterious main character energy 🧚
  • -version β€” displays the version of lrelease and exits. quick lil flex ⭐

🌈 USAGE 🌈

here's an example .pro file you can hand over to lrelease:

HEADERS         = funnydialog.h \
                  wackywidget.h
SOURCES         = funnydialog.cpp \
                  main.cpp \
                  wackywidget.cpp
FORMS           = fancybox.ui
TRANSLATIONS    = gnomovision_dk.ts \
                  gnomovision_fi.ts \
                  gnomovision_no.ts \
                  gnomovision_se.ts

so when you run lrelease on this project file, the Qt message files gnomovision_dk.qm, gnomovision_fi.qm, gnomovision_no.qm and gnomovision_se.qm get generated from gnomovision_dk.ts, gnomovision_fi.ts, gnomovision_no.ts and gnomovision_se.ts, respectively. like, one-to-one, they match up 🫢

and lrelease can also be invoked with a list of TS files to convert, bestie:

lrelease gnomovision_*.ts

πŸ‘€ SEE ALSO πŸ‘€

go check out lupdate(1) and also http://doc.qt.io/qt-5/qtwidgets-tools-i18n-example.html β€” they're the supporting cast and they ate πŸ’œ


that's the whole page! no notes, she's perfect 🌸

The Qt Company Ltd. Β· 18 October 2001 β€” ok that's the source, the version vibes and the date, all wrapped up in a cute lil sign-off. thanks for coming to my ted talk, bestie πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from