Trailing Whitespace Check
The trailing whitespace check catches target strings where ending spaces or tabs no longer match the source string.
Examples
{
"form.nameLabel": "Name: ",
"plain.signature": "Regards,
"
}{
"form.nameLabel": "名前:",
"plain.signature": "よろしくお願いします。
"
}form.nameLabel: trailing space removed plain.signature: extra trailing space after newline
A label designed for concatenation can render as 名前:John instead of 名前: John; plain text output can gain invisible noise.
What LocaleQA checks
LocaleQA compares the trailing whitespace at the end of matching source and target strings. It looks for spaces and tabs that were removed, added, or changed during localization.
Trailing spaces are hard to catch by eye because many editors hide them. They still matter in concatenated labels, plain text emails, CLI output, generated files, and tests that compare exact strings.
What appears in the report
The report shows the JSON path and the source-target whitespace difference. The finding is deterministic: the same source and target values produce the same result every time.
The report does not rewrite the string or normalize whitespace. The team can decide whether to restore the source spacing, update the source text, or mark the difference as intentional.
When to keep or skip this check
Some products intentionally remove trailing spaces when translating into languages that do not use the same concatenation pattern. Some teams also standardize files to avoid trailing whitespace entirely.
Disable this rule for a scan when the project deliberately rewrites spacing conventions or when trailing spaces in source are known legacy noise. Keep it enabled for exact-output strings, emails, and UI labels assembled from multiple pieces.
How to use the finding
LocaleQA reports the affected JSON path, the source and target values involved, and the rule that triggered the finding. Developers, localization PMs, vendors, and QA reviewers can use that as a specific file-level item to fix, approve, or discuss before release.
Some findings are valid exceptions. A migration file, documented style choice, or locale-specific convention may explain the difference. In those cases, teams can leave the string as-is or disable the check for that scan.
LocaleQA is JSON file QA. It does not judge wording or rewrite translations; it surfaces the file issue so the responsible owner can decide the right fix.