Closed Bug 897026 Opened 12 years ago Closed 12 years ago

Locale file inclusion not working over file:///

Categories

(L20n :: HTML Bindings, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: zbraniecki)

References

Details

Attachments

(1 file)

Example code <script type="application/l20n" src="locales/it.lol"></script> This works if the page is loaded in a Web server (http), but doesn't work if the page is opened locally over file:///
Attached patch patchSplinter Review
patch
Attachment #779748 - Flags: review?(francesco.lodolo)
Component: General → HTML Bindings
Comment on attachment 779748 [details] [diff] [review] patch Review of attachment 779748 [details] [diff] [review]: ----------------------------------------------------------------- Patch works as expected, but there's a similar check on a following line exports.loadSync = function loadSync(url) ... if (xhr.status == 200) {
Attachment #779748 - Flags: review?(francesco.lodolo) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
So it turns out this doesn't work in Chrome, because Chrome strictly forbids cross-domain requests. You have to either run your L20n project on localhost, or launch Chrome with --disable-web-security.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: