slint/tools/tr-extractor
autofix-ci[bot] 590c9b7864
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
autofix.ci / ci (push) Blocked by required conditions
[autofix.ci] apply automated fixes
2025-12-09 12:11:04 +01:00
..
Cargo.toml Remormat all the toml file again to fix npm upload 2025-04-09 15:06:00 +02:00
main.rs [autofix.ci] apply automated fixes 2025-12-09 12:11:04 +01:00
README.md Remove license header from .md/.mdx files 2025-12-04 21:58:09 +01:00

slint-tr-extractor

A command-line tool for extracting translatable strings from .slint files and generating gettext-compatible translation files.

Overview

slint-tr-extractor is part of the Slint framework's internationalization (i18n) workflow. It scans .slint files for strings marked with the @tr() macro and extracts them into gettext .pot (Portable Object Template) files, which can then be translated into multiple languages.

See also the Slint Translations Guide for more information.

Prerequisites

Installation

Install the tool using Cargo:

cargo install slint-tr-extractor

Usage

Usage: slint-tr-extractor [OPTIONS] [path to .slint file(s)]...

Arguments:
  [path to .slint file(s)]...

Options:
  -d, --default-domain <DOMAIN>
  -o <file>                                Write output to specified file (instead of messages.po).
      --package-name <PACKAGE_NAME>        Set the package name in the header of the output
      --package-version <PACKAGE_VERSION>  Set the package version in the header of the output
  -j, --join-existing                      Join messages with existing file
  -h, --help                               Print help
  -V, --version                            Print version