respec icon indicating copy to clipboard operation
respec copied to clipboard

Checks for privacy and security sections don't work if lang is set to en-US

Open jnurthen opened this issue 3 years ago • 1 comments

Description of problem

Checks for privacy and security sections don't work if lang is set to en-US. Changing the Document language to en correctly shows the warnings but having the lang set to en-US does not.

Document languages are recommended to be as specific as possible to en-US is correct.

URL to affected spec or repo:

https://w3c.github.io/aria/

What happened (e.g., it crashed)?:

Gives console warning Missing localization strings for en-US.

Expected behavior (e.g., it shouldn't crash):

Should complain about no separate security / privacy sections

jnurthen avatar May 11 '22 23:05 jnurthen

The reason may be because ReSpecs's language matching method is relatively simple. Ideally, the algorithm in BCP 47 should be used.

See https://github.com/wooorm/bcp-47-match for an example.

xfq avatar May 17 '22 02:05 xfq