Metadata-Version: 2.4
Name: locqa
Version: 0.4.0
Summary: Quality assurance for ARB localizations
License-Expression: MIT
License-File: LICENSE
Classifier: Environment :: Console
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.12
Requires-Dist: jinja2>=3.1.4
Requires-Dist: prompt-toolkit<4,>=3.0.48
Requires-Dist: questionary>=2.0.1
Requires-Dist: rich-argparse>=1.6
Requires-Dist: rich>=13.9
Description-Content-Type: text/markdown

# locqa

Quality checks for Flutter ARB localizations: placeholders and ICU, glossary terms,
untranslated and wrong-language strings, Kazakh and Uzbek orthography. Writes a JSON
report and an offline HTML report. Fixes go through human review before export.

## Install

Linux and macOS:

```sh
curl -fsSL https://raw.githubusercontent.com/BEknUur/locqa-install/main/install.sh | sh
```

Any OS with Python 3.12+:

```sh
uv tool install locqa   # or: pipx install locqa
```

## Quickstart

```sh
locqa            # interactive wizard
locqa doctor     # versions, Flutter and API key status
locqa check --source /path/to/source.arb --target /path/to/target.arb \
  --glossary /path/to/glossary.csv --out out/report.json
```

`check` exits with 0 when there are no findings, 1 when it finds issues and 2 on errors.
`export` and `bundle` need Flutter 3.35.7 (`--flutter-bin`). LLM commands (`judge`,
`suggest`, `triage`) read `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`; `check` stays offline.

## Validate with Flutter

```sh
locqa sandbox --source /path/to/source.arb --target /path/to/target.arb \
  --out out/flutter-check --flutter-bin /path/to/flutter
```

Each run requires a new output directory. The command retains exact input copies,
stage logs and `report.json`; it does not discard invalid resource names. A Flutter
failure stops later stages. Compilation validates technical structure, not translation
quality. Getter values are checked against real input strings; the report identifies
missing translations and target-only keys. Runtime tests require actual ARBs; private organizer
inputs and review decisions are not included in the package.

Exports validate the complete pair through Flutter, including tests. Invalid names
require an explicit JSON `--key-map` and a paired `--source-out`; values remain
unchanged by renaming. The generated migration manifest lists application API changes.
`correction-sample` draws real approved text changes for blind native-speaker review;
it never fabricates ratings. `eval` computes recall against supplied labels; precision
requires manual verdicts or an explicit exhaustive-label declaration.
