language-tags icon indicating copy to clipboard operation
language-tags copied to clipboard

Some of the official examples are considered invalid

Open LinusU opened this issue 8 years ago • 2 comments

It seems like the following language tags, picked right from Appendix A of bcp47, isn't considered valid. Is this a bug?

[
  'i-enochian',
  'sl-rozaj-biske',
  'x-whatever',
  'qaa-Qaaa-QM-x-southern',
  'de-Qaaa',
  'sr-Latn-QM',
  'sr-Qaaa-RS'
]

LinusU avatar Mar 01 '17 14:03 LinusU

Hi Linus, thanks for reporting this.

The tag 'i-enouchian' is deprecated, so:

tags('i-enochian').errors()[0].message;

Will give you: 'The tag \'i-enochian\' is deprecated.'

There's a spec question here: should a deprecated grandfathered tag be considered valid or invalid?

For all the others, those tags are valid according to the spec, so I guess we need to make some fixes to the parser.

mattcg avatar Mar 04 '17 11:03 mattcg