Opened 6 years ago

Closed 6 years ago

#8828 closed enhancement (fixed)

Recognize other subtags in language tags

Reported by: dcf Owned by: dcf
Priority: Low Milestone:
Component: Archived/Flashproxy Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The badge's lang parameter currently understands exactly the codes en, de, and ru. If you try lang=en-US, it won't work. We should try looking up the whole string first, and if that fails, apply the regex /(\w+\)/ and look that up.

https://en.wikipedia.org/wiki/IETF_language_tag#Syntax_of_language_tags

Child Tickets

Attachments (1)

0001-Recognize-other-subtags-in-language-tags.patch (1.1 KB) - added by arlolra 6 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by dcf

en-US is a bad example because English is the default; think of de-DE instead.

The regex in the description got mangled; it should be /^(\w+)/.

comment:2 Changed 6 years ago by arlolra

Status: newneeds_review

Please see the attached patch.

comment:3 Changed 6 years ago by dcf

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.