Closed Bug 293327 Opened 20 years ago Closed 20 years ago

[10.4] zh-Hans prevents setting accept-language header to system languages

Categories

(Camino Graveyard :: OS Integration, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lernean.hydra, Assigned: mozilla)

References

Details

Attachments

(1 file)

On launch of Camino on a clean 10.4 install I get the console message 'Unable to
set languages - language 'zh-Hans' not a valid ISO language identifier'
IIRC, Bruce did the work to implement the accept-language stuff.
Yes. The method we use for identifying valid ISO language identifiers is that
they must be of the form xx[-xx]. It looks like you've found a case that shows
we need a more complex matching algorithm.

Reporter: Can you try setting the pref camino.accept_languages in your user
prefs file to the language string you would like Camino to send, including
"zh-Hans". If this results in the web experience you expect I will update
Camino's auto-detection code to accept the form xx[-(x){2,8}].
Assignee: pinkerton → Bruce.Davidson
Having just enabled all the Chinese-looking languages I can find on my system I
get "ja" (oops - obviously that wasn't a chinese-looking language), "zh-cn" and
"zh-tw" as the languages, all of which we accept.

Reporter: Are you using a system you upgraded from 10.1? If so can you try
disabling the "zh-Hans" language in system prefs and then re-enabling it. We've
had a problem with European languages where systems upgraded from 10.1 reported
a descriptive form rather than two letter codes, however I'm not sure if what
you're seeing is the same problem.

Also could you post a screenshot of this languages option in system preferences,
so we can try enabling it on our systems.
(In reply to comment #3)
> Reporter: Are you using a system you upgraded from 10.1?

No. Clean install meaning erase install without bringing preferences over.
Because it was a clean install with default languages I thought it should be
reported as a bug.

> Also could you post a screenshot of this languages option in system preferences,
> so we can try enabling it on our systems.

I already changed my languages from the default because I don't use any Chinese
languages and wanted my system settings to be used for Camino. You should be
able to reproduce with a clean install.

Looks like for language codes in 10.4, Apple switched to "the new system" that's
being proposed (at least for Simp and Trad Chinese; I'm not on 10.4 so I can't
tell what others might have changed).

See, e.g., http://www.iana.org/assignments/lang-tags/zh-Hans-SG
http://www.iana.org/assignments/lang-tags/zh-Hans and
http://www.w3.org/International/tutorials/tutorial-lang/

(Not sure if Gfx:Mac handles the intended results of these new codes right,
based on the testpage linked from the W3C article, but that's another bug...)
*** Bug 294496 has been marked as a duplicate of this bug. ***
Summary: zh-Hans prevents setting accept-language header to system languages → [10.4] zh-Hans prevents setting accept-language header to system languages
Any progress here?
Attached patch Proposed patchSplinter Review
Proposed patch to allow secondary subtags between 2 and 8 characters long, as
per RFC 3066 et al.
Attachment #185348 - Flags: review?(sfraser_bugs)
Status: NEW → ASSIGNED
Attachment #185348 - Flags: review?(sfraser_bugs) → review+
Attachment #185348 - Flags: superreview?(pinkerton)
Attachment #185348 - Flags: review+
Attachment #185348 - Flags: superreview?(pinkerton) → superreview+
sr=pink. landed.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: