mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-06 02:30:31 -08:00
28 lines
1.9 KiB
HTML
28 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Qt Linguist</title>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
</head>
|
|
<body>
|
|
<div style="width: 600px; margin: 20px;">
|
|
<h2>Qt Linguist</h2>
|
|
<p>For every new project:</p>
|
|
<ul>
|
|
<li>In Lisp, wrap the strings you want to translate in the <code>tr</code> macro (as you would do in Qt), optionally passing a context and/or a plural indicator (see Qt Assistant). Both string and context can be Lisp forms evaluating to constant strings.
|
|
<li>Adapt the <code>my_app/eql-lupdate</code> file, adding your Qt Designer <code>*.ui</code> files (if any), and listing the respective <code>*.ts</code> files for all languages you want to support.
|
|
<li>Adapt the <code>my_app/eql-lrelease</code> file, simply listing all <code>*.ts</code> files (see above).
|
|
</ul>
|
|
<p>For every new release (in order to create the <code>*.qm</code> files):</p>
|
|
<ul>
|
|
<li>In <code>my_app/</code>, run <code>eql make.lisp</code> (compiling all files). This will find all source strings to translate and save them in the file <code>tr.h</code> (only a dummy needed for the Qt <code>lupdate</code> function). This is done using a compiler macro, see <code>my_app/tr.lisp</code>.
|
|
<li>Run the <code>my_app/eql-lupdate</code> script; this will create/update the single <code>*.ts</code> files for every language.
|
|
<li>Use Qt Linguist on the <code>*.ts</code> files (as usual).
|
|
<li>Run the <code>my_app/eql-lrelease</code> script.
|
|
</ul>
|
|
<p>Note: you may need to copy the respective <code>qt_*.qm</code> files (see <code>translations/</code> in the Qt sources), in order to load the translated texts used by Qt itself.</p>
|
|
<p>See <code>my_app/main.cpp</code> for an example how to load your translation files.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|