lingora

MIT License Language Build Coverage Version

Site | GitHub | API | Coverage Report

Note: This is a work in progress, and is not yet ready for general use.

Despite the test suite, not all functionality has been tested, and there are likely to be bugs.

lingora is a free and open-source localization management program that analyses fluent translation files highlighting discrepancies between reference and target language files.

lingora is designed primarily to be used as a command line tool, but also provides a graphical user interface.

linux | macos | windows

Status

Operation

lingora compares the entries of a reference translation file against one or more target translation files.

A Lingora.toml file can be used to define the reference translation file, and target translation files (or search paths).

If the Lingora.toml file exists in the current working directory then it will be used. An explicit config file can be provided using the --config=path/to/your-config.toml command line argument. If no config file exists then sensible defaults will be used.

It is recommended that projects provide an explicit Lingora.toml file minimally specifying the reference translation file so that all other files are compared against it, rather than the locale of a user’s workstation, which would vary from user to user.

By default (i.e., no toml file exists, or is specified) lingora will look for the translation files in ./i18n/ and it will use <current_system_locale>.ftl as the reference translation file.

Command line arguments can be used to override config file settings, with -r path/to/reference_file.ftl and -t path/to/target_file.ftl command line arguments. -t may also specify a folder, in which case all *.ftl files under that folder will be used as targets. The reference and target file names are expected to use the <language>-<locale> naming convention.

Additional functionality

Command line arguments

Developmemt

cargo test
cargo llvm-cov
Module Description Notes
root Root module  
config Interpret command line arguments and Lingora.toml file 1
domain Domain logic 2
domain/fluent Fluent file handling  
domain/integrity Integrity checking data structures  
gui Graphical user interface 3
output Output handling 4
  1. The config module is responsible for interpreting the command line arguments and the Lingora.toml file. The Lingora.toml file can be in the current working directory, or specified with the --config=path/to/your-config.toml argument. arguments.rs is the structure populated by clap. interim_settings.rs is built from the Lingora.toml config file sourced from:
    • the –config=path/to/your-config.toml argument, or, if not provided.
    • the Lingora.toml file in the current working directory, or, if not provided.
    • default settings, which are described in the default_lingora.toml file. settings.rs is the final settings used by the program, which are built from interim_settings.rs and arguments.rs.
  2. The domain module is responsible for the core logic of the program. It compares the reference and target files, and creates the resultant integrity checks. analysis.rs is the resultant analysis of all files, as formed from their respective integrity checks and cross-checks.

  3. The gui module is responsible for the graphical user interface. components contains the various components used in the GUI. state.rs is the user interaction and subseqent current selections.

  4. The output module provides formatted output of the analysis and output of the I18nConfig function call.

Build

cargo binstall dioxus-cli
dx build --release
# dx bundle // Still in development