Re: Questions about bindings for L20n

2016-06-15 Thread zbraniecki
On Tuesday, June 14, 2016 at 11:51:16 AM UTC+1, Joe Walker wrote: > I don't think you can say "It's sync unless in which case it's > async". > If that's that case then from the API consumers point of view, then (deep > voodoo withstanding) it's async. As weird as it sounds, I believe that you act

Re: Questions about bindings for L20n

2016-06-14 Thread Joe Walker
On Tue, Jun 14, 2016 at 7:00 AM Axel Hecht wrote: > On 14/06/16 05:06, zbranie...@mozilla.com wrote: > > On Monday, June 13, 2016 at 9:39:32 AM UTC+1, Gijs Kruitbosch wrote: > > > Separately, the documentation put forth so far seems to indicate that > >> the localization itself is also async, on

Re: Questions about bindings for L20n

2016-06-13 Thread Axel Hecht
On 14/06/16 05:06, zbranie...@mozilla.com wrote: On Monday, June 13, 2016 at 9:39:32 AM UTC+1, Gijs Kruitbosch wrote: > Separately, the documentation put forth so far seems to indicate that the localization itself is also async, on top of the asyncness of the mutationobserver approach, and that

Re: Questions about bindings for L20n

2016-06-13 Thread wax miguel
looking forward! thanks! On 14/06/2016, zbranie...@mozilla.com wrote: > On Monday, June 13, 2016 at 9:39:32 AM UTC+1, Gijs Kruitbosch wrote: > > Separately, the documentation put forth so far seems to indicate that >> the localization itself is also async, on top of the asyncness of the >> mutat

Re: Questions about bindings for L20n

2016-06-13 Thread zbraniecki
On Monday, June 13, 2016 at 9:39:32 AM UTC+1, Gijs Kruitbosch wrote: > Separately, the documentation put forth so far seems to indicate that > the localization itself is also async, on top of the asyncness of the > mutationobserver approach, and that could potentially result in flashes > of unl

Re: Questions about bindings for L20n

2016-06-13 Thread Gijs Kruitbosch
On 10/06/2016 23:01, zbranie...@mozilla.com wrote: On Friday, June 10, 2016 at 10:37:04 AM UTC-7, Gijs Kruitbosch wrote: This async-ness will not be acceptable in all circumstances. As a somewhat random example: how would we localize the 'slow script' dialog, for which we have to pause script a

Re: Questions about bindings for L20n

2016-06-13 Thread Gijs Kruitbosch
On 10/06/2016 22:56, smaug wrote: , and dtd localization in XHTML is currently synchronous on parsing. That seems like a large change that will cause a lot of problems relating to reflow / flashes of unlocalized content Why would it cause reflows or flashes of unlocalized content? AIUI, if I

Re: Questions about bindings for L20n

2016-06-10 Thread zbraniecki
On Friday, June 10, 2016 at 10:37:04 AM UTC-7, Gijs Kruitbosch wrote: > This async-ness will not be acceptable in all circumstances. As a > somewhat random example: how would we localize the 'slow script' dialog, > for which we have to pause script and then show the dialog? Agree, there are ex

Re: Questions about bindings for L20n

2016-06-10 Thread smaug
On 06/10/2016 12:49 PM, Gijs Kruitbosch wrote: On 10/06/2016 09:51, zbranie...@mozilla.com wrote: While working on the new localization API (See Intent to Implement post from yesterday), we're developing bindings into UI languages used by Firefox and we have some decisions to make that could be

Re: Questions about bindings for L20n

2016-06-10 Thread zbraniecki
Hi Gijs, On Friday, June 10, 2016 at 2:49:16 AM UTC-7, Gijs Kruitbosch wrote: > Mutation observers or mutation events? How do you decide which elements > you observe? Observing the entire DOM tree seems like it'd likely be > terrible for performance once we start mutating the DOM. Have you done

Re: Questions about bindings for L20n

2016-06-10 Thread Gijs Kruitbosch
On 10/06/2016 17:26, smalolep...@mozilla.com wrote: These are all valid concerns. The API is async by design, which allow us to also do runtime fallback on missing or broken translations. document.l10n.get('main').formatValue('hello', { user: '…' }).then(hello => …); This async-ness wil

Re: Questions about bindings for L20n

2016-06-10 Thread smalolepszy
Thanks for a lot of great feedback, Gijs! W dniu piątek, 10 czerwca 2016 11:49:16 UTC+2 użytkownik Gijs Kruitbosch napisał: > Mutation observers or mutation events? How do you decide which elements > you observe? Observing the entire DOM tree seems like it'd likely be > terrible for performanc

Re: Questions about bindings for L20n

2016-06-10 Thread Neil Deakin
On 2016-06-10 4:51 AM, zbranie...@mozilla.com wrote: While working on the new localization API (See Intent to Implement post from yesterday), we're developing bindings into UI languages used by Firefox and we have some decisions to make that could be better answered by this group. The general

Re: Questions about bindings for L20n

2016-06-10 Thread Gijs Kruitbosch
On 10/06/2016 09:51, zbranie...@mozilla.com wrote: While working on the new localization API (See Intent to Implement post from yesterday), we're developing bindings into UI languages used by Firefox and we have some decisions to make that could be better answered by this group. The general API

Questions about bindings for L20n

2016-06-10 Thread zbraniecki
While working on the new localization API (See Intent to Implement post from yesterday), we're developing bindings into UI languages used by Firefox and we have some decisions to make that could be better answered by this group. The general API is declarative and DOM-based. Instead of forcing d