• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

[Proposal] Enhanced Translator

Scheduled Pinned Locked Moved Feature Requests
10 Posts 4 Posters 884 Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    BKeyport Module Developer
    last edited by Sep 7, 2021, 11:06 PM

    I love this idea! Could we include other localization as well, such as week start (Sunday start, Monday Start, Saturday start), etc.

    The "E" in "Javascript" stands for "Easy"

    M 1 Reply Last reply Sep 8, 2021, 6:40 AM Reply Quote 1
    • M Offline
      MMRIZE @BKeyport
      last edited by MMRIZE Sep 8, 2021, 6:41 AM Sep 8, 2021, 6:40 AM

      @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.

      K B 2 Replies Last reply Sep 9, 2021, 8:29 PM Reply Quote 0
      • K Offline
        karsten13 @MMRIZE
        last edited by Sep 9, 2021, 8:29 PM

        @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).

        S M 2 Replies Last reply Sep 9, 2021, 8:57 PM Reply Quote 0
        • B Offline
          BKeyport Module Developer @MMRIZE
          last edited by Sep 9, 2021, 8:48 PM

          @mmrize So, let me get this straight, we’re getting international support within vanilla JS?

          The "E" in "Javascript" stands for "Easy"

          M 1 Reply Last reply Sep 10, 2021, 7:00 AM Reply Quote 0
          • S Offline
            sdetweil @karsten13
            last edited by Sep 9, 2021, 8:57 PM

            @karsten13 someone would need to submit a PR for him to consider

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • M Offline
              MMRIZE @BKeyport
              last edited by MMRIZE Sep 10, 2021, 7:11 AM Sep 10, 2021, 7:00 AM

              @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.

              B 1 Reply Last reply Sep 10, 2021, 7:29 PM Reply Quote 0
              • M Offline
                MMRIZE @karsten13
                last edited by Sep 10, 2021, 7:04 AM

                @karsten13
                I’ll make a PR in a few days. I just need some assurances. :)

                S 1 Reply Last reply Sep 10, 2021, 4:01 PM Reply Quote 0
                • S Offline
                  sdetweil @MMRIZE
                  last edited by Sep 10, 2021, 4:01 PM

                  @mmrize there are no ‘assurances’

                  the team will review the submission.
                  may ask for changes, may reject it.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    BKeyport Module Developer @MMRIZE
                    last edited by Sep 10, 2021, 7:29 PM

                    @mmrize Gotcha. Cool.

                    The "E" in "Javascript" stands for "Easy"

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      6/10
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy