- Qt 6.11
- Qt Linguist Manual
- Using lrelease-pro
- Qt 6.11.1 Reference Documentation

Using lupdate-pro ◦ Using lconvert

# Using lrelease-pro

The `lrelease-pro` command line tool generates QM files from qmake projects (.pro files). It reads the `TRANSLATIONS` variable from the project file and generates the corresponding QM files.

Use `lrelease-pro` when you have a qmake project and want to generate QM files based on the translations defined in your .pro file.

## lrelease-pro syntax

     lrelease-pro [options] [project-file]...

Where:

- `options` means one or several lrelease-pro options.
- `project-file` is a .pro file to process.

To view the latest help, enter:

     lrelease-pro -help

### lrelease-pro options

Option | Action
--- | ---
`-help` | Display up-to-date help information and exit.
`-dump-json <file>` | Generate a JSON project description file without generating QM files. This file can be passed to `lrelease` using the `-project` option.
`-silent` | Do not explain what is being done.
`-removeidentical` | If the translated text is the same as the source text, exclude the message.
`-fail-on-unfinished` | Generate an error if unfinished translations are found.
`-fail-on-invalid` | Fail if translations failing the following checks are found: validity check of accelerators validity check of surrounding whitespaces validity check of ending punctuation validity check of place markers To get more details refer to Qt Linguist help
`-nounfinished` | Do not include unfinished translations.
`-markuntranslated <prefix>` | If a message has no real translation, use the source text prefixed with the given string instead.
`-version` | Display the version of `lrelease-pro` and exit.

## Examples

### Generate QM files from a qmake project

     lrelease-pro myproject.pro

### Generate JSON project description

Generate a JSON file describing the project's translations:

     lrelease-pro myproject.pro -dump-json project.json

Then use the generated JSON file with `lrelease`:

     lrelease -project project.json

Using lupdate-pro ◦ Using lconvert