Read the statement by Michael Teeuw here.
[Proposal] Enhanced Translator
-
@bkeyport
Thanks.
Intl
spec is not completed yet perfectly.weekData
by locale is STAGE3 now, waiting for STAGE4(release). It has not been implemented in all environments at this moment. (But V8 has that feature with--harmony_intl_locale_info
. In the case of Chrome, it’s in developer trial, shipped since Chrome92. It will be released publicly soon.)Anyway, it will be used like this after public release;
let he = new Intl.Locale("he") he.weekInfo // {firstDay: 7, weekendStart: 5, weekendEnd: 6, minimalDays: 1} let enGB = new Intl.Locale("en-GB") enGB.weekInfo // {firstDay: 1, weekendStart: 6, weekendEnd: 7, minimalDays: 4}
At that time, we can use this feature for our Translator or calendar module also. We can deprecate
momentJS
or other dependencies. -
@mmrize I see no reason why it should not be a part of the core project.
But I don’t know if @MichMich is very present here, I tagged him now so he will hopefully read this thread because he has to decide if he wants it in the core project.
The e2e tests are a mess and there is already an issue to replace them (or at least a part of them).
-
@mmrize So, let me get this straight, we’re getting international support within vanilla JS?
-
@karsten13 someone would need to submit a PR for him to consider
-
@bkeyport said in [Proposal] Enhanced Translator:
So, let me get this straight, we’re getting international support within vanilla JS?
Well, it’s not about a matter of using Vanilla JS or not. But briefly answered, “possible”.
The main point of this project is;
“Give more freedom to the translation providers and Reduce the burden from the module developers.”
This will not become the alternative of “momentJS”. The main algorithm for WHAT TO SHOW still should be done in the module. But the translation provider could have more freedom for HOW TO SHOW under specific language and locale. -
@karsten13
I’ll make a PR in a few days. I just need some assurances. :) -
@mmrize there are no ‘assurances’
the team will review the submission.
may ask for changes, may reject it. -
@mmrize Gotcha. Cool.