Closed Bug 934726 Opened 11 years ago Closed 10 years ago

Use CustomEvent in l10n.js

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(3 files, 2 obsolete files)

That's an offspring of bug 914414.

We want to use CustomEvent but that requires changes to bto code. We'll deal with this followup bug.
Depends on: 914414
Assignee: nobody → gandalf
OS: Mac OS X → All
Hardware: x86 → All
Component: Gaia → Gaia::L10n
Attached patch patch, gaia part (obsolete) — Splinter Review
Attachment #8404204 - Flags: review?(stas)
Attached patch patch, l10n part (obsolete) — Splinter Review
Attachment #8404205 - Flags: review?(stas)
Comment on attachment 8404205 [details] [diff] [review]
patch, l10n part

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

::: bindings/l20n/runtime.js
@@ +221,5 @@
> +    'detail': {
> +      'language': this.ctx.supportedLocales[0]
> +    }
> +  });
> +  document.dispatchEvent(event);

Changing the origin of the dispatched event will break all the apps that use window.addEventListener('localized'), won't it?

Should we keep window for now and file a follow-up to change it later across all the apps (and their tests!)?j
Attachment #8404205 - Flags: review?(stas) → review-
You're right!

I'm going to postpone updating this patch until bug 994459 is fixed. It seems that we may stop relying on this in bto which will make things simpler.
Attached patch patch, l10n partSplinter Review
Updated patch. dispatch on window.
Attachment #8404205 - Attachment is obsolete: true
Attachment #8405059 - Flags: review?(stas)
Attached patch patch, gaia partSplinter Review
Updated patch.
Attachment #8404204 - Attachment is obsolete: true
Attachment #8404204 - Flags: review?(stas)
Attachment #8405060 - Flags: review?(stas)
Attachment #8405060 - Flags: review?(stas) → review+
Attachment #8405059 - Flags: review?(stas) → review+
Attached file pull request
I'll wait for travis and push it if the tests pass.
https://github.com/mozilla-b2g/gaia/commit/f84f6232821e42bd425684a7de27a4a2b505843f
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: