hl validate checks one source/target segment or a JSON batch with the same 12-check policy as Hyperlocalise Cloud. hl check applies that policy to mapped repository files when you pass --qa-policy or set qa.policy_file. Spelling is reported as skipped when Hunspell or the locale dictionary is missing, so the commands stay usable offline.
View the GitHub release · Full changelog
Breaking changes
None.Features
- Add
hl validate. Pass--source-textor--source-file,--target-textor--target-file, and--target-localefor one segment, or--input-file(use-for stdin) for a JSON batch of{ id, sourceText, targetText, targetLocale }. Optional--source-pathselects format detection, and--max-lengthsets the Unicode character limit (0means no limit).--policy-fileloads a version1policy that lists all 12 checks, eachenabledwith severityerrororwarning. The default policy enables not-localized, whitespace-only, same-as-source, escaped-character, length, placeholder, glossary, format, and spelling checks. Numbers, punctuation, and character-case checks stay off until the policy turns them on. Glossary terms and accepted spelling words travel in that policy file. Text output printsid: severity: messageand exits1when findings exist;--no-failkeeps exit code0. JSON output lists findings and skipped checks and exits0for findings. Malformed input and execution failures still fail the process. See validate. - Apply the same runner from
hl checkwith--qa-policyorqa.policy_fileini18n.yml. File integrity findings, including a missing target file, stay in the report. Policy severities covernot_localized,same_as_source,whitespace_only,escaped_char_mismatch, andplaceholder_mismatch.--checkand--exclude-checkcannot be combined with a QA policy. With no policy path,hl checkkeeps its current checks. Repository checks do not set a per-string character limit, solengthapplies whenvalidatereceives--max-lengthor a segmentmaxLength.
Fixes
None.Performance
None.Tests
hl validatetext and file inputs, JSON batch input, and a policy that disablessame_as_source.hl checkapplies policy severity (numbers_mismatchas an error) and still reports a missing target file alongsidenot_localized.- Policy files must include every check. Spelling is skipped when the dictionary is absent, and Hunspell word case is preserved.

