WarUI

Locale-aware boolean text parsing

GRID-A24-F24P2beyond-baselinePlanned

Converts typed or pasted text into boolean values using words from the active locale, so 'sí', 's' and 'no' in Spanish, or 'yes', 'y' and 'no' in English, together with 'true', 'false', '1' and '0', produce true or false instead of a validation error. The vocabulary comes from the string catalog and can be extended per grid or per column. This capability exists in vue-editable-grid (https://github.com/eledwinn/vue-e…

Planned. This page shows the specification from issue #204. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A users grid with a boolean Active column and a paste box preloaded with mixed values.

Expected behavior

With locale es, 'Sí', 'si', 'S' and '1' become true and 'No', 'n' and '0' become false. Switching the locale changes which words are accepted. Unknown words such as 'maybe' are rejected and listed in the paste report.

Planned API surface

localecatalog.boolean.trueWordscatalog.boolean.falseWordscolumns[].booleanParse { trueWords, falseWords, caseSensitive, accentSensitive }parseBoolean(text, locale)

Acceptance criteria

  • Each built-in locale ships true and false word lists, and 'true', 'false', '1' and '0' are always accepted. (pending)
  • Matching is case-insensitive and accent-insensitive by default, so 'si' equals 'sí'. (pending)
  • A word in both the true and false lists is a configuration error in dev mode. (pending)
  • Unknown words follow the typed paste validation mode (A12-F11) and are never coerced silently. (pending)
  • Typing into a boolean cell in text mode uses the same parser as paste. (pending)