Gå til hovedinnhold

Whitespace Correct tool

The Whitespace Correct tool cleans up whitespace in target translations. It can collapse repeated spaces, trim leading and trailing whitespace, match the source's leading/trailing whitespace onto the target, remove zero-width characters, and remove whitespace after specific punctuation marks. The last is particularly useful when translating from a space-delimited language into a non-space-delimited one such as Chinese or Japanese.

The tool operates only on the target text, so a target locale is required, and only blocks that already have a target for that locale are processed.

IDwhitespace-correct
SourceBuilt-in
CategoryText processing
Cardinalitybilingual
Requirestarget-language
Tagstext-processing, l10n

Parameters

ParameterTypeDefaultDescription
correctCommabooleantrueKorriger mellomrom etter kommaer
correctExclamationbooleantrueKorriger mellomrom etter utropstegn
correctFullStopbooleantrueKorriger mellomrom etter punktum
correctQuestionbooleantrueKorriger mellomrom etter spørsmålstegn
includeHorizontalWSbooleantrueInkluder horisontale tabulatortegn i rettelser
includeVerticalWSbooleantrueInkluder vertikale mellomrom (linjeskift og vognretur) i rettelsene
matchSourceWhitespacebooleantrueKopier innledende/avsluttende mellomrom fra kilde til mål
normalizeSpacesbooleantrueSlå sammen flere mellomrom til ett enkelt mellomrom
removeZeroWidthCharsbooleantrueFjern mellomrom med nullbredde og sammenbindere
targetLocalestringMållokal for behandling
trimLeadingbooleanfalseFjern innledende mellomrom fra måltekst
trimTrailingbooleanfalseFjern etterfølgende mellomrom fra målteksten

Configure it live

Configuration
Loading form…

Examples

Normalize spacing for a locale

Apply the default whitespace cleanup to a target.

targetLocale: fr

Tidy CJK punctuation spacing

Remove spaces after punctuation for a non-space-delimited target.

targetLocale: zh-Hans
correctFullStop: true
correctComma: true

Processing notes

  • Operates on the target text only; a target locale is required and only existing targets are processed.

  • Punctuation correction removes the whitespace that immediately follows each enabled punctuation mark, limited to the included whitespace types.

← Back to the Tool Reference