Special code for casing of Irish text should be triggered in any document with lang=ga

RESOLVED FIXED in mozilla34

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: kscanne, Assigned: jfkthame)

Tracking

(Blocks: 1 bug)

unspecified
mozilla34
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
I've been testing the resolution of bug 1014639 (which is now in our Aurora builds), and the special casing rules work perfectly.  This brings me great joy.

I noticed however that the rules are only triggered when a lang attribute matches "ga-ie", and not simply "ga" which is the code one would typically expect in Irish language documents.
(Assignee)

Comment 1

4 years ago
Hmm, you're right, this should have been done for plain "ga".

Actually, this highlights a wider problem, in that we won't currently apply the proper casing rules for other languages if the content is tagged with a lang attribute that *does* include a region subtag, such as "tr-TR" or "nl-NL", etc.

In general, I think we should ignore the region or other subtags, and base the behavior here just on the primary language subtag (unless there's specific, different behavior for a particular region -- but we don't currently have any examples of this).
Assignee: nobody → jfkthame
OS: Mac OS X → All
Hardware: x86 → All
(Assignee)

Comment 2

4 years ago
Created attachment 8466990 [details] [diff] [review]
ignore region (or other) subtags when checking for language-specific casing behavior.

This should enable us to support language tags with or without region subtags here. Simon, if you agree this is the right behavior to implement, I'll add a couple of testcases.
Attachment #8466990 - Flags: review?(smontagu)
Blocks: 905381
Comment on attachment 8466990 [details] [diff] [review]
ignore region (or other) subtags when checking for language-specific casing behavior.

Review of attachment 8466990 [details] [diff] [review]:
-----------------------------------------------------------------

Seems reasonable (but it would be nice if we had a less ad-hoc way of parsing language tags. I suppose that is bug 556237, or bug 356038)
Attachment #8466990 - Flags: review?(smontagu) → review+
(Assignee)

Comment 4

4 years ago
Created attachment 8468404 [details] [diff] [review]
additional reftests to cover cases with and without region subtag.

This just duplicates a couple of our existing tests, and then varies the lang tag so that we're testing examples both with and without region subtags.
Attachment #8468404 - Flags: review?(smontagu)
Attachment #8468404 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/99e040a2e972
https://hg.mozilla.org/mozilla-central/rev/bf19c9da1518
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
(In reply to Simon Montagu :smontagu from comment #3)
> Comment on attachment 8466990 [details] [diff] [review]
> ignore region (or other) subtags when checking for language-specific casing
> behavior.
> 
> Review of attachment 8466990 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Seems reasonable (but it would be nice if we had a less ad-hoc way of
> parsing language tags. I suppose that is bug 556237, or bug 356038)

(Sorry, I'm just seeing this now.)

While we wait on true BCP 47 support, this would be a lot better if it recursively truncated at the last '-' instead of the first one (which is what I understand this to be doing). That way you can support all possible subtag combinations.
You need to log in before you can comment on or make changes to this bug.